interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / src / omega_api_decl.h

1534 lines · 110393 bytes Raw Blame History
1/* Generated by omega-bridge src/native.om: the C API of the ABI v2 units in libomega_native
2 * (docs/NATIVE-ABI.md, ABI v2), declarations only (output apih). The definitions are the generated C
3 * file of output apic: each calls omega2_<name> and calls abort() on a nonzero status. Including this
4 * header references no C library function. Regenerate it; do not edit it. */
5#ifndef OMEGA_API_DECL_H
6#define OMEGA_API_DECL_H
7#include <stddef.h>
8#include <stdint.h>
9#include "omega_native.h"
10#ifdef __cplusplus
11#define OMBR_ASSERT static_assert
12extern "C" {
13#else
14#define OMBR_ASSERT _Static_assert
15#endif
16/* export fn arboris_plan_arena m edit ulong 16 budget ulong page ulong offsets edit ulong 6 to ulong */
17uint64_t arboris_plan_arena(uint64_t o_m[16], uint64_t o_budget, uint64_t o_page, uint64_t o_offsets[6]);
18/* export fn arboris_check_csr m view ulong 16 data view uint * to ulong */
19uint64_t arboris_check_csr(const uint64_t o_m[16], const uint32_t *o_data, size_t o_data_len);
20/* export fn arboris_plan_sparse m edit ulong 16 budget ulong page ulong offsets edit ulong 6 to ulong */
21uint64_t arboris_plan_sparse(uint64_t o_m[16], uint64_t o_budget, uint64_t o_page, uint64_t o_offsets[6]);
22/* export fn arboris_validate_in_csr hdr view ulong 16 csr view uint * to ulong */
23uint64_t arboris_validate_in_csr(const uint64_t o_hdr[16], const uint32_t *o_csr, size_t o_csr_len);
24/* export fn arboris_compile_in_csr r view uint * hdr view ulong 16 csr edit uint * to ulong */
25uint64_t arboris_compile_in_csr(const uint32_t *o_r, size_t o_r_len, const uint64_t o_hdr[16], uint32_t *o_csr, size_t o_csr_len);
26/* export fn arboris_load_records r view uint * topo edit uint * weights edit uint * to ulong */
27uint64_t arboris_load_records(const uint32_t *o_r, size_t o_r_len, uint32_t *o_topo, size_t o_topo_len, uint32_t *o_weights, size_t o_weights_len);
28/* export fn arboris_topology_digest topo view uint * weights view uint * digest edit uchar 32 to ulong */
29uint64_t arboris_topology_digest(const uint32_t *o_topo, size_t o_topo_len, const uint32_t *o_weights, size_t o_weights_len, uint8_t o_digest[32]);
30/* export fn arboris_spread_step topo view uint * weights view uint * state edit uint * to ulong */
31uint64_t arboris_spread_step(const uint32_t *o_topo, size_t o_topo_len, const uint32_t *o_weights, size_t o_weights_len, uint32_t *o_state, size_t o_state_len);
32/* export fn arboris_relax_step topo view uint * weights view uint * state edit uint * to ulong */
33uint64_t arboris_relax_step(const uint32_t *o_topo, size_t o_topo_len, const uint32_t *o_weights, size_t o_weights_len, uint32_t *o_state, size_t o_state_len);
34/* export fn arboris_spread_plan hdr edit ulong 16 budget ulong page ulong offsets edit ulong 5 mapped_sizes edit ulong 5 to ulong */
35uint64_t arboris_spread_plan(uint64_t o_hdr[16], uint64_t o_budget, uint64_t o_page, uint64_t o_offsets[5], uint64_t o_mapped_sizes[5]);
36/* export fn arboris_spread_verify_header hdr view ulong 16 budget ulong page ulong to ulong */
37uint64_t arboris_spread_verify_header(const uint64_t o_hdr[16], uint64_t o_budget, uint64_t o_page);
38/* export fn arboris_spread_cpu_hop hdr edit ulong 16 csr view uint * state edit uint * receipt edit ulong 8 to ulong */
39uint64_t arboris_spread_cpu_hop(uint64_t o_hdr[16], const uint32_t *o_csr, size_t o_csr_len, uint32_t *o_state, size_t o_state_len, uint64_t o_receipt[8]);
40/* export fn arboris_spread_cpu_run hdr edit ulong 16 csr view uint * state edit uint * receipt edit ulong 8 to ulong */
41uint64_t arboris_spread_cpu_run(uint64_t o_hdr[16], const uint32_t *o_csr, size_t o_csr_len, uint32_t *o_state, size_t o_state_len, uint64_t o_receipt[8]);
42/* export fn bw_arboris_spread_emit_mode0 code edit uchar 16384 to ulong */
43uint64_t bw_arboris_spread_emit_mode0(uint8_t o_code[16384]);
44/* export fn bw_arboris_spread_emit_mode1 code edit uchar 16384 to ulong */
45uint64_t bw_arboris_spread_emit_mode1(uint8_t o_code[16384]);
46/* export fn bw_arboris_spread_emit_mode2 code edit uchar 16384 to ulong */
47uint64_t bw_arboris_spread_emit_mode2(uint8_t o_code[16384]);
48/* export fn bw_arboris_spread_emit_mode3 code edit uchar 16384 to ulong */
49uint64_t bw_arboris_spread_emit_mode3(uint8_t o_code[16384]);
50/* export fn bw_arboris_spread_pack_qmd hdr view ulong 16 vas view ulong 10 driver view uint 224 bank edit uint 240 q0 edit uint 96 q1 edit uint 96 to ulong */
51uint64_t bw_arboris_spread_pack_qmd(const uint64_t o_hdr[16], const uint64_t o_vas[10], const uint32_t o_driver[224], uint32_t o_bank[240], uint32_t o_q0[96], uint32_t o_q1[96]);
52/* export fn arboris_gated_tick m view ulong 16 offsets view ulong 6 arena edit ushort * page ulong to ulong */
53uint64_t arboris_gated_tick(const uint64_t o_m[16], const uint64_t o_offsets[6], uint16_t *o_arena, size_t o_arena_len, uint64_t o_page);
54/* export fn arboris_pack_gated m view ulong 16 offsets view ulong 6 a edit ushort * limits edit ulong 2 to ulong */
55uint64_t arboris_pack_gated(const uint64_t o_m[16], const uint64_t o_offsets[6], uint16_t *o_a, size_t o_a_len, uint64_t o_limits[2]);
56/* export fn arboris_emit_spread n ulong code edit uchar 16384 to ulong */
57uint64_t arboris_emit_spread(uint64_t o_n, uint8_t o_code[16384]);
58/* export fn arboris_emit_relax n ulong code edit uchar 16384 to ulong */
59uint64_t arboris_emit_relax(uint64_t o_n, uint8_t o_code[16384]);
60/* export fn arboris_emit_gated n ulong d ulong standard ulong code edit uchar 16384 to ulong */
61uint64_t arboris_emit_gated(uint64_t o_n, uint64_t o_d, uint64_t o_standard, uint8_t o_code[16384]);
62/* export fn arboris_wave_qmd shape view ulong 7 slots view ulong 20 driver view uint 224 bank edit uint 236 q0 edit uint 96 q1 edit uint 96 to ulong */
63uint64_t arboris_wave_qmd(const uint64_t o_shape[7], const uint64_t o_slots[20], const uint32_t o_driver[224], uint32_t o_bank[236], uint32_t o_q0[96], uint32_t o_q1[96]);
64/* export fn arboris_relax_qmd shape view ulong 7 slots view ulong 20 driver view uint 224 bank edit uint 236 q0 edit uint 96 q1 edit uint 96 to ulong */
65uint64_t arboris_relax_qmd(const uint64_t o_shape[7], const uint64_t o_slots[20], const uint32_t o_driver[224], uint32_t o_bank[236], uint32_t o_q0[96], uint32_t o_q1[96]);
66/* export fn hz_chk c view uchar 32768 lc ulong m edit ulong 3203584 to long */
67int64_t hz_chk(const uint8_t o_c[32768], uint64_t o_lc, uint64_t o_m[3203584]);
68#define SHA256_DIGEST_SIZE 32
69#define SHA256_BLOCK_SIZE 64
70typedef struct {
71 uint32_t state[8];
72 uint64_t count;
73 uint8_t buf[64];
74} sha256_ctx;
75OMBR_ASSERT(sizeof(sha256_ctx) == 104, "layout shactx size");
76OMBR_ASSERT(offsetof(sha256_ctx, state) == 0, "layout shactx field state");
77OMBR_ASSERT(offsetof(sha256_ctx, count) == 32, "layout shactx field count");
78OMBR_ASSERT(offsetof(sha256_ctx, buf) == 40, "layout shactx field buf");
79/* export fn sha256_init c edit shactx to void */
80void sha256_init(sha256_ctx *o_c);
81/* export fn sha256_update c edit shactx d view uchar * to void */
82void sha256_update(sha256_ctx *o_c, const uint8_t *o_d, size_t o_d_len);
83/* export fn sha256_final c edit shactx o out uchar 32 to void */
84void sha256_final(sha256_ctx *o_c, uint8_t o_o[32]);
85/* export fn sha256_hash d view uchar * o out uchar 32 to void */
86void sha256_hash(const uint8_t *o_d, size_t o_d_len, uint8_t o_o[32]);
87/* export fn a64addreg sf ulong rd ulong rn ulong rm ulong to long */
88int64_t a64addreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_rm);
89/* export fn a64subreg sf ulong rd ulong rn ulong rm ulong to long */
90int64_t a64subreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_rm);
91/* export fn a64mulreg sf ulong rd ulong rn ulong rm ulong to long */
92int64_t a64mulreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_rm);
93/* export fn a64andreg sf ulong rd ulong rn ulong rm ulong to long */
94int64_t a64andreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_rm);
95/* export fn a64orrreg sf ulong rd ulong rn ulong rm ulong to long */
96int64_t a64orrreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_rm);
97/* export fn a64eorreg sf ulong rd ulong rn ulong rm ulong to long */
98int64_t a64eorreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_rm);
99/* export fn a64movreg sf ulong rd ulong rm ulong to long */
100int64_t a64movreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rm);
101/* export fn a64movz sf ulong rd ulong imm ulong sh ulong to long */
102int64_t a64movz(uint64_t o_sf, uint64_t o_rd, uint64_t o_imm, uint64_t o_sh);
103/* export fn a64movk sf ulong rd ulong imm ulong sh ulong to long */
104int64_t a64movk(uint64_t o_sf, uint64_t o_rd, uint64_t o_imm, uint64_t o_sh);
105/* export fn a64ret to long */
106int64_t a64ret(void);
107/* export fn a64b imm long to long */
108int64_t a64b(int64_t o_imm);
109/* export fn a64bcond cond long imm long to long */
110int64_t a64bcond(int64_t o_cond, int64_t o_imm);
111/* export fn a64cbz sf ulong rt ulong imm long to long */
112int64_t a64cbz(uint64_t o_sf, uint64_t o_rt, int64_t o_imm);
113/* export fn a64cbnz sf ulong rt ulong imm long to long */
114int64_t a64cbnz(uint64_t o_sf, uint64_t o_rt, int64_t o_imm);
115/* export fn a64adr rd ulong imm long to long */
116int64_t a64adr(uint64_t o_rd, int64_t o_imm);
117/* export fn a64ldruoff sf ulong rt ulong rn ulong uo ulong to long */
118int64_t a64ldruoff(uint64_t o_sf, uint64_t o_rt, uint64_t o_rn, uint64_t o_uo);
119/* export fn a64struoff sf ulong rt ulong rn ulong uo ulong to long */
120int64_t a64struoff(uint64_t o_sf, uint64_t o_rt, uint64_t o_rn, uint64_t o_uo);
121/* export fn a64ldrbuoff rt ulong rn ulong uo ulong to long */
122int64_t a64ldrbuoff(uint64_t o_rt, uint64_t o_rn, uint64_t o_uo);
123/* export fn a64strbuoff rt ulong rn ulong uo ulong to long */
124int64_t a64strbuoff(uint64_t o_rt, uint64_t o_rn, uint64_t o_uo);
125/* export fn a64ldrpost rt ulong rn ulong imm long to long */
126int64_t a64ldrpost(uint64_t o_rt, uint64_t o_rn, int64_t o_imm);
127/* export fn a64strpost rt ulong rn ulong imm long to long */
128int64_t a64strpost(uint64_t o_rt, uint64_t o_rn, int64_t o_imm);
129/* export fn a64ldrxpost rt ulong rn ulong imm long to long */
130int64_t a64ldrxpost(uint64_t o_rt, uint64_t o_rn, int64_t o_imm);
131/* export fn a64strxpost rt ulong rn ulong imm long to long */
132int64_t a64strxpost(uint64_t o_rt, uint64_t o_rn, int64_t o_imm);
133/* export fn a64subsimm sf ulong rd ulong rn ulong imm ulong to long */
134int64_t a64subsimm(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_imm);
135/* export fn a64subsreg sf ulong rd ulong rn ulong rm ulong to long */
136int64_t a64subsreg(uint64_t o_sf, uint64_t o_rd, uint64_t o_rn, uint64_t o_rm);
137/* export fn a64put b edit uchar * st edit ulong 2 w long to long */
138int64_t a64put(uint8_t *o_b, size_t o_b_len, uint64_t o_st[2], int64_t o_w);
139/* export fn a64decode insn ulong dst edit ulong 9 to long */
140int64_t a64decode(uint64_t o_insn, uint64_t o_dst[9]);
141/* export fn a64validate code view uchar * n ulong msg edit uchar * ml ulong to long */
142int64_t a64validate(const uint8_t *o_code, size_t o_code_len, uint64_t o_n, uint8_t *o_msg, size_t o_msg_len, uint64_t o_ml);
143/* export fn om_canon_obj_ver kind ulong to ulong */
144uint64_t om_canon_obj_ver(uint64_t o_kind);
145/* export fn om_canon_chk_hdr ver ulong kind ulong to long */
146int64_t om_canon_chk_hdr(uint64_t o_ver, uint64_t o_kind);
147/* export fn om_canon_cmp_id a view uchar 32 b view uchar 32 to long */
148int64_t om_canon_cmp_id(const uint8_t o_a[32], const uint8_t o_b[32]);
149/* export fn om_canon_hex_id id view uchar 32 dst edit uchar 65 to void */
150void om_canon_hex_id(const uint8_t o_id[32], uint8_t o_dst[65]);
151/* export fn om_canon_parse_hex hx view uchar * n ulong dst edit uchar 32 to long */
152int64_t om_canon_parse_hex(const uint8_t *o_hx, size_t o_hx_len, uint64_t o_n, uint8_t o_dst[32]);
153/* export fn om_canon_write_hdr kind ulong dst edit uchar * mlen ulong to long */
154int64_t om_canon_write_hdr(uint64_t o_kind, uint8_t *o_dst, size_t o_dst_len, uint64_t o_mlen);
155/* export fn om_canon_write_u16be v ulong dst edit uchar * pos ulong mlen ulong to long */
156int64_t om_canon_write_u16be(uint64_t o_v, uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_mlen);
157/* export fn om_canon_write_u32be v ulong dst edit uchar * pos ulong mlen ulong to long */
158int64_t om_canon_write_u32be(uint64_t o_v, uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_mlen);
159/* export fn om_canon_sort_attr keys view uchar 2048 n ulong order edit ushort 32 to long */
160int64_t om_canon_sort_attr(const uint8_t o_keys[2048], uint64_t o_n, uint16_t o_order[32]);
161/* export fn om_canon_sort_rel kinds view ushort 64 targets view uchar 2048 n ulong order edit ushort 64 to long */
162int64_t om_canon_sort_rel(const uint16_t o_kinds[64], const uint8_t o_targets[2048], uint64_t o_n, uint16_t o_order[64]);
163/* export fn om_canon_sort_const meta view ushort 64 payloads view uchar 4096 n ulong order edit ushort 32 to long */
164int64_t om_canon_sort_const(const uint16_t o_meta[64], const uint8_t o_payloads[4096], uint64_t o_n, uint16_t o_order[32]);
165/* export fn om_val_kind kind ulong to long */
166int64_t om_val_kind(uint64_t o_kind);
167/* export fn om_val_rel_kind kind ulong to long */
168int64_t om_val_rel_kind(uint64_t o_kind);
169/* export fn om_val_const_kind kind ulong to long */
170int64_t om_val_const_kind(uint64_t o_kind);
171/* export fn om_val_type_fields tag ulong width ulong slen ulong to long */
172int64_t om_val_type_fields(uint64_t o_tag, uint64_t o_width, uint64_t o_slen);
173/* export fn om_val_val_bytes tag ulong width ulong blen ulong to long */
174int64_t om_val_val_bytes(uint64_t o_tag, uint64_t o_width, uint64_t o_blen);
175/* export fn om_val_op_fields opcode ulong overflow ulong to long */
176int64_t om_val_op_fields(uint64_t o_opcode, uint64_t o_overflow);
177/* export fn om_val_graph_count cnt ulong mcnt ulong to long */
178int64_t om_val_graph_count(uint64_t o_cnt, uint64_t o_mcnt);
179/* export fn om_val_find_cycle edges view ushort 32768 deg view ushort 256 n ulong info edit ulong 2 to long */
180int64_t om_val_find_cycle(const uint16_t o_edges[32768], const uint16_t o_deg[256], uint64_t o_n, uint64_t o_info[2]);
181/* export fn om_codec_hdr_enc cnt ulong dst edit uchar * mlen ulong to long */
182int64_t om_codec_hdr_enc(uint64_t o_cnt, uint8_t *o_dst, size_t o_dst_len, uint64_t o_mlen);
183/* export fn om_codec_hdr_dec buf view uchar * n ulong mobj ulong to long */
184int64_t om_codec_hdr_dec(const uint8_t *o_buf, size_t o_buf_len, uint64_t o_n, uint64_t o_mobj);
185/* export fn om_codec_u16_rd buf view uchar * pos ulong to ulong */
186uint64_t om_codec_u16_rd(const uint8_t *o_buf, size_t o_buf_len, uint64_t o_pos);
187/* export fn om_codec_u32_rd buf view uchar * pos ulong to ulong */
188uint64_t om_codec_u32_rd(const uint8_t *o_buf, size_t o_buf_len, uint64_t o_pos);
189/* export fn om_codec_obj_hdr_chk buf view uchar * pos ulong clen ulong to long */
190int64_t om_codec_obj_hdr_chk(const uint8_t *o_buf, size_t o_buf_len, uint64_t o_pos, uint64_t o_clen);
191/* export fn om_ver_v0_real prof ulong clen ulong mcode ulong hasid ulong to long */
192int64_t om_ver_v0_real(uint64_t o_prof, uint64_t o_clen, uint64_t o_mcode, uint64_t o_hasid);
193/* export fn om_ver_v1_ref a ulong b ulong c ulong to ulong */
194uint64_t om_ver_v1_ref(uint64_t o_a, uint64_t o_b, uint64_t o_c);
195/* export fn om_ver_v1_defvec idx ulong dst edit ulong 3 to long */
196int64_t om_ver_v1_defvec(uint64_t o_idx, uint64_t o_dst[3]);
197/* export fn om_ver_v2_eval op ulong width ulong a ulong b ulong to ulong */
198uint64_t om_ver_v2_eval(uint64_t o_op, uint64_t o_width, uint64_t o_a, uint64_t o_b);
199/* export fn om_ver_v2_props info edit ulong 4 to long */
200int64_t om_ver_v2_props(uint64_t o_info[4]);
201/* export fn bw_qmd0 q edit uint 96 qmd1_va ulong to ulong */
202uint64_t bw_qmd0(uint32_t o_q[96], uint64_t o_qmd1_va);
203/* export fn bw_qmd1 m view ulong 16 q edit uint 96 to ulong */
204uint64_t bw_qmd1(const uint64_t o_m[16], uint32_t o_q[96]);
205/* export fn bw_qmd_verify q view uint 96 to ulong */
206uint64_t bw_qmd_verify(const uint32_t o_q[96]);
207/* export fn bw_attn256_args s view ulong 16 args edit uint 25 to ulong */
208uint64_t bw_attn256_args(const uint64_t o_s[16], uint32_t o_args[25]);
209/* export fn bw_attn256_record s view ulong 16 slot view ulong 8 driver view uint 224 bank edit uint 249 q1 edit uint 96 q0 edit uint 96 to ulong */
210uint64_t bw_attn256_record(const uint64_t o_s[16], const uint64_t o_slot[8], const uint32_t o_driver[224], uint32_t o_bank[249], uint32_t o_q1[96], uint32_t o_q0[96]);
211/* export fn bw_sched_stalls ins edit ulong 8192 phys view ulong 256 bsz view ulong 256 n ulong to ulong */
212uint64_t bw_sched_stalls(uint64_t o_ins[8192], const uint64_t o_phys[256], const uint64_t o_bsz[256], uint64_t o_n);
213/* export fn bw_regalloc_solve cfg view ulong 4 vinfo view long 768 uinfo view ulong 32 res edit long 290 to ulong */
214uint64_t bw_regalloc_solve(const uint64_t o_cfg[4], const int64_t o_vinfo[768], const uint64_t o_uinfo[32], int64_t o_res[290]);
215/* export fn bw_encode_vecadd buf edit uchar 512 to ulong */
216uint64_t bw_encode_vecadd(uint8_t o_buf[512]);
217/* export fn bw_cmdlist_nop ins edit ulong 8192 meta edit ulong 512 to ulong */
218uint64_t bw_cmdlist_nop(uint64_t o_ins[8192], uint64_t o_meta[512]);
219/* export fn cg_matmul_tensor sp view ulong 12 ins edit ulong 8192 meta edit ulong 512 to ulong */
220uint64_t cg_matmul_tensor(const uint64_t o_sp[12], uint64_t o_ins[8192], uint64_t o_meta[512]);
221/* export fn cg_matmul_tensor_loop sp view ulong 12 ins edit ulong 8192 meta edit ulong 512 to ulong */
222uint64_t cg_matmul_tensor_loop(const uint64_t o_sp[12], uint64_t o_ins[8192], uint64_t o_meta[512]);
223/* export fn cg_matmul_frag sp view ulong 12 ins edit ulong 8192 meta edit ulong 512 to ulong */
224uint64_t cg_matmul_frag(const uint64_t o_sp[12], uint64_t o_ins[8192], uint64_t o_meta[512]);
225/* export fn cg_matmul_frag_block sp view ulong 12 ins edit ulong 8192 meta edit ulong 512 to ulong */
226uint64_t cg_matmul_frag_block(const uint64_t o_sp[12], uint64_t o_ins[8192], uint64_t o_meta[512]);
227/* export fn cg_matmul_frag_shape mt ulong nt ulong kp ulong res edit ulong 4 to ulong */
228uint64_t cg_matmul_frag_shape(uint64_t o_mt, uint64_t o_nt, uint64_t o_kp, uint64_t o_res[4]);
229/* export fn cg_matmul_i32 sp view ulong 12 ins edit ulong 8192 meta edit ulong 512 to ulong */
230uint64_t cg_matmul_i32(const uint64_t o_sp[12], uint64_t o_ins[8192], uint64_t o_meta[512]);
231/* export fn cg_gpu_gemm_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
232uint64_t cg_gpu_gemm_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
233/* export fn cg_gpu_gemm_plan sp view ulong 10 res edit ulong 18 to ulong */
234uint64_t cg_gpu_gemm_plan(const uint64_t o_sp[10], uint64_t o_res[18]);
235/* export fn cg_gpu_attn_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
236uint64_t cg_gpu_attn_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
237/* export fn q38_plan_layer cfg view ulong 8 dst edit uint 384 to ulong */
238uint64_t q38_plan_layer(const uint64_t o_cfg[8], uint32_t o_dst[384]);
239/* export fn q38_bf16_xbatch_max hd ulong max_smem ulong to ulong */
240uint64_t q38_bf16_xbatch_max(uint64_t o_hd, uint64_t o_max_smem);
241/* export fn q38_plan_final cfg view ulong 8 dst edit uint 384 to ulong */
242uint64_t q38_plan_final(const uint64_t o_cfg[8], uint32_t o_dst[384]);
243/* export fn q38_attn256_cache_policy env_mode ulong to ulong */
244uint64_t q38_attn256_cache_policy(uint64_t o_env_mode);
245/* export fn moe_queue_init q edit uint 512 cap ulong to ulong */
246uint64_t moe_queue_init(uint32_t o_q[512], uint64_t o_cap);
247/* export fn moe_queue_enqueue q edit uint 512 req_id ulong tokens ulong layer ulong flags ulong to ulong */
248uint64_t moe_queue_enqueue(uint32_t o_q[512], uint64_t o_req_id, uint64_t o_tokens, uint64_t o_layer, uint64_t o_flags);
249/* export fn moe_queue_claim_batch q edit uint 512 max_tokens ulong out_slots edit uint 64 to ulong */
250uint64_t moe_queue_claim_batch(uint32_t o_q[512], uint64_t o_max_tokens, uint32_t o_out_slots[64]);
251/* export fn moe_queue_complete_batch q edit uint 512 n ulong slots view uint 64 status ulong to ulong */
252uint64_t moe_queue_complete_batch(uint32_t o_q[512], uint64_t o_n, const uint32_t o_slots[64], uint64_t o_status);
253/* export fn moe_plan_layer cfg view ulong 8 dst edit uint 128 to ulong */
254uint64_t moe_plan_layer(const uint64_t o_cfg[8], uint32_t o_dst[128]);
255/* export fn moe_plan_traffic cfg view ulong 8 distinct_experts ulong out_bytes edit ulong 8 to ulong */
256uint64_t moe_plan_traffic(const uint64_t o_cfg[8], uint64_t o_distinct_experts, uint64_t o_out_bytes[8]);
257/* export fn cg_pf_copy ins edit ulong 8192 meta edit ulong 512 to ulong */
258uint64_t cg_pf_copy(uint64_t o_ins[8192], uint64_t o_meta[512]);
259/* export fn cg_bf16_ok_i sp view ulong 8 to ulong */
260uint64_t cg_bf16_ok_i(const uint64_t o_sp[8]);
261/* export fn cg_bf16_ok sp view ulong 8 to ulong */
262uint64_t cg_bf16_ok(const uint64_t o_sp[8]);
263/* export fn cg_bf16_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
264uint64_t cg_bf16_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
265/* export fn cg_gemm_ok sp view ulong 8 to ulong */
266uint64_t cg_gemm_ok(const uint64_t o_sp[8]);
267/* export fn cg_gemm_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
268uint64_t cg_gemm_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
269/* export fn cg_moe2_ok sp view ulong 8 to ulong */
270uint64_t cg_moe2_ok(const uint64_t o_sp[8]);
271/* export fn cg_moe2_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
272uint64_t cg_moe2_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
273/* export fn cg_moe_ok sp view ulong 8 to ulong */
274uint64_t cg_moe_ok(const uint64_t o_sp[8]);
275/* export fn cg_moe_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
276uint64_t cg_moe_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
277/* export fn cg_qmma_probe sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
278uint64_t cg_qmma_probe(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
279/* export fn cg_qmma_peak sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
280uint64_t cg_qmma_peak(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
281/* export fn cg_f2e4_probe ins edit ulong 8192 meta edit ulong 512 to ulong */
282uint64_t cg_f2e4_probe(uint64_t o_ins[8192], uint64_t o_meta[512]);
283/* export fn cg_rl_ok sp view ulong 8 to ulong */
284uint64_t cg_rl_ok(const uint64_t o_sp[8]);
285/* export fn cg_rl_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
286uint64_t cg_rl_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
287/* export fn cg_mc_ok sp view ulong 8 to ulong */
288uint64_t cg_mc_ok(const uint64_t o_sp[8]);
289/* export fn cg_mc_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
290uint64_t cg_mc_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
291/* export fn cg_tgemm_spec_ok sp view ulong 10 to ulong */
292uint64_t cg_tgemm_spec_ok(const uint64_t o_sp[10]);
293/* export fn cg_tgemm_emit sp view ulong 10 ins edit ulong 8192 meta edit ulong 512 to ulong */
294uint64_t cg_tgemm_emit(const uint64_t o_sp[10], uint64_t o_ins[8192], uint64_t o_meta[512]);
295/* export fn cg_tc2_spec_ok sp view ulong 10 to ulong */
296uint64_t cg_tc2_spec_ok(const uint64_t o_sp[10]);
297/* export fn cg_tc2_emit sp view ulong 10 ins edit ulong 8192 meta edit ulong 512 to ulong */
298uint64_t cg_tc2_emit(const uint64_t o_sp[10], uint64_t o_ins[8192], uint64_t o_meta[512]);
299/* export fn cg_pq_spec_ok sp view ulong 8 to ulong */
300uint64_t cg_pq_spec_ok(const uint64_t o_sp[8]);
301/* export fn cg_pq_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
302uint64_t cg_pq_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
303/* export fn cg_qg_spec_ok sp view ulong 10 to ulong */
304uint64_t cg_qg_spec_ok(const uint64_t o_sp[10]);
305/* export fn cg_qgemm_emit sp view ulong 10 ins edit ulong 8192 meta edit ulong 512 to ulong */
306uint64_t cg_qgemm_emit(const uint64_t o_sp[10], uint64_t o_ins[8192], uint64_t o_meta[512]);
307/* export fn cg_tc_probe_emit sp view ulong 4 ins edit ulong 8192 meta edit ulong 512 to ulong */
308uint64_t cg_tc_probe_emit(const uint64_t o_sp[4], uint64_t o_ins[8192], uint64_t o_meta[512]);
309/* export fn cg_tcgemm_spec_ok sp view ulong 8 to ulong */
310uint64_t cg_tcgemm_spec_ok(const uint64_t o_sp[8]);
311/* export fn cg_tcgemm_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
312uint64_t cg_tcgemm_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
313/* export fn cg_tc_peak_emit sp view ulong 4 ins edit ulong 8192 meta edit ulong 512 to ulong */
314uint64_t cg_tc_peak_emit(const uint64_t o_sp[4], uint64_t o_ins[8192], uint64_t o_meta[512]);
315/* export fn cg_tc_bw_emit sp view ulong 4 ins edit ulong 8192 meta edit ulong 512 to ulong */
316uint64_t cg_tc_bw_emit(const uint64_t o_sp[4], uint64_t o_ins[8192], uint64_t o_meta[512]);
317/* export fn cg_pattn256_spec_ok sp view ulong 4 to ulong */
318uint64_t cg_pattn256_spec_ok(const uint64_t o_sp[4]);
319/* export fn cg_pattn256_emit sp view ulong 4 ins edit ulong 8192 meta edit ulong 512 to ulong */
320uint64_t cg_pattn256_emit(const uint64_t o_sp[4], uint64_t o_ins[8192], uint64_t o_meta[512]);
321/* export fn cg_router_spec_ok sp view ulong 8 to ulong */
322uint64_t cg_router_spec_ok(const uint64_t o_sp[8]);
323/* export fn cg_router_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
324uint64_t cg_router_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
325/* export fn cg_pattn_spec_ok sp view ulong 4 to ulong */
326uint64_t cg_pattn_spec_ok(const uint64_t o_sp[4]);
327/* export fn cg_pattn_emit sp view ulong 4 ins edit ulong 8192 meta edit ulong 512 to ulong */
328uint64_t cg_pattn_emit(const uint64_t o_sp[4], uint64_t o_ins[8192], uint64_t o_meta[512]);
329/* export fn cg_attn_spec_ok sp view ulong 4 to ulong */
330uint64_t cg_attn_spec_ok(const uint64_t o_sp[4]);
331/* export fn cg_attn_emit sp view ulong 4 ins edit ulong 8192 meta edit ulong 512 to ulong */
332uint64_t cg_attn_emit(const uint64_t o_sp[4], uint64_t o_ins[8192], uint64_t o_meta[512]);
333/* export fn cg_tern_spec_ok sp view ulong 8 to ulong */
334uint64_t cg_tern_spec_ok(const uint64_t o_sp[8]);
335/* export fn cg_tern_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
336uint64_t cg_tern_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
337/* export fn cg_tern_sched_stalls ins edit ulong 8192 n ulong v2p view ulong 256 bsz view ulong 256 to ulong */
338uint64_t cg_tern_sched_stalls(uint64_t o_ins[8192], uint64_t o_n, const uint64_t o_v2p[256], const uint64_t o_bsz[256]);
339/* export fn cg_attn256_spec_ok sp view ulong 8 to ulong */
340uint64_t cg_attn256_spec_ok(const uint64_t o_sp[8]);
341/* export fn cg_attn256_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
342uint64_t cg_attn256_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
343/* fn cg_dec_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
344uint64_t cg_dec_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
345/* fn cg_gdn_emit sp view ulong 8 ins edit ulong 8192 meta edit ulong 512 to ulong */
346uint64_t cg_gdn_emit(const uint64_t o_sp[8], uint64_t o_ins[8192], uint64_t o_meta[512]);
347/* export fn rx_reg_envelope_ok env view ulong 16 to long */
348int64_t rx_reg_envelope_ok(const uint64_t o_env[16]);
349/* export fn rx_reg_decide env view ulong 16 regime ulong dwell ulong contention ulong pressure ulong to ulong */
350uint64_t rx_reg_decide(const uint64_t o_env[16], uint64_t o_regime, uint64_t o_dwell, uint64_t o_contention, uint64_t o_pressure);
351/* export fn rx_reg_policy_for env view ulong 16 regime ulong dst edit ulong 4 to void */
352void rx_reg_policy_for(const uint64_t o_env[16], uint64_t o_regime, uint64_t o_dst[4]);
353/* export fn rx_reg_apply_check env view ulong 16 pol view ulong 8 to long */
354int64_t rx_reg_apply_check(const uint64_t o_env[16], const uint64_t o_pol[8]);
355/* export fn rx_reg_step env view ulong 16 cond view ulong 8 pol view ulong 8 dst edit ulong 8 to ulong */
356uint64_t rx_reg_step(const uint64_t o_env[16], const uint64_t o_cond[8], const uint64_t o_pol[8], uint64_t o_dst[8]);
357/* export fn rx_mid_is_zero buf view uchar 32 to ulong */
358uint64_t rx_mid_is_zero(const uint8_t o_buf[32]);
359/* export fn rx_mid_equal a view uchar 32 b view uchar 32 to ulong */
360uint64_t rx_mid_equal(const uint8_t o_a[32], const uint8_t o_b[32]);
361/* export fn rx_mid_compare a view uchar 32 b view uchar 32 to long */
362int64_t rx_mid_compare(const uint8_t o_a[32], const uint8_t o_b[32]);
363/* export fn rx_mid_hash buf view uchar 32 to ulong */
364uint64_t rx_mid_hash(const uint8_t o_buf[32]);
365/* export fn rx_mid_pack_hdr root ulong id view uchar 32 rec edit uchar 44 to long */
366int64_t rx_mid_pack_hdr(uint64_t o_root, const uint8_t o_id[32], uint8_t o_rec[44]);
367/* export fn rx_mid_val_rec rec view uchar 44 chk view uchar 4 dst edit uchar 33 to long */
368int64_t rx_mid_val_rec(const uint8_t o_rec[44], const uint8_t o_chk[4], uint8_t o_dst[33]);
369/* export fn rx_mid_to_hex rec view uchar 44 hex edit uchar 88 to void */
370void rx_mid_to_hex(const uint8_t o_rec[44], uint8_t o_hex[88]);
371/* export fn rx_mid_from_hex hex view uchar 88 rec edit uchar 44 to long */
372int64_t rx_mid_from_hex(const uint8_t o_hex[88], uint8_t o_rec[44]);
373/* export fn rx_cx_kind_of ckind ulong dst edit ulong 4 to void */
374void rx_cx_kind_of(uint64_t o_ckind, uint64_t o_dst[4]);
375/* export fn rx_cx_pack_digest dig view uchar 32 dst edit ulong 4 to void */
376void rx_cx_pack_digest(const uint8_t o_dig[32], uint64_t o_dst[4]);
377/* export fn rx_cx_dedup_links cause ulong parents view ulong * dst edit ulong 8 max_links ulong to ulong */
378uint64_t rx_cx_dedup_links(uint64_t o_cause, const uint64_t *o_parents, size_t o_parents_len, uint64_t o_dst[8], uint64_t o_max_links);
379/* export fn rx_pl_word dig view uchar 32 k ulong to ulong */
380uint64_t rx_pl_word(const uint8_t o_dig[32], uint64_t o_k);
381/* export fn rx_pla_fact_pack xid ulong xgen ulong is_floor ulong tid ulong tgen ulong to ulong */
382uint64_t rx_pla_fact_pack(uint64_t o_xid, uint64_t o_xgen, uint64_t o_is_floor, uint64_t o_tid, uint64_t o_tgen);
383/* export fn rx_pla_fact_unpack f ulong dst edit ulong 5 to void */
384void rx_pla_fact_unpack(uint64_t o_f, uint64_t o_dst[5]);
385/* export fn rx_pl_sort_preds buf edit ulong 288 n ulong to void */
386void rx_pl_sort_preds(uint64_t o_buf[288], uint64_t o_n);
387/* export fn rx_pj_summarize w view ulong * dst edit ulong 5 to void */
388void rx_pj_summarize(const uint64_t *o_w, size_t o_w_len, uint64_t o_dst[5]);
389/* export fn rx_pj_section_of protect ulong cls ulong treatment ulong temporal ulong to ulong */
390uint64_t rx_pj_section_of(uint64_t o_protect, uint64_t o_cls, uint64_t o_treatment, uint64_t o_temporal);
391/* export fn rx_pj_form_of treatment ulong to ulong */
392uint64_t rx_pj_form_of(uint64_t o_treatment);
393/* export fn rx_cq_key_hash cap_id ulong real_id ulong mach_id ulong skill_id ulong to ulong */
394uint64_t rx_cq_key_hash(uint64_t o_cap_id, uint64_t o_real_id, uint64_t o_mach_id, uint64_t o_skill_id);
395/* export fn rx_cq_dim_value vals view ulong 7 dim ulong to ulong */
396uint64_t rx_cq_dim_value(const uint64_t o_vals[7], uint64_t o_dim);
397/* export fn rx_cq_dominates a view ulong 7 b view ulong 7 dims view uchar 7 nd ulong to ulong */
398uint64_t rx_cq_dominates(const uint64_t o_a[7], const uint64_t o_b[7], const uint8_t o_dims[7], uint64_t o_nd);
399/* export fn rx_cq_cmp_full a view ulong 11 b view ulong 11 dims view uchar 7 nd ulong to long */
400int64_t rx_cq_cmp_full(const uint64_t o_a[11], const uint64_t o_b[11], const uint8_t o_dims[7], uint64_t o_nd);
401/* export fn rx_cq_within v ulong best ulong tol_ppm ulong to ulong */
402uint64_t rx_cq_within(uint64_t o_v, uint64_t o_best, uint64_t o_tol_ppm);
403/* export fn rx_cq_plan_sources domains ulong need_src ulong loc ulong pin ulong self_mach ulong to ulong */
404uint64_t rx_cq_plan_sources(uint64_t o_domains, uint64_t o_need_src, uint64_t o_loc, uint64_t o_pin, uint64_t o_self_mach);
405/* export fn rx_cq_filter_entry ent view ulong 14 need view ulong 14 to ulong */
406uint64_t rx_cq_filter_entry(const uint64_t o_ent[14], const uint64_t o_need[14]);
407/* export fn rx_cq_wire_encode_body hdr view ulong 4 fields view ulong 17 mid view uchar 44 sdig view uchar 32 dst edit uchar 188 to ulong */
408uint64_t rx_cq_wire_encode_body(const uint64_t o_hdr[4], const uint64_t o_fields[17], const uint8_t o_mid[44], const uint8_t o_sdig[32], uint8_t o_dst[188]);
409/* export fn rx_cq_wire_decode_body src view uchar 188 hdr edit ulong 4 fields edit ulong 17 sdig edit uchar 32 to ulong */
410uint64_t rx_cq_wire_decode_body(const uint8_t o_src[188], uint64_t o_hdr[4], uint64_t o_fields[17], uint8_t o_sdig[32]);
411/* export fn rx_cq_wire_apply_check has_old ulong old_gen ulong old_live ulong new_gen ulong kind ulong to long */
412int64_t rx_cq_wire_apply_check(uint64_t o_has_old, uint64_t o_old_gen, uint64_t o_old_live, uint64_t o_new_gen, uint64_t o_kind);
413/* export fn rx_cm_fit_predict tri view ulong 36 xty_u view ulong 8 phi_u view ulong 8 meta view ulong 2 dst edit ulong 4 to ulong */
414uint64_t rx_cm_fit_predict(const uint64_t o_tri[36], const uint64_t o_xty_u[8], const uint64_t o_phi_u[8], const uint64_t o_meta[2], uint64_t o_dst[4]);
415/* export fn rx_cm_rank1_update tri edit ulong 36 xty edit ulong 8 phi view ulong 8 y_bits ulong to void */
416void rx_cm_rank1_update(uint64_t o_tri[36], uint64_t o_xty[8], const uint64_t o_phi[8], uint64_t o_y_bits);
417/* export fn rx_cm_pack_v1 model view uchar 28072 wire out uchar 28080 to void */
418void rx_cm_pack_v1(const uint8_t o_model[28072], uint8_t o_wire[28080]);
419/* export fn rx_cm_unpack_v1 wire view uchar 28080 model edit uchar 28072 to ulong */
420uint64_t rx_cm_unpack_v1(const uint8_t o_wire[28080], uint8_t o_model[28072]);
421/* export fn rx_rt_conf_bin conf ulong conf_one ulong bins ulong to ulong */
422uint64_t rx_rt_conf_bin(uint64_t o_conf, uint64_t o_conf_one, uint64_t o_bins);
423/* export fn rx_rt_wilson k ulong n ulong dst edit ulong 2 to void */
424void rx_rt_wilson(uint64_t o_k, uint64_t o_n, uint64_t o_dst[2]);
425/* export fn rx_world_state_legal from ulong dest ulong to ulong */
426uint64_t rx_world_state_legal(uint64_t o_from, uint64_t o_dest);
427/* export fn rx_world_res_fits used view ulong 4 budget view ulong 6 need view ulong 5 to ulong */
428uint64_t rx_world_res_fits(const uint64_t o_used[4], const uint64_t o_budget[6], const uint64_t o_need[5]);
429/* export fn rx_world_better_admit a view ulong 3 b view ulong 3 to ulong */
430uint64_t rx_world_better_admit(const uint64_t o_a[3], const uint64_t o_b[3]);
431/* export fn rx_coh_crc32c data view uchar * n ulong to ulong */
432uint64_t rx_coh_crc32c(const uint8_t *o_data, size_t o_data_len, uint64_t o_n);
433/* export fn rx_coh_ring_msg t ulong to ulong */
434uint64_t rx_coh_ring_msg(uint64_t o_t);
435/* export fn rx_coh_msg_rights t ulong to ulong */
436uint64_t rx_coh_msg_rights(uint64_t o_t);
437/* export fn rx_coh_fault_err fault ulong to long */
438int64_t rx_coh_fault_err(uint64_t o_fault);
439/* export fn rx_sem_digest_eq_om2 a view uchar 32 b view uchar 32 to ulong */
440uint64_t rx_sem_digest_eq_om2(const uint8_t o_a[32], const uint8_t o_b[32]);
441/* export fn rx_sem_node_id_from_hash d view uchar 32 kind ulong to ulong */
442uint64_t rx_sem_node_id_from_hash(const uint8_t o_d[32], uint64_t o_kind);
443/* export fn rx_sem_inputs_unique inputs view ulong * n ulong to ulong */
444uint64_t rx_sem_inputs_unique(const uint64_t *o_inputs, size_t o_inputs_len, uint64_t o_n);
445/* export fn rx_sr_digest_zero d view uchar 32 to ulong */
446uint64_t rx_sr_digest_zero(const uint8_t o_d[32]);
447/* export fn rx_sr_why_of counts view ulong 10 to ulong */
448uint64_t rx_sr_why_of(const uint64_t o_counts[10]);
449/* export fn rx_fus_word64 d view uchar 8 to ulong */
450uint64_t rx_fus_word64(const uint8_t o_d[8]);
451/* export fn rx_fus_eligible_kind k ulong to ulong */
452uint64_t rx_fus_eligible_kind(uint64_t o_k);
453/* export fn cap_token_eq a view uchar 32 b view uchar 32 to ulong */
454uint64_t cap_token_eq(const uint8_t o_a[32], const uint8_t o_b[32]);
455/* export fn cap_add_u64 a ulong b ulong dst edit ulong 1 to long */
456int64_t cap_add_u64(uint64_t o_a, uint64_t o_b, uint64_t o_dst[1]);
457/* export fn cap_gen_advance gen ulong dst edit ulong 1 to long */
458int64_t cap_gen_advance(uint64_t o_gen, uint64_t o_dst[1]);
459/* export fn cap_table_init hdr edit ulong 4 slots edit ulong 3328 delivered edit uchar 256 boot_gen ulong to long */
460int64_t cap_table_init(uint64_t o_hdr[4], uint64_t o_slots[3328], uint8_t o_delivered[256], uint64_t o_boot_gen);
461/* export fn cap_table_validate hdr view ulong 4 slots view ulong 3328 args view ulong 5 out_slot edit ulong 13 to long */
462int64_t cap_table_validate(const uint64_t o_hdr[4], const uint64_t o_slots[3328], const uint64_t o_args[5], uint64_t o_out_slot[13]);
463/* export fn cap_table_inspect hdr view ulong 4 slots view ulong 3328 cap_id ulong gen ulong out_slot edit ulong 13 to long */
464int64_t cap_table_inspect(const uint64_t o_hdr[4], const uint64_t o_slots[3328], uint64_t o_cap_id, uint64_t o_gen, uint64_t o_out_slot[13]);
465/* export fn cap_table_auth_use hdr view ulong 4 slots view ulong 3328 delivered view uchar 256 args view ulong 3 to long */
466int64_t cap_table_auth_use(const uint64_t o_hdr[4], const uint64_t o_slots[3328], const uint8_t o_delivered[256], const uint64_t o_args[3]);
467/* export fn cap_table_mint hdr edit ulong 4 slots edit ulong 3328 delivered edit uchar 256 req view ulong 9 out_ref edit ulong 2 to long */
468int64_t cap_table_mint(uint64_t o_hdr[4], uint64_t o_slots[3328], uint8_t o_delivered[256], const uint64_t o_req[9], uint64_t o_out_ref[2]);
469/* export fn cap_table_revoke hdr edit ulong 4 slots edit ulong 3328 delivered view uchar 256 args view ulong 4 rev_list edit ulong 257 to long */
470int64_t cap_table_revoke(uint64_t o_hdr[4], uint64_t o_slots[3328], const uint8_t o_delivered[256], const uint64_t o_args[4], uint64_t o_rev_list[257]);
471/* export fn cap_table_reclaim hdr edit ulong 4 slots edit ulong 3328 delivered edit uchar 256 args view ulong 3 to long */
472int64_t cap_table_reclaim(uint64_t o_hdr[4], uint64_t o_slots[3328], uint8_t o_delivered[256], const uint64_t o_args[3]);
473/* export fn cap_table_clock hdr edit ulong 4 slots view ulong 3328 delivered view uchar 256 args view ulong 3 to long */
474int64_t cap_table_clock(uint64_t o_hdr[4], const uint64_t o_slots[3328], const uint8_t o_delivered[256], const uint64_t o_args[3]);
475/* export fn cap_table_epoch hdr edit ulong 4 slots view ulong 3328 delivered view uchar 256 aid ulong agen ulong to long */
476int64_t cap_table_epoch(uint64_t o_hdr[4], const uint64_t o_slots[3328], const uint8_t o_delivered[256], uint64_t o_aid, uint64_t o_agen);
477/* export fn aegis_evaluate rules view ulong 112 n_rules ulong req view ulong 4 res edit ulong 3 to ulong */
478uint64_t aegis_evaluate(const uint64_t o_rules[112], uint64_t o_n_rules, const uint64_t o_req[4], uint64_t o_res[3]);
479/* export fn aegis_decide rules view ulong 112 n_rules ulong subject ulong in_f view ulong 10 out_dec edit ulong 8 to ulong */
480uint64_t aegis_decide(const uint64_t o_rules[112], uint64_t o_n_rules, uint64_t o_subject, const uint64_t o_in_f[10], uint64_t o_out_dec[8]);
481/* export fn aegis_install_check dec view ulong 8 req view ulong 6 client view ulong 3 to ulong */
482uint64_t aegis_install_check(const uint64_t o_dec[8], const uint64_t o_req[6], const uint64_t o_client[3]);
483#define OSC_LITERAL_MALFORMED 1
484#define OSC_LITERAL_OVERFLOW 2
485#define OSC_LEX_COMMENT 3
486#define OSC_LEX_FULL 4
487#define OSC_LEX_NAME_LONG 5
488#define OSC_LEX_BAD_BYTE 6
489typedef struct {
490 uint64_t pos;
491 uint64_t start;
492 uint64_t value;
493 uint32_t line;
494 uint32_t col;
495 uint32_t width;
496 uint32_t kind;
497} OscLexState;
498OMBR_ASSERT(sizeof(OscLexState) == 40, "layout lexstate size");
499OMBR_ASSERT(offsetof(OscLexState, pos) == 0, "layout lexstate field pos");
500OMBR_ASSERT(offsetof(OscLexState, start) == 8, "layout lexstate field start");
501OMBR_ASSERT(offsetof(OscLexState, value) == 16, "layout lexstate field value");
502OMBR_ASSERT(offsetof(OscLexState, line) == 24, "layout lexstate field line");
503OMBR_ASSERT(offsetof(OscLexState, col) == 28, "layout lexstate field col");
504OMBR_ASSERT(offsetof(OscLexState, width) == 32, "layout lexstate field width");
505OMBR_ASSERT(offsetof(OscLexState, kind) == 36, "layout lexstate field kind");
506typedef struct {
507 uint16_t kind;
508 uint8_t ombr_pad2[2];
509 uint32_t line;
510 uint32_t col;
511 uint32_t off;
512 uint32_t width;
513 uint8_t ombr_pad20[4];
514 uint64_t value;
515} osctoken;
516OMBR_ASSERT(sizeof(osctoken) == 32, "layout osctoken size");
517OMBR_ASSERT(offsetof(osctoken, kind) == 0, "layout osctoken field kind");
518OMBR_ASSERT(offsetof(osctoken, line) == 4, "layout osctoken field line");
519OMBR_ASSERT(offsetof(osctoken, col) == 8, "layout osctoken field col");
520OMBR_ASSERT(offsetof(osctoken, off) == 12, "layout osctoken field off");
521OMBR_ASSERT(offsetof(osctoken, width) == 16, "layout osctoken field width");
522OMBR_ASSERT(offsetof(osctoken, value) == 24, "layout osctoken field value");
523/* export fn osc_parse_literal spelling view uchar * value out ulong 1 to ulong */
524uint64_t osc_parse_literal(const uint8_t *o_spelling, size_t o_spelling_len, uint64_t o_value[1]);
525/* export fn osc_lex_next src view uchar * cursor edit lexstate room ulong namemax ulong to ulong */
526uint64_t osc_lex_next(const uint8_t *o_src, size_t o_src_len, OscLexState *o_cursor, uint64_t o_room, uint64_t o_namemax);
527/* export fn osc_lex_stream src view uchar * cursor edit lexstate dest edit uchar * count edit ulong 1 to ulong */
528uint64_t osc_lex_stream(const uint8_t *o_src, size_t o_src_len, OscLexState *o_cursor, uint8_t *o_dest, size_t o_dest_len, uint64_t o_count[1]);
529#define OSC_TYPE_WINDOW 7
530#define OSC_TYPE_SCALAR 1
531#define OSC_TYPE_ARRAY 2
532#define OSC_TYPE_REF_BODY 3
533#define OSC_TYPE_PARAM 4
534#define OSC_TYPE_EXPECT_SCALAR 1
535#define OSC_TYPE_SLICE_ESCAPE 2
536#define OSC_TYPE_EXPECT_OPEN 3
537#define OSC_TYPE_EXPECT_SEMI 4
538#define OSC_TYPE_EXPECT_LENGTH 5
539#define OSC_TYPE_ZERO_LENGTH 6
540#define OSC_TYPE_LONG_ARRAY 7
541#define OSC_TYPE_EXPECT_CLOSE 8
542#define OSC_TYPE_NAMED_REF 9
543#define OSC_TYPE_BARE_NAME 10
544#define OSC_TYPE_LOCAL_ONLY 11
545typedef struct {
546 uint32_t used;
547 uint32_t scalar;
548 uint32_t refkind;
549 uint32_t elem;
550 uint64_t count;
551} OscParsedType;
552OMBR_ASSERT(sizeof(OscParsedType) == 24, "layout typerec size");
553OMBR_ASSERT(offsetof(OscParsedType, used) == 0, "layout typerec field used");
554OMBR_ASSERT(offsetof(OscParsedType, scalar) == 4, "layout typerec field scalar");
555OMBR_ASSERT(offsetof(OscParsedType, refkind) == 8, "layout typerec field refkind");
556OMBR_ASSERT(offsetof(OscParsedType, elem) == 12, "layout typerec field elem");
557OMBR_ASSERT(offsetof(OscParsedType, count) == 16, "layout typerec field count");
558/* export fn osc_read_type kinds view ushort 7 values view ulong 7 form ulong refkind ulong limit ulong result edit typerec to ulong */
559uint64_t osc_read_type(const uint16_t o_kinds[7], const uint64_t o_values[7], uint64_t o_form, uint64_t o_refkind, uint64_t o_limit, OscParsedType *o_result);
560#define OSC_EXPR_DONE 0
561#define OSC_EXPR_SHIFT 1
562#define OSC_EXPR_REDUCE 2
563#define OSC_EXPR_CHAINED 3
564#define OSC_OPERAND_DONE 0
565#define OSC_OPERAND_PREFIX 1
566#define OSC_OPERAND_INTEGER 2
567#define OSC_OPERAND_TRUE 3
568#define OSC_OPERAND_FALSE 4
569#define OSC_OPERAND_NAME 5
570#define OSC_OPERAND_CALL 6
571#define OSC_OPERAND_FIELD 7
572#define OSC_OPERAND_INDEX 8
573#define OSC_OPERAND_POOL 9
574#define OSC_OPERAND_GROUP 10
575#define OSC_OPERAND_BORROW_ERROR 11
576#define OSC_OPERAND_SYNTAX 12
577#define OSC_OPERAND_CAST 13
578#define OSC_OPERAND_CAST_ERROR 14
579#define OSC_OPERAND_UNWIND 15
580typedef struct {
581 uint32_t depth;
582 uint32_t rank[9];
583 int32_t node[9];
584 int32_t lhs[9];
585 int32_t parent;
586 int32_t left;
587} OscExprStack;
588OMBR_ASSERT(sizeof(OscExprStack) == 120, "layout exprstk size");
589OMBR_ASSERT(offsetof(OscExprStack, depth) == 0, "layout exprstk field depth");
590OMBR_ASSERT(offsetof(OscExprStack, rank) == 4, "layout exprstk field rank");
591OMBR_ASSERT(offsetof(OscExprStack, node) == 40, "layout exprstk field node");
592OMBR_ASSERT(offsetof(OscExprStack, lhs) == 76, "layout exprstk field lhs");
593OMBR_ASSERT(offsetof(OscExprStack, parent) == 112, "layout exprstk field parent");
594OMBR_ASSERT(offsetof(OscExprStack, left) == 116, "layout exprstk field left");
595typedef struct {
596 uint32_t phase;
597 uint32_t prefixes;
598 uint32_t pending;
599} OscOperandState;
600OMBR_ASSERT(sizeof(OscOperandState) == 12, "layout opstate size");
601OMBR_ASSERT(offsetof(OscOperandState, phase) == 0, "layout opstate field phase");
602OMBR_ASSERT(offsetof(OscOperandState, prefixes) == 4, "layout opstate field prefixes");
603OMBR_ASSERT(offsetof(OscOperandState, pending) == 8, "layout opstate field pending");
604/* export fn osc_expr_step stack edit exprstk look ulong operand ulong to ulong */
605uint64_t osc_expr_step(OscExprStack *o_stack, uint64_t o_look, uint64_t o_operand);
606/* export fn osc_operand_step state edit opstate kind ulong nextkind ulong third ulong to ulong */
607uint64_t osc_operand_step(OscOperandState *o_state, uint64_t o_kind, uint64_t o_nextkind, uint64_t o_third);
608#define OSC_ARG_SCALAR 1
609#define OSC_ARG_SLICE 2
610#define OSC_ARG_OWNER 3
611#define OSC_ARG_BORROW 4
612#define OSC_ARG_SCALAR_BORROW 5
613#define OSC_ARG_SLICE_BORROW 6
614#define OSC_ARG_OWNER_FORM 7
615#define OSC_ARG_BORROW_FORM 8
616#define OSC_INFER_DONE 0
617#define OSC_INFER_CHECK 1
618#define OSC_INFER_CAST_LITERAL 2
619#define OSC_INFER_COMPARE_LITERALS 3
620#define OSC_INFER_COMPARE_BOOL 4
621#define OSC_INFER_ARITH_BOOL 5
622#define OSC_INFER_UNARY_TYPE 6
623#define OSC_INFER_CAST_TYPE 7
624#define OSC_INFER_SHIFT_TYPE 8
625#define OSC_INFER_AMOUNT_TYPE 9
626#define OSC_INFER_SHIFT_RANGE 10
627#define OSC_INFER_ARITH_TYPE 11
628#define OSC_INFER_ZERO_DIVISOR 12
629typedef struct {
630 int32_t params[6];
631 int32_t args[7];
632 uint32_t actions[6];
633 int32_t cells[6];
634 uint32_t np;
635 uint32_t na;
636 uint32_t clause;
637} OscCallArgs;
638OMBR_ASSERT(sizeof(OscCallArgs) == 112, "layout callargs size");
639OMBR_ASSERT(offsetof(OscCallArgs, params) == 0, "layout callargs field params");
640OMBR_ASSERT(offsetof(OscCallArgs, args) == 24, "layout callargs field args");
641OMBR_ASSERT(offsetof(OscCallArgs, actions) == 52, "layout callargs field actions");
642OMBR_ASSERT(offsetof(OscCallArgs, cells) == 76, "layout callargs field cells");
643OMBR_ASSERT(offsetof(OscCallArgs, np) == 100, "layout callargs field np");
644OMBR_ASSERT(offsetof(OscCallArgs, na) == 104, "layout callargs field na");
645OMBR_ASSERT(offsetof(OscCallArgs, clause) == 108, "layout callargs field clause");
646typedef struct {
647 uint64_t v[6];
648 uint8_t k[6];
649 uint8_t ombr_pad54[2];
650 int32_t nk;
651 int32_t res_sym;
652 uint8_t known;
653 uint8_t ombr_pad65[7];
654 uint64_t result;
655} OscContractBindings;
656OMBR_ASSERT(sizeof(OscContractBindings) == 80, "layout contract size");
657OMBR_ASSERT(offsetof(OscContractBindings, v) == 0, "layout contract field v");
658OMBR_ASSERT(offsetof(OscContractBindings, k) == 48, "layout contract field k");
659OMBR_ASSERT(offsetof(OscContractBindings, nk) == 56, "layout contract field nk");
660OMBR_ASSERT(offsetof(OscContractBindings, res_sym) == 60, "layout contract field res_sym");
661OMBR_ASSERT(offsetof(OscContractBindings, known) == 64, "layout contract field known");
662OMBR_ASSERT(offsetof(OscContractBindings, result) == 72, "layout contract field result");
663typedef struct {
664 uint64_t root;
665 uint64_t want;
666 uint64_t phase;
667 uint64_t first;
668 uint64_t second;
669 uint64_t literal2;
670 uint64_t optype;
671 uint64_t site;
672 uint64_t context;
673} OscInference;
674OMBR_ASSERT(sizeof(OscInference) == 72, "layout infer size");
675OMBR_ASSERT(offsetof(OscInference, root) == 0, "layout infer field root");
676OMBR_ASSERT(offsetof(OscInference, want) == 8, "layout infer field want");
677OMBR_ASSERT(offsetof(OscInference, phase) == 16, "layout infer field phase");
678OMBR_ASSERT(offsetof(OscInference, first) == 24, "layout infer field first");
679OMBR_ASSERT(offsetof(OscInference, second) == 32, "layout infer field second");
680OMBR_ASSERT(offsetof(OscInference, literal2) == 40, "layout infer field literal2");
681OMBR_ASSERT(offsetof(OscInference, optype) == 48, "layout infer field optype");
682OMBR_ASSERT(offsetof(OscInference, site) == 56, "layout infer field site");
683OMBR_ASSERT(offsetof(OscInference, context) == 64, "layout infer field context");
684/* export fn osc_alu_width t ulong to ulong */
685uint64_t osc_alu_width(uint64_t o_t);
686/* export fn osc_alu_canon t ulong v ulong to ulong */
687uint64_t osc_alu_canon(uint64_t o_t, uint64_t o_v);
688/* export fn osc_alu_bin op ulong t ulong a ulong b ulong value out ulong 1 to ulong */
689uint64_t osc_alu_bin(uint64_t o_op, uint64_t o_t, uint64_t o_a, uint64_t o_b, uint64_t o_value[1]);
690/* export fn osc_alu_un op ulong t ulong a ulong value out ulong 1 to ulong */
691uint64_t osc_alu_un(uint64_t o_op, uint64_t o_t, uint64_t o_a, uint64_t o_value[1]);
692/* export fn osc_alu_cmp cc ulong t ulong a ulong b ulong to ulong */
693uint64_t osc_alu_cmp(uint64_t o_cc, uint64_t o_t, uint64_t o_a, uint64_t o_b);
694/* export fn osc_alu_cast target ulong src ulong a ulong value out ulong 1 to ulong */
695uint64_t osc_alu_cast(uint64_t o_target, uint64_t o_src, uint64_t o_a, uint64_t o_value[1]);
696/* export fn osc_binary_opcode tok ulong to ulong */
697uint64_t osc_binary_opcode(uint64_t o_tok);
698/* export fn osc_compare_opcode tok ulong to ulong */
699uint64_t osc_compare_opcode(uint64_t o_tok);
700/* export fn osc_literal_fits t ulong magnitude ulong negative ulong to ulong */
701uint64_t osc_literal_fits(uint64_t o_t, uint64_t o_magnitude, uint64_t o_negative);
702/* export fn osc_contract_value nodes view uchar * env view contract stack edit ulong * request edit ulong 2 to ulong */
703uint64_t osc_contract_value(const uint8_t *o_nodes, size_t o_nodes_len, const OscContractBindings *o_env, uint64_t *o_stack, size_t o_stack_len, uint64_t o_request[2]);
704/* export fn osc_constant_tree nodes view uchar * id ulong require_literals ulong pending edit ulong * to ulong */
705uint64_t osc_constant_tree(const uint8_t *o_nodes, size_t o_nodes_len, uint64_t o_id, uint64_t o_require_literals, uint64_t *o_pending, size_t o_pending_len);
706/* export fn osc_fold_tree nodes edit uchar * typ ulong stack edit ulong * report edit ulong 3 to ulong */
707uint64_t osc_fold_tree(uint8_t *o_nodes, size_t o_nodes_len, uint64_t o_typ, uint64_t *o_stack, size_t o_stack_len, uint64_t o_report[3]);
708/* export fn osc_infer_step nodes edit uchar * stack edit ulong * frame edit infer checked ulong to ulong */
709uint64_t osc_infer_step(uint8_t *o_nodes, size_t o_nodes_len, uint64_t *o_stack, size_t o_stack_len, OscInference *o_frame, uint64_t o_checked);
710/* export fn osc_call_args nodes view uchar * param long arg long call edit callargs to void */
711void osc_call_args(const uint8_t *o_nodes, size_t o_nodes_len, int64_t o_param, int64_t o_arg, OscCallArgs *o_call);
712/* export fn osc_bind_cell_argument call edit callargs index ulong symbol long to ulong */
713uint64_t osc_bind_cell_argument(OscCallArgs *o_call, uint64_t o_index, int64_t o_symbol);
714/* export fn osc_call_requires nodes view uchar * call view callargs bindings edit contract stack edit ulong * to ulong */
715uint64_t osc_call_requires(const uint8_t *o_nodes, size_t o_nodes_len, const OscCallArgs *o_call, OscContractBindings *o_bindings, uint64_t *o_stack, size_t o_stack_len);
716/* export fn osc_slice_args types view uint * args view ulong * to long */
717int64_t osc_slice_args(const uint32_t *o_types, size_t o_types_len, const uint64_t *o_args, size_t o_args_len);
718/* export fn osc_return_ensures nodes view uchar * selectors view uint 3 bindings edit contract stack edit ulong * to ulong */
719uint64_t osc_return_ensures(const uint8_t *o_nodes, size_t o_nodes_len, const uint32_t o_selectors[3], OscContractBindings *o_bindings, uint64_t *o_stack, size_t o_stack_len);
720#define OSC_A64_ERR_UNUSED_SHIFT 1
721#define OSC_A64_ERR_UNUSED_COND 2
722#define OSC_A64_ERR_UNUSED_IMM2 3
723#define OSC_A64_ERR_UNUSED_IMM 4
724#define OSC_A64_ERR_SHIFT_KIND 5
725#define OSC_A64_ERR_SHIFT_AMOUNT 6
726#define OSC_A64_ERR_IMM12 7
727#define OSC_A64_ERR_LSL12 8
728#define OSC_A64_ERR_IMMR 9
729#define OSC_A64_ERR_IMMS 10
730#define OSC_A64_ERR_COND 11
731#define OSC_A64_ERR_IMM16 12
732#define OSC_A64_ERR_MOV_SHIFT 13
733#define OSC_A64_ERR_MEM_OFFSET 14
734#define OSC_A64_ERR_PAIR_OFFSET 15
735#define OSC_A64_ERR_WRITEBACK_ALIAS 16
736#define OSC_A64_ERR_LOAD_ALIAS 17
737#define OSC_A64_ERR_BRANCH_OFFSET 18
738#define OSC_A64_ERR_BRANCH_COND 19
739#define OSC_A64_ERR_UNUSED_REG 32
740#define OSC_A64_ERR_REG_SP 36
741#define OSC_A64_ERR_REG_ZR 40
742#define OSC_A64_ERR_BAD_REG 44
743typedef struct {
744 uint8_t ombr_pad0[8];
745 uint32_t base;
746 uint8_t form;
747 uint8_t role[4];
748 uint8_t flags;
749 uint8_t ombr_pad18[6];
750} a64spec;
751OMBR_ASSERT(sizeof(a64spec) == 24, "layout a64spec size");
752OMBR_ASSERT(offsetof(a64spec, base) == 8, "layout a64spec field base");
753OMBR_ASSERT(offsetof(a64spec, form) == 12, "layout a64spec field form");
754OMBR_ASSERT(offsetof(a64spec, role) == 13, "layout a64spec field role");
755OMBR_ASSERT(offsetof(a64spec, flags) == 17, "layout a64spec field flags");
756typedef struct {
757 uint8_t opcode;
758 uint8_t reg[4];
759 uint8_t shift;
760 uint8_t cond;
761 uint8_t ombr_pad7[1];
762 int64_t imm;
763 int64_t imm2;
764} a64insn;
765OMBR_ASSERT(sizeof(a64insn) == 24, "layout a64insn size");
766OMBR_ASSERT(offsetof(a64insn, opcode) == 0, "layout a64insn field opcode");
767OMBR_ASSERT(offsetof(a64insn, reg) == 1, "layout a64insn field reg");
768OMBR_ASSERT(offsetof(a64insn, shift) == 5, "layout a64insn field shift");
769OMBR_ASSERT(offsetof(a64insn, cond) == 6, "layout a64insn field cond");
770OMBR_ASSERT(offsetof(a64insn, imm) == 8, "layout a64insn field imm");
771OMBR_ASSERT(offsetof(a64insn, imm2) == 16, "layout a64insn field imm2");
772typedef struct {
773 uint32_t rd;
774 uint32_t rn;
775 uint32_t rm;
776 uint32_t ra;
777 uint32_t shift;
778 uint32_t cond;
779 int64_t imm;
780 int64_t imm2;
781} OscA64Fields;
782OMBR_ASSERT(sizeof(OscA64Fields) == 40, "layout a64field size");
783OMBR_ASSERT(offsetof(OscA64Fields, rd) == 0, "layout a64field field rd");
784OMBR_ASSERT(offsetof(OscA64Fields, rn) == 4, "layout a64field field rn");
785OMBR_ASSERT(offsetof(OscA64Fields, rm) == 8, "layout a64field field rm");
786OMBR_ASSERT(offsetof(OscA64Fields, ra) == 12, "layout a64field field ra");
787OMBR_ASSERT(offsetof(OscA64Fields, shift) == 16, "layout a64field field shift");
788OMBR_ASSERT(offsetof(OscA64Fields, cond) == 20, "layout a64field field cond");
789OMBR_ASSERT(offsetof(OscA64Fields, imm) == 24, "layout a64field field imm");
790OMBR_ASSERT(offsetof(OscA64Fields, imm2) == 32, "layout a64field field imm2");
791/* export fn osc_a64_pack_fields form ulong base ulong f view a64field to ulong */
792uint64_t osc_a64_pack_fields(uint64_t o_form, uint64_t o_base, const OscA64Fields *o_f);
793/* export fn osc_a64_unpack_fields form ulong word ulong f edit a64field to void */
794void osc_a64_unpack_fields(uint64_t o_form, uint64_t o_word, OscA64Fields *o_f);
795/* export fn osc_a64_check_fields cls ulong f view a64field writeback ulong loadpair ulong to ulong */
796uint64_t osc_a64_check_fields(uint64_t o_cls, const OscA64Fields *o_f, uint64_t o_writeback, uint64_t o_loadpair);
797/* export fn osc_a64_checked_word form ulong base ulong f view a64field flags ulong to ulong */
798uint64_t osc_a64_checked_word(uint64_t o_form, uint64_t o_base, const OscA64Fields *o_f, uint64_t o_flags);
799/* export fn osc_a64_canonical_word form ulong base ulong word ulong flags ulong fields edit a64field to ulong */
800uint64_t osc_a64_canonical_word(uint64_t o_form, uint64_t o_base, uint64_t o_word, uint64_t o_flags, OscA64Fields *o_fields);
801/* export fn osc_a64_materialize value ulong plan edit ulong 4 to ulong */
802uint64_t osc_a64_materialize(uint64_t o_value, uint64_t o_plan[4]);
803/* export fn osc_a64_write spec view uchar 24 insn view uchar 24 to ulong */
804uint64_t osc_a64_write(const uint8_t o_spec[24], const uint8_t o_insn[24]);
805/* export fn osc_a64_read word ulong specs view uchar * insn edit uchar 24 to ulong */
806uint64_t osc_a64_read(uint64_t o_word, const uint8_t *o_specs, size_t o_specs_len, uint8_t o_insn[24]);
807#define OSC_FOR_WINDOW 7
808#define OSC_FOR_NAME 1
809#define OSC_FOR_IN 2
810#define OSC_FOR_INT 3
811#define OSC_FOR_OVERFLOW 4
812#define OSC_FOR_DOTS 5
813#define OSC_FOR_TRIPS 6
814#define OSC_BOUND_KEYWORD 1
815#define OSC_BOUND_INT 2
816#define OSC_BOUND_RANGE 3
817#define OSC_IMPORT_POSITION 1
818#define OSC_IMPORT_NAME 2
819#define OSC_IMPORT_FULL 3
820#define OSC_IMPORT_DUP 4
821#define OSC_IMPORT_SEMI 5
822#define OSC_ST_CALL 70
823#define OSC_ST_EXPR_A 71
824#define OSC_ST_EXPR_B 72
825#define OSC_ST_BORROW_A 73
826#define OSC_ST_INDEX 74
827#define OSC_ST_STORE 75
828typedef struct {
829 uint32_t used;
830 uint32_t lower_at;
831 uint64_t low;
832 uint64_t high;
833} OscForRange;
834OMBR_ASSERT(sizeof(OscForRange) == 24, "layout forrange size");
835OMBR_ASSERT(offsetof(OscForRange, used) == 0, "layout forrange field used");
836OMBR_ASSERT(offsetof(OscForRange, lower_at) == 4, "layout forrange field lower_at");
837OMBR_ASSERT(offsetof(OscForRange, low) == 8, "layout forrange field low");
838OMBR_ASSERT(offsetof(OscForRange, high) == 16, "layout forrange field high");
839typedef struct {
840 uint32_t skip;
841 uint32_t steps;
842 uint32_t actions[5];
843 uint32_t nodekind;
844} OscStmtPlan;
845OMBR_ASSERT(sizeof(OscStmtPlan) == 32, "layout stmtplan size");
846OMBR_ASSERT(offsetof(OscStmtPlan, skip) == 0, "layout stmtplan field skip");
847OMBR_ASSERT(offsetof(OscStmtPlan, steps) == 4, "layout stmtplan field steps");
848OMBR_ASSERT(offsetof(OscStmtPlan, actions) == 8, "layout stmtplan field actions");
849OMBR_ASSERT(offsetof(OscStmtPlan, nodekind) == 28, "layout stmtplan field nodekind");
850typedef struct {
851 uint32_t started;
852 uint32_t stride;
853 uint32_t nameoff;
854 uint32_t match;
855 uint32_t nextkind;
856} OscImportParse;
857OMBR_ASSERT(sizeof(OscImportParse) == 20, "layout imprec size");
858OMBR_ASSERT(offsetof(OscImportParse, started) == 0, "layout imprec field started");
859OMBR_ASSERT(offsetof(OscImportParse, stride) == 4, "layout imprec field stride");
860OMBR_ASSERT(offsetof(OscImportParse, nameoff) == 8, "layout imprec field nameoff");
861OMBR_ASSERT(offsetof(OscImportParse, match) == 12, "layout imprec field match");
862OMBR_ASSERT(offsetof(OscImportParse, nextkind) == 16, "layout imprec field nextkind");
863/* export fn osc_for_range kinds view ushort 7 values view ulong 7 limit ulong range edit forrange to ulong */
864uint64_t osc_for_range(const uint16_t o_kinds[7], const uint64_t o_values[7], uint64_t o_limit, OscForRange *o_range);
865/* export fn osc_read_bound keyword ulong kind ulong value ulong limit ulong to ulong */
866uint64_t osc_read_bound(uint64_t o_keyword, uint64_t o_kind, uint64_t o_value, uint64_t o_limit);
867/* export fn osc_read_import state edit imprec kind ulong spelling view uchar * table edit uchar * to ulong */
868uint64_t osc_read_import(OscImportParse *o_state, uint64_t o_kind, const uint8_t *o_spelling, size_t o_spelling_len, uint8_t *o_table, size_t o_table_len);
869/* export fn osc_clause_word dst edit uchar 256 used ulong prev ulong kind ulong word view uchar * to ulong */
870uint64_t osc_clause_word(uint8_t o_dst[256], uint64_t o_used, uint64_t o_prev, uint64_t o_kind, const uint8_t *o_word, size_t o_word_len);
871/* export fn osc_clause_text dst edit uchar 256 tokens view uchar * source view uchar * to ulong */
872uint64_t osc_clause_text(uint8_t o_dst[256], const uint8_t *o_tokens, size_t o_tokens_len, const uint8_t *o_source, size_t o_source_len);
873/* export fn osc_new_node node out uchar 104 kind ulong token ulong line ulong col ulong to void */
874void osc_new_node(uint8_t o_node[104], uint64_t o_kind, uint64_t o_token, uint64_t o_line, uint64_t o_col);
875/* export fn osc_statement_plan plan edit stmtplan kind ulong nextkind ulong third ulong spelling view uchar * to ulong */
876uint64_t osc_statement_plan(OscStmtPlan *o_plan, uint64_t o_kind, uint64_t o_nextkind, uint64_t o_third, const uint8_t *o_spelling, size_t o_spelling_len);
877#define OSC_OWN_ALLOWED 0
878#define OSC_OWN_MOVED 1
879#define OSC_OWN_ALIAS 2
880#define OSC_OWN_READ_ONLY 3
881#define OSC_OWN_LOOP_MOVE 4
882#define OSC_SNAP_OWNER_WORDS 3
883#define OSC_SNAP_BORROW_WORDS 2
884typedef struct {
885 uint32_t owners;
886 uint32_t borrows;
887 uint32_t symbols;
888 uint32_t active;
889} OscSnapshotShape;
890OMBR_ASSERT(sizeof(OscSnapshotShape) == 16, "layout snapdim size");
891OMBR_ASSERT(offsetof(OscSnapshotShape, owners) == 0, "layout snapdim field owners");
892OMBR_ASSERT(offsetof(OscSnapshotShape, borrows) == 4, "layout snapdim field borrows");
893OMBR_ASSERT(offsetof(OscSnapshotShape, symbols) == 8, "layout snapdim field symbols");
894OMBR_ASSERT(offsetof(OscSnapshotShape, active) == 12, "layout snapdim field active");
895typedef struct {
896 uint8_t moved;
897 uint8_t ombr_pad1[1];
898 uint16_t n_shared;
899 uint16_t n_mut;
900 uint8_t ombr_pad6[2];
901 uint32_t moveline;
902 int32_t sym;
903 int32_t arena1;
904} OscCheckedOwner;
905OMBR_ASSERT(sizeof(OscCheckedOwner) == 20, "layout oscowner size");
906OMBR_ASSERT(offsetof(OscCheckedOwner, moved) == 0, "layout oscowner field moved");
907OMBR_ASSERT(offsetof(OscCheckedOwner, n_shared) == 2, "layout oscowner field n_shared");
908OMBR_ASSERT(offsetof(OscCheckedOwner, n_mut) == 4, "layout oscowner field n_mut");
909OMBR_ASSERT(offsetof(OscCheckedOwner, moveline) == 8, "layout oscowner field moveline");
910OMBR_ASSERT(offsetof(OscCheckedOwner, sym) == 12, "layout oscowner field sym");
911OMBR_ASSERT(offsetof(OscCheckedOwner, arena1) == 16, "layout oscowner field arena1");
912typedef struct {
913 uint8_t live;
914 uint8_t mut;
915 uint8_t ombr_pad2[2];
916 int32_t obj;
917 int32_t parent;
918 uint16_t n_shared;
919 uint16_t n_mut;
920 uint32_t line;
921 int32_t sym;
922} OscCheckedBorrow;
923OMBR_ASSERT(sizeof(OscCheckedBorrow) == 24, "layout oscbor size");
924OMBR_ASSERT(offsetof(OscCheckedBorrow, live) == 0, "layout oscbor field live");
925OMBR_ASSERT(offsetof(OscCheckedBorrow, mut) == 1, "layout oscbor field mut");
926OMBR_ASSERT(offsetof(OscCheckedBorrow, obj) == 4, "layout oscbor field obj");
927OMBR_ASSERT(offsetof(OscCheckedBorrow, parent) == 8, "layout oscbor field parent");
928OMBR_ASSERT(offsetof(OscCheckedBorrow, n_shared) == 12, "layout oscbor field n_shared");
929OMBR_ASSERT(offsetof(OscCheckedBorrow, n_mut) == 14, "layout oscbor field n_mut");
930OMBR_ASSERT(offsetof(OscCheckedBorrow, line) == 16, "layout oscbor field line");
931OMBR_ASSERT(offsetof(OscCheckedBorrow, sym) == 20, "layout oscbor field sym");
932/* export fn osc_owner_access moved ulong exclusive ulong shared_count ulong mut_count ulong to ulong */
933uint64_t osc_owner_access(uint64_t o_moved, uint64_t o_exclusive, uint64_t o_shared_count, uint64_t o_mut_count);
934/* export fn osc_borrow_access writable ulong exclusive ulong shared_count ulong mut_count ulong to ulong */
935uint64_t osc_borrow_access(uint64_t o_writable, uint64_t o_exclusive, uint64_t o_shared_count, uint64_t o_mut_count);
936/* export fn osc_owner_move moved ulong shared_count ulong mut_count ulong declaration_depth long loop_depth long to ulong */
937uint64_t osc_owner_move(uint64_t o_moved, uint64_t o_shared_count, uint64_t o_mut_count, int64_t o_declaration_depth, int64_t o_loop_depth);
938/* export fn osc_join_owner taken view oscowner remaining edit oscowner to ulong */
939uint64_t osc_join_owner(const OscCheckedOwner *o_taken, OscCheckedOwner *o_remaining);
940/* export fn osc_join_handle before long current long other long to long */
941int64_t osc_join_handle(int64_t o_before, int64_t o_current, int64_t o_other);
942/* export fn osc_join_frees taken view uchar * remaining edit uchar * to void */
943void osc_join_frees(const uint8_t *o_taken, size_t o_taken_len, uint8_t *o_remaining, size_t o_remaining_len);
944/* export fn osc_init_owner item edit oscowner symbol long to void */
945void osc_init_owner(OscCheckedOwner *o_item, int64_t o_symbol);
946/* export fn osc_open_borrow owner edit oscowner child edit oscbor object long mutable ulong source_line ulong to void */
947void osc_open_borrow(OscCheckedOwner *o_owner, OscCheckedBorrow *o_child, int64_t o_object, uint64_t o_mutable, uint64_t o_source_line);
948/* export fn osc_open_reborrow parent edit oscbor child edit oscbor object long parent_id long mutable ulong source_line ulong to void */
949void osc_open_reborrow(OscCheckedBorrow *o_parent, OscCheckedBorrow *o_child, int64_t o_object, int64_t o_parent_id, uint64_t o_mutable, uint64_t o_source_line);
950/* export fn osc_close_borrow owner edit oscowner child edit oscbor to void */
951void osc_close_borrow(OscCheckedOwner *o_owner, OscCheckedBorrow *o_child);
952/* export fn osc_close_reborrow parent edit oscbor child edit oscbor to void */
953void osc_close_reborrow(OscCheckedBorrow *o_parent, OscCheckedBorrow *o_child);
954/* export fn osc_join_owners taken view uchar * remaining edit uchar * changes edit int * to ulong */
955uint64_t osc_join_owners(const uint8_t *o_taken, size_t o_taken_len, uint8_t *o_remaining, size_t o_remaining_len, int32_t *o_changes, size_t o_changes_len);
956/* export fn osc_snapshot_save shape view snapdim owners view uint 1280 borrows view uint 3072 symbols view uint 19200 saved edit uint * to void */
957void osc_snapshot_save(const OscSnapshotShape *o_shape, const uint32_t o_owners[1280], const uint32_t o_borrows[3072], const uint32_t o_symbols[19200], uint32_t *o_saved, size_t o_saved_len);
958/* export fn osc_snapshot_restore shape view snapdim owners edit uint 1280 borrows edit uint 3072 symbols edit uint 19200 saved view uint * to void */
959void osc_snapshot_restore(const OscSnapshotShape *o_shape, uint32_t o_owners[1280], uint32_t o_borrows[3072], uint32_t o_symbols[19200], const uint32_t *o_saved, size_t o_saved_len);
960/* export fn osc_join_snapshot saved view uint * owners edit uint 1280 changes edit int * to ulong */
961uint64_t osc_join_snapshot(const uint32_t *o_saved, size_t o_saved_len, uint32_t o_owners[1280], int32_t *o_changes, size_t o_changes_len);
962/* export fn osc_snapshot_moves saved view uint * owners view uint 1280 ids edit int * to ulong */
963uint64_t osc_snapshot_moves(const uint32_t *o_saved, size_t o_saved_len, const uint32_t o_owners[1280], int32_t *o_ids, size_t o_ids_len);
964/* export fn osc_join_branch_owners saved view uint * owners edit uint 1280 symbols view uint 19200 nodes edit uchar * to void */
965void osc_join_branch_owners(const uint32_t *o_saved, size_t o_saved_len, uint32_t o_owners[1280], const uint32_t o_symbols[19200], uint8_t *o_nodes, size_t o_nodes_len);
966typedef struct {
967 uint32_t id;
968 uint32_t line;
969 uint32_t node;
970 uint32_t loop;
971 uint8_t kind;
972 uint8_t mut;
973 uint8_t ombr_pad18[2];
974} OscDeclSite;
975OMBR_ASSERT(sizeof(OscDeclSite) == 20, "layout declsite size");
976OMBR_ASSERT(offsetof(OscDeclSite, id) == 0, "layout declsite field id");
977OMBR_ASSERT(offsetof(OscDeclSite, line) == 4, "layout declsite field line");
978OMBR_ASSERT(offsetof(OscDeclSite, node) == 8, "layout declsite field node");
979OMBR_ASSERT(offsetof(OscDeclSite, loop) == 12, "layout declsite field loop");
980OMBR_ASSERT(offsetof(OscDeclSite, kind) == 16, "layout declsite field kind");
981OMBR_ASSERT(offsetof(OscDeclSite, mut) == 17, "layout declsite field mut");
982typedef struct {
983 uint16_t head[256];
984 uint16_t prior[480];
985 uint16_t bucket[480];
986 uint16_t visible[480];
987 uint16_t start[136];
988 uint32_t count;
989 uint32_t depth;
990} OscCheckedScope;
991OMBR_ASSERT(sizeof(OscCheckedScope) == 3672, "layout scopetab size");
992OMBR_ASSERT(offsetof(OscCheckedScope, head) == 0, "layout scopetab field head");
993OMBR_ASSERT(offsetof(OscCheckedScope, prior) == 512, "layout scopetab field prior");
994OMBR_ASSERT(offsetof(OscCheckedScope, bucket) == 1472, "layout scopetab field bucket");
995OMBR_ASSERT(offsetof(OscCheckedScope, visible) == 2432, "layout scopetab field visible");
996OMBR_ASSERT(offsetof(OscCheckedScope, start) == 3392, "layout scopetab field start");
997OMBR_ASSERT(offsetof(OscCheckedScope, count) == 3664, "layout scopetab field count");
998OMBR_ASSERT(offsetof(OscCheckedScope, depth) == 3668, "layout scopetab field depth");
999/* export fn osc_scope_reset table edit scopetab to void */
1000void osc_scope_reset(OscCheckedScope *o_table);
1001/* export fn osc_scope_find table view scopetab symbols view uchar * stride ulong name view uchar * to long */
1002int64_t osc_scope_find(const OscCheckedScope *o_table, const uint8_t *o_symbols, size_t o_symbols_len, uint64_t o_stride, const uint8_t *o_name, size_t o_name_len);
1003/* export fn osc_scope_bind table edit scopetab id ulong name view uchar * to void */
1004void osc_scope_bind(OscCheckedScope *o_table, uint64_t o_id, const uint8_t *o_name, size_t o_name_len);
1005/* export fn osc_scope_push table edit scopetab to ulong */
1006uint64_t osc_scope_push(OscCheckedScope *o_table);
1007/* export fn osc_scope_pop table edit scopetab to void */
1008void osc_scope_pop(OscCheckedScope *o_table);
1009/* export fn osc_record_name records view uchar * name view uchar * stride ulong newest ulong to long */
1010int64_t osc_record_name(const uint8_t *o_records, size_t o_records_len, const uint8_t *o_name, size_t o_name_len, uint64_t o_stride, uint64_t o_newest);
1011/* export fn osc_find_function names view uchar * name view uchar * to long */
1012int64_t osc_find_function(const uint8_t *o_names, size_t o_names_len, const uint8_t *o_name, size_t o_name_len);
1013/* export fn osc_declare_symbol table edit scopetab symbols edit uchar 76800 name view uchar * ty view uchar 16 site view declsite to long */
1014int64_t osc_declare_symbol(OscCheckedScope *o_table, uint8_t o_symbols[76800], const uint8_t *o_name, size_t o_name_len, const uint8_t o_ty[16], const OscDeclSite *o_site);
1015#define OSC_POOL_FULL 1
1016#define OSC_POOL_RETIRED 2
1017#define OSC_HANDLE_UNKNOWN 0
1018#define OSC_HANDLE_LIVE 1
1019#define OSC_HANDLE_STALE 2
1020#define OSC_HANDLE_STALE_COPY 3
1021typedef struct {
1022 uint32_t count;
1023 uint32_t nbind;
1024 uint8_t freed[1024];
1025 int32_t binding[480];
1026} OscHandleState;
1027OMBR_ASSERT(sizeof(OscHandleState) == 2952, "layout handles size");
1028OMBR_ASSERT(offsetof(OscHandleState, count) == 0, "layout handles field count");
1029OMBR_ASSERT(offsetof(OscHandleState, nbind) == 4, "layout handles field nbind");
1030OMBR_ASSERT(offsetof(OscHandleState, freed) == 8, "layout handles field freed");
1031OMBR_ASSERT(offsetof(OscHandleState, binding) == 1032, "layout handles field binding");
1032typedef struct {
1033 uint64_t gbase;
1034 uint64_t dallocs;
1035 int32_t loop;
1036 int32_t branch;
1037 uint16_t cap;
1038 uint16_t dlive;
1039 uint8_t cap_off;
1040 uint8_t ombr_pad29[3];
1041} OscCheckedPool;
1042OMBR_ASSERT(sizeof(OscCheckedPool) == 32, "layout poolstat size");
1043OMBR_ASSERT(offsetof(OscCheckedPool, gbase) == 0, "layout poolstat field gbase");
1044OMBR_ASSERT(offsetof(OscCheckedPool, dallocs) == 8, "layout poolstat field dallocs");
1045OMBR_ASSERT(offsetof(OscCheckedPool, loop) == 16, "layout poolstat field loop");
1046OMBR_ASSERT(offsetof(OscCheckedPool, branch) == 20, "layout poolstat field branch");
1047OMBR_ASSERT(offsetof(OscCheckedPool, cap) == 24, "layout poolstat field cap");
1048OMBR_ASSERT(offsetof(OscCheckedPool, dlive) == 26, "layout poolstat field dlive");
1049OMBR_ASSERT(offsetof(OscCheckedPool, cap_off) == 28, "layout poolstat field cap_off");
1050/* export fn osc_pool_init p edit poolstat cap ulong base ulong loop_depth long cond_depth long to void */
1051void osc_pool_init(OscCheckedPool *o_p, uint64_t o_cap, uint64_t o_base, int64_t o_loop_depth, int64_t o_cond_depth);
1052/* export fn osc_pool_alloc p edit poolstat loop_depth long cond_depth long to ulong */
1053uint64_t osc_pool_alloc(OscCheckedPool *o_p, int64_t o_loop_depth, int64_t o_cond_depth);
1054/* export fn osc_pool_free p edit poolstat loop_depth long cond_depth long to void */
1055void osc_pool_free(OscCheckedPool *o_p, int64_t o_loop_depth, int64_t o_cond_depth);
1056/* export fn osc_handle_allocate h edit handles to long */
1057int64_t osc_handle_allocate(OscHandleState *o_h);
1058/* export fn osc_handle_bind h edit handles provenance long to ulong */
1059uint64_t osc_handle_bind(OscHandleState *o_h, int64_t o_provenance);
1060/* export fn osc_handle_visit h edit handles sites edit ulong 1024 b ulong freeing ulong symbol long line ulong to ulong */
1061uint64_t osc_handle_visit(OscHandleState *o_h, uint64_t o_sites[1024], uint64_t o_b, uint64_t o_freeing, int64_t o_symbol, uint64_t o_line);
1062/* export fn osc_handles_save h view handles s edit handles to void */
1063void osc_handles_save(const OscHandleState *o_h, OscHandleState *o_s);
1064/* export fn osc_handles_restore h edit handles s view handles bindings ulong to void */
1065void osc_handles_restore(OscHandleState *o_h, const OscHandleState *o_s, uint64_t o_bindings);
1066/* export fn osc_handles_settle h edit handles before view handles other view handles to void */
1067void osc_handles_settle(OscHandleState *o_h, const OscHandleState *o_before, const OscHandleState *o_other);
1068/* export fn osc_handle_frees h view handles before view handles ids edit uint 1024 to ulong */
1069uint64_t osc_handle_frees(const OscHandleState *o_h, const OscHandleState *o_before, uint32_t o_ids[1024]);
1070typedef struct {
1071 uint8_t op;
1072 uint8_t refused;
1073 uint16_t func;
1074 uint32_t line;
1075 uint32_t kind;
1076 int32_t obj;
1077 int32_t obj2;
1078 int32_t borrow;
1079 int32_t via;
1080 uint32_t region;
1081 uint32_t slot;
1082 uint32_t handle;
1083 uint64_t rights;
1084} OscTraceInput;
1085OMBR_ASSERT(sizeof(OscTraceInput) == 48, "layout trinput size");
1086OMBR_ASSERT(offsetof(OscTraceInput, op) == 0, "layout trinput field op");
1087OMBR_ASSERT(offsetof(OscTraceInput, refused) == 1, "layout trinput field refused");
1088OMBR_ASSERT(offsetof(OscTraceInput, func) == 2, "layout trinput field func");
1089OMBR_ASSERT(offsetof(OscTraceInput, line) == 4, "layout trinput field line");
1090OMBR_ASSERT(offsetof(OscTraceInput, kind) == 8, "layout trinput field kind");
1091OMBR_ASSERT(offsetof(OscTraceInput, obj) == 12, "layout trinput field obj");
1092OMBR_ASSERT(offsetof(OscTraceInput, obj2) == 16, "layout trinput field obj2");
1093OMBR_ASSERT(offsetof(OscTraceInput, borrow) == 20, "layout trinput field borrow");
1094OMBR_ASSERT(offsetof(OscTraceInput, via) == 24, "layout trinput field via");
1095OMBR_ASSERT(offsetof(OscTraceInput, region) == 28, "layout trinput field region");
1096OMBR_ASSERT(offsetof(OscTraceInput, slot) == 32, "layout trinput field slot");
1097OMBR_ASSERT(offsetof(OscTraceInput, handle) == 36, "layout trinput field handle");
1098OMBR_ASSERT(offsetof(OscTraceInput, rights) == 40, "layout trinput field rights");
1099/* export fn osc_trace_record trace edit uchar * event view trinput to void */
1100void osc_trace_record(uint8_t *o_trace, size_t o_trace_len, const OscTraceInput *o_event);
1101#define OSC_SCOPE_END_BORROW 1
1102#define OSC_SCOPE_RELEASE_OWNER 2
1103#define OSC_SCOPE_DESTROY_ARENA 3
1104#define OSC_SCOPE_CLOSE_POOL 4
1105#define OSC_SCOPE_REFUSE_ESCAPE 5
1106typedef struct {
1107 uint32_t first;
1108 uint32_t count;
1109 uint32_t objects;
1110 uint32_t borrows;
1111 uint32_t actions[480];
1112} OscScopeExit;
1113OMBR_ASSERT(sizeof(OscScopeExit) == 1936, "layout exitwork size");
1114OMBR_ASSERT(offsetof(OscScopeExit, first) == 0, "layout exitwork field first");
1115OMBR_ASSERT(offsetof(OscScopeExit, count) == 4, "layout exitwork field count");
1116OMBR_ASSERT(offsetof(OscScopeExit, objects) == 8, "layout exitwork field objects");
1117OMBR_ASSERT(offsetof(OscScopeExit, borrows) == 12, "layout exitwork field borrows");
1118OMBR_ASSERT(offsetof(OscScopeExit, actions) == 16, "layout exitwork field actions");
1119/* export fn osc_scope_exit visible view ushort 480 symbols view uchar 76800 owners edit uchar 5120 borrows edit uchar 12288 work edit exitwork to ulong */
1120uint64_t osc_scope_exit(const uint16_t o_visible[480], const uint8_t o_symbols[76800], uint8_t o_owners[5120], uint8_t o_borrows[12288], OscScopeExit *o_work);
1121/* export fn osc_reserve_arena symbol edit uchar 160 loop_depth ulong branch_depth ulong cells ulong to ulong */
1122uint64_t osc_reserve_arena(uint8_t o_symbol[160], uint64_t o_loop_depth, uint64_t o_branch_depth, uint64_t o_cells);
1123#define OSC_FLOW_RETURNS 1
1124#define OSC_FLOW_UNREACHABLE 2
1125#define OSC_BLOCK_BAD_RANGE 1
1126#define OSC_BLOCK_OVERLAP 2
1127#define OSC_BLOCK_NO_TERMINATOR 3
1128#define OSC_BLOCK_EARLY_TERMINATOR 4
1129#define OSC_BLOCK_UNCOVERED 5
1130/* export fn osc_statement_flow nodes view uchar * order edit ulong * flow edit uchar * to void */
1131void osc_statement_flow(const uint8_t *o_nodes, size_t o_nodes_len, uint64_t *o_order, size_t o_order_len, uint8_t *o_flow, size_t o_flow_len);
1132/* export fn osc_block_partition blocks view uchar * insns view uchar * location out ulong 1 to ulong */
1133uint64_t osc_block_partition(const uint8_t *o_blocks, size_t o_blocks_len, const uint8_t *o_insns, size_t o_insns_len, uint64_t o_location[1]);
1134/* export fn osc_definite_inputs transfers view ulong * inputs edit ulong * params ulong width ulong to void */
1135void osc_definite_inputs(const uint64_t *o_transfers, size_t o_transfers_len, uint64_t *o_inputs, size_t o_inputs_len, uint64_t o_params, uint64_t o_width);
1136/* export fn osc_layout_blocks tags view short * source view ulong 24576 dest edit ulong 24576 blocks edit uint 1024 nblocks ulong to void */
1137void osc_layout_blocks(const int16_t *o_tags, size_t o_tags_len, const uint64_t o_source[24576], uint64_t o_dest[24576], uint32_t o_blocks[1024], uint64_t o_nblocks);
1138/* export fn osc_ir_operands insn view uchar 48 uses edit ushort 6 to ulong */
1139uint64_t osc_ir_operands(const uint8_t o_insn[48], uint16_t o_uses[6]);
1140/* export fn osc_ir_resources insns view uchar * types view uchar 480 slices view uchar 480 params ulong to ulong */
1141uint64_t osc_ir_resources(const uint8_t *o_insns, size_t o_insns_len, const uint8_t o_types[480], const uint8_t o_slices[480], uint64_t o_params);
1142/* export fn osc_ir_block_transfer insns view uchar * record edit ulong * blocks ulong to void */
1143void osc_ir_block_transfer(const uint8_t *o_insns, size_t o_insns_len, uint64_t *o_record, size_t o_record_len, uint64_t o_blocks);
1144/* export fn osc_ir_block_reads insns view uchar * available edit ulong * to ulong */
1145uint64_t osc_ir_block_reads(const uint8_t *o_insns, size_t o_insns_len, uint64_t *o_available, size_t o_available_len);
1146/* export fn osc_ir_canonical scalar ulong value ulong to ulong */
1147uint64_t osc_ir_canonical(uint64_t o_scalar, uint64_t o_value);
1148/* export fn osc_ir_contract terms view uchar * params view uchar 256 result ulong to ulong */
1149uint64_t osc_ir_contract(const uint8_t *o_terms, size_t o_terms_len, const uint8_t o_params[256], uint64_t o_result);
1150/* export fn osc_begin_insn record out uchar 48 opcode ulong line ulong to ulong */
1151uint64_t osc_begin_insn(uint8_t o_record[48], uint64_t o_opcode, uint64_t o_line);
1152typedef struct {
1153 uint32_t index;
1154 uint32_t count;
1155 uint32_t result;
1156 uint32_t kind[6];
1157 uint32_t offset;
1158} OscArtifactEntry;
1159OMBR_ASSERT(sizeof(OscArtifactEntry) == 40, "layout entry size");
1160OMBR_ASSERT(offsetof(OscArtifactEntry, index) == 0, "layout entry field index");
1161OMBR_ASSERT(offsetof(OscArtifactEntry, count) == 4, "layout entry field count");
1162OMBR_ASSERT(offsetof(OscArtifactEntry, result) == 8, "layout entry field result");
1163OMBR_ASSERT(offsetof(OscArtifactEntry, kind) == 12, "layout entry field kind");
1164OMBR_ASSERT(offsetof(OscArtifactEntry, offset) == 36, "layout entry field offset");
1165/* export fn osc_artifact_entry row view entry name view uchar * dst edit uchar * to long */
1166int64_t osc_artifact_entry(const OscArtifactEntry *o_row, const uint8_t *o_name, size_t o_name_len, uint8_t *o_dst, size_t o_dst_len);
1167/* export fn osc_artifact_hex digest view uchar 32 dst edit uchar 65 to void */
1168void osc_artifact_hex(const uint8_t o_digest[32], uint8_t o_dst[65]);
1169/* export fn tensor_shape_size dims view ulong * elems edit ulong 1 to long */
1170int64_t tensor_shape_size(const uint64_t *o_dims, size_t o_dims_len, uint64_t o_elems[1]);
1171/* export fn tensor_dense_strides dims view ulong * strides edit ulong * to void */
1172void tensor_dense_strides(const uint64_t *o_dims, size_t o_dims_len, uint64_t *o_strides, size_t o_strides_len);
1173/* export fn tensor_view_bounds dims view ulong * strides view ulong * offset ulong storage ulong to long */
1174int64_t tensor_view_bounds(const uint64_t *o_dims, size_t o_dims_len, const uint64_t *o_strides, size_t o_strides_len, uint64_t o_offset, uint64_t o_storage);
1175/* export fn tensor_broadcast_dims lhs view ulong * rhs view ulong * result_dims edit ulong * to long */
1176int64_t tensor_broadcast_dims(const uint64_t *o_lhs, size_t o_lhs_len, const uint64_t *o_rhs, size_t o_rhs_len, uint64_t *o_result_dims, size_t o_result_dims_len);
1177/* export fn tensor_is_row_major dims view ulong * strides view ulong * to ulong */
1178uint64_t tensor_is_row_major(const uint64_t *o_dims, size_t o_dims_len, const uint64_t *o_strides, size_t o_strides_len);
1179/* export fn tensor_canonical_word dtype ulong word ulong to ulong */
1180uint64_t tensor_canonical_word(uint64_t o_dtype, uint64_t o_word);
1181/* export fn tensor_value_bytes data edit uchar * dtype ulong native_le ulong to void */
1182void tensor_value_bytes(uint8_t *o_data, size_t o_data_len, uint64_t o_dtype, uint64_t o_native_le);
1183/* export fn tstore_hex_name id view uchar 32 out_name out uchar 68 to void */
1184void tstore_hex_name(const uint8_t o_id[32], uint8_t o_out_name[68]);
1185/* export fn tstore_is_payload_name name view uchar * to ulong */
1186uint64_t tstore_is_payload_name(const uint8_t *o_name, size_t o_name_len);
1187/* export fn tstore_encode_header cap ulong count ulong out_hdr out uchar 24 to void */
1188void tstore_encode_header(uint64_t o_cap, uint64_t o_count, uint8_t o_out_hdr[24]);
1189/* export fn tstore_decode_header in_hdr view uchar 24 expect_cap ulong count_out edit ulong 1 to ulong */
1190uint64_t tstore_decode_header(const uint8_t o_in_hdr[24], uint64_t o_expect_cap, uint64_t o_count_out[1]);
1191/* export fn tstore_encode_record meta view ulong 6 shape view ulong 8 value_id view uchar 32 payload_sha view uchar 32 out_rec out uchar 168 to void */
1192void tstore_encode_record(const uint64_t o_meta[6], const uint64_t o_shape[8], const uint8_t o_value_id[32], const uint8_t o_payload_sha[32], uint8_t o_out_rec[168]);
1193/* export fn tstore_decode_record in_rec view uchar 168 meta edit ulong 6 shape edit ulong 8 value_id out uchar 32 payload_sha out uchar 32 to ulong */
1194uint64_t tstore_decode_record(const uint8_t o_in_rec[168], uint64_t o_meta[6], uint64_t o_shape[8], uint8_t o_value_id[32], uint8_t o_payload_sha[32]);
1195/* export fn tensor_copy_op src view uchar * dst edit uchar * desc view ulong 21 to void */
1196void tensor_copy_op(const uint8_t *o_src, size_t o_src_len, uint8_t *o_dst, size_t o_dst_len, const uint64_t o_desc[21]);
1197/* export fn tensor_plan_op in_a view ulong 8 in_b view ulong 8 out_buf edit ulong 24 meta view ulong 4 to void */
1198void tensor_plan_op(const uint64_t o_in_a[8], const uint64_t o_in_b[8], uint64_t o_out_buf[24], const uint64_t o_meta[4]);
1199/* export fn tg_sgd_mode learning ulong momentum ulong to long */
1200int64_t tg_sgd_mode(uint64_t o_learning, uint64_t o_momentum);
1201/* export fn tg_update_velocity velocity edit uint * gradient view uint * bits ulong to void */
1202void tg_update_velocity(uint32_t *o_velocity, size_t o_velocity_len, const uint32_t *o_gradient, size_t o_gradient_len, uint64_t o_bits);
1203/* export fn tg_update_params params edit uint * direction view uint * bits ulong to void */
1204void tg_update_params(uint32_t *o_params, size_t o_params_len, const uint32_t *o_direction, size_t o_direction_len, uint64_t o_bits);
1205/* export fn tg_encode_hex digest view uchar 32 out_hex out uchar 64 to void */
1206void tg_encode_hex(const uint8_t o_digest[32], uint8_t o_out_hex[64]);
1207/* export fn tg_encode_pointer gen ulong digest view uchar 32 out_buf out uchar 95 to void */
1208void tg_encode_pointer(uint64_t o_gen, const uint8_t o_digest[32], uint8_t o_out_buf[95]);
1209/* export fn tg_decode_pointer buf view uchar 95 gen_out edit ulong 1 digest_out out uchar 32 to ulong */
1210uint64_t tg_decode_pointer(const uint8_t o_buf[95], uint64_t o_gen_out[1], uint8_t o_digest_out[32]);
1211/* export fn tg_encode_dispatch fields view ulong 6 refs view ulong 9 base_digest view uchar 32 rec out uchar 192 to void */
1212void tg_encode_dispatch(const uint64_t o_fields[6], const uint64_t o_refs[9], const uint8_t o_base_digest[32], uint8_t o_rec[192]);
1213/* export fn tg_set_dispatch_seq rec edit uchar 192 seq ulong to void */
1214void tg_set_dispatch_seq(uint8_t o_rec[192], uint64_t o_seq);
1215/* export fn tg_check_dispatch_header rec view uchar 192 expect_seq ulong to ulong */
1216uint64_t tg_check_dispatch_header(const uint8_t o_rec[192], uint64_t o_expect_seq);
1217/* export fn tg_decode_dispatch rec view uchar 192 fields edit ulong 7 refs edit ulong 9 to ulong */
1218uint64_t tg_decode_dispatch(const uint8_t o_rec[192], uint64_t o_fields[7], uint64_t o_refs[9]);
1219/* export fn tg_encode_generation fields view ulong 5 dispatch view uchar 32 previous view uchar 32 header out uchar 152 to void */
1220void tg_encode_generation(const uint64_t o_fields[5], const uint8_t o_dispatch[32], const uint8_t o_previous[32], uint8_t o_header[152]);
1221/* export fn tg_decode_generation header view uchar 152 size ulong expected ulong fields edit ulong 5 to ulong */
1222uint64_t tg_decode_generation(const uint8_t o_header[152], uint64_t o_size, uint64_t o_expected, uint64_t o_fields[5]);
1223/* export fn ad_unbroadcast_steps source view ulong * target view ulong * steps edit uchar 8 to long */
1224int64_t ad_unbroadcast_steps(const uint64_t *o_source, size_t o_source_len, const uint64_t *o_target, size_t o_target_len, uint8_t o_steps[8]);
1225/* export fn ad_same_shape lhs view ulong * rhs view ulong * to ulong */
1226uint64_t ad_same_shape(const uint64_t *o_lhs, size_t o_lhs_len, const uint64_t *o_rhs, size_t o_rhs_len);
1227/* export fn ad_restore_axis shape view ulong * axis ulong restored edit ulong * to void */
1228void ad_restore_axis(const uint64_t *o_shape, size_t o_shape_len, uint64_t o_axis, uint64_t *o_restored, size_t o_restored_len);
1229/* export fn allen_encode_hex src view uchar * out_hex edit uchar * to void */
1230void allen_encode_hex(const uint8_t *o_src, size_t o_src_len, uint8_t *o_out_hex, size_t o_out_hex_len);
1231/* export fn allen_decode_hex in_hex view uchar * out_bytes edit uchar * to ulong */
1232uint64_t allen_decode_hex(const uint8_t *o_in_hex, size_t o_in_hex_len, uint8_t *o_out_bytes, size_t o_out_bytes_len);
1233/* export fn allen_check_lineage cortex view uchar 32 genesis view uchar 32 has_genesis ulong to long */
1234int64_t allen_check_lineage(const uint8_t o_cortex[32], const uint8_t o_genesis[32], uint64_t o_has_genesis);
1235/* export fn allen_le64 id view uchar 8 to ulong */
1236uint64_t allen_le64(const uint8_t o_id[8]);
1237/* export fn rxp_valid_role family ulong role ulong to ulong */
1238uint64_t rxp_valid_role(uint64_t o_family, uint64_t o_role);
1239/* export fn rxp_check_step family ulong role ulong n_in ulong n_out ulong plen ulong to long */
1240int64_t rxp_check_step(uint64_t o_family, uint64_t o_role, uint64_t o_n_in, uint64_t o_n_out, uint64_t o_plen);
1241/* export fn rxp_step_size n_in ulong n_out ulong plen ulong to ulong */
1242uint64_t rxp_step_size(uint64_t o_n_in, uint64_t o_n_out, uint64_t o_plen);
1243/* export fn rxp_bytes_cmp a view uchar * b view uchar * to long */
1244int64_t rxp_bytes_cmp(const uint8_t *o_a, size_t o_a_len, const uint8_t *o_b, size_t o_b_len);
1245/* export fn rxp_encode_header count ulong attr_count ulong ids view uchar 96 out_hdr out uchar 106 to void */
1246void rxp_encode_header(uint64_t o_count, uint64_t o_attr_count, const uint8_t o_ids[96], uint8_t o_out_hdr[106]);
1247/* export fn rxp_decode_header in_hdr view uchar 106 counts edit ulong 2 ids out uchar 96 to long */
1248int64_t rxp_decode_header(const uint8_t o_in_hdr[106], uint64_t o_counts[2], uint8_t o_ids[96]);
1249/* export fn rxp_encode_step_head idx ulong family ulong role ulong in_cnt ulong out_buf out uchar 8 to void */
1250void rxp_encode_step_head(uint64_t o_idx, uint64_t o_family, uint64_t o_role, uint64_t o_in_cnt, uint8_t o_out_buf[8]);
1251/* export fn rxp_decode_step_head in_buf view uchar 8 expect_idx ulong fields edit ulong 3 to long */
1252int64_t rxp_decode_step_head(const uint8_t o_in_buf[8], uint64_t o_expect_idx, uint64_t o_fields[3]);
1253/* export fn ans_om_component_atom comp ulong to ulong */
1254uint64_t ans_om_component_atom(uint64_t o_comp);
1255/* export fn ans_om_validate_ref version ulong vals view ulong 23 to long */
1256int64_t ans_om_validate_ref(uint64_t o_version, const uint64_t o_vals[23]);
1257/* export fn ans_om_drift x view ulong 4 p_diag view ulong 4 out_vals edit ulong 3 to long */
1258int64_t ans_om_drift(const uint64_t o_x[4], const uint64_t o_p_diag[4], uint64_t o_out_vals[3]);
1259/* export fn ans_om_autonomy_tier x view ulong 4 limits view ulong 4 tsig view ulong 3 sigma_bits ulong disagreement ulong to ulong */
1260uint64_t ans_om_autonomy_tier(const uint64_t o_x[4], const uint64_t o_limits[4], const uint64_t o_tsig[3], uint64_t o_sigma_bits, uint64_t o_disagreement);
1261/* export fn ans_om_promotion_result flags view ulong 4 d_bits ulong lim_bits ulong to ulong */
1262uint64_t ans_om_promotion_result(const uint64_t o_flags[4], uint64_t o_d_bits, uint64_t o_lim_bits);
1263/* export fn ans_om_check_action kind ulong risk_bits ulong touches view uint 10 id view uchar 32 to long */
1264int64_t ans_om_check_action(uint64_t o_kind, uint64_t o_risk_bits, const uint32_t o_touches[10], const uint8_t o_id[32]);
1265/* export fn ans_om_check_meas cls ulong z view ulong 4 to long */
1266int64_t ans_om_check_meas(uint64_t o_cls, const uint64_t o_z[4]);
1267/* export fn ans_om_write_header kind ulong out_hdr out uchar 8 to void */
1268void ans_om_write_header(uint64_t o_kind, uint8_t o_out_hdr[8]);
1269/* export fn ans_om_check_header hdr view uchar 8 kind ulong to ulong */
1270uint64_t ans_om_check_header(const uint8_t o_hdr[8], uint64_t o_kind);
1271/* export fn ans_om_canon_f64 bits ulong to ulong */
1272uint64_t ans_om_canon_f64(uint64_t o_bits);
1273/* export fn res_om_fit_normal x view ulong * y view ulong * ws edit ulong 67334 meta view ulong 4 to long */
1274int64_t res_om_fit_normal(const uint64_t *o_x, size_t o_x_len, const uint64_t *o_y, size_t o_y_len, uint64_t o_ws[67334], const uint64_t o_meta[4]);
1275/* export fn res_om_fit_solve ws edit ulong 67334 nf ulong no ulong to long */
1276int64_t res_om_fit_solve(uint64_t o_ws[67334], uint64_t o_nf, uint64_t o_no);
1277/* export fn res_om_readout_apply w view ulong 1028 x view ulong * y_out edit ulong * meta view ulong 2 to long */
1278int64_t res_om_readout_apply(const uint64_t o_w[1028], const uint64_t *o_x, size_t o_x_len, uint64_t *o_y_out, size_t o_y_out_len, const uint64_t o_meta[2]);
1279/* export fn res_om_nrmse ref view ulong * pred view ulong * out_bits edit ulong 1 to long */
1280int64_t res_om_nrmse(const uint64_t *o_ref, size_t o_ref_len, const uint64_t *o_pred, size_t o_pred_len, uint64_t o_out_bits[1]);
1281/* export fn cl_om_put_le val ulong nbytes ulong out_buf out uchar 8 to void */
1282void cl_om_put_le(uint64_t o_val, uint64_t o_nbytes, uint8_t o_out_buf[8]);
1283/* export fn cl_om_get_le in_buf view uchar 8 nbytes ulong to ulong */
1284uint64_t cl_om_get_le(const uint8_t o_in_buf[8], uint64_t o_nbytes);
1285/* export fn cl_om_hex src view uchar * out_hex edit uchar * to void */
1286void cl_om_hex(const uint8_t *o_src, size_t o_src_len, uint8_t *o_out_hex, size_t o_out_hex_len);
1287/* export fn cl_om_contains hay view uchar * needle view uchar * to ulong */
1288uint64_t cl_om_contains(const uint8_t *o_hay, size_t o_hay_len, const uint8_t *o_needle, size_t o_needle_len);
1289/* export fn rx_dual_om_digest_is_zero d view uchar 32 to ulong */
1290uint64_t rx_dual_om_digest_is_zero(const uint8_t o_d[32]);
1291/* export fn rx_dual_om_digest_eq a view uchar 32 b view uchar 32 to ulong */
1292uint64_t rx_dual_om_digest_eq(const uint8_t o_a[32], const uint8_t o_b[32]);
1293/* export fn rx_dual_om_unit_valid u ulong to ulong */
1294uint64_t rx_dual_om_unit_valid(uint64_t o_u);
1295/* export fn rx_dual_om_ids_ascending ids view uint * n ulong to ulong */
1296uint64_t rx_dual_om_ids_ascending(const uint32_t *o_ids, size_t o_ids_len, uint64_t o_n);
1297/* export fn rx_dual_om_check_site_name name view uchar 32 to ulong */
1298uint64_t rx_dual_om_check_site_name(const uint8_t o_name[32]);
1299/* export fn rx_dual_om_put_u32 dst edit uchar * pos ulong v ulong to void */
1300void rx_dual_om_put_u32(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1301/* export fn rx_dual_om_put_u64 dst edit uchar * pos ulong v ulong to void */
1302void rx_dual_om_put_u64(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1303/* export fn rx_dual_om_put_f64_canon dst edit uchar * pos ulong bits ulong to void */
1304void rx_dual_om_put_f64_canon(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_bits);
1305/* export fn rx_dual_om_get_u32 src view uchar * pos ulong to ulong */
1306uint64_t rx_dual_om_get_u32(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1307/* export fn rx_dual_om_get_u64 src view uchar * pos ulong to ulong */
1308uint64_t rx_dual_om_get_u64(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1309/* export fn rx_dual_om_consequence_check meta view ulong 2 vals view ulong 4 to ulong */
1310uint64_t rx_dual_om_consequence_check(const uint64_t o_meta[2], const uint64_t o_vals[4]);
1311/* export fn rx_dual_om_consequence_error pred_b ulong sd_b ulong meas_b ulong to ulong */
1312uint64_t rx_dual_om_consequence_error(uint64_t o_pred_b, uint64_t o_sd_b, uint64_t o_meas_b);
1313/* export fn rx_dual_om_unit_from_est u ulong to ulong */
1314uint64_t rx_dual_om_unit_from_est(uint64_t o_u);
1315/* export fn rx_dual_om_classify_state flags view ulong 6 to ulong */
1316uint64_t rx_dual_om_classify_state(const uint64_t o_flags[6]);
1317/* export fn rx_dual_om_step_lambda p view ulong 9 out_b edit ulong 1 to ulong */
1318uint64_t rx_dual_om_step_lambda(const uint64_t o_p[9], uint64_t o_out_b[1]);
1319/* export fn rx_dual_om_parse_udec p view uchar * n ulong out_b edit ulong 1 to ulong */
1320uint64_t rx_dual_om_parse_udec(const uint8_t *o_p, size_t o_p_len, uint64_t o_n, uint64_t o_out_b[1]);
1321/* export fn rx_dual_om_reversals xbytes view uchar * lo ulong hi ulong to ulong */
1322uint64_t rx_dual_om_reversals(const uint8_t *o_xbytes, size_t o_xbytes_len, uint64_t o_lo, uint64_t o_hi);
1323/* export fn rx_dual_om_peak_to_peak xbytes view uchar * lo ulong hi ulong to ulong */
1324uint64_t rx_dual_om_peak_to_peak(const uint8_t *o_xbytes, size_t o_xbytes_len, uint64_t o_lo, uint64_t o_hi);
1325/* export fn applic_om_rng_next st edit ulong 1 to ulong */
1326uint64_t applic_om_rng_next(uint64_t o_st[1]);
1327/* export fn applic_om_rng_unit st edit ulong 1 to ulong */
1328uint64_t applic_om_rng_unit(uint64_t o_st[1]);
1329/* export fn applic_om_rng_range st edit ulong 1 lo ulong hi ulong to ulong */
1330uint64_t applic_om_rng_range(uint64_t o_st[1], uint64_t o_lo, uint64_t o_hi);
1331/* export fn applic_om_seed wl ulong seed_index ulong to ulong */
1332uint64_t applic_om_seed(uint64_t o_wl, uint64_t o_seed_index);
1333/* export fn applic_om_sweep_sigma seed_index ulong to ulong */
1334uint64_t applic_om_sweep_sigma(uint64_t o_seed_index);
1335/* export fn applic_om_family_is_het wl ulong step ulong to ulong */
1336uint64_t applic_om_family_is_het(uint64_t o_wl, uint64_t o_step);
1337/* export fn applic_om_capacity_this_step wl ulong step ulong to ulong */
1338uint64_t applic_om_capacity_this_step(uint64_t o_wl, uint64_t o_step);
1339/* export fn applic_om_ledger_ok counts view ulong 5 to ulong */
1340uint64_t applic_om_ledger_ok(const uint64_t o_counts[5]);
1341/* export fn applic_om_predict_with_arrivals inp view ulong 8 out_p edit ulong 3 to void */
1342void applic_om_predict_with_arrivals(const uint64_t o_inp[8], uint64_t o_out_p[3]);
1343/* export fn applic_om_error_finalize se view ulong 4 scored ulong out_e edit ulong 4 to void */
1344void applic_om_error_finalize(const uint64_t o_se[4], uint64_t o_scored, uint64_t o_out_e[4]);
1345/* export fn applic_om_sort_desc items view uchar * idx edit uint * n ulong to void */
1346void applic_om_sort_desc(const uint8_t *o_items, size_t o_items_len, uint32_t *o_idx, size_t o_idx_len, uint64_t o_n);
1347/* export fn applic_om_pearson xbytes view uchar * ybytes view uchar * n ulong out_r edit ulong 2 to void */
1348void applic_om_pearson(const uint8_t *o_xbytes, size_t o_xbytes_len, const uint8_t *o_ybytes, size_t o_ybytes_len, uint64_t o_n, uint64_t o_out_r[2]);
1349/* export fn est_om_digest_is_zero d view uchar 32 to ulong */
1350uint64_t est_om_digest_is_zero(const uint8_t o_d[32]);
1351/* export fn est_om_check_finite a view ulong * cnt ulong to long */
1352int64_t est_om_check_finite(const uint64_t *o_a, size_t o_a_len, uint64_t o_cnt);
1353/* export fn est_om_check_units u view uint * cnt ulong to long */
1354int64_t est_om_check_units(const uint32_t *o_u, size_t o_u_len, uint64_t o_cnt);
1355/* export fn est_om_check_covariance a view ulong * n ulong work edit ulong 72 tols view ulong 4 to long */
1356int64_t est_om_check_covariance(const uint64_t *o_a, size_t o_a_len, uint64_t o_n, uint64_t o_work[72], const uint64_t o_tols[4]);
1357/* export fn est_om_chol s view ulong * l edit ulong 64 n ulong to ulong */
1358uint64_t est_om_chol(const uint64_t *o_s, size_t o_s_len, uint64_t o_l[64], uint64_t o_n);
1359/* export fn est_om_fwd l view ulong 64 b view ulong 8 y edit ulong 8 n ulong to void */
1360void est_om_fwd(const uint64_t o_l[64], const uint64_t o_b[8], uint64_t o_y[8], uint64_t o_n);
1361/* export fn est_om_bwd l view ulong 64 y view ulong 8 x edit ulong 8 n ulong to void */
1362void est_om_bwd(const uint64_t o_l[64], const uint64_t o_y[8], uint64_t o_x[8], uint64_t o_n);
1363/* export fn est_om_mm a view ulong 64 b view ulong 64 c edit ulong 64 dims view ulong 3 to void */
1364void est_om_mm(const uint64_t o_a[64], const uint64_t o_b[64], uint64_t o_c[64], const uint64_t o_dims[3]);
1365/* export fn est_om_mmt a view ulong 64 b view ulong 64 c edit ulong 64 dims view ulong 3 to void */
1366void est_om_mmt(const uint64_t o_a[64], const uint64_t o_b[64], uint64_t o_c[64], const uint64_t o_dims[3]);
1367/* export fn est_om_symmetrize a edit ulong * n ulong to void */
1368void est_om_symmetrize(uint64_t *o_a, size_t o_a_len, uint64_t o_n);
1369/* export fn est_om_put_u32 dst edit uchar * pos ulong v ulong to void */
1370void est_om_put_u32(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1371/* export fn est_om_put_u64 dst edit uchar * pos ulong v ulong to void */
1372void est_om_put_u64(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1373/* export fn est_om_put_f64_canon dst edit uchar * pos ulong bits ulong to void */
1374void est_om_put_f64_canon(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_bits);
1375/* export fn est_om_get_u32 src view uchar * pos ulong to ulong */
1376uint64_t est_om_get_u32(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1377/* export fn est_om_get_u64 src view uchar * pos ulong to ulong */
1378uint64_t est_om_get_u64(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1379/* export fn est_om_write_hdr dst edit uchar * kind ulong to void */
1380void est_om_write_hdr(uint8_t *o_dst, size_t o_dst_len, uint64_t o_kind);
1381/* export fn est_om_check_hdr src view uchar * slen ulong want ulong to long */
1382int64_t est_om_check_hdr(const uint8_t *o_src, size_t o_src_len, uint64_t o_slen, uint64_t o_want);
1383/* export fn est_om_mix_check w view ulong 3 v view ulong 3 k ulong tol_bits ulong to long */
1384int64_t est_om_mix_check(const uint64_t o_w[3], const uint64_t o_v[3], uint64_t o_k, uint64_t o_tol_bits);
1385/* export fn est_om_mix_total_var w view ulong 3 v view ulong 3 k ulong to ulong */
1386uint64_t est_om_mix_total_var(const uint64_t o_w[3], const uint64_t o_v[3], uint64_t o_k);
1387/* export fn st_om_hex_lower src view uchar * n ulong dst edit uchar * to void */
1388void st_om_hex_lower(const uint8_t *o_src, size_t o_src_len, uint64_t o_n, uint8_t *o_dst, size_t o_dst_len);
1389/* export fn st_om_ct_equal a view uchar * b view uchar * n ulong to ulong */
1390uint64_t st_om_ct_equal(const uint8_t *o_a, size_t o_a_len, const uint8_t *o_b, size_t o_b_len, uint64_t o_n);
1391/* export fn st_om_label_ok s view uchar * n ulong lim ulong to ulong */
1392uint64_t st_om_label_ok(const uint8_t *o_s, size_t o_s_len, uint64_t o_n, uint64_t o_lim);
1393/* export fn st_om_count_tasks t view uchar * slen ulong to ulong */
1394uint64_t st_om_count_tasks(const uint8_t *o_t, size_t o_t_len, uint64_t o_slen);
1395/* export fn st_om_put_be64_be32 dst edit uchar 12 l ulong count ulong to void */
1396void st_om_put_be64_be32(uint8_t o_dst[12], uint64_t o_l, uint64_t o_count);
1397/* export fn st_om_parse_hex32 v view uchar * n ulong dst edit uchar 32 to long */
1398int64_t st_om_parse_hex32(const uint8_t *o_v, size_t o_v_len, uint64_t o_n, uint8_t o_dst[32]);
1399/* export fn st_om_parse_dec v view uchar * n ulong max_v ulong dst edit ulong 1 to long */
1400int64_t st_om_parse_dec(const uint8_t *o_v, size_t o_v_len, uint64_t o_n, uint64_t o_max_v, uint64_t o_dst[1]);
1401/* export fn st_om_parse_i64 s view uchar * n ulong dst edit ulong 1 to ulong */
1402uint64_t st_om_parse_i64(const uint8_t *o_s, size_t o_s_len, uint64_t o_n, uint64_t o_dst[1]);
1403/* export fn st_om_check_rec_bytes rec view uchar * slen ulong to long */
1404int64_t st_om_check_rec_bytes(const uint8_t *o_rec, size_t o_rec_len, uint64_t o_slen);
1405/* export fn lang_om_is_ident_start c ulong to ulong */
1406uint64_t lang_om_is_ident_start(uint64_t o_c);
1407/* export fn lang_om_is_ident_char c ulong to ulong */
1408uint64_t lang_om_is_ident_char(uint64_t o_c);
1409/* export fn lang_om_digit_value c ulong to ulong */
1410uint64_t lang_om_digit_value(uint64_t o_c);
1411/* export fn lang_om_lex_int src view uchar * slen ulong pos ulong dst edit ulong 3 to ulong */
1412uint64_t lang_om_lex_int(const uint8_t *o_src, size_t o_src_len, uint64_t o_slen, uint64_t o_pos, uint64_t o_dst[3]);
1413/* export fn lang_om_keyword w view uchar * n ulong to ulong */
1414uint64_t lang_om_keyword(const uint8_t *o_w, size_t o_w_len, uint64_t o_n);
1415/* export fn lang_om_punct c ulong d ulong dst edit ulong 2 to ulong */
1416uint64_t lang_om_punct(uint64_t o_c, uint64_t o_d, uint64_t o_dst[2]);
1417/* export fn visor_om_check_bytes p view uchar * n ulong dst edit ulong 2 to ulong */
1418uint64_t visor_om_check_bytes(const uint8_t *o_p, size_t o_p_len, uint64_t o_n, uint64_t o_dst[2]);
1419/* export fn visor_om_trim_blanks p view uchar * n ulong dst edit ulong 2 to void */
1420void visor_om_trim_blanks(const uint8_t *o_p, size_t o_p_len, uint64_t o_n, uint64_t o_dst[2]);
1421/* export fn visor_om_cmd_arity cmd ulong dst edit ulong 2 to ulong */
1422uint64_t visor_om_cmd_arity(uint64_t o_cmd, uint64_t o_dst[2]);
1423/* export fn fab_om_ct_equal a view uchar * b view uchar * n ulong to ulong */
1424uint64_t fab_om_ct_equal(const uint8_t *o_a, size_t o_a_len, const uint8_t *o_b, size_t o_b_len, uint64_t o_n);
1425/* export fn fab_om_hmac_xor_pad k view uchar 64 pad edit uchar 64 xbyte ulong to void */
1426void fab_om_hmac_xor_pad(const uint8_t o_k[64], uint8_t o_pad[64], uint64_t o_xbyte);
1427/* export fn fab_om_put_u16 dst edit uchar * pos ulong v ulong to void */
1428void fab_om_put_u16(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1429/* export fn fab_om_put_u32 dst edit uchar * pos ulong v ulong to void */
1430void fab_om_put_u32(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1431/* export fn fab_om_put_u64 dst edit uchar * pos ulong v ulong to void */
1432void fab_om_put_u64(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1433/* export fn fab_om_get_u16 src view uchar * pos ulong to ulong */
1434uint64_t fab_om_get_u16(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1435/* export fn fab_om_get_u32 src view uchar * pos ulong to ulong */
1436uint64_t fab_om_get_u32(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1437/* export fn fab_om_get_u64 src view uchar * pos ulong to ulong */
1438uint64_t fab_om_get_u64(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1439/* export fn fab_om_body_size kind ulong to ulong */
1440uint64_t fab_om_body_size(uint64_t o_kind);
1441/* export fn fab_om_digest_nonzero_eq a view uchar 32 b view uchar 32 to ulong */
1442uint64_t fab_om_digest_nonzero_eq(const uint8_t o_a[32], const uint8_t o_b[32]);
1443/* export fn oma_om_block_encode src view uchar 64 dst edit ulong 2 to ulong */
1444uint64_t oma_om_block_encode(const uint8_t o_src[64], uint64_t o_dst[2]);
1445/* export fn oma_om_block_decode pos ulong neg_p ulong dst edit uchar 64 to ulong */
1446uint64_t oma_om_block_decode(uint64_t o_pos, uint64_t o_neg_p, uint8_t o_dst[64]);
1447/* export fn oma_om_block_add a view ulong 2 b view ulong 2 dst edit ulong 4 to ulong */
1448uint64_t oma_om_block_add(const uint64_t o_a[2], const uint64_t o_b[2], uint64_t o_dst[4]);
1449/* export fn oma_om_block_mul a view ulong 2 b view ulong 2 dst edit ulong 2 to ulong */
1450uint64_t oma_om_block_mul(const uint64_t o_a[2], const uint64_t o_b[2], uint64_t o_dst[2]);
1451/* export fn oma_om_block_dot a view ulong 2 b view ulong 2 dst edit ulong 1 to ulong */
1452uint64_t oma_om_block_dot(const uint64_t o_a[2], const uint64_t o_b[2], uint64_t o_dst[1]);
1453/* export fn oma_om_z3_encode src view uchar 64 dst edit ulong 2 to ulong */
1454uint64_t oma_om_z3_encode(const uint8_t o_src[64], uint64_t o_dst[2]);
1455/* export fn oma_om_z3_decode one ulong two ulong dst edit uchar 64 to ulong */
1456uint64_t oma_om_z3_decode(uint64_t o_one, uint64_t o_two, uint8_t o_dst[64]);
1457/* export fn oma_om_block_serialize pos ulong neg_p ulong dst edit uchar 16 to ulong */
1458uint64_t oma_om_block_serialize(uint64_t o_pos, uint64_t o_neg_p, uint8_t o_dst[16]);
1459/* export fn oma_om_block_deserialize src view uchar 16 dst edit ulong 2 to ulong */
1460uint64_t oma_om_block_deserialize(const uint8_t o_src[16], uint64_t o_dst[2]);
1461/* export fn oma_om_dense_byte_decode bv ulong dst edit uchar 5 to ulong */
1462uint64_t oma_om_dense_byte_decode(uint64_t o_bv, uint8_t o_dst[5]);
1463/* export fn oma_om_pack_dense_byte src view uchar * start ulong n ulong to ulong */
1464uint64_t oma_om_pack_dense_byte(const uint8_t *o_src, size_t o_src_len, uint64_t o_start, uint64_t o_n);
1465/* export fn oma_om_int_to_bt v_bits ulong dst edit uchar 41 n_out edit ulong 1 to void */
1466void oma_om_int_to_bt(uint64_t o_v_bits, uint8_t o_dst[41], uint64_t o_n_out[1]);
1467/* export fn oma_om_bt_to_int digits view uchar * n ulong dst edit ulong 1 to ulong */
1468uint64_t oma_om_bt_to_int(const uint8_t *o_digits, size_t o_digits_len, uint64_t o_n, uint64_t o_dst[1]);
1469/* export fn pd0_om_fnv1a64 tag view uchar * n ulong to ulong */
1470uint64_t pd0_om_fnv1a64(const uint8_t *o_tag, size_t o_tag_len, uint64_t o_n);
1471/* export fn pd0_om_splitmix64 st edit ulong 1 to ulong */
1472uint64_t pd0_om_splitmix64(uint64_t o_st[1]);
1473/* export fn pd0_om_uniform st edit ulong 1 to ulong */
1474uint64_t pd0_om_uniform(uint64_t o_st[1]);
1475/* export fn pd0_om_put_u16 dst edit uchar * pos ulong v ulong to void */
1476void pd0_om_put_u16(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1477/* export fn pd0_om_put_u32 dst edit uchar * pos ulong v ulong to void */
1478void pd0_om_put_u32(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1479/* export fn pd0_om_put_u64 dst edit uchar * pos ulong v ulong to void */
1480void pd0_om_put_u64(uint8_t *o_dst, size_t o_dst_len, uint64_t o_pos, uint64_t o_v);
1481/* export fn pd0_om_get_u16 src view uchar * pos ulong to ulong */
1482uint64_t pd0_om_get_u16(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1483/* export fn pd0_om_get_u32 src view uchar * pos ulong to ulong */
1484uint64_t pd0_om_get_u32(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1485/* export fn pd0_om_get_u64 src view uchar * pos ulong to ulong */
1486uint64_t pd0_om_get_u64(const uint8_t *o_src, size_t o_src_len, uint64_t o_pos);
1487/* export fn pd0_om_check_desc_magic src view uchar * slen ulong to ulong */
1488uint64_t pd0_om_check_desc_magic(const uint8_t *o_src, size_t o_src_len, uint64_t o_slen);
1489/* export fn pd0_om_check_rec_magic src view uchar * slen ulong to ulong */
1490uint64_t pd0_om_check_rec_magic(const uint8_t *o_src, size_t o_src_len, uint64_t o_slen);
1491/* export fn turing_om_hex d view uchar 32 dst edit uchar 64 to void */
1492void turing_om_hex(const uint8_t o_d[32], uint8_t o_dst[64]);
1493/* export fn turing_om_digest_eq a view uchar 32 b view uchar 32 to ulong */
1494uint64_t turing_om_digest_eq(const uint8_t o_a[32], const uint8_t o_b[32]);
1495/* export fn turing_om_splitmix64 st edit ulong 1 to ulong */
1496uint64_t turing_om_splitmix64(uint64_t o_st[1]);
1497/* export fn turing_om_bucket_observe cnt edit uint 1 mean_b edit ulong 1 cost_ps ulong to void */
1498void turing_om_bucket_observe(uint32_t o_cnt[1], uint64_t o_mean_b[1], uint64_t o_cost_ps);
1499/* export fn turing_om_rank_min_cost cnt view uint 32 means view ulong 32 allowed view uint 32 nspec ulong to ulong */
1500uint64_t turing_om_rank_min_cost(const uint32_t o_cnt[32], const uint64_t o_means[32], const uint32_t o_allowed[32], uint64_t o_nspec);
1501/* export fn turing_om_fisher_yates ord edit uint 32 nspec ulong seed ulong to void */
1502void turing_om_fisher_yates(uint32_t o_ord[32], uint64_t o_nspec, uint64_t o_seed);
1503/* export fn omx_om_rng_next st edit ulong 1 to ulong */
1504uint64_t omx_om_rng_next(uint64_t o_st[1]);
1505/* export fn omx_om_rng_01 st edit ulong 1 to ulong */
1506uint64_t omx_om_rng_01(uint64_t o_st[1]);
1507/* export fn omx_om_hex d view uchar * n ulong dst edit uchar * to void */
1508void omx_om_hex(const uint8_t *o_d, size_t o_d_len, uint64_t o_n, uint8_t *o_dst, size_t o_dst_len);
1509/* export fn omx_om_elf64_le_ok b view uchar * slen ulong to ulong */
1510uint64_t omx_om_elf64_le_ok(const uint8_t *o_b, size_t o_b_len, uint64_t o_slen);
1511/* export fn omx_om_sort_d v edit ulong * n ulong to void */
1512void omx_om_sort_d(uint64_t *o_v, size_t o_v_len, uint64_t o_n);
1513/* export fn omx_om_median_sorted v view ulong * n ulong to ulong */
1514uint64_t omx_om_median_sorted(const uint64_t *o_v, size_t o_v_len, uint64_t o_n);
1515/* export fn omx_om_abs_dev v view ulong * n ulong med_b ulong dst edit ulong * to void */
1516void omx_om_abs_dev(const uint64_t *o_v, size_t o_v_len, uint64_t o_n, uint64_t o_med_b, uint64_t *o_dst, size_t o_dst_len);
1517/* export fn osh_om_name_valid s view uchar * n ulong to ulong */
1518uint64_t osh_om_name_valid(const uint8_t *o_s, size_t o_s_len, uint64_t o_n);
1519/* export fn osh_om_check_req_hdr rec view ulong * nrec ulong nout ulong has_out ulong to ulong */
1520uint64_t osh_om_check_req_hdr(const uint64_t *o_rec, size_t o_rec_len, uint64_t o_nrec, uint64_t o_nout, uint64_t o_has_out);
1521/* export fn osh_om_check_cmd_reserved b view ulong * na ulong ns ulong nr ulong to ulong */
1522uint64_t osh_om_check_cmd_reserved(const uint64_t *o_b, size_t o_b_len, uint64_t o_na, uint64_t o_ns, uint64_t o_nr);
1523/* export fn osh_om_op_right op ulong to ulong */
1524uint64_t osh_om_op_right(uint64_t o_op);
1525/* export fn osh_om_map_cap_rc rc long to long */
1526int64_t osh_om_map_cap_rc(int64_t o_rc);
1527/* export fn osh_om_path_under pref view uchar * np ulong path view uchar * npath ulong to ulong */
1528uint64_t osh_om_path_under(const uint8_t *o_pref, size_t o_pref_len, uint64_t o_np, const uint8_t *o_path, size_t o_path_len, uint64_t o_npath);
1529/* export fn osh_om_check_binding domain ulong pid view uchar 32 to long */
1530int64_t osh_om_check_binding(uint64_t o_domain, const uint8_t o_pid[32]);
1531#ifdef __cplusplus
1532}
1533#endif
1534#endif