/-
AUTO-GENERATED by `verifier emit`. Do not edit by hand.
-/
import CodeLib
set_option maxRecDepth 1048576
namespace Project.RustArray
open Wasm
def func0 : Wasm.Program :=
[
.localGet 1,
.ret
]
def func0Def : Wasm.Function :=
{ params := [.i32, .i32], locals := [], body := func0, results := [.i32] }
def func1 : Wasm.Program :=
[
.localGet 0,
.localGet 1,
.call 2,
.const (1 : UInt32),
.and,
.ret
]
def func1Def : Wasm.Function :=
{ params := [.i32, .i32], locals := [], body := func1, results := [.i32] }
def func2 : Wasm.Program :=
[
.localGet 1,
.const (0 : UInt32),
.eq,
.const (1 : UInt32),
.and,
.ret
]
def func2Def : Wasm.Function :=
{ params := [.i32, .i32], locals := [], body := func2, results := [.i32] }
/-- export: entrypoint -/
def func3 : Wasm.Program :=
[
.globalGet 0,
.const (16 : UInt32),
.sub,
.localSet 1,
.localGet 1,
.globalSet 0,
.localGet 0,
.load32 (0 : UInt32),
.localSet 2,
.localGet 0,
.load32 (4 : UInt32),
.localSet 3,
.localGet 1,
.localGet 2,
.store32 (0 : UInt32),
.localGet 1,
.localGet 3,
.store32 (4 : UInt32),
.localGet 1,
.call 4,
.drop,
.localGet 0,
.load32 (0 : UInt32),
.localSet 4,
.localGet 0,
.load32 (4 : UInt32),
.localSet 5,
.localGet 1,
.localGet 4,
.store32 (8 : UInt32),
.localGet 1,
.localGet 5,
.store32 (12 : UInt32),
.localGet 1,
.const (8 : UInt32),
.add,
.call 5,
.drop,
.localGet 1,
.const (16 : UInt32),
.add,
.globalSet 0,
.ret
]
def func3Def : Wasm.Function :=
{ params := [.i32], locals := [.i32, .i32, .i32, .i32, .i32], body := func3, results := [] }
/-- export: len -/
def func4 : Wasm.Program :=
[
.localGet 0,
.load32 (0 : UInt32),
.localGet 0,
.load32 (4 : UInt32),
.call 0,
.ret
]
def func4Def : Wasm.Function :=
{ params := [.i32], locals := [], body := func4, results := [.i32] }
/-- export: is_empty -/
def func5 : Wasm.Program :=
[
.localGet 0,
.load32 (0 : UInt32),
.localGet 0,
.load32 (4 : UInt32),
.call 1,
.const (1 : UInt32),
.and,
.ret
]
def func5Def : Wasm.Function :=
{ params := [.i32], locals := [], body := func5, results := [.i32] }
def «module» : Wasm.Module :=
{
imports := [],
funcs := [
func0Def,
func1Def,
func2Def,
func3Def,
func4Def,
func5Def
],
exports := [
{ name := "entrypoint", funcIdx := 3 },
{ name := "len", funcIdx := 4 },
{ name := "is_empty", funcIdx := 5 }
],
memory := some { pagesMin := (16 : UInt32), pagesMax := none, data := [] },
globals := [
{ init := .i32 (1048576 : UInt32) },
{ init := .i32 (1048576 : UInt32) },
{ init := .i32 (1048576 : UInt32) }
],
types := [
{ params := [.i32, .i32], results := [.i32] },
{ params := [.i32], results := [] },
{ params := [.i32], results := [.i32] }
],
tables := [
{ min := 1, max := some 1, elemType := .funcref }
],
elements := []
}
end Project.RustArray