diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index fa9a736d..9bc411e2 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -25,11 +25,11 @@ (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0 (mut i64) (i64.const 0)) (global $~lib/math/random_state1 (mut i64) (i64.const 0)) - (global $std/array/reversed0 (mut i32) (i32.const 152)) - (global $std/array/reversed1 (mut i32) (i32.const 168)) - (global $std/array/reversed2 (mut i32) (i32.const 192)) - (global $std/array/reversed4 (mut i32) (i32.const 216)) - (global $std/array/expected4 (mut i32) (i32.const 256)) + (global $std/array/reversed0 (mut i32) (i32.const 328)) + (global $std/array/reversed1 (mut i32) (i32.const 344)) + (global $std/array/reversed2 (mut i32) (i32.const 368)) + (global $std/array/reversed4 (mut i32) (i32.const 392)) + (global $std/array/expected4 (mut i32) (i32.const 432)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -37,22 +37,37 @@ (global $std/array/randomized512 (mut i32) (i32.const 0)) (global $std/array/randomized64 (mut i32) (i32.const 0)) (global $std/array/randomized257 (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 344)) - (table 28 28 anyfunc) - (elem (i32.const 0) $start~anonymous|0 $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|2 $start~anonymous|5 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|16 $start~anonymous|18 $start~anonymous|19 $start~anonymous|20 $start~anonymous|16 $start~anonymous|22 $std/array/assertSortedDefault~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|24 $start~anonymous|25) + (global $std/array/reversedNested512 (mut i32) (i32.const 0)) + (global $std/array/reversedElements512 (mut i32) (i32.const 0)) + (global $std/array/randomStringsActual (mut i32) (i32.const 560)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 632)) + (global $std/array/randomStrings400 (mut i32) (i32.const 0)) + (global $HEAP_BASE i32 (i32.const 800)) + (table 32 32 anyfunc) + (elem (i32.const 0) $start~anonymous|0 $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|2 $start~anonymous|5 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|16 $start~anonymous|18 $start~anonymous|19 $start~anonymous|20 $start~anonymous|16 $start~anonymous|22 $std/array/assertSortedDefault~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|24 $start~anonymous|25 $start~anonymous|28 $start~anonymous|29 $start~anonymous|30 $start~anonymous|30) (memory $0 1) (data (i32.const 4) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 36) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 96) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 124) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 152) "\a0") - (data (i32.const 168) "\b0\00\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01") - (data (i32.const 192) "\c8\00\00\00\02\00\00\00\08\00\00\00\00\00\00\00\02\00\00\00\01") - (data (i32.const 216) "\e0\00\00\00\04\00\00\00\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01") - (data (i32.const 256) "\08\01\00\00\04\00\00\00\10") - (data (i32.const 276) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 296) "0\01\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01") - (data (i32.const 320) "H\01\00\00\02\00\00\00\08\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 152) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\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 328) "P\01") + (data (i32.const 344) "`\01\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01") + (data (i32.const 368) "x\01\00\00\02\00\00\00\08\00\00\00\00\00\00\00\02\00\00\00\01") + (data (i32.const 392) "\90\01\00\00\04\00\00\00\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01") + (data (i32.const 432) "\b8\01\00\00\04\00\00\00\10") + (data (i32.const 452) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 472) "\e0\01\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01") + (data (i32.const 496) "\f8\01\00\00\02\00\00\00\08\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 520) "\01\00\00\00a") + (data (i32.const 528) "\01\00\00\00b") + (data (i32.const 536) "\02\00\00\00a\00b") + (data (i32.const 544) "\02\00\00\00b\00a") + (data (i32.const 560) "8\02\00\00\07\00\00\00\1c\00\00\00\00\00\00\00\08\02\00\00\10\02\00\00\08\02\00\00\18\02\00\00 \02\00\00(\02") + (data (i32.const 632) "\80\02\00\00\07\00\00\00\1c\00\00\00\00\00\00\00(\02\00\00\08\02\00\00\08\02\00\00\18\02\00\00\10\02\00\00 \02") + (data (i32.const 704) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 736) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 788) "\04\00\00\00n\00u\00l\00l") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -4800,7 +4815,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 419) + (i32.const 436) (i32.const 2) ) (unreachable) @@ -4909,7 +4924,826 @@ (get_local $0) ) ) - (func $start (; 66 ;) (type $v) + (func $std/array/createReverseOrderedNestedArray (; 66 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (set_local $1 + (call $~lib/array/Array#constructor + (i32.const 0) + (get_local $0) + ) + ) + (set_local $0 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $0) + (call $~lib/array/Array#get:length + (get_local $1) + ) + ) + (block + (call $~lib/array/Array#__set + (get_local $1) + (get_local $0) + (call $~lib/array/Array#constructor + (i32.const 0) + (i32.const 1) + ) + ) + (call $~lib/array/Array#__set + (call $~lib/array/Array#__get + (get_local $1) + (get_local $0) + ) + (i32.const 0) + (i32.sub + (i32.sub + (call $~lib/array/Array#get:length + (get_local $1) + ) + (i32.const 1) + ) + (get_local $0) + ) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (get_local $1) + ) + (func $start~anonymous|28 (; 67 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (call $~lib/array/Array#__get + (get_local $0) + (i32.const 0) + ) + (call $~lib/array/Array#__get + (get_local $1) + (i32.const 0) + ) + ) + ) + (func $std/array/Proxy#constructor (; 68 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if (result i32) + (get_local $0) + (get_local $0) + (block (result i32) + (i32.store + (tee_local $2 + (call $~lib/allocator/arena/allocate_memory + (i32.const 4) + ) + ) + (get_local $1) + ) + (get_local $2) + ) + ) + ) + (func $std/array/createReverseOrderedElementsArray (; 69 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (set_local $1 + (call $~lib/array/Array#constructor + (i32.const 0) + (get_local $0) + ) + ) + (set_local $0 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $0) + (call $~lib/array/Array#get:length + (get_local $1) + ) + ) + (block + (call $~lib/array/Array#__set + (get_local $1) + (get_local $0) + (call $std/array/Proxy#constructor + (i32.const 0) + (i32.sub + (i32.sub + (call $~lib/array/Array#get:length + (get_local $1) + ) + (i32.const 1) + ) + (get_local $0) + ) + ) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (get_local $1) + ) + (func $start~anonymous|29 (; 70 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (i32.load + (get_local $0) + ) + (i32.load + (get_local $1) + ) + ) + ) + (func $~lib/memory/compare_memory (; 71 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (if + (i32.eq + (get_local $0) + (get_local $1) + ) + (return + (i32.const 0) + ) + ) + (loop $continue|0 + (if + (if (result i32) + (get_local $2) + (i32.eq + (i32.load8_u + (get_local $0) + ) + (i32.load8_u + (get_local $1) + ) + ) + (get_local $2) + ) + (block + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (if (result i32) + (get_local $2) + (i32.sub + (i32.load8_u + (get_local $0) + ) + (i32.load8_u + (get_local $1) + ) + ) + (i32.const 0) + ) + ) + (func $~lib/string/String.__gt (; 72 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (if + (i32.and + (if (result i32) + (tee_local $2 + (i32.and + (if (result i32) + (tee_local $2 + (i32.eq + (get_local $0) + (get_local $1) + ) + ) + (get_local $2) + (i32.eqz + (get_local $0) + ) + ) + (i32.const 1) + ) + ) + (get_local $2) + (i32.eqz + (get_local $1) + ) + ) + (i32.const 1) + ) + (return + (i32.const 0) + ) + ) + (set_local $3 + (i32.load + (get_local $1) + ) + ) + (if + (i32.eqz + (tee_local $2 + (i32.load + (get_local $0) + ) + ) + ) + (return + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $3) + ) + (return + (i32.const 1) + ) + ) + (i32.gt_s + (call $~lib/memory/compare_memory + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (select + (get_local $2) + (get_local $3) + (i32.lt_s + (get_local $2) + (get_local $3) + ) + ) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + (func $~lib/string/String.__lt (; 73 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (if + (i32.and + (if (result i32) + (tee_local $2 + (i32.and + (if (result i32) + (tee_local $2 + (i32.eq + (get_local $0) + (get_local $1) + ) + ) + (get_local $2) + (i32.eqz + (get_local $0) + ) + ) + (i32.const 1) + ) + ) + (get_local $2) + (i32.eqz + (get_local $1) + ) + ) + (i32.const 1) + ) + (return + (i32.const 0) + ) + ) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (if + (i32.eqz + (tee_local $3 + (i32.load + (get_local $1) + ) + ) + ) + (return + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $2) + ) + (return + (i32.const 1) + ) + ) + (i32.lt_s + (call $~lib/memory/compare_memory + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (select + (get_local $2) + (get_local $3) + (i32.lt_s + (get_local $2) + (get_local $3) + ) + ) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + (func $start~anonymous|30 (; 74 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (call $~lib/string/String.__gt + (get_local $0) + (get_local $1) + ) + (call $~lib/string/String.__lt + (get_local $0) + (get_local $1) + ) + ) + ) + (func $~lib/string/String.__eq (; 75 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if + (i32.eq + (get_local $0) + (get_local $1) + ) + (return + (i32.const 1) + ) + ) + (if + (i32.eqz + (get_local $0) + ) + (return + (i32.eqz + (get_local $1) + ) + ) + ) + (if + (i32.eqz + (get_local $1) + ) + (return + (i32.const 0) + ) + ) + (if + (i32.ne + (tee_local $2 + (i32.load + (get_local $0) + ) + ) + (i32.load + (get_local $1) + ) + ) + (return + (i32.const 0) + ) + ) + (i32.eqz + (call $~lib/memory/compare_memory + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + ) + ) + (func $~lib/string/String.__ne (; 76 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.eqz + (call $~lib/string/String.__eq + (get_local $0) + (get_local $1) + ) + ) + ) + (func $std/array/isArraysEqual (; 77 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.eqz + (get_local $2) + ) + (block + (if + (i32.ne + (call $~lib/array/Array#get:length + (get_local $0) + ) + (call $~lib/array/Array#get:length + (get_local $1) + ) + ) + (return + (i32.const 0) + ) + ) + (set_local $2 + (call $~lib/array/Array#get:length + (get_local $0) + ) + ) + ) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $3) + (get_local $2) + ) + (block + (if + (call $~lib/string/String.__ne + (call $~lib/array/Array#__get + (get_local $0) + (get_local $3) + ) + (call $~lib/array/Array#__get + (get_local $1) + (get_local $3) + ) + ) + (return + (i32.const 0) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (i32.const 1) + ) + (func $std/array/isArraysEqual|trampoline (; 78 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (block $1of1 + (block $0of1 + (block $oob + (br_table $0of1 $1of1 $oob + (i32.sub + (get_global $argumentCount) + (i32.const 2) + ) + ) + ) + (unreachable) + ) + (set_local $2 + (i32.const 0) + ) + ) + (call $std/array/isArraysEqual + (get_local $0) + (get_local $1) + (get_local $2) + ) + ) + (func $~lib/internal/string/allocate (; 79 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (if + (i32.eqz + (i32.and + (if (result i32) + (tee_local $1 + (i32.gt_s + (get_local $0) + (i32.const 0) + ) + ) + (i32.le_s + (get_local $0) + (i32.const 536870910) + ) + (get_local $1) + ) + (i32.const 1) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 736) + (i32.const 20) + (i32.const 2) + ) + (unreachable) + ) + ) + (i32.store + (tee_local $1 + (call $~lib/allocator/arena/allocate_memory + (i32.add + (i32.shl + (get_local $0) + (i32.const 1) + ) + (i32.const 4) + ) + ) + ) + (get_local $0) + ) + (get_local $1) + ) + (func $~lib/string/String#charAt (; 80 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if + (i32.eqz + (get_local $0) + ) + (block + (call $abort + (i32.const 0) + (i32.const 704) + (i32.const 18) + (i32.const 4) + ) + (unreachable) + ) + ) + (if + (i32.ge_u + (get_local $1) + (i32.load + (get_local $0) + ) + ) + (return + (i32.const 552) + ) + ) + (i32.store16 offset=4 + (tee_local $2 + (call $~lib/internal/string/allocate + (i32.const 1) + ) + ) + (i32.load16_u offset=4 + (i32.add + (get_local $0) + (i32.shl + (get_local $1) + (i32.const 1) + ) + ) + ) + ) + (get_local $2) + ) + (func $~lib/string/String#concat (; 81 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (i32.eqz + (get_local $0) + ) + (block + (call $abort + (i32.const 0) + (i32.const 704) + (i32.const 74) + (i32.const 4) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (get_local $1) + ) + (set_local $1 + (i32.const 788) + ) + ) + (if + (i32.eqz + (tee_local $2 + (i32.add + (tee_local $3 + (i32.load + (get_local $0) + ) + ) + (tee_local $4 + (i32.load + (get_local $1) + ) + ) + ) + ) + ) + (return + (i32.const 552) + ) + ) + (call $~lib/memory/move_memory + (i32.add + (tee_local $2 + (call $~lib/internal/string/allocate + (get_local $2) + ) + ) + (i32.const 4) + ) + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (call $~lib/memory/move_memory + (i32.add + (i32.add + (get_local $2) + (i32.const 4) + ) + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (get_local $4) + (i32.const 1) + ) + ) + (get_local $2) + ) + (func $~lib/string/String.__concat (; 82 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (if + (i32.eqz + (get_local $0) + ) + (set_local $0 + (i32.const 788) + ) + ) + (call $~lib/string/String#concat + (get_local $0) + (get_local $1) + ) + ) + (func $std/array/createRandomString (; 83 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (set_local $1 + (i32.const 552) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (get_local $0) + ) + (block + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (call $~lib/string/String#charAt + (i32.const 152) + (i32.trunc_s/f64 + (f64.floor + (f64.mul + (call $~lib/math/NativeMath.random) + (f64.convert_s/i32 + (i32.load + (i32.const 152) + ) + ) + ) + ) + ) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (get_local $1) + ) + (func $std/array/createRandomStringArray (; 84 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (set_local $1 + (call $~lib/array/Array#constructor + (i32.const 0) + (get_local $0) + ) + ) + (set_local $0 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $0) + (call $~lib/array/Array#get:length + (get_local $1) + ) + ) + (block + (call $~lib/array/Array#__set + (get_local $1) + (get_local $0) + (call $std/array/createRandomString + (i32.trunc_s/f64 + (f64.mul + (call $~lib/math/NativeMath.random) + (f64.const 32) + ) + ) + ) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (get_local $1) + ) + (func $start (; 85 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add @@ -7200,7 +8034,7 @@ (i32.eqz (call $std/array/isArraysEqual|trampoline (get_global $std/array/reversed1) - (i32.const 296) + (i32.const 472) (i32.const 0) ) ) @@ -7209,7 +8043,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 445) + (i32.const 462) (i32.const 0) ) (unreachable) @@ -7226,7 +8060,7 @@ (i32.eqz (call $std/array/isArraysEqual|trampoline (get_global $std/array/reversed2) - (i32.const 320) + (i32.const 496) (i32.const 0) ) ) @@ -7235,7 +8069,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 448) + (i32.const 465) (i32.const 0) ) (unreachable) @@ -7261,7 +8095,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 451) + (i32.const 468) (i32.const 0) ) (unreachable) @@ -7282,7 +8116,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 454) + (i32.const 471) (i32.const 0) ) (unreachable) @@ -7303,7 +8137,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 457) + (i32.const 474) (i32.const 0) ) (unreachable) @@ -7324,7 +8158,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 460) + (i32.const 477) (i32.const 0) ) (unreachable) @@ -7345,7 +8179,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 463) + (i32.const 480) (i32.const 0) ) (unreachable) @@ -7380,5 +8214,59 @@ (get_global $std/array/randomized257) (i32.const 27) ) + (set_global $std/array/reversedNested512 + (call $std/array/createReverseOrderedNestedArray + (i32.const 512) + ) + ) + (call $std/array/assertSorted + (get_global $std/array/reversedNested512) + (i32.const 28) + ) + (set_global $std/array/reversedElements512 + (call $std/array/createReverseOrderedElementsArray + (i32.const 512) + ) + ) + (call $std/array/assertSorted + (get_global $std/array/reversedElements512) + (i32.const 29) + ) + (call $std/array/assertSorted + (get_global $std/array/randomStringsActual) + (i32.const 30) + ) + (if + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (i32.eqz + (call $std/array/isArraysEqual|trampoline + (get_global $std/array/randomStringsActual) + (get_global $std/array/randomStringsExpected) + (i32.const 0) + ) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 96) + (i32.const 509) + (i32.const 0) + ) + (unreachable) + ) + ) + (set_global $std/array/randomStrings400 + (call $std/array/createRandomStringArray + (i32.const 400) + ) + ) + (call $std/array/assertSorted + (get_global $std/array/randomStrings400) + (i32.const 31) + ) ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 43cbee61..17411e18 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -392,7 +392,6 @@ function createRandomOrderedArray(size: i32): Array { return arr; } -/* function createReverseOrderedNestedArray(size: i32): Array> { var arr = new Array>(size); for (let i: i32 = 0; i < arr.length; i++) { @@ -413,7 +412,25 @@ function createReverseOrderedElementsArray(size: i32): Proxy[] { } return arr; } -*/ + +const charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-,.+/\\[]{}()<>*&$%^@#!?"; + +function createRandomString(len: i32): string { + var result = ""; + + for (let i = 0; i < len; i++) { + result += charset.charAt((NativeMath.floor(NativeMath.random() * charset.length))); + } + return result; +} + +function createRandomStringArray(size: i32): string[] { + var arr = new Array(size); + for (let i: i32 = 0; i < arr.length; i++) { + arr[i] = createRandomString((NativeMath.random() * 32)); + } + return arr; +} function assertSorted(arr: Array, comparator: (a: T, b: T) => i32): void { assert(isSorted(arr.sort(comparator), comparator)); @@ -477,9 +494,19 @@ assertSorted(randomized257, (a: i32, b: i32): i32 => b - a); // Test sorting complex objects -// var reversedNested512 = createReverseOrderedNestedArray(512); -// assertSorted(reversedNested512, (a: i32[], b: i32[]): i32 => a[0] - b[0]); +var reversedNested512 = createReverseOrderedNestedArray(512); +assertSorted(reversedNested512, (a: i32[], b: i32[]): i32 => a[0] - b[0]); // Test sorting reference elements -// var reversedElements512 = createReverseOrderedElementsArray(512); -// assertSorted>(reversedElements512, (a: Proxy, b: Proxy): i32 => a.x - b.x); +var reversedElements512 = createReverseOrderedElementsArray(512); +assertSorted>(reversedElements512, (a: Proxy, b: Proxy): i32 => a.x - b.x); + +// Test sorting strings + +var randomStringsActual: string[] = ['a', 'b', 'a', 'ab', 'ba', '', null]; +var randomStringsExpected: string[] = ['', 'a', 'a', 'ab', 'b', 'ba', null]; +assertSorted(randomStringsActual, (a: string, b: string): i32 => (a > b) - (a < b)); +assert(isArraysEqual(randomStringsActual, randomStringsExpected)); + +var randomStrings400 = createRandomStringArray(400); +assertSorted(randomStrings400, (a: string, b: string): i32 => (a > b) - (a < b)); diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 3547db60..144e0b8e 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -32,11 +32,12 @@ (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0 (mut i64) (i64.const 0)) (global $~lib/math/random_state1 (mut i64) (i64.const 0)) - (global $std/array/reversed0 (mut i32) (i32.const 152)) - (global $std/array/reversed1 (mut i32) (i32.const 168)) - (global $std/array/reversed2 (mut i32) (i32.const 192)) - (global $std/array/reversed4 (mut i32) (i32.const 216)) - (global $std/array/expected4 (mut i32) (i32.const 256)) + (global $std/array/charset i32 (i32.const 152)) + (global $std/array/reversed0 (mut i32) (i32.const 328)) + (global $std/array/reversed1 (mut i32) (i32.const 344)) + (global $std/array/reversed2 (mut i32) (i32.const 368)) + (global $std/array/reversed4 (mut i32) (i32.const 392)) + (global $std/array/expected4 (mut i32) (i32.const 432)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -44,21 +45,40 @@ (global $std/array/randomized512 (mut i32) (i32.const 0)) (global $std/array/randomized64 (mut i32) (i32.const 0)) (global $std/array/randomized257 (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 344)) - (table 28 28 anyfunc) - (elem (i32.const 0) $start~anonymous|0 $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|4 $start~anonymous|5 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|17 $start~anonymous|18 $start~anonymous|19 $start~anonymous|20 $start~anonymous|21 $start~anonymous|22 $std/array/assertSortedDefault~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|26 $start~anonymous|27) + (global $std/array/reversedNested512 (mut i32) (i32.const 0)) + (global $std/array/reversedElements512 (mut i32) (i32.const 0)) + (global $std/array/randomStringsActual (mut i32) (i32.const 560)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 632)) + (global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4)) + (global $~lib/internal/string/EMPTY i32 (i32.const 552)) + (global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910)) + (global $std/array/randomStrings400 (mut i32) (i32.const 0)) + (global $HEAP_BASE i32 (i32.const 800)) + (table 32 32 anyfunc) + (elem (i32.const 0) $start~anonymous|0 $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|4 $start~anonymous|5 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|17 $start~anonymous|18 $start~anonymous|19 $start~anonymous|20 $start~anonymous|21 $start~anonymous|22 $std/array/assertSortedDefault~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|26 $start~anonymous|27 $start~anonymous|28 $start~anonymous|29 $start~anonymous|30 $start~anonymous|31) (memory $0 1) (data (i32.const 4) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 36) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (data (i32.const 96) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 124) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 152) "\a0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 168) "\b0\00\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 192) "\c8\00\00\00\02\00\00\00\08\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 216) "\e0\00\00\00\04\00\00\00\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 256) "\08\01\00\00\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 296) "0\01\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 320) "H\01\00\00\02\00\00\00\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 152) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\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 328) "P\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 344) "`\01\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 368) "x\01\00\00\02\00\00\00\08\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 392) "\90\01\00\00\04\00\00\00\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 432) "\b8\01\00\00\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 472) "\e0\01\00\00\01\00\00\00\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 496) "\f8\01\00\00\02\00\00\00\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 520) "\01\00\00\00a\00") + (data (i32.const 528) "\01\00\00\00b\00") + (data (i32.const 536) "\02\00\00\00a\00b\00") + (data (i32.const 544) "\02\00\00\00b\00a\00") + (data (i32.const 552) "\00\00\00\00") + (data (i32.const 560) "8\02\00\00\07\00\00\00\1c\00\00\00\00\00\00\00\08\02\00\00\10\02\00\00\08\02\00\00\18\02\00\00 \02\00\00(\02\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\00\00") + (data (i32.const 632) "\80\02\00\00\07\00\00\00\1c\00\00\00\00\00\00\00(\02\00\00\08\02\00\00\08\02\00\00\18\02\00\00\10\02\00\00 \02\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\00\00") + (data (i32.const 704) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 736) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 788) "\04\00\00\00n\00u\00l\00l\00") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -6030,7 +6050,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 419) + (i32.const 436) (i32.const 2) ) (unreachable) @@ -6164,7 +6184,4857 @@ (get_local $0) ) ) - (func $start (; 72 ;) (type $v) + (func $~lib/array/Array>#constructor (; 72 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (block + (nop) + (if + (i32.gt_u + (get_local $1) + (i32.const 268435454) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 23) + (i32.const 39) + ) + (unreachable) + ) + ) + (i32.store + (tee_local $0 + (if (result i32) + (get_local $0) + (get_local $0) + (tee_local $0 + (block (result i32) + (set_local $2 + (call $~lib/allocator/arena/allocate_memory + (i32.const 8) + ) + ) + (i32.store + (get_local $2) + (i32.const 0) + ) + (i32.store offset=4 + (get_local $2) + (i32.const 0) + ) + (get_local $2) + ) + ) + ) + ) + (call $~lib/internal/arraybuffer/allocUnsafe + (i32.shl + (get_local $1) + (i32.const 2) + ) + ) + ) + (i32.store offset=4 + (get_local $0) + (get_local $1) + ) + ) + (get_local $0) + ) + (func $~lib/array/Array>#get:length (; 73 ;) (type $ii) (param $0 i32) (result i32) + (return + (i32.load offset=4 + (get_local $0) + ) + ) + ) + (func $~lib/array/Array>#__set (; 74 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (set_local $4 + (i32.shr_u + (i32.load + (get_local $3) + ) + (i32.const 2) + ) + ) + (if + (i32.ge_u + (get_local $1) + (get_local $4) + ) + (block + (nop) + (if + (i32.ge_u + (get_local $1) + (i32.const 268435454) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 75) + (i32.const 41) + ) + (unreachable) + ) + ) + (set_local $3 + (call $~lib/internal/arraybuffer/reallocUnsafe + (get_local $3) + (i32.shl + (i32.add + (get_local $1) + (i32.const 1) + ) + (i32.const 2) + ) + ) + ) + (i32.store + (get_local $0) + (get_local $3) + ) + (i32.store offset=4 + (get_local $0) + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.0 + (set_local $5 + (get_local $3) + ) + (set_local $6 + (get_local $1) + ) + (set_local $7 + (get_local $2) + ) + (i32.store offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $7) + ) + ) + ) + (func $~lib/array/Array>#__get (; 75 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (set_local $3 + (i32.shr_u + (i32.load + (get_local $2) + ) + (i32.const 2) + ) + ) + (if + (i32.ge_u + (get_local $1) + (get_local $3) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 64) + (i32.const 37) + ) + (unreachable) + ) + ) + (return + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.0 (result i32) + (set_local $4 + (get_local $2) + ) + (set_local $5 + (get_local $1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.0 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $5) + (i32.const 2) + ) + ) + ) + ) + ) + ) + ) + (func $std/array/createReverseOrderedNestedArray (; 76 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (set_local $1 + (call $~lib/array/Array>#constructor + (i32.const 0) + (get_local $0) + ) + ) + (block $break|0 + (set_local $2 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (call $~lib/array/Array>#get:length + (get_local $1) + ) + ) + (block + (block + (call $~lib/array/Array>#__set + (get_local $1) + (get_local $2) + (call $~lib/array/Array#constructor + (i32.const 0) + (i32.const 1) + ) + ) + (call $~lib/array/Array#__set + (call $~lib/array/Array>#__get + (get_local $1) + (get_local $2) + ) + (i32.const 0) + (i32.sub + (i32.sub + (call $~lib/array/Array>#get:length + (get_local $1) + ) + (i32.const 1) + ) + (get_local $2) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (get_local $1) + ) + ) + (func $start~anonymous|28 (; 77 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (call $~lib/array/Array#__get + (get_local $0) + (i32.const 0) + ) + (call $~lib/array/Array#__get + (get_local $1) + (i32.const 0) + ) + ) + ) + (func $~lib/internal/array/insertionSort> (; 78 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (block $break|0 + (block + (set_local $3 + (i32.const 0) + ) + (set_local $4 + (call $~lib/array/Array>#get:length + (get_local $0) + ) + ) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $3) + (get_local $4) + ) + (block + (block + (set_local $6 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.3 (result i32) + (set_local $5 + (get_local $2) + ) + (set_local $6 + (get_local $3) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.3 + (i32.load offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $5 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (block $break|1 + (loop $continue|1 + (if + (i32.ge_s + (get_local $5) + (i32.const 0) + ) + (block + (block + (set_local $8 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.4 (result i32) + (set_local $7 + (get_local $2) + ) + (set_local $8 + (get_local $5) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.4 + (i32.load offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $6) + (get_local $8) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.3 + (set_local $7 + (get_local $2) + ) + (set_local $9 + (i32.add + (block (result i32) + (set_local $10 + (get_local $5) + ) + (set_local $5 + (i32.sub + (get_local $10) + (i32.const 1) + ) + ) + (get_local $10) + ) + (i32.const 1) + ) + ) + (set_local $10 + (get_local $8) + ) + (i32.store offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $10) + ) + ) + (br $break|1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.4 + (set_local $8 + (get_local $2) + ) + (set_local $10 + (i32.add + (get_local $5) + (i32.const 1) + ) + ) + (set_local $9 + (get_local $6) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + (get_local $9) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + (func $~lib/internal/array/weakHeapSort> (; 79 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (nop) + (set_local $2 + (call $~lib/array/Array>#get:length + (get_local $0) + ) + ) + (set_local $3 + (i32.shl + (i32.shr_s + (i32.add + (get_local $2) + (i32.const 31) + ) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (set_local $4 + (call $~lib/allocator/arena/allocate_memory + (get_local $3) + ) + ) + (call $~lib/memory/set_memory + (get_local $4) + (i32.const 0) + (get_local $3) + ) + (set_local $5 + (i32.load + (get_local $0) + ) + ) + (block $break|0 + (set_local $6 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|0 + (if + (i32.gt_s + (get_local $6) + (i32.const 0) + ) + (block + (block + (set_local $7 + (get_local $6) + ) + (block $break|1 + (loop $continue|1 + (if + (i32.eq + (i32.and + (get_local $7) + (i32.const 1) + ) + (i32.and + (i32.shr_s + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $7) + (i32.const 6) + ) + (i32.const 2) + ) + ) + ) + (i32.and + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + (i32.const 31) + ) + ) + (i32.const 1) + ) + ) + (block + (set_local $7 + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (set_local $8 + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + ) + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.5 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $10 + (get_local $8) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.5 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $11 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.6 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $11 + (get_local $6) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.6 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $11) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $10) + (get_local $11) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $6) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (i32.xor + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $6) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (get_local $6) + (i32.const 31) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.5 + (set_local $9 + (get_local $5) + ) + (set_local $12 + (get_local $6) + ) + (set_local $13 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + (get_local $13) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.6 + (set_local $13 + (get_local $5) + ) + (set_local $12 + (get_local $8) + ) + (set_local $9 + (get_local $11) + ) + (i32.store offset=8 + (i32.add + (get_local $13) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + (get_local $9) + ) + ) + ) + ) + ) + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (block $break|2 + (set_local $6 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|2 + (if + (i32.ge_s + (get_local $6) + (i32.const 2) + ) + (block + (block + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.7 (result i32) + (set_local $11 + (get_local $5) + ) + (set_local $10 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.7 + (i32.load offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.7 + (set_local $11 + (get_local $5) + ) + (set_local $8 + (i32.const 0) + ) + (set_local $7 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.8 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $12 + (get_local $6) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.8 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (i32.store offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + (get_local $7) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.8 + (set_local $7 + (get_local $5) + ) + (set_local $8 + (get_local $6) + ) + (set_local $11 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + (get_local $11) + ) + ) + (set_local $11 + (i32.const 1) + ) + (block $break|3 + (loop $continue|3 + (if + (i32.lt_s + (tee_local $8 + (i32.add + (i32.shl + (get_local $11) + (i32.const 1) + ) + (i32.and + (i32.shr_s + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.and + (get_local $11) + (i32.const 31) + ) + ) + (i32.const 1) + ) + ) + ) + (get_local $6) + ) + (block + (set_local $11 + (get_local $8) + ) + (br $continue|3) + ) + ) + ) + ) + (block $break|4 + (loop $continue|4 + (if + (i32.gt_s + (get_local $11) + (i32.const 0) + ) + (block + (block + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.9 (result i32) + (set_local $7 + (get_local $5) + ) + (set_local $12 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.9 + (i32.load offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $7 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.10 (result i32) + (set_local $12 + (get_local $5) + ) + (set_local $7 + (get_local $11) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.10 + (i32.load offset=8 + (i32.add + (get_local $12) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $10) + (get_local $7) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (i32.xor + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (get_local $11) + (i32.const 31) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.9 + (set_local $12 + (get_local $5) + ) + (set_local $9 + (get_local $11) + ) + (set_local $13 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $12) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $13) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.10 + (set_local $13 + (get_local $5) + ) + (set_local $9 + (i32.const 0) + ) + (set_local $12 + (get_local $7) + ) + (i32.store offset=8 + (i32.add + (get_local $13) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $12) + ) + ) + ) + ) + (set_local $11 + (i32.shr_s + (get_local $11) + (i32.const 1) + ) + ) + ) + (br $continue|4) + ) + ) + ) + ) + ) + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + ) + (call $~lib/allocator/arena/free_memory + (get_local $4) + ) + (set_local $14 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.11 (result i32) + (set_local $6 + (get_local $5) + ) + (set_local $8 + (i32.const 1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.11 + (i32.load offset=8 + (i32.add + (get_local $6) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.11 + (set_local $8 + (get_local $5) + ) + (set_local $6 + (i32.const 1) + ) + (set_local $11 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.12 (result i32) + (set_local $10 + (get_local $5) + ) + (set_local $7 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.12 + (i32.load offset=8 + (i32.add + (get_local $10) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $11) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.12 + (set_local $11 + (get_local $5) + ) + (set_local $6 + (i32.const 0) + ) + (set_local $8 + (get_local $14) + ) + (i32.store offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $8) + ) + ) + (return + (get_local $0) + ) + ) + (func $~lib/array/Array>#sort (; 80 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (set_local $2 + (i32.load offset=4 + (get_local $0) + ) + ) + (if + (i32.le_s + (get_local $2) + (i32.const 1) + ) + (return + (get_local $0) + ) + ) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (if + (i32.eq + (get_local $2) + (i32.const 2) + ) + (block + (set_local $5 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.1 (result i32) + (set_local $4 + (get_local $3) + ) + (set_local $5 + (i32.const 1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.1 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $5) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $6 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.2 (result i32) + (set_local $4 + (get_local $3) + ) + (set_local $6 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.2 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $5) + (get_local $6) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.1 + (set_local $4 + (get_local $3) + ) + (set_local $7 + (i32.const 1) + ) + (set_local $8 + (get_local $6) + ) + (i32.store offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + (get_local $8) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.2 + (set_local $8 + (get_local $3) + ) + (set_local $7 + (i32.const 0) + ) + (set_local $4 + (get_local $5) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + (get_local $4) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (return + (if (result i32) + (i32.lt_s + (get_local $2) + (i32.const 256) + ) + (call $~lib/internal/array/insertionSort> + (get_local $0) + (get_local $1) + ) + (call $~lib/internal/array/weakHeapSort> + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (func $std/array/isSorted> (; 81 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (block $break|0 + (block + (set_local $2 + (i32.const 1) + ) + (set_local $3 + (call $~lib/array/Array>#get:length + (get_local $0) + ) + ) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (get_local $3) + ) + (block + (block + (if + (i32.gt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (call $~lib/array/Array>#__get + (get_local $0) + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (call $~lib/array/Array>#__get + (get_local $0) + (get_local $2) + ) + (get_local $1) + ) + ) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (i32.const 1) + ) + ) + (func $std/array/assertSorted> (; 82 ;) (type $iiv) (param $0 i32) (param $1 i32) + (if + (i32.eqz + (call $std/array/isSorted> + (call $~lib/array/Array>#sort + (get_local $0) + (get_local $1) + ) + (get_local $1) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 96) + (i32.const 436) + (i32.const 2) + ) + (unreachable) + ) + ) + ) + (func $~lib/array/Array>#constructor (; 83 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (block + (nop) + (if + (i32.gt_u + (get_local $1) + (i32.const 268435454) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 23) + (i32.const 39) + ) + (unreachable) + ) + ) + (i32.store + (tee_local $0 + (if (result i32) + (get_local $0) + (get_local $0) + (tee_local $0 + (block (result i32) + (set_local $2 + (call $~lib/allocator/arena/allocate_memory + (i32.const 8) + ) + ) + (i32.store + (get_local $2) + (i32.const 0) + ) + (i32.store offset=4 + (get_local $2) + (i32.const 0) + ) + (get_local $2) + ) + ) + ) + ) + (call $~lib/internal/arraybuffer/allocUnsafe + (i32.shl + (get_local $1) + (i32.const 2) + ) + ) + ) + (i32.store offset=4 + (get_local $0) + (get_local $1) + ) + ) + (get_local $0) + ) + (func $~lib/array/Array>#get:length (; 84 ;) (type $ii) (param $0 i32) (result i32) + (return + (i32.load offset=4 + (get_local $0) + ) + ) + ) + (func $std/array/Proxy#constructor (; 85 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (block + ) + (tee_local $0 + (if (result i32) + (get_local $0) + (get_local $0) + (tee_local $0 + (block (result i32) + (set_local $2 + (call $~lib/allocator/arena/allocate_memory + (i32.const 4) + ) + ) + (i32.store + (get_local $2) + (get_local $1) + ) + (get_local $2) + ) + ) + ) + ) + ) + (func $~lib/array/Array>#__set (; 86 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (set_local $4 + (i32.shr_u + (i32.load + (get_local $3) + ) + (i32.const 2) + ) + ) + (if + (i32.ge_u + (get_local $1) + (get_local $4) + ) + (block + (nop) + (if + (i32.ge_u + (get_local $1) + (i32.const 268435454) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 75) + (i32.const 41) + ) + (unreachable) + ) + ) + (set_local $3 + (call $~lib/internal/arraybuffer/reallocUnsafe + (get_local $3) + (i32.shl + (i32.add + (get_local $1) + (i32.const 1) + ) + (i32.const 2) + ) + ) + ) + (i32.store + (get_local $0) + (get_local $3) + ) + (i32.store offset=4 + (get_local $0) + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.0 + (set_local $5 + (get_local $3) + ) + (set_local $6 + (get_local $1) + ) + (set_local $7 + (get_local $2) + ) + (i32.store offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $7) + ) + ) + ) + (func $std/array/createReverseOrderedElementsArray (; 87 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (set_local $1 + (call $~lib/array/Array>#constructor + (i32.const 0) + (get_local $0) + ) + ) + (block $break|0 + (set_local $2 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (call $~lib/array/Array>#get:length + (get_local $1) + ) + ) + (block + (block + (call $~lib/array/Array>#__set + (get_local $1) + (get_local $2) + (call $std/array/Proxy#constructor + (i32.const 0) + (i32.sub + (i32.sub + (call $~lib/array/Array>#get:length + (get_local $1) + ) + (i32.const 1) + ) + (get_local $2) + ) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (get_local $1) + ) + ) + (func $start~anonymous|29 (; 88 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (i32.load + (get_local $0) + ) + (i32.load + (get_local $1) + ) + ) + ) + (func $~lib/internal/array/insertionSort> (; 89 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (block $break|0 + (block + (set_local $3 + (i32.const 0) + ) + (set_local $4 + (call $~lib/array/Array>#get:length + (get_local $0) + ) + ) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $3) + (get_local $4) + ) + (block + (block + (set_local $6 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.2 (result i32) + (set_local $5 + (get_local $2) + ) + (set_local $6 + (get_local $3) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.2 + (i32.load offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $5 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (block $break|1 + (loop $continue|1 + (if + (i32.ge_s + (get_local $5) + (i32.const 0) + ) + (block + (block + (set_local $8 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.3 (result i32) + (set_local $7 + (get_local $2) + ) + (set_local $8 + (get_local $5) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.3 + (i32.load offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $6) + (get_local $8) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.3 + (set_local $7 + (get_local $2) + ) + (set_local $9 + (i32.add + (block (result i32) + (set_local $10 + (get_local $5) + ) + (set_local $5 + (i32.sub + (get_local $10) + (i32.const 1) + ) + ) + (get_local $10) + ) + (i32.const 1) + ) + ) + (set_local $10 + (get_local $8) + ) + (i32.store offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $10) + ) + ) + (br $break|1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.4 + (set_local $8 + (get_local $2) + ) + (set_local $10 + (i32.add + (get_local $5) + (i32.const 1) + ) + ) + (set_local $9 + (get_local $6) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + (get_local $9) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + (func $~lib/internal/array/weakHeapSort> (; 90 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (nop) + (set_local $2 + (call $~lib/array/Array>#get:length + (get_local $0) + ) + ) + (set_local $3 + (i32.shl + (i32.shr_s + (i32.add + (get_local $2) + (i32.const 31) + ) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (set_local $4 + (call $~lib/allocator/arena/allocate_memory + (get_local $3) + ) + ) + (call $~lib/memory/set_memory + (get_local $4) + (i32.const 0) + (get_local $3) + ) + (set_local $5 + (i32.load + (get_local $0) + ) + ) + (block $break|0 + (set_local $6 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|0 + (if + (i32.gt_s + (get_local $6) + (i32.const 0) + ) + (block + (block + (set_local $7 + (get_local $6) + ) + (block $break|1 + (loop $continue|1 + (if + (i32.eq + (i32.and + (get_local $7) + (i32.const 1) + ) + (i32.and + (i32.shr_s + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $7) + (i32.const 6) + ) + (i32.const 2) + ) + ) + ) + (i32.and + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + (i32.const 31) + ) + ) + (i32.const 1) + ) + ) + (block + (set_local $7 + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (set_local $8 + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + ) + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.4 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $10 + (get_local $8) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.4 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $11 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.5 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $11 + (get_local $6) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.5 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $11) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $10) + (get_local $11) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $6) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (i32.xor + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $6) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (get_local $6) + (i32.const 31) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.5 + (set_local $9 + (get_local $5) + ) + (set_local $12 + (get_local $6) + ) + (set_local $13 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + (get_local $13) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.6 + (set_local $13 + (get_local $5) + ) + (set_local $12 + (get_local $8) + ) + (set_local $9 + (get_local $11) + ) + (i32.store offset=8 + (i32.add + (get_local $13) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + (get_local $9) + ) + ) + ) + ) + ) + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (block $break|2 + (set_local $6 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|2 + (if + (i32.ge_s + (get_local $6) + (i32.const 2) + ) + (block + (block + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.6 (result i32) + (set_local $11 + (get_local $5) + ) + (set_local $10 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.6 + (i32.load offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.7 + (set_local $11 + (get_local $5) + ) + (set_local $8 + (i32.const 0) + ) + (set_local $7 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.7 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $12 + (get_local $6) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.7 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (i32.store offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + (get_local $7) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.8 + (set_local $7 + (get_local $5) + ) + (set_local $8 + (get_local $6) + ) + (set_local $11 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + (get_local $11) + ) + ) + (set_local $11 + (i32.const 1) + ) + (block $break|3 + (loop $continue|3 + (if + (i32.lt_s + (tee_local $8 + (i32.add + (i32.shl + (get_local $11) + (i32.const 1) + ) + (i32.and + (i32.shr_s + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.and + (get_local $11) + (i32.const 31) + ) + ) + (i32.const 1) + ) + ) + ) + (get_local $6) + ) + (block + (set_local $11 + (get_local $8) + ) + (br $continue|3) + ) + ) + ) + ) + (block $break|4 + (loop $continue|4 + (if + (i32.gt_s + (get_local $11) + (i32.const 0) + ) + (block + (block + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.8 (result i32) + (set_local $7 + (get_local $5) + ) + (set_local $12 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.8 + (i32.load offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $7 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.9 (result i32) + (set_local $12 + (get_local $5) + ) + (set_local $7 + (get_local $11) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.9 + (i32.load offset=8 + (i32.add + (get_local $12) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $10) + (get_local $7) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (i32.xor + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (get_local $11) + (i32.const 31) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.9 + (set_local $12 + (get_local $5) + ) + (set_local $9 + (get_local $11) + ) + (set_local $13 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $12) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $13) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.10 + (set_local $13 + (get_local $5) + ) + (set_local $9 + (i32.const 0) + ) + (set_local $12 + (get_local $7) + ) + (i32.store offset=8 + (i32.add + (get_local $13) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $12) + ) + ) + ) + ) + (set_local $11 + (i32.shr_s + (get_local $11) + (i32.const 1) + ) + ) + ) + (br $continue|4) + ) + ) + ) + ) + ) + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + ) + (call $~lib/allocator/arena/free_memory + (get_local $4) + ) + (set_local $14 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.10 (result i32) + (set_local $6 + (get_local $5) + ) + (set_local $8 + (i32.const 1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.10 + (i32.load offset=8 + (i32.add + (get_local $6) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.11 + (set_local $8 + (get_local $5) + ) + (set_local $6 + (i32.const 1) + ) + (set_local $11 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.11 (result i32) + (set_local $10 + (get_local $5) + ) + (set_local $7 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.11 + (i32.load offset=8 + (i32.add + (get_local $10) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $11) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.12 + (set_local $11 + (get_local $5) + ) + (set_local $6 + (i32.const 0) + ) + (set_local $8 + (get_local $14) + ) + (i32.store offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $8) + ) + ) + (return + (get_local $0) + ) + ) + (func $~lib/array/Array>#sort (; 91 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (set_local $2 + (i32.load offset=4 + (get_local $0) + ) + ) + (if + (i32.le_s + (get_local $2) + (i32.const 1) + ) + (return + (get_local $0) + ) + ) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (if + (i32.eq + (get_local $2) + (i32.const 2) + ) + (block + (set_local $5 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.0 (result i32) + (set_local $4 + (get_local $3) + ) + (set_local $5 + (i32.const 1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.0 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $5) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $6 + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.1 (result i32) + (set_local $4 + (get_local $3) + ) + (set_local $6 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.1 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $5) + (get_local $6) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.1 + (set_local $4 + (get_local $3) + ) + (set_local $7 + (i32.const 1) + ) + (set_local $8 + (get_local $6) + ) + (i32.store offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + (get_local $8) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe>|inlined.2 + (set_local $8 + (get_local $3) + ) + (set_local $7 + (i32.const 0) + ) + (set_local $4 + (get_local $5) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + (get_local $4) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (return + (if (result i32) + (i32.lt_s + (get_local $2) + (i32.const 256) + ) + (call $~lib/internal/array/insertionSort> + (get_local $0) + (get_local $1) + ) + (call $~lib/internal/array/weakHeapSort> + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (func $~lib/array/Array>#__get (; 92 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (set_local $3 + (i32.shr_u + (i32.load + (get_local $2) + ) + (i32.const 2) + ) + ) + (if + (i32.ge_u + (get_local $1) + (get_local $3) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 64) + (i32.const 37) + ) + (unreachable) + ) + ) + (return + (block $~lib/internal/arraybuffer/loadUnsafe>|inlined.12 (result i32) + (set_local $4 + (get_local $2) + ) + (set_local $5 + (get_local $1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe>|inlined.12 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $5) + (i32.const 2) + ) + ) + ) + ) + ) + ) + ) + (func $std/array/isSorted> (; 93 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (block $break|0 + (block + (set_local $2 + (i32.const 1) + ) + (set_local $3 + (call $~lib/array/Array>#get:length + (get_local $0) + ) + ) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (get_local $3) + ) + (block + (block + (if + (i32.gt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (call $~lib/array/Array>#__get + (get_local $0) + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (call $~lib/array/Array>#__get + (get_local $0) + (get_local $2) + ) + (get_local $1) + ) + ) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (i32.const 1) + ) + ) + (func $std/array/assertSorted> (; 94 ;) (type $iiv) (param $0 i32) (param $1 i32) + (if + (i32.eqz + (call $std/array/isSorted> + (call $~lib/array/Array>#sort + (get_local $0) + (get_local $1) + ) + (get_local $1) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 96) + (i32.const 436) + (i32.const 2) + ) + (unreachable) + ) + ) + ) + (func $~lib/memory/compare_memory (; 95 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (if + (i32.eq + (get_local $0) + (get_local $1) + ) + (return + (i32.const 0) + ) + ) + (block $break|0 + (loop $continue|0 + (if + (if (result i32) + (get_local $2) + (i32.eq + (i32.load8_u + (get_local $0) + ) + (i32.load8_u + (get_local $1) + ) + ) + (get_local $2) + ) + (block + (block + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (if (result i32) + (get_local $2) + (i32.sub + (i32.load8_u + (get_local $0) + ) + (i32.load8_u + (get_local $1) + ) + ) + (i32.const 0) + ) + ) + ) + (func $~lib/string/String.__gt (; 96 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (if + (i32.and + (if (result i32) + (tee_local $2 + (i32.and + (if (result i32) + (tee_local $2 + (i32.eq + (get_local $0) + (get_local $1) + ) + ) + (get_local $2) + (i32.eq + (get_local $0) + (i32.const 0) + ) + ) + (i32.const 1) + ) + ) + (get_local $2) + (i32.eq + (get_local $1) + (i32.const 0) + ) + ) + (i32.const 1) + ) + (return + (i32.const 0) + ) + ) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (set_local $4 + (i32.load + (get_local $1) + ) + ) + (if + (i32.eqz + (get_local $3) + ) + (return + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $4) + ) + (return + (i32.const 1) + ) + ) + (set_local $6 + (select + (tee_local $2 + (get_local $3) + ) + (tee_local $5 + (get_local $4) + ) + (i32.lt_s + (get_local $2) + (get_local $5) + ) + ) + ) + (return + (i32.gt_s + (call $~lib/memory/compare_memory + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (get_local $6) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + ) + (func $~lib/string/String.__lt (; 97 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (if + (i32.and + (if (result i32) + (tee_local $2 + (i32.and + (if (result i32) + (tee_local $2 + (i32.eq + (get_local $0) + (get_local $1) + ) + ) + (get_local $2) + (i32.eq + (get_local $0) + (i32.const 0) + ) + ) + (i32.const 1) + ) + ) + (get_local $2) + (i32.eq + (get_local $1) + (i32.const 0) + ) + ) + (i32.const 1) + ) + (return + (i32.const 0) + ) + ) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (set_local $4 + (i32.load + (get_local $1) + ) + ) + (if + (i32.eqz + (get_local $4) + ) + (return + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $3) + ) + (return + (i32.const 1) + ) + ) + (set_local $6 + (select + (tee_local $2 + (get_local $3) + ) + (tee_local $5 + (get_local $4) + ) + (i32.lt_s + (get_local $2) + (get_local $5) + ) + ) + ) + (return + (i32.lt_s + (call $~lib/memory/compare_memory + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (get_local $6) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + ) + (func $start~anonymous|30 (; 98 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (call $~lib/string/String.__gt + (get_local $0) + (get_local $1) + ) + (call $~lib/string/String.__lt + (get_local $0) + (get_local $1) + ) + ) + ) + (func $~lib/array/Array#get:length (; 99 ;) (type $ii) (param $0 i32) (result i32) + (return + (i32.load offset=4 + (get_local $0) + ) + ) + ) + (func $~lib/internal/array/insertionSort (; 100 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (block $break|0 + (block + (set_local $3 + (i32.const 0) + ) + (set_local $4 + (call $~lib/array/Array#get:length + (get_local $0) + ) + ) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $3) + (get_local $4) + ) + (block + (block + (set_local $6 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.2 (result i32) + (set_local $5 + (get_local $2) + ) + (set_local $6 + (get_local $3) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.2 + (i32.load offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $5 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (block $break|1 + (loop $continue|1 + (if + (i32.ge_s + (get_local $5) + (i32.const 0) + ) + (block + (block + (set_local $8 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.3 (result i32) + (set_local $7 + (get_local $2) + ) + (set_local $8 + (get_local $5) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.3 + (i32.load offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $6) + (get_local $8) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.2 + (set_local $7 + (get_local $2) + ) + (set_local $9 + (i32.add + (block (result i32) + (set_local $10 + (get_local $5) + ) + (set_local $5 + (i32.sub + (get_local $10) + (i32.const 1) + ) + ) + (get_local $10) + ) + (i32.const 1) + ) + ) + (set_local $10 + (get_local $8) + ) + (i32.store offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $10) + ) + ) + (br $break|1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.3 + (set_local $8 + (get_local $2) + ) + (set_local $10 + (i32.add + (get_local $5) + (i32.const 1) + ) + ) + (set_local $9 + (get_local $6) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + (get_local $9) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + (func $~lib/internal/array/weakHeapSort (; 101 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (nop) + (set_local $2 + (call $~lib/array/Array#get:length + (get_local $0) + ) + ) + (set_local $3 + (i32.shl + (i32.shr_s + (i32.add + (get_local $2) + (i32.const 31) + ) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (set_local $4 + (call $~lib/allocator/arena/allocate_memory + (get_local $3) + ) + ) + (call $~lib/memory/set_memory + (get_local $4) + (i32.const 0) + (get_local $3) + ) + (set_local $5 + (i32.load + (get_local $0) + ) + ) + (block $break|0 + (set_local $6 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|0 + (if + (i32.gt_s + (get_local $6) + (i32.const 0) + ) + (block + (block + (set_local $7 + (get_local $6) + ) + (block $break|1 + (loop $continue|1 + (if + (i32.eq + (i32.and + (get_local $7) + (i32.const 1) + ) + (i32.and + (i32.shr_s + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $7) + (i32.const 6) + ) + (i32.const 2) + ) + ) + ) + (i32.and + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + (i32.const 31) + ) + ) + (i32.const 1) + ) + ) + (block + (set_local $7 + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (set_local $8 + (i32.shr_s + (get_local $7) + (i32.const 1) + ) + ) + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.4 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $10 + (get_local $8) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.4 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $11 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.5 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $11 + (get_local $6) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.5 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $11) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $10) + (get_local $11) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $6) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (i32.xor + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $6) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (get_local $6) + (i32.const 31) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.4 + (set_local $9 + (get_local $5) + ) + (set_local $12 + (get_local $6) + ) + (set_local $13 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + (get_local $13) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.5 + (set_local $13 + (get_local $5) + ) + (set_local $12 + (get_local $8) + ) + (set_local $9 + (get_local $11) + ) + (i32.store offset=8 + (i32.add + (get_local $13) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + (get_local $9) + ) + ) + ) + ) + ) + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (block $break|2 + (set_local $6 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|2 + (if + (i32.ge_s + (get_local $6) + (i32.const 2) + ) + (block + (block + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.6 (result i32) + (set_local $11 + (get_local $5) + ) + (set_local $10 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.6 + (i32.load offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $10) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.6 + (set_local $11 + (get_local $5) + ) + (set_local $8 + (i32.const 0) + ) + (set_local $7 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.7 (result i32) + (set_local $9 + (get_local $5) + ) + (set_local $12 + (get_local $6) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.7 + (i32.load offset=8 + (i32.add + (get_local $9) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (i32.store offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + (get_local $7) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.7 + (set_local $7 + (get_local $5) + ) + (set_local $8 + (get_local $6) + ) + (set_local $11 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + (get_local $11) + ) + ) + (set_local $11 + (i32.const 1) + ) + (block $break|3 + (loop $continue|3 + (if + (i32.lt_s + (tee_local $8 + (i32.add + (i32.shl + (get_local $11) + (i32.const 1) + ) + (i32.and + (i32.shr_s + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.and + (get_local $11) + (i32.const 31) + ) + ) + (i32.const 1) + ) + ) + ) + (get_local $6) + ) + (block + (set_local $11 + (get_local $8) + ) + (br $continue|3) + ) + ) + ) + ) + (block $break|4 + (loop $continue|4 + (if + (i32.gt_s + (get_local $11) + (i32.const 0) + ) + (block + (block + (set_local $10 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.8 (result i32) + (set_local $7 + (get_local $5) + ) + (set_local $12 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.8 + (i32.load offset=8 + (i32.add + (get_local $7) + (i32.shl + (get_local $12) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $7 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.9 (result i32) + (set_local $12 + (get_local $5) + ) + (set_local $7 + (get_local $11) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.9 + (i32.load offset=8 + (i32.add + (get_local $12) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $10) + (get_local $7) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + (i32.xor + (i32.load + (i32.add + (get_local $4) + (i32.shl + (i32.shr_s + (get_local $11) + (i32.const 5) + ) + (i32.const 2) + ) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (get_local $11) + (i32.const 31) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.8 + (set_local $12 + (get_local $5) + ) + (set_local $9 + (get_local $11) + ) + (set_local $13 + (get_local $10) + ) + (i32.store offset=8 + (i32.add + (get_local $12) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $13) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.9 + (set_local $13 + (get_local $5) + ) + (set_local $9 + (i32.const 0) + ) + (set_local $12 + (get_local $7) + ) + (i32.store offset=8 + (i32.add + (get_local $13) + (i32.shl + (get_local $9) + (i32.const 2) + ) + ) + (get_local $12) + ) + ) + ) + ) + (set_local $11 + (i32.shr_s + (get_local $11) + (i32.const 1) + ) + ) + ) + (br $continue|4) + ) + ) + ) + ) + ) + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + ) + (call $~lib/allocator/arena/free_memory + (get_local $4) + ) + (set_local $14 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.10 (result i32) + (set_local $6 + (get_local $5) + ) + (set_local $8 + (i32.const 1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.10 + (i32.load offset=8 + (i32.add + (get_local $6) + (i32.shl + (get_local $8) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.10 + (set_local $8 + (get_local $5) + ) + (set_local $6 + (i32.const 1) + ) + (set_local $11 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.11 (result i32) + (set_local $10 + (get_local $5) + ) + (set_local $7 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.11 + (i32.load offset=8 + (i32.add + (get_local $10) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $11) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.11 + (set_local $11 + (get_local $5) + ) + (set_local $6 + (i32.const 0) + ) + (set_local $8 + (get_local $14) + ) + (i32.store offset=8 + (i32.add + (get_local $11) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $8) + ) + ) + (return + (get_local $0) + ) + ) + (func $~lib/array/Array#sort (; 102 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (set_local $2 + (i32.load offset=4 + (get_local $0) + ) + ) + (if + (i32.le_s + (get_local $2) + (i32.const 1) + ) + (return + (get_local $0) + ) + ) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (if + (i32.eq + (get_local $2) + (i32.const 2) + ) + (block + (set_local $5 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.0 (result i32) + (set_local $4 + (get_local $3) + ) + (set_local $5 + (i32.const 1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.0 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $5) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (set_local $6 + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.1 (result i32) + (set_local $4 + (get_local $3) + ) + (set_local $6 + (i32.const 0) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.1 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (get_local $5) + (get_local $6) + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 + (set_local $4 + (get_local $3) + ) + (set_local $7 + (i32.const 1) + ) + (set_local $8 + (get_local $6) + ) + (i32.store offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + (get_local $8) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.1 + (set_local $8 + (get_local $3) + ) + (set_local $7 + (i32.const 0) + ) + (set_local $4 + (get_local $5) + ) + (i32.store offset=8 + (i32.add + (get_local $8) + (i32.shl + (get_local $7) + (i32.const 2) + ) + ) + (get_local $4) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (return + (if (result i32) + (i32.lt_s + (get_local $2) + (i32.const 256) + ) + (call $~lib/internal/array/insertionSort + (get_local $0) + (get_local $1) + ) + (call $~lib/internal/array/weakHeapSort + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (func $~lib/array/Array#__get (; 103 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (set_local $3 + (i32.shr_u + (i32.load + (get_local $2) + ) + (i32.const 2) + ) + ) + (if + (i32.ge_u + (get_local $1) + (get_local $3) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 64) + (i32.const 37) + ) + (unreachable) + ) + ) + (return + (block $~lib/internal/arraybuffer/loadUnsafe|inlined.12 (result i32) + (set_local $4 + (get_local $2) + ) + (set_local $5 + (get_local $1) + ) + (br $~lib/internal/arraybuffer/loadUnsafe|inlined.12 + (i32.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $5) + (i32.const 2) + ) + ) + ) + ) + ) + ) + ) + (func $std/array/isSorted (; 104 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (block $break|0 + (block + (set_local $2 + (i32.const 1) + ) + (set_local $3 + (call $~lib/array/Array#get:length + (get_local $0) + ) + ) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (get_local $3) + ) + (block + (block + (if + (i32.gt_s + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call_indirect (type $iii) + (call $~lib/array/Array#__get + (get_local $0) + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (call $~lib/array/Array#__get + (get_local $0) + (get_local $2) + ) + (get_local $1) + ) + ) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (i32.const 1) + ) + ) + (func $std/array/assertSorted (; 105 ;) (type $iiv) (param $0 i32) (param $1 i32) + (if + (i32.eqz + (call $std/array/isSorted + (call $~lib/array/Array#sort + (get_local $0) + (get_local $1) + ) + (get_local $1) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 96) + (i32.const 436) + (i32.const 2) + ) + (unreachable) + ) + ) + ) + (func $~lib/string/String.__eq (; 106 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if + (i32.eq + (get_local $0) + (get_local $1) + ) + (return + (i32.const 1) + ) + ) + (if + (i32.eq + (get_local $0) + (i32.const 0) + ) + (return + (i32.eq + (get_local $1) + (i32.const 0) + ) + ) + ) + (if + (i32.eq + (get_local $1) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (if + (i32.ne + (get_local $2) + (i32.load + (get_local $1) + ) + ) + (return + (i32.const 0) + ) + ) + (return + (i32.eqz + (call $~lib/memory/compare_memory + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + ) + ) + ) + (func $~lib/string/String.__ne (; 107 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (return + (i32.eqz + (call $~lib/string/String.__eq + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (func $std/array/isArraysEqual (; 108 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.eqz + (get_local $2) + ) + (block + (if + (i32.ne + (call $~lib/array/Array#get:length + (get_local $0) + ) + (call $~lib/array/Array#get:length + (get_local $1) + ) + ) + (return + (i32.const 0) + ) + ) + (set_local $2 + (call $~lib/array/Array#get:length + (get_local $0) + ) + ) + ) + ) + (block $break|0 + (set_local $3 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $3) + (get_local $2) + ) + (block + (block + (if + (call $~lib/string/String.__ne + (call $~lib/array/Array#__get + (get_local $0) + (get_local $3) + ) + (call $~lib/array/Array#__get + (get_local $1) + (get_local $3) + ) + ) + (return + (i32.const 0) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (i32.const 1) + ) + ) + (func $std/array/isArraysEqual|trampoline (; 109 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (block $1of1 + (block $0of1 + (block $oob + (br_table $0of1 $1of1 $oob + (i32.sub + (get_global $argumentCount) + (i32.const 2) + ) + ) + ) + (unreachable) + ) + (set_local $2 + (i32.const 0) + ) + ) + (call $std/array/isArraysEqual + (get_local $0) + (get_local $1) + (get_local $2) + ) + ) + (func $~lib/array/Array#constructor (; 110 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (block + (nop) + (if + (i32.gt_u + (get_local $1) + (i32.const 268435454) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 23) + (i32.const 39) + ) + (unreachable) + ) + ) + (i32.store + (tee_local $0 + (if (result i32) + (get_local $0) + (get_local $0) + (tee_local $0 + (block (result i32) + (set_local $2 + (call $~lib/allocator/arena/allocate_memory + (i32.const 8) + ) + ) + (i32.store + (get_local $2) + (i32.const 0) + ) + (i32.store offset=4 + (get_local $2) + (i32.const 0) + ) + (get_local $2) + ) + ) + ) + ) + (call $~lib/internal/arraybuffer/allocUnsafe + (i32.shl + (get_local $1) + (i32.const 2) + ) + ) + ) + (i32.store offset=4 + (get_local $0) + (get_local $1) + ) + ) + (get_local $0) + ) + (func $~lib/internal/string/allocate (; 111 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (if + (i32.eqz + (i32.and + (if (result i32) + (tee_local $1 + (i32.gt_s + (get_local $0) + (i32.const 0) + ) + ) + (i32.le_s + (get_local $0) + (i32.const 536870910) + ) + (get_local $1) + ) + (i32.const 1) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 736) + (i32.const 20) + (i32.const 2) + ) + (unreachable) + ) + ) + (set_local $2 + (call $~lib/allocator/arena/allocate_memory + (i32.add + (i32.const 4) + (i32.shl + (get_local $0) + (i32.const 1) + ) + ) + ) + ) + (i32.store + (get_local $2) + (get_local $0) + ) + (return + (get_local $2) + ) + ) + (func $~lib/string/String#charAt (; 112 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if + (i32.eqz + (i32.ne + (get_local $0) + (i32.const 0) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 704) + (i32.const 18) + (i32.const 4) + ) + (unreachable) + ) + ) + (if + (i32.ge_u + (get_local $1) + (i32.load + (get_local $0) + ) + ) + (return + (i32.const 552) + ) + ) + (set_local $2 + (call $~lib/internal/string/allocate + (i32.const 1) + ) + ) + (i32.store16 offset=4 + (get_local $2) + (i32.load16_u offset=4 + (i32.add + (get_local $0) + (i32.shl + (get_local $1) + (i32.const 1) + ) + ) + ) + ) + (return + (get_local $2) + ) + ) + (func $~lib/string/String#concat (; 113 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (if + (i32.eqz + (i32.ne + (get_local $0) + (i32.const 0) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 704) + (i32.const 74) + (i32.const 4) + ) + (unreachable) + ) + ) + (if + (i32.eq + (get_local $1) + (i32.const 0) + ) + (set_local $1 + (i32.const 788) + ) + ) + (set_local $2 + (i32.load + (get_local $0) + ) + ) + (set_local $3 + (i32.load + (get_local $1) + ) + ) + (set_local $4 + (i32.add + (get_local $2) + (get_local $3) + ) + ) + (if + (i32.eq + (get_local $4) + (i32.const 0) + ) + (return + (i32.const 552) + ) + ) + (set_local $5 + (call $~lib/internal/string/allocate + (get_local $4) + ) + ) + (call $~lib/memory/move_memory + (i32.add + (get_local $5) + (i32.const 4) + ) + (i32.add + (get_local $0) + (i32.const 4) + ) + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (call $~lib/memory/move_memory + (i32.add + (i32.add + (get_local $5) + (i32.const 4) + ) + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (i32.add + (get_local $1) + (i32.const 4) + ) + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (return + (get_local $5) + ) + ) + (func $~lib/string/String.__concat (; 114 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (if + (i32.eqz + (get_local $0) + ) + (set_local $0 + (i32.const 788) + ) + ) + (return + (call $~lib/string/String#concat + (get_local $0) + (get_local $1) + ) + ) + ) + (func $std/array/createRandomString (; 115 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (set_local $1 + (i32.const 552) + ) + (block $break|0 + (set_local $2 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (get_local $0) + ) + (block + (block + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (call $~lib/string/String#charAt + (i32.const 152) + (i32.trunc_s/f64 + (block $~lib/math/NativeMath.floor|inlined.0 (result f64) + (set_local $3 + (f64.mul + (call $~lib/math/NativeMath.random) + (f64.convert_s/i32 + (i32.load + (i32.const 152) + ) + ) + ) + ) + (br $~lib/math/NativeMath.floor|inlined.0 + (f64.floor + (get_local $3) + ) + ) + ) + ) + ) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (get_local $1) + ) + ) + (func $~lib/array/Array#__set (; 116 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (set_local $3 + (i32.load + (get_local $0) + ) + ) + (set_local $4 + (i32.shr_u + (i32.load + (get_local $3) + ) + (i32.const 2) + ) + ) + (if + (i32.ge_u + (get_local $1) + (get_local $4) + ) + (block + (nop) + (if + (i32.ge_u + (get_local $1) + (i32.const 268435454) + ) + (block + (call $abort + (i32.const 0) + (i32.const 4) + (i32.const 75) + (i32.const 41) + ) + (unreachable) + ) + ) + (set_local $3 + (call $~lib/internal/arraybuffer/reallocUnsafe + (get_local $3) + (i32.shl + (i32.add + (get_local $1) + (i32.const 1) + ) + (i32.const 2) + ) + ) + ) + (i32.store + (get_local $0) + (get_local $3) + ) + (i32.store offset=4 + (get_local $0) + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + ) + (block $~lib/internal/arraybuffer/storeUnsafe|inlined.12 + (set_local $5 + (get_local $3) + ) + (set_local $6 + (get_local $1) + ) + (set_local $7 + (get_local $2) + ) + (i32.store offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $6) + (i32.const 2) + ) + ) + (get_local $7) + ) + ) + ) + (func $std/array/createRandomStringArray (; 117 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (set_local $1 + (call $~lib/array/Array#constructor + (i32.const 0) + (get_local $0) + ) + ) + (block $break|0 + (set_local $2 + (i32.const 0) + ) + (loop $continue|0 + (if + (i32.lt_s + (get_local $2) + (call $~lib/array/Array#get:length + (get_local $1) + ) + ) + (block + (block + (call $~lib/array/Array#__set + (get_local $1) + (get_local $2) + (call $std/array/createRandomString + (i32.trunc_s/f64 + (f64.mul + (call $~lib/math/NativeMath.random) + (f64.const 32) + ) + ) + ) + ) + ) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (return + (get_local $1) + ) + ) + (func $start~anonymous|31 (; 118 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (call $~lib/string/String.__gt + (get_local $0) + (get_local $1) + ) + (call $~lib/string/String.__lt + (get_local $0) + (get_local $1) + ) + ) + ) + (func $start (; 119 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add @@ -8709,7 +13579,7 @@ ) (call $std/array/isArraysEqual|trampoline (get_global $std/array/reversed1) - (i32.const 296) + (i32.const 472) (i32.const 0) ) ) @@ -8718,7 +13588,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 445) + (i32.const 462) (i32.const 0) ) (unreachable) @@ -8735,7 +13605,7 @@ ) (call $std/array/isArraysEqual|trampoline (get_global $std/array/reversed2) - (i32.const 320) + (i32.const 496) (i32.const 0) ) ) @@ -8744,7 +13614,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 448) + (i32.const 465) (i32.const 0) ) (unreachable) @@ -8770,7 +13640,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 451) + (i32.const 468) (i32.const 0) ) (unreachable) @@ -8791,7 +13661,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 454) + (i32.const 471) (i32.const 0) ) (unreachable) @@ -8812,7 +13682,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 457) + (i32.const 474) (i32.const 0) ) (unreachable) @@ -8833,7 +13703,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 460) + (i32.const 477) (i32.const 0) ) (unreachable) @@ -8854,7 +13724,7 @@ (call $abort (i32.const 0) (i32.const 96) - (i32.const 463) + (i32.const 480) (i32.const 0) ) (unreachable) @@ -8889,5 +13759,59 @@ (get_global $std/array/randomized257) (i32.const 27) ) + (set_global $std/array/reversedNested512 + (call $std/array/createReverseOrderedNestedArray + (i32.const 512) + ) + ) + (call $std/array/assertSorted> + (get_global $std/array/reversedNested512) + (i32.const 28) + ) + (set_global $std/array/reversedElements512 + (call $std/array/createReverseOrderedElementsArray + (i32.const 512) + ) + ) + (call $std/array/assertSorted> + (get_global $std/array/reversedElements512) + (i32.const 29) + ) + (call $std/array/assertSorted + (get_global $std/array/randomStringsActual) + (i32.const 30) + ) + (if + (i32.eqz + (block (result i32) + (set_global $argumentCount + (i32.const 2) + ) + (call $std/array/isArraysEqual|trampoline + (get_global $std/array/randomStringsActual) + (get_global $std/array/randomStringsExpected) + (i32.const 0) + ) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 96) + (i32.const 509) + (i32.const 0) + ) + (unreachable) + ) + ) + (set_global $std/array/randomStrings400 + (call $std/array/createRandomStringArray + (i32.const 400) + ) + ) + (call $std/array/assertSorted + (get_global $std/array/randomStrings400) + (i32.const 31) + ) ) )