code wiki / _hdl_build / nx_surrogate_satisfy_gate.nx

nx_surrogate_satisfy_gate.nx

buildroot/runtime/_hdl_build/nx_surrogate_satisfy_gate.nx

4823 B69 linesdepth 7pulls 26 transitivereach 0 importersview sourcekind gate/prooftopic surrogate
docsdependenciesstructsconstsfunctions

dependencies 5 imports · 0 importers

nx_gate_gn.nx nx_gate_base.nx nx_syscalls.nx nx_js_eval.nx nx_surrogate.nx nx_surrogate_satisfy_gate.nx

imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.nxnx_js_eval.nxnx_surrogate.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gw sys_write sys_mmap sg_new sys_mmap ↻ sg_seed sg_addc sg_add sg_slen sg_build_preamble sg_puts grow gw ↻ satisfy sys_mmap ↻ js_pending_url ev_str_bytes str_flatten ev_str_new nx_pool_alloc nx_pool_alloc ↻ ev_str_len contains gsl gn sys_exit

structs

none

consts

none

functions

11func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw("
called by 1: main calls 1: gw
13func gsl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: satisfy calls 1: gsl
14func contains(hay: *u8, hl: i64, needle: *u8) -> i64 { let nl: i64=gsl(needle); if nl>hl {return 0} var i: i64=0; let last: i64=hl-nl; while i<=last { var j: i64=0; var m: i64=1; while j<nl { if (hay[i+j]&0xff)!=(needle[j]&0xff){m=0;j=nl} else {j=j+1} } if m==1 {return 1} i=i+1 } return 0 }
17func satisfy(preamble: *u8, plen: i64, page: *u8, want: *u8) -> i64
34func main() -> i64