code wiki / _hdl_build / nx_carflip_lib.nx

nx_carflip_lib.nx

buildroot/runtime/_hdl_build/nx_carflip_lib.nx

3097 B91 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_carflip_lib.nx -- shared Car-Flip lane library: integer parse/print + the P10-gated deal calc. Extracted from runtime/nx_carflip_roi.nx (v1 stays FROZEN as the CLI equivalence ORACLE -- the sts_load_slow precedent: same 10 figures MUST yield the same verdict). DRY home for the lane's organs (deal scorer now; R1 complaints-ingest + R7 taxonomy organs next). license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_carflip_lib.nx nx_carflip_deal.nx

imports: nx_syscalls.nx

imported by: nx_carflip_deal.nx

structs

none

consts

8const CF_BPS: i64 = 10000 // ROI reported in basis points (10000 = 100%)

functions

10func cf_puts(s: *u8) -> i64
called by 3: maincf_kvcf_score calls 1: sys_write
16func cf_atoi(s: *u8) -> i64
called by 1: main
32func cf_putn(n: i64) -> i64
called by 1: cf_kv calls 2: sys_writesys_mmap
57func cf_kv(key: *u8, val: i64) -> i64
called by 2: maincf_score calls 2: cf_putscf_putn
67func cf_score(asking: i64, resale_typ: i64, resale_low: i64, repair_typ: i64, repair_high: i64, recon: i64, transport: i64, fees: i64, sell_cost: i64, holding: i64) -> i64
called by 1: main calls 2: cf_kvcf_puts