/-
AUTO-GENERATED by `verifier emit`. Do not edit by hand.
-/
import CodeLib
set_option maxRecDepth 1048576
namespace Project.FloatReinterpret
open Wasm
def func0 : Wasm.Program :=
[
.localGet 0,
.call 1,
.ret
]
def func0Def : Wasm.Function :=
{ params := [.f32], locals := [], body := func0, results := [.f32] }
def func1 : Wasm.Program :=
[
.globalGet 0,
.const (16 : UInt32),
.sub,
.localSet 1,
.localGet 1,
.localGet 0,
.f32Abs,
.f32Store (12 : UInt32),
.localGet 1,
.f32Load (12 : UInt32),
.ret
]
def func1Def : Wasm.Function :=
{ params := [.f32], locals := [.i32], body := func1, results := [.f32] }
def func2 : Wasm.Program :=
[
.localGet 0,
.f64PromoteF32,
.call 3,
.f32DemoteF64,
.ret
]
def func2Def : Wasm.Function :=
{ params := [.f32], locals := [], body := func2, results := [.f32] }
def func3 : Wasm.Program :=
[
.globalGet 0,
.const (16 : UInt32),
.sub,
.localSet 1,
.localGet 1,
.localGet 0,
.f64Abs,
.f64Store (8 : UInt32),
.localGet 1,
.f64Load (8 : UInt32),
.ret
]
def func3Def : Wasm.Function :=
{ params := [.f64], locals := [.i32], body := func3, results := [.f64] }
def func4 : Wasm.Program :=
[
.localGet 1,
.call 5,
.const (2147483648 : UInt32),
.and,
.localGet 0,
.call 5,
.const (2147483647 : UInt32),
.and,
.or,
.call 6,
.ret
]
def func4Def : Wasm.Function :=
{ params := [.f32, .f32], locals := [], body := func4, results := [.f32] }
def func5 : Wasm.Program :=
[
.localGet 0,
.i32ReinterpretF32,
.ret
]
def func5Def : Wasm.Function :=
{ params := [.f32], locals := [], body := func5, results := [.i32] }
def func6 : Wasm.Program :=
[
.localGet 0,
.f32ReinterpretI32,
.ret
]
def func6Def : Wasm.Function :=
{ params := [.i32], locals := [], body := func6, results := [.f32] }
def func7 : Wasm.Program :=
[
.localGet 0,
.localGet 1,
.call 8,
.ret
]
def func7Def : Wasm.Function :=
{ params := [.f32, .f32], locals := [], body := func7, results := [.f32] }
def func8 : Wasm.Program :=
[
.globalGet 0,
.const (16 : UInt32),
.sub,
.localSet 2,
.localGet 2,
.localGet 0,
.localGet 1,
.f32Copysign,
.f32Store (12 : UInt32),
.localGet 2,
.f32Load (12 : UInt32),
.ret
]
def func8Def : Wasm.Function :=
{ params := [.f32, .f32], locals := [.i32], body := func8, results := [.f32] }
def func9 : Wasm.Program :=
[
.localGet 0,
.call 5,
.const (2147483647 : UInt32),
.and,
.call 6,
.ret
]
def func9Def : Wasm.Function :=
{ params := [.f32], locals := [], body := func9, results := [.f32] }
/-- export: check_abs -/
def func10 : Wasm.Program :=
[
.globalGet 0,
.const (16 : UInt32),
.sub,
.localSet 1,
.localGet 1,
.globalSet 0,
.block 0 0 [
.block 0 0 [
.localGet 0,
.call 0,
.localGet 0,
.call 9,
.f32Eq,
.const (1 : UInt32),
.and,
.eqz,
.br_if 0,
.localGet 0,
.call 0,
.localGet 0,
.call 2,
.f32Eq,
.const (1 : UInt32),
.and,
.eqz,
.br_if 0,
.localGet 1,
.const (1 : UInt32),
.store32 (12 : UInt32),
.br 1
],
.localGet 1,
.const (0 : UInt32),
.store32 (12 : UInt32)
],
.localGet 1,
.load32 (12 : UInt32),
.localSet 2,
.localGet 1,
.const (16 : UInt32),
.add,
.globalSet 0,
.localGet 2,
.ret
]
def func10Def : Wasm.Function :=
{ params := [.f32], locals := [.i32, .i32], body := func10, results := [.i32] }
/-- export: check_copysign -/
def func11 : Wasm.Program :=
[
.globalGet 0,
.const (16 : UInt32),
.sub,
.localSet 2,
.localGet 2,
.globalSet 0,
.block 0 0 [
.block 0 0 [
.localGet 0,
.localGet 1,
.call 7,
.localGet 0,
.localGet 1,
.call 4,
.f32Eq,
.const (1 : UInt32),
.and,
.br_if 0,
.localGet 2,
.const (0 : UInt32),
.store32 (12 : UInt32),
.br 1
],
.localGet 2,
.const (1 : UInt32),
.store32 (12 : UInt32)
],
.localGet 2,
.load32 (12 : UInt32),
.localSet 3,
.localGet 2,
.const (16 : UInt32),
.add,
.globalSet 0,
.localGet 3,
.ret
]
def func11Def : Wasm.Function :=
{ params := [.f32, .f32], locals := [.i32, .i32], body := func11, results := [.i32] }
def «module» : Wasm.Module :=
{
imports := [],
funcs := [
func0Def,
func1Def,
func2Def,
func3Def,
func4Def,
func5Def,
func6Def,
func7Def,
func8Def,
func9Def,
func10Def,
func11Def
],
exports := [
{ name := "check_abs", funcIdx := 10 },
{ name := "check_copysign", funcIdx := 11 }
],
memory := some { pagesMin := (16 : UInt32), pagesMax := none, data := [] },
globals := [
{ init := .i32 (1048576 : UInt32) },
{ init := .i32 (1048576 : UInt32) },
{ init := .i32 (1048576 : UInt32) }
],
types := [
{ params := [.f32], results := [.f32] },
{ params := [.f64], results := [.f64] },
{ params := [.f32, .f32], results := [.f32] },
{ params := [.f32], results := [.i32] },
{ params := [.i32], results := [.f32] },
{ params := [.f32, .f32], results := [.i32] }
],
tables := [
{ min := 1, max := some 1, elemType := .funcref }
],
elements := []
}
end Project.FloatReinterpret