@salang/sa 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/sa.js +19 -1
- package/package.json +8 -7
- package/sa_std/alloc/layout.sal +12 -0
- package/sa_std/alloc/prelude.sa +1 -0
- package/sa_std/alloc/prelude.sal +1 -0
- package/sa_std/alloc/string.sa +3 -0
- package/sa_std/alloc/vec.sa +684 -0
- package/sa_std/alloc/vec.sal +4 -0
- package/sa_std/any.sa +130 -0
- package/sa_std/any.sal +23 -0
- package/sa_std/array.sa +1876 -0
- package/sa_std/ascii.sa +2 -0
- package/sa_std/ascii.sal +1 -0
- package/sa_std/async.sla +116 -0
- package/sa_std/binary_heap.sa +3003 -0
- package/sa_std/binary_heap.sal +7 -0
- package/sa_std/borrow.sa +171 -0
- package/sa_std/borrow.sal +13 -0
- package/sa_std/btree_map.sa +2210 -0
- package/sa_std/btree_map.sal +11 -0
- package/sa_std/btree_set.sa +1072 -0
- package/sa_std/btree_set.sal +6 -0
- package/sa_std/char.sa +1309 -0
- package/sa_std/char.sal +50 -0
- package/sa_std/cmp.sa +554 -0
- package/sa_std/cmp.sal +14 -0
- package/sa_std/collections/binary_heap.sa +1 -0
- package/sa_std/collections/btree_map.sa +1 -0
- package/sa_std/collections/btree_set.sa +1 -0
- package/sa_std/collections/hashmap.sa +1 -0
- package/sa_std/collections/hashset.sa +1 -0
- package/sa_std/collections/linked_list.sa +1120 -0
- package/sa_std/collections/linked_list.sal +10 -0
- package/sa_std/collections/prelude.sa +7 -0
- package/sa_std/collections/prelude.sal +1 -0
- package/sa_std/collections/vec_deque.sa +1 -0
- package/sa_std/collections.sal +13 -0
- package/sa_std/convert.sa +1115 -0
- package/sa_std/convert.sal +24 -0
- package/sa_std/core/arc.sa +233 -0
- package/sa_std/core/arc.sal +4 -0
- package/sa_std/core/ascii.sa +784 -0
- package/sa_std/core/ascii.sal +34 -0
- package/sa_std/core/bit.sa +41 -0
- package/sa_std/core/box.sa +1 -0
- package/sa_std/core/box.sal +2 -0
- package/sa_std/core/cell.sa +108 -0
- package/sa_std/core/cell.sal +5 -0
- package/sa_std/core/cleanup.sa +26 -0
- package/sa_std/core/control.sa +20 -0
- package/sa_std/core/derive.sa +60 -0
- package/sa_std/core/derive.sal +1 -0
- package/sa_std/core/dispatch.sa +7 -0
- package/sa_std/core/dispatch.sal +5 -0
- package/sa_std/core/future.sa +777 -0
- package/sa_std/core/future.sal +73 -0
- package/sa_std/core/hash.sa +48 -0
- package/sa_std/core/iter.sa +2805 -0
- package/sa_std/core/iter.sal +4 -0
- package/sa_std/core/loop.sa +60 -0
- package/sa_std/core/mem.sa +220 -0
- package/sa_std/core/option.sa +825 -0
- package/sa_std/core/option.sal +11 -0
- package/sa_std/core/panic.sa +23 -0
- package/sa_std/core/panic.sal +12 -0
- package/sa_std/core/prelude.sa +18 -0
- package/sa_std/core/prelude.sal +18 -0
- package/sa_std/core/rc.sa +225 -0
- package/sa_std/core/rc.sal +4 -0
- package/sa_std/core/refcell.sa +283 -0
- package/sa_std/core/refcell.sal +13 -0
- package/sa_std/core/result.sa +708 -0
- package/sa_std/core/result.sal +6 -0
- package/sa_std/core/rust_patterns.sal +295 -0
- package/sa_std/core/sa_core.sa +84 -0
- package/sa_std/core/slice.sa +4021 -0
- package/sa_std/core/slice.sal +7 -0
- package/sa_std/core/task.sa +112 -0
- package/sa_std/core/task.sal +15 -0
- package/sa_std/core/trait_object.sa +26 -0
- package/sa_std/core/trait_object.sal +4 -0
- package/sa_std/core/waker.sa +289 -0
- package/sa_std/core/waker.sal +31 -0
- package/sa_std/core/weak.sa +2 -0
- package/sa_std/core/weak.sal +4 -0
- package/sa_std/cow.sa +3 -0
- package/sa_std/cow.sal +2 -0
- package/sa_std/cstring.sa +3 -0
- package/sa_std/cstring.sal +2 -0
- package/sa_std/default.sa +99 -0
- package/sa_std/duration.sa +3 -0
- package/sa_std/duration.sal +2 -0
- package/sa_std/encoding/json.sa +259 -0
- package/sa_std/encoding/json.sai +54 -0
- package/sa_std/encoding/json.sal +35 -0
- package/sa_std/encoding/prelude.sa +1 -0
- package/sa_std/encoding/prelude.sal +0 -0
- package/sa_std/env.sa +390 -0
- package/sa_std/env.sai +25 -0
- package/sa_std/error.sa +253 -0
- package/sa_std/error.sal +44 -0
- package/sa_std/ffi/cstring.sa +3 -0
- package/sa_std/ffi/cstring.sal +1 -0
- package/sa_std/ffi/prelude.sa +2 -0
- package/sa_std/ffi/prelude.sal +2 -0
- package/sa_std/ffi.sa +635 -0
- package/sa_std/ffi.sal +51 -0
- package/sa_std/fmt.sa +2 -0
- package/sa_std/fmt.sai +18 -0
- package/sa_std/fmt.sal +35 -0
- package/sa_std/fs.sa +1023 -0
- package/sa_std/fs.sai +127 -0
- package/sa_std/fs.sal +51 -0
- package/sa_std/future.sa +2 -0
- package/sa_std/future.sal +1 -0
- package/sa_std/hash.sa +1486 -0
- package/sa_std/hash.sal +13 -0
- package/sa_std/hashmap.sa +1962 -0
- package/sa_std/hashmap.sal +20 -0
- package/sa_std/hashset.sa +1004 -0
- package/sa_std/hashset.sal +18 -0
- package/sa_std/http2.sa +78 -0
- package/sa_std/http2.sai +26 -0
- package/sa_std/http2.sal +36 -0
- package/sa_std/instant.sa +3 -0
- package/sa_std/instant.sal +2 -0
- package/sa_std/io/buf_reader.sa +43 -0
- package/sa_std/io/buf_writer.sa +35 -0
- package/sa_std/io/bufio.sa +4 -0
- package/sa_std/io/bufio.sal +4 -0
- package/sa_std/io/prelude.sa +1 -0
- package/sa_std/io/prelude.sal +1 -0
- package/sa_std/io/print.sa +2 -0
- package/sa_std/io/print.sai +3 -0
- package/sa_std/io.sa +925 -0
- package/sa_std/io.sai +25 -0
- package/sa_std/io.sal +84 -0
- package/sa_std/iter.sa +2 -0
- package/sa_std/iter.sal +1 -0
- package/sa_std/join_handle.sa +3 -0
- package/sa_std/join_handle.sal +2 -0
- package/sa_std/libsa_async.sa +80 -0
- package/sa_std/m_async.sa +137 -0
- package/sa_std/m_async.sal +30 -0
- package/sa_std/m_async.sla +2 -0
- package/sa_std/manually_drop.sa +3 -0
- package/sa_std/manually_drop.sal +2 -0
- package/sa_std/marker/phantom_data.sa +3 -0
- package/sa_std/marker/phantom_data.sal +1 -0
- package/sa_std/marker/prelude.sa +4 -0
- package/sa_std/marker/prelude.sal +4 -0
- package/sa_std/marker.sa +220 -0
- package/sa_std/marker.sal +15 -0
- package/sa_std/math.sa +84 -0
- package/sa_std/math.sai +10 -0
- package/sa_std/mem/manually_drop.sa +3 -0
- package/sa_std/mem/manually_drop.sal +1 -0
- package/sa_std/mem/prelude.sa +2 -0
- package/sa_std/mem/prelude.sal +2 -0
- package/sa_std/mem.sa +564 -0
- package/sa_std/mem.sal +40 -0
- package/sa_std/modstate.sai +19 -0
- package/sa_std/net.sa +4227 -0
- package/sa_std/net.sai +239 -0
- package/sa_std/net.sal +159 -0
- package/sa_std/netx.sa +85 -0
- package/sa_std/netx.sai +11 -0
- package/sa_std/netx.sal +39 -0
- package/sa_std/nonzero.sa +3 -0
- package/sa_std/nonzero.sal +2 -0
- package/sa_std/num/nonzero.sa +3 -0
- package/sa_std/num/nonzero.sal +1 -0
- package/sa_std/num/prelude.sa +3 -0
- package/sa_std/num/prelude.sal +3 -0
- package/sa_std/num.sa +17302 -0
- package/sa_std/num.sai +11 -0
- package/sa_std/num.sal +341 -0
- package/sa_std/ops.sa +1884 -0
- package/sa_std/ops.sal +68 -0
- package/sa_std/option.sa +2 -0
- package/sa_std/option.sal +1 -0
- package/sa_std/os/fd.sa +96 -0
- package/sa_std/os/fd.sai +7 -0
- package/sa_std/os/fd.sal +11 -0
- package/sa_std/os/prelude.sa +2 -0
- package/sa_std/os/prelude.sal +1 -0
- package/sa_std/os/unix_ffi.sa +271 -0
- package/sa_std/panic.sa +1 -0
- package/sa_std/panic.sal +1 -0
- package/sa_std/path.sa +3170 -0
- package/sa_std/path.sal +12 -0
- package/sa_std/phantom_data.sa +3 -0
- package/sa_std/phantom_data.sal +2 -0
- package/sa_std/pin.sa +79 -0
- package/sa_std/pin.sal +5 -0
- package/sa_std/plugin_async.sa +90 -0
- package/sa_std/plugin_async.sal +29 -0
- package/sa_std/plugin_async.sla +4 -0
- package/sa_std/plugin_http_async.sa +46 -0
- package/sa_std/plugin_http_server.sa +61 -0
- package/sa_std/plugin_http_server.sla +2 -0
- package/sa_std/plugin_sqlite.sa +106 -0
- package/sa_std/plugin_sqlite.sla +2 -0
- package/sa_std/prelude.sa +60 -0
- package/sa_std/prelude.sal +55 -0
- package/sa_std/process.sa +916 -0
- package/sa_std/process.sai +57 -0
- package/sa_std/process.sal +27 -0
- package/sa_std/ptr.sa +503 -0
- package/sa_std/ptr.sal +2 -0
- package/sa_std/result.sa +2 -0
- package/sa_std/result.sal +1 -0
- package/sa_std/rust_core.sa +51 -0
- package/sa_std/rust_core.sal +26 -0
- package/sa_std/sa.mod +7 -0
- package/sa_std/sort.sa +156 -0
- package/sa_std/str.sla +13 -0
- package/sa_std/string.sa +12240 -0
- package/sa_std/string.sai +25 -0
- package/sa_std/string.sal +17 -0
- package/sa_std/string_format.sa +269 -0
- package/sa_std/sync/atomic.sa +1500 -0
- package/sa_std/sync/atomic.sal +45 -0
- package/sa_std/sync/barrier.sa +105 -0
- package/sa_std/sync/barrier.sal +7 -0
- package/sa_std/sync/condvar.sa +240 -0
- package/sa_std/sync/condvar.sal +4 -0
- package/sa_std/sync/mpsc.sa +758 -0
- package/sa_std/sync/mpsc.sal +42 -0
- package/sa_std/sync/mpsc_list.sa +255 -0
- package/sa_std/sync/mpsc_list.sal +3 -0
- package/sa_std/sync/mutex.sa +182 -0
- package/sa_std/sync/mutex.sal +7 -0
- package/sa_std/sync/once.sa +371 -0
- package/sa_std/sync/once.sal +31 -0
- package/sa_std/sync/poison.sa +36 -0
- package/sa_std/sync/poison.sal +11 -0
- package/sa_std/sync/prelude.sa +8 -0
- package/sa_std/sync/prelude.sal +7 -0
- package/sa_std/sync/rwlock.sa +369 -0
- package/sa_std/sync/rwlock.sal +13 -0
- package/sa_std/task.sa +2 -0
- package/sa_std/task.sal +1 -0
- package/sa_std/term.sa +2 -0
- package/sa_std/term.sai +10 -0
- package/sa_std/term.sal +33 -0
- package/sa_std/testing/assert.sai +4 -0
- package/sa_std/testing/mock_io.sa +174 -0
- package/sa_std/testing/mock_io.sal +5 -0
- package/sa_std/testing/prelude.sa +2 -0
- package/sa_std/testing/prelude.sal +1 -0
- package/sa_std/text/prelude.sa +1 -0
- package/sa_std/text/prelude.sal +1 -0
- package/sa_std/text/regex.sa +2 -0
- package/sa_std/text/regex.sai +9 -0
- package/sa_std/text/regex.sal +33 -0
- package/sa_std/thread/join_handle.sa +3 -0
- package/sa_std/thread/join_handle.sal +1 -0
- package/sa_std/thread/prelude.sa +4 -0
- package/sa_std/thread/prelude.sal +3 -0
- package/sa_std/thread.sa +160 -0
- package/sa_std/thread.sai +11 -0
- package/sa_std/thread.sal +4 -0
- package/sa_std/thread_local.sa +45 -0
- package/sa_std/thread_local.sai +9 -0
- package/sa_std/time/duration.sa +3 -0
- package/sa_std/time/duration.sal +1 -0
- package/sa_std/time/instant.sa +3 -0
- package/sa_std/time/instant.sal +1 -0
- package/sa_std/time/prelude.sa +4 -0
- package/sa_std/time/prelude.sal +4 -0
- package/sa_std/time.sa +850 -0
- package/sa_std/time.sai +37 -0
- package/sa_std/time.sal +35 -0
- package/sa_std/time.sla +67 -0
- package/sa_std/tls_client.sai +39 -0
- package/sa_std/vec.sa +5754 -0
- package/sa_std/vec.sal +1 -0
- package/sa_std/vec_deque.sa +4925 -0
- package/sa_std/vec_deque.sal +8 -0
- package/sa_std/vec_runtime_macros.sa +11 -0
- package/sa_std/ws_client.sai +57 -0
|
@@ -0,0 +1,4021 @@
|
|
|
1
|
+
// 在栈上或预分配寄存器中初始化 Slice
|
|
2
|
+
[MACRO] SLICE_NEW %slice_reg, %data_ptr, %length
|
|
3
|
+
store %slice_reg+Slice_ptr, %data_ptr as ptr
|
|
4
|
+
store %slice_reg+Slice_len, %length as u64
|
|
5
|
+
[END_MACRO]
|
|
6
|
+
|
|
7
|
+
[MACRO] SLICE_GET_PTR %out_ptr, %slice_reg
|
|
8
|
+
%out_ptr = load %slice_reg+Slice_ptr as ptr
|
|
9
|
+
[END_MACRO]
|
|
10
|
+
|
|
11
|
+
[MACRO] SLICE_AS_PTR %out_ptr, %slice_reg
|
|
12
|
+
EXPAND SLICE_GET_PTR %out_ptr, %slice_reg
|
|
13
|
+
[END_MACRO]
|
|
14
|
+
|
|
15
|
+
[MACRO] SLICE_AS_PTR_RANGE %out_start, %out_end, %slice_reg, %elem_size
|
|
16
|
+
__slice_range_ptr_%out_start = load %slice_reg+Slice_ptr as ptr
|
|
17
|
+
__slice_range_len_%out_start = load %slice_reg+Slice_len as u64
|
|
18
|
+
__slice_range_bytes_%out_start = mul __slice_range_len_%out_start, %elem_size
|
|
19
|
+
%out_start = ptr_add __slice_range_ptr_%out_start, 0
|
|
20
|
+
%out_end = ptr_add __slice_range_ptr_%out_start, __slice_range_bytes_%out_start
|
|
21
|
+
!__slice_range_bytes_%out_start
|
|
22
|
+
!__slice_range_len_%out_start
|
|
23
|
+
!__slice_range_ptr_%out_start
|
|
24
|
+
[END_MACRO]
|
|
25
|
+
|
|
26
|
+
[MACRO] SLICE_AS_MUT_PTR_RANGE %out_start, %out_end, %slice_reg, %elem_size
|
|
27
|
+
EXPAND SLICE_AS_PTR_RANGE %out_start, %out_end, %slice_reg, %elem_size
|
|
28
|
+
[END_MACRO]
|
|
29
|
+
|
|
30
|
+
[MACRO] SLICE_AS_PTR_RANGE_U64 %out_start, %out_end, %slice_reg
|
|
31
|
+
EXPAND SLICE_AS_PTR_RANGE %out_start, %out_end, %slice_reg, 8
|
|
32
|
+
[END_MACRO]
|
|
33
|
+
|
|
34
|
+
[MACRO] SLICE_AS_MUT_PTR_RANGE_U64 %out_start, %out_end, %slice_reg
|
|
35
|
+
EXPAND SLICE_AS_MUT_PTR_RANGE %out_start, %out_end, %slice_reg, 8
|
|
36
|
+
[END_MACRO]
|
|
37
|
+
|
|
38
|
+
[MACRO] SLICE_GET_LEN %out_len, %slice_reg
|
|
39
|
+
%out_len = load %slice_reg+Slice_len as u64
|
|
40
|
+
[END_MACRO]
|
|
41
|
+
|
|
42
|
+
[MACRO] SLICE_IS_EMPTY %out_bool, %slice_reg
|
|
43
|
+
__slice_len_%out_bool = load %slice_reg+Slice_len as u64
|
|
44
|
+
%out_bool = eq __slice_len_%out_bool, 0
|
|
45
|
+
!__slice_len_%out_bool
|
|
46
|
+
[END_MACRO]
|
|
47
|
+
|
|
48
|
+
[MACRO] SLICE_GET_U64 %out_value, %slice_reg, %index
|
|
49
|
+
__slice_ptr_%out_value = load %slice_reg+Slice_ptr as ptr
|
|
50
|
+
__slice_off_%out_value = mul %index, 8
|
|
51
|
+
__slice_item_%out_value = ptr_add __slice_ptr_%out_value, __slice_off_%out_value
|
|
52
|
+
%out_value = load __slice_item_%out_value+0 as u64
|
|
53
|
+
!__slice_item_%out_value
|
|
54
|
+
!__slice_off_%out_value
|
|
55
|
+
!__slice_ptr_%out_value
|
|
56
|
+
[END_MACRO]
|
|
57
|
+
|
|
58
|
+
// Rust method-name alias over SLICE_GET_U64.
|
|
59
|
+
[MACRO] SLICE_GET %out_value, %slice_reg, %index
|
|
60
|
+
EXPAND SLICE_GET_U64 %out_value, %slice_reg, %index
|
|
61
|
+
[END_MACRO]
|
|
62
|
+
|
|
63
|
+
[MACRO] SLICE_GET_MUT_PTR_U64 %out_ptr, %slice_reg, %index
|
|
64
|
+
__slice_ptr_%out_ptr = load %slice_reg+Slice_ptr as ptr
|
|
65
|
+
__slice_off_%out_ptr = mul %index, 8
|
|
66
|
+
%out_ptr = ptr_add __slice_ptr_%out_ptr, __slice_off_%out_ptr
|
|
67
|
+
!__slice_off_%out_ptr
|
|
68
|
+
!__slice_ptr_%out_ptr
|
|
69
|
+
[END_MACRO]
|
|
70
|
+
|
|
71
|
+
// Rust method-name alias over SLICE_GET_MUT_PTR_U64.
|
|
72
|
+
[MACRO] SLICE_GET_MUT_PTR %out_ptr, %slice_reg, %index
|
|
73
|
+
EXPAND SLICE_GET_MUT_PTR_U64 %out_ptr, %slice_reg, %index
|
|
74
|
+
[END_MACRO]
|
|
75
|
+
|
|
76
|
+
[MACRO] SLICE_GET_UNCHECKED_U64 %out_value, %slice_reg, %index
|
|
77
|
+
EXPAND SLICE_GET_U64 %out_value, %slice_reg, %index
|
|
78
|
+
[END_MACRO]
|
|
79
|
+
|
|
80
|
+
// Rust method-name alias over SLICE_GET_UNCHECKED_U64.
|
|
81
|
+
[MACRO] SLICE_GET_UNCHECKED %out_value, %slice_reg, %index
|
|
82
|
+
EXPAND SLICE_GET_UNCHECKED_U64 %out_value, %slice_reg, %index
|
|
83
|
+
[END_MACRO]
|
|
84
|
+
|
|
85
|
+
[MACRO] SLICE_GET_UNCHECKED_MUT_PTR_U64 %out_ptr, %slice_reg, %index
|
|
86
|
+
EXPAND SLICE_GET_MUT_PTR_U64 %out_ptr, %slice_reg, %index
|
|
87
|
+
[END_MACRO]
|
|
88
|
+
|
|
89
|
+
// Rust method-name alias over SLICE_GET_UNCHECKED_MUT_PTR_U64.
|
|
90
|
+
[MACRO] SLICE_GET_UNCHECKED_MUT_PTR %out_ptr, %slice_reg, %index
|
|
91
|
+
EXPAND SLICE_GET_UNCHECKED_MUT_PTR_U64 %out_ptr, %slice_reg, %index
|
|
92
|
+
[END_MACRO]
|
|
93
|
+
|
|
94
|
+
[MACRO] SLICE_FIRST_U64 %out_value, %slice_reg
|
|
95
|
+
EXPAND SLICE_GET_U64 %out_value, %slice_reg, 0
|
|
96
|
+
[END_MACRO]
|
|
97
|
+
|
|
98
|
+
// Rust method-name alias over SLICE_FIRST_U64.
|
|
99
|
+
[MACRO] SLICE_FIRST %out_value, %slice_reg
|
|
100
|
+
EXPAND SLICE_FIRST_U64 %out_value, %slice_reg
|
|
101
|
+
[END_MACRO]
|
|
102
|
+
|
|
103
|
+
[MACRO] SLICE_FIRST_MUT_PTR_U64 %out_ptr, %slice_reg
|
|
104
|
+
EXPAND SLICE_GET_MUT_PTR_U64 %out_ptr, %slice_reg, 0
|
|
105
|
+
[END_MACRO]
|
|
106
|
+
|
|
107
|
+
// Rust method-name alias over SLICE_FIRST_MUT_PTR_U64.
|
|
108
|
+
[MACRO] SLICE_FIRST_MUT_PTR %out_ptr, %slice_reg
|
|
109
|
+
EXPAND SLICE_FIRST_MUT_PTR_U64 %out_ptr, %slice_reg
|
|
110
|
+
[END_MACRO]
|
|
111
|
+
|
|
112
|
+
[MACRO] SLICE_TRY_FIRST_U64 %out_ok, %out_value, %slice_reg
|
|
113
|
+
EXPAND SLICE_TRY_GET_U64 %out_ok, %out_value, %slice_reg, 0
|
|
114
|
+
[END_MACRO]
|
|
115
|
+
|
|
116
|
+
// Rust method-name alias over SLICE_TRY_FIRST_U64.
|
|
117
|
+
[MACRO] SLICE_TRY_FIRST %out_ok, %out_value, %slice_reg
|
|
118
|
+
EXPAND SLICE_TRY_FIRST_U64 %out_ok, %out_value, %slice_reg
|
|
119
|
+
[END_MACRO]
|
|
120
|
+
|
|
121
|
+
[MACRO] SLICE_LAST_U64 %out_value, %slice_reg
|
|
122
|
+
__slice_len_%out_value = load %slice_reg+Slice_len as u64
|
|
123
|
+
__slice_last_%out_value = sub __slice_len_%out_value, 1
|
|
124
|
+
EXPAND SLICE_GET_U64 %out_value, %slice_reg, __slice_last_%out_value
|
|
125
|
+
!__slice_last_%out_value
|
|
126
|
+
!__slice_len_%out_value
|
|
127
|
+
[END_MACRO]
|
|
128
|
+
|
|
129
|
+
// Rust method-name alias over SLICE_LAST_U64.
|
|
130
|
+
[MACRO] SLICE_LAST %out_value, %slice_reg
|
|
131
|
+
EXPAND SLICE_LAST_U64 %out_value, %slice_reg
|
|
132
|
+
[END_MACRO]
|
|
133
|
+
|
|
134
|
+
[MACRO] SLICE_LAST_MUT_PTR_U64 %out_ptr, %slice_reg
|
|
135
|
+
__slice_len_%out_ptr = load %slice_reg+Slice_len as u64
|
|
136
|
+
__slice_last_%out_ptr = sub __slice_len_%out_ptr, 1
|
|
137
|
+
EXPAND SLICE_GET_MUT_PTR_U64 %out_ptr, %slice_reg, __slice_last_%out_ptr
|
|
138
|
+
!__slice_last_%out_ptr
|
|
139
|
+
!__slice_len_%out_ptr
|
|
140
|
+
[END_MACRO]
|
|
141
|
+
|
|
142
|
+
// Rust method-name alias over SLICE_LAST_MUT_PTR_U64.
|
|
143
|
+
[MACRO] SLICE_LAST_MUT_PTR %out_ptr, %slice_reg
|
|
144
|
+
EXPAND SLICE_LAST_MUT_PTR_U64 %out_ptr, %slice_reg
|
|
145
|
+
[END_MACRO]
|
|
146
|
+
|
|
147
|
+
[MACRO] SLICE_TRY_LAST_U64 %out_ok, %out_value, %slice_reg
|
|
148
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
149
|
+
__slice_empty_%out_ok = eq __slice_len_%out_ok, 0
|
|
150
|
+
br __slice_empty_%out_ok -> L_SLICE_TRY_LAST_MISS_%out_ok, L_SLICE_TRY_LAST_HIT_%out_ok
|
|
151
|
+
|
|
152
|
+
L_SLICE_TRY_LAST_HIT_%out_ok:
|
|
153
|
+
__slice_last_%out_ok = sub __slice_len_%out_ok, 1
|
|
154
|
+
EXPAND SLICE_GET_U64 %out_value, %slice_reg, __slice_last_%out_ok
|
|
155
|
+
%out_ok = add 0, 1
|
|
156
|
+
!__slice_last_%out_ok
|
|
157
|
+
!__slice_empty_%out_ok
|
|
158
|
+
!__slice_len_%out_ok
|
|
159
|
+
jmp L_SLICE_TRY_LAST_END_%out_ok
|
|
160
|
+
|
|
161
|
+
L_SLICE_TRY_LAST_MISS_%out_ok:
|
|
162
|
+
%out_value = add 0, 0
|
|
163
|
+
%out_ok = add 0, 0
|
|
164
|
+
!__slice_empty_%out_ok
|
|
165
|
+
!__slice_len_%out_ok
|
|
166
|
+
|
|
167
|
+
L_SLICE_TRY_LAST_END_%out_ok:
|
|
168
|
+
[END_MACRO]
|
|
169
|
+
|
|
170
|
+
// Rust method-name alias over SLICE_TRY_LAST_U64.
|
|
171
|
+
[MACRO] SLICE_TRY_LAST %out_ok, %out_value, %slice_reg
|
|
172
|
+
EXPAND SLICE_TRY_LAST_U64 %out_ok, %out_value, %slice_reg
|
|
173
|
+
[END_MACRO]
|
|
174
|
+
|
|
175
|
+
[MACRO] SLICE_TRY_GET_U64 %out_ok, %out_value, %slice_reg, %index
|
|
176
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
177
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
178
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_HIT_%out_ok, L_SLICE_TRY_GET_MISS_%out_ok
|
|
179
|
+
|
|
180
|
+
L_SLICE_TRY_GET_HIT_%out_ok:
|
|
181
|
+
EXPAND SLICE_GET_U64 %out_value, %slice_reg, %index
|
|
182
|
+
%out_ok = add 0, 1
|
|
183
|
+
!__slice_in_bounds_%out_ok
|
|
184
|
+
!__slice_len_%out_ok
|
|
185
|
+
jmp L_SLICE_TRY_GET_END_%out_ok
|
|
186
|
+
|
|
187
|
+
L_SLICE_TRY_GET_MISS_%out_ok:
|
|
188
|
+
%out_value = add 0, 0
|
|
189
|
+
%out_ok = add 0, 0
|
|
190
|
+
!__slice_in_bounds_%out_ok
|
|
191
|
+
!__slice_len_%out_ok
|
|
192
|
+
|
|
193
|
+
L_SLICE_TRY_GET_END_%out_ok:
|
|
194
|
+
[END_MACRO]
|
|
195
|
+
|
|
196
|
+
// Rust method-name alias over SLICE_TRY_GET_U64.
|
|
197
|
+
[MACRO] SLICE_TRY_GET %out_ok, %out_value, %slice_reg, %index
|
|
198
|
+
EXPAND SLICE_TRY_GET_U64 %out_ok, %out_value, %slice_reg, %index
|
|
199
|
+
[END_MACRO]
|
|
200
|
+
|
|
201
|
+
[MACRO] SLICE_TRY_GET_TYPED_I1 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
202
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
203
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
204
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_I1_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_I1_MISS_%out_ok
|
|
205
|
+
L_SLICE_TRY_GET_TYPED_I1_HIT_%out_ok:
|
|
206
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
207
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
208
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
209
|
+
%out_value = load __slice_item_%out_ok+0 as i1
|
|
210
|
+
%out_ok = add 0, 1
|
|
211
|
+
!__slice_item_%out_ok
|
|
212
|
+
!__slice_off_%out_ok
|
|
213
|
+
!__slice_ptr_%out_ok
|
|
214
|
+
!__slice_in_bounds_%out_ok
|
|
215
|
+
!__slice_len_%out_ok
|
|
216
|
+
jmp L_SLICE_TRY_GET_TYPED_I1_END_%out_ok
|
|
217
|
+
L_SLICE_TRY_GET_TYPED_I1_MISS_%out_ok:
|
|
218
|
+
%out_value = add 0, 0
|
|
219
|
+
%out_ok = add 0, 0
|
|
220
|
+
!__slice_in_bounds_%out_ok
|
|
221
|
+
!__slice_len_%out_ok
|
|
222
|
+
L_SLICE_TRY_GET_TYPED_I1_END_%out_ok:
|
|
223
|
+
[END_MACRO]
|
|
224
|
+
|
|
225
|
+
[MACRO] SLICE_TRY_GET_TYPED_I8 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
226
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
227
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
228
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_I8_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_I8_MISS_%out_ok
|
|
229
|
+
L_SLICE_TRY_GET_TYPED_I8_HIT_%out_ok:
|
|
230
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
231
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
232
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
233
|
+
%out_value = load __slice_item_%out_ok+0 as i8
|
|
234
|
+
%out_ok = add 0, 1
|
|
235
|
+
!__slice_item_%out_ok
|
|
236
|
+
!__slice_off_%out_ok
|
|
237
|
+
!__slice_ptr_%out_ok
|
|
238
|
+
!__slice_in_bounds_%out_ok
|
|
239
|
+
!__slice_len_%out_ok
|
|
240
|
+
jmp L_SLICE_TRY_GET_TYPED_I8_END_%out_ok
|
|
241
|
+
L_SLICE_TRY_GET_TYPED_I8_MISS_%out_ok:
|
|
242
|
+
%out_value = add 0, 0
|
|
243
|
+
%out_ok = add 0, 0
|
|
244
|
+
!__slice_in_bounds_%out_ok
|
|
245
|
+
!__slice_len_%out_ok
|
|
246
|
+
L_SLICE_TRY_GET_TYPED_I8_END_%out_ok:
|
|
247
|
+
[END_MACRO]
|
|
248
|
+
|
|
249
|
+
[MACRO] SLICE_TRY_GET_TYPED_I16 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
250
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
251
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
252
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_I16_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_I16_MISS_%out_ok
|
|
253
|
+
L_SLICE_TRY_GET_TYPED_I16_HIT_%out_ok:
|
|
254
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
255
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
256
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
257
|
+
%out_value = load __slice_item_%out_ok+0 as i16
|
|
258
|
+
%out_ok = add 0, 1
|
|
259
|
+
!__slice_item_%out_ok
|
|
260
|
+
!__slice_off_%out_ok
|
|
261
|
+
!__slice_ptr_%out_ok
|
|
262
|
+
!__slice_in_bounds_%out_ok
|
|
263
|
+
!__slice_len_%out_ok
|
|
264
|
+
jmp L_SLICE_TRY_GET_TYPED_I16_END_%out_ok
|
|
265
|
+
L_SLICE_TRY_GET_TYPED_I16_MISS_%out_ok:
|
|
266
|
+
%out_value = add 0, 0
|
|
267
|
+
%out_ok = add 0, 0
|
|
268
|
+
!__slice_in_bounds_%out_ok
|
|
269
|
+
!__slice_len_%out_ok
|
|
270
|
+
L_SLICE_TRY_GET_TYPED_I16_END_%out_ok:
|
|
271
|
+
[END_MACRO]
|
|
272
|
+
|
|
273
|
+
[MACRO] SLICE_TRY_GET_TYPED_I32 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
274
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
275
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
276
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_I32_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_I32_MISS_%out_ok
|
|
277
|
+
L_SLICE_TRY_GET_TYPED_I32_HIT_%out_ok:
|
|
278
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
279
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
280
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
281
|
+
%out_value = load __slice_item_%out_ok+0 as i32
|
|
282
|
+
%out_ok = add 0, 1
|
|
283
|
+
!__slice_item_%out_ok
|
|
284
|
+
!__slice_off_%out_ok
|
|
285
|
+
!__slice_ptr_%out_ok
|
|
286
|
+
!__slice_in_bounds_%out_ok
|
|
287
|
+
!__slice_len_%out_ok
|
|
288
|
+
jmp L_SLICE_TRY_GET_TYPED_I32_END_%out_ok
|
|
289
|
+
L_SLICE_TRY_GET_TYPED_I32_MISS_%out_ok:
|
|
290
|
+
%out_value = add 0, 0
|
|
291
|
+
%out_ok = add 0, 0
|
|
292
|
+
!__slice_in_bounds_%out_ok
|
|
293
|
+
!__slice_len_%out_ok
|
|
294
|
+
L_SLICE_TRY_GET_TYPED_I32_END_%out_ok:
|
|
295
|
+
[END_MACRO]
|
|
296
|
+
|
|
297
|
+
[MACRO] SLICE_TRY_GET_TYPED_I64 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
298
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
299
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
300
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_I64_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_I64_MISS_%out_ok
|
|
301
|
+
L_SLICE_TRY_GET_TYPED_I64_HIT_%out_ok:
|
|
302
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
303
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
304
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
305
|
+
%out_value = load __slice_item_%out_ok+0 as i64
|
|
306
|
+
%out_ok = add 0, 1
|
|
307
|
+
!__slice_item_%out_ok
|
|
308
|
+
!__slice_off_%out_ok
|
|
309
|
+
!__slice_ptr_%out_ok
|
|
310
|
+
!__slice_in_bounds_%out_ok
|
|
311
|
+
!__slice_len_%out_ok
|
|
312
|
+
jmp L_SLICE_TRY_GET_TYPED_I64_END_%out_ok
|
|
313
|
+
L_SLICE_TRY_GET_TYPED_I64_MISS_%out_ok:
|
|
314
|
+
%out_value = add 0, 0
|
|
315
|
+
%out_ok = add 0, 0
|
|
316
|
+
!__slice_in_bounds_%out_ok
|
|
317
|
+
!__slice_len_%out_ok
|
|
318
|
+
L_SLICE_TRY_GET_TYPED_I64_END_%out_ok:
|
|
319
|
+
[END_MACRO]
|
|
320
|
+
|
|
321
|
+
[MACRO] SLICE_TRY_GET_TYPED_U8 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
322
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
323
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
324
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_U8_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_U8_MISS_%out_ok
|
|
325
|
+
L_SLICE_TRY_GET_TYPED_U8_HIT_%out_ok:
|
|
326
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
327
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
328
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
329
|
+
%out_value = load __slice_item_%out_ok+0 as u8
|
|
330
|
+
%out_ok = add 0, 1
|
|
331
|
+
!__slice_item_%out_ok
|
|
332
|
+
!__slice_off_%out_ok
|
|
333
|
+
!__slice_ptr_%out_ok
|
|
334
|
+
!__slice_in_bounds_%out_ok
|
|
335
|
+
!__slice_len_%out_ok
|
|
336
|
+
jmp L_SLICE_TRY_GET_TYPED_U8_END_%out_ok
|
|
337
|
+
L_SLICE_TRY_GET_TYPED_U8_MISS_%out_ok:
|
|
338
|
+
%out_value = add 0, 0
|
|
339
|
+
%out_ok = add 0, 0
|
|
340
|
+
!__slice_in_bounds_%out_ok
|
|
341
|
+
!__slice_len_%out_ok
|
|
342
|
+
L_SLICE_TRY_GET_TYPED_U8_END_%out_ok:
|
|
343
|
+
[END_MACRO]
|
|
344
|
+
|
|
345
|
+
[MACRO] SLICE_TRY_GET_TYPED_U16 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
346
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
347
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
348
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_U16_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_U16_MISS_%out_ok
|
|
349
|
+
L_SLICE_TRY_GET_TYPED_U16_HIT_%out_ok:
|
|
350
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
351
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
352
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
353
|
+
%out_value = load __slice_item_%out_ok+0 as u16
|
|
354
|
+
%out_ok = add 0, 1
|
|
355
|
+
!__slice_item_%out_ok
|
|
356
|
+
!__slice_off_%out_ok
|
|
357
|
+
!__slice_ptr_%out_ok
|
|
358
|
+
!__slice_in_bounds_%out_ok
|
|
359
|
+
!__slice_len_%out_ok
|
|
360
|
+
jmp L_SLICE_TRY_GET_TYPED_U16_END_%out_ok
|
|
361
|
+
L_SLICE_TRY_GET_TYPED_U16_MISS_%out_ok:
|
|
362
|
+
%out_value = add 0, 0
|
|
363
|
+
%out_ok = add 0, 0
|
|
364
|
+
!__slice_in_bounds_%out_ok
|
|
365
|
+
!__slice_len_%out_ok
|
|
366
|
+
L_SLICE_TRY_GET_TYPED_U16_END_%out_ok:
|
|
367
|
+
[END_MACRO]
|
|
368
|
+
|
|
369
|
+
[MACRO] SLICE_TRY_GET_TYPED_U32 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
370
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
371
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
372
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_U32_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_U32_MISS_%out_ok
|
|
373
|
+
L_SLICE_TRY_GET_TYPED_U32_HIT_%out_ok:
|
|
374
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
375
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
376
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
377
|
+
%out_value = load __slice_item_%out_ok+0 as u32
|
|
378
|
+
%out_ok = add 0, 1
|
|
379
|
+
!__slice_item_%out_ok
|
|
380
|
+
!__slice_off_%out_ok
|
|
381
|
+
!__slice_ptr_%out_ok
|
|
382
|
+
!__slice_in_bounds_%out_ok
|
|
383
|
+
!__slice_len_%out_ok
|
|
384
|
+
jmp L_SLICE_TRY_GET_TYPED_U32_END_%out_ok
|
|
385
|
+
L_SLICE_TRY_GET_TYPED_U32_MISS_%out_ok:
|
|
386
|
+
%out_value = add 0, 0
|
|
387
|
+
%out_ok = add 0, 0
|
|
388
|
+
!__slice_in_bounds_%out_ok
|
|
389
|
+
!__slice_len_%out_ok
|
|
390
|
+
L_SLICE_TRY_GET_TYPED_U32_END_%out_ok:
|
|
391
|
+
[END_MACRO]
|
|
392
|
+
|
|
393
|
+
[MACRO] SLICE_TRY_GET_TYPED_U64 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
394
|
+
EXPAND SLICE_TRY_GET_U64 %out_ok, %out_value, %slice_reg, %index
|
|
395
|
+
[END_MACRO]
|
|
396
|
+
|
|
397
|
+
// Rust method-name alias over SLICE_TRY_GET_TYPED_U64.
|
|
398
|
+
[MACRO] SLICE_TRY_GET_TYPED %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
399
|
+
EXPAND SLICE_TRY_GET_TYPED_U64 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
400
|
+
[END_MACRO]
|
|
401
|
+
|
|
402
|
+
[MACRO] SLICE_TRY_GET_TYPED_F32 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
403
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
404
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
405
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_F32_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_F32_MISS_%out_ok
|
|
406
|
+
L_SLICE_TRY_GET_TYPED_F32_HIT_%out_ok:
|
|
407
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
408
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
409
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
410
|
+
%out_value = load __slice_item_%out_ok+0 as f32
|
|
411
|
+
%out_ok = add 0, 1
|
|
412
|
+
!__slice_item_%out_ok
|
|
413
|
+
!__slice_off_%out_ok
|
|
414
|
+
!__slice_ptr_%out_ok
|
|
415
|
+
!__slice_in_bounds_%out_ok
|
|
416
|
+
!__slice_len_%out_ok
|
|
417
|
+
jmp L_SLICE_TRY_GET_TYPED_F32_END_%out_ok
|
|
418
|
+
L_SLICE_TRY_GET_TYPED_F32_MISS_%out_ok:
|
|
419
|
+
%out_value = 0.0
|
|
420
|
+
%out_ok = add 0, 0
|
|
421
|
+
!__slice_in_bounds_%out_ok
|
|
422
|
+
!__slice_len_%out_ok
|
|
423
|
+
L_SLICE_TRY_GET_TYPED_F32_END_%out_ok:
|
|
424
|
+
[END_MACRO]
|
|
425
|
+
|
|
426
|
+
[MACRO] SLICE_TRY_GET_TYPED_F64 %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
427
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
428
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
429
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_F64_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_F64_MISS_%out_ok
|
|
430
|
+
L_SLICE_TRY_GET_TYPED_F64_HIT_%out_ok:
|
|
431
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
432
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
433
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
434
|
+
%out_value = load __slice_item_%out_ok+0 as f64
|
|
435
|
+
%out_ok = add 0, 1
|
|
436
|
+
!__slice_item_%out_ok
|
|
437
|
+
!__slice_off_%out_ok
|
|
438
|
+
!__slice_ptr_%out_ok
|
|
439
|
+
!__slice_in_bounds_%out_ok
|
|
440
|
+
!__slice_len_%out_ok
|
|
441
|
+
jmp L_SLICE_TRY_GET_TYPED_F64_END_%out_ok
|
|
442
|
+
L_SLICE_TRY_GET_TYPED_F64_MISS_%out_ok:
|
|
443
|
+
%out_value = 0.0
|
|
444
|
+
%out_ok = add 0, 0
|
|
445
|
+
!__slice_in_bounds_%out_ok
|
|
446
|
+
!__slice_len_%out_ok
|
|
447
|
+
L_SLICE_TRY_GET_TYPED_F64_END_%out_ok:
|
|
448
|
+
[END_MACRO]
|
|
449
|
+
|
|
450
|
+
[MACRO] SLICE_TRY_GET_TYPED_PTR %out_ok, %out_value, %slice_reg, %index, %elem_size
|
|
451
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
452
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
453
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_TYPED_PTR_HIT_%out_ok, L_SLICE_TRY_GET_TYPED_PTR_MISS_%out_ok
|
|
454
|
+
L_SLICE_TRY_GET_TYPED_PTR_HIT_%out_ok:
|
|
455
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
456
|
+
__slice_off_%out_ok = mul %index, %elem_size
|
|
457
|
+
__slice_item_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_off_%out_ok
|
|
458
|
+
%out_value = load __slice_item_%out_ok+0 as ptr
|
|
459
|
+
%out_ok = add 0, 1
|
|
460
|
+
!__slice_item_%out_ok
|
|
461
|
+
!__slice_off_%out_ok
|
|
462
|
+
!__slice_ptr_%out_ok
|
|
463
|
+
!__slice_in_bounds_%out_ok
|
|
464
|
+
!__slice_len_%out_ok
|
|
465
|
+
jmp L_SLICE_TRY_GET_TYPED_PTR_END_%out_ok
|
|
466
|
+
L_SLICE_TRY_GET_TYPED_PTR_MISS_%out_ok:
|
|
467
|
+
%out_value = 0 as ptr
|
|
468
|
+
%out_ok = add 0, 0
|
|
469
|
+
!__slice_in_bounds_%out_ok
|
|
470
|
+
!__slice_len_%out_ok
|
|
471
|
+
L_SLICE_TRY_GET_TYPED_PTR_END_%out_ok:
|
|
472
|
+
[END_MACRO]
|
|
473
|
+
|
|
474
|
+
[MACRO] SLICE_GET_TYPED_I1 %out_value, %slice_reg, %index, %elem_size
|
|
475
|
+
EXPAND SLICE_TRY_GET_TYPED_I1 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
476
|
+
!__slice_get_ok_%out_value
|
|
477
|
+
[END_MACRO]
|
|
478
|
+
|
|
479
|
+
[MACRO] SLICE_GET_TYPED_I8 %out_value, %slice_reg, %index, %elem_size
|
|
480
|
+
EXPAND SLICE_TRY_GET_TYPED_I8 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
481
|
+
!__slice_get_ok_%out_value
|
|
482
|
+
[END_MACRO]
|
|
483
|
+
|
|
484
|
+
[MACRO] SLICE_GET_TYPED_I16 %out_value, %slice_reg, %index, %elem_size
|
|
485
|
+
EXPAND SLICE_TRY_GET_TYPED_I16 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
486
|
+
!__slice_get_ok_%out_value
|
|
487
|
+
[END_MACRO]
|
|
488
|
+
|
|
489
|
+
[MACRO] SLICE_GET_TYPED_I32 %out_value, %slice_reg, %index, %elem_size
|
|
490
|
+
EXPAND SLICE_TRY_GET_TYPED_I32 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
491
|
+
!__slice_get_ok_%out_value
|
|
492
|
+
[END_MACRO]
|
|
493
|
+
|
|
494
|
+
[MACRO] SLICE_GET_TYPED_I64 %out_value, %slice_reg, %index, %elem_size
|
|
495
|
+
EXPAND SLICE_TRY_GET_TYPED_I64 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
496
|
+
!__slice_get_ok_%out_value
|
|
497
|
+
[END_MACRO]
|
|
498
|
+
|
|
499
|
+
[MACRO] SLICE_GET_TYPED_U8 %out_value, %slice_reg, %index, %elem_size
|
|
500
|
+
EXPAND SLICE_TRY_GET_TYPED_U8 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
501
|
+
!__slice_get_ok_%out_value
|
|
502
|
+
[END_MACRO]
|
|
503
|
+
|
|
504
|
+
[MACRO] SLICE_GET_TYPED_U16 %out_value, %slice_reg, %index, %elem_size
|
|
505
|
+
EXPAND SLICE_TRY_GET_TYPED_U16 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
506
|
+
!__slice_get_ok_%out_value
|
|
507
|
+
[END_MACRO]
|
|
508
|
+
|
|
509
|
+
[MACRO] SLICE_GET_TYPED_U32 %out_value, %slice_reg, %index, %elem_size
|
|
510
|
+
EXPAND SLICE_TRY_GET_TYPED_U32 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
511
|
+
!__slice_get_ok_%out_value
|
|
512
|
+
[END_MACRO]
|
|
513
|
+
|
|
514
|
+
[MACRO] SLICE_GET_TYPED_U64 %out_value, %slice_reg, %index, %elem_size
|
|
515
|
+
EXPAND SLICE_TRY_GET_TYPED_U64 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
516
|
+
!__slice_get_ok_%out_value
|
|
517
|
+
[END_MACRO]
|
|
518
|
+
|
|
519
|
+
// Rust method-name alias over SLICE_GET_TYPED_U64.
|
|
520
|
+
[MACRO] SLICE_GET_TYPED %out_value, %slice_reg, %index, %elem_size
|
|
521
|
+
EXPAND SLICE_GET_TYPED_U64 %out_value, %slice_reg, %index, %elem_size
|
|
522
|
+
[END_MACRO]
|
|
523
|
+
|
|
524
|
+
[MACRO] SLICE_GET_TYPED_F32 %out_value, %slice_reg, %index, %elem_size
|
|
525
|
+
EXPAND SLICE_TRY_GET_TYPED_F32 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
526
|
+
!__slice_get_ok_%out_value
|
|
527
|
+
[END_MACRO]
|
|
528
|
+
|
|
529
|
+
[MACRO] SLICE_GET_TYPED_F64 %out_value, %slice_reg, %index, %elem_size
|
|
530
|
+
EXPAND SLICE_TRY_GET_TYPED_F64 __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
531
|
+
!__slice_get_ok_%out_value
|
|
532
|
+
[END_MACRO]
|
|
533
|
+
|
|
534
|
+
[MACRO] SLICE_GET_TYPED_PTR %out_value, %slice_reg, %index, %elem_size
|
|
535
|
+
EXPAND SLICE_TRY_GET_TYPED_PTR __slice_get_ok_%out_value, %out_value, %slice_reg, %index, %elem_size
|
|
536
|
+
!__slice_get_ok_%out_value
|
|
537
|
+
[END_MACRO]
|
|
538
|
+
|
|
539
|
+
[MACRO] SLICE_TRY_GET_MUT_PTR_U64 %out_ok, %out_ptr, %slice_reg, %index
|
|
540
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
541
|
+
__slice_in_bounds_%out_ok = ult %index, __slice_len_%out_ok
|
|
542
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_TRY_GET_MUT_HIT_%out_ok, L_SLICE_TRY_GET_MUT_MISS_%out_ok
|
|
543
|
+
|
|
544
|
+
L_SLICE_TRY_GET_MUT_HIT_%out_ok:
|
|
545
|
+
EXPAND SLICE_GET_MUT_PTR_U64 %out_ptr, %slice_reg, %index
|
|
546
|
+
%out_ok = add 0, 1
|
|
547
|
+
!__slice_in_bounds_%out_ok
|
|
548
|
+
!__slice_len_%out_ok
|
|
549
|
+
jmp L_SLICE_TRY_GET_MUT_END_%out_ok
|
|
550
|
+
|
|
551
|
+
L_SLICE_TRY_GET_MUT_MISS_%out_ok:
|
|
552
|
+
%out_ptr = 0 as ptr
|
|
553
|
+
%out_ok = add 0, 0
|
|
554
|
+
!__slice_in_bounds_%out_ok
|
|
555
|
+
!__slice_len_%out_ok
|
|
556
|
+
|
|
557
|
+
L_SLICE_TRY_GET_MUT_END_%out_ok:
|
|
558
|
+
[END_MACRO]
|
|
559
|
+
|
|
560
|
+
// Rust method-name alias over SLICE_TRY_GET_MUT_PTR_U64.
|
|
561
|
+
[MACRO] SLICE_TRY_GET_MUT_PTR %out_ok, %out_ptr, %slice_reg, %index
|
|
562
|
+
EXPAND SLICE_TRY_GET_MUT_PTR_U64 %out_ok, %out_ptr, %slice_reg, %index
|
|
563
|
+
[END_MACRO]
|
|
564
|
+
|
|
565
|
+
[MACRO] SLICE_TRY_FIRST_MUT_PTR_U64 %out_ok, %out_ptr, %slice_reg
|
|
566
|
+
EXPAND SLICE_TRY_GET_MUT_PTR_U64 %out_ok, %out_ptr, %slice_reg, 0
|
|
567
|
+
[END_MACRO]
|
|
568
|
+
|
|
569
|
+
// Rust method-name alias over SLICE_TRY_FIRST_MUT_PTR_U64.
|
|
570
|
+
[MACRO] SLICE_TRY_FIRST_MUT_PTR %out_ok, %out_ptr, %slice_reg
|
|
571
|
+
EXPAND SLICE_TRY_FIRST_MUT_PTR_U64 %out_ok, %out_ptr, %slice_reg
|
|
572
|
+
[END_MACRO]
|
|
573
|
+
|
|
574
|
+
[MACRO] SLICE_TRY_LAST_MUT_PTR_U64 %out_ok, %out_ptr, %slice_reg
|
|
575
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
576
|
+
__slice_empty_%out_ok = eq __slice_len_%out_ok, 0
|
|
577
|
+
br __slice_empty_%out_ok -> L_SLICE_TRY_LAST_MUT_MISS_%out_ok, L_SLICE_TRY_LAST_MUT_HIT_%out_ok
|
|
578
|
+
|
|
579
|
+
L_SLICE_TRY_LAST_MUT_HIT_%out_ok:
|
|
580
|
+
__slice_last_%out_ok = sub __slice_len_%out_ok, 1
|
|
581
|
+
EXPAND SLICE_GET_MUT_PTR_U64 %out_ptr, %slice_reg, __slice_last_%out_ok
|
|
582
|
+
%out_ok = add 0, 1
|
|
583
|
+
!__slice_last_%out_ok
|
|
584
|
+
!__slice_empty_%out_ok
|
|
585
|
+
!__slice_len_%out_ok
|
|
586
|
+
jmp L_SLICE_TRY_LAST_MUT_END_%out_ok
|
|
587
|
+
|
|
588
|
+
L_SLICE_TRY_LAST_MUT_MISS_%out_ok:
|
|
589
|
+
%out_ptr = 0 as ptr
|
|
590
|
+
%out_ok = add 0, 0
|
|
591
|
+
!__slice_empty_%out_ok
|
|
592
|
+
!__slice_len_%out_ok
|
|
593
|
+
|
|
594
|
+
L_SLICE_TRY_LAST_MUT_END_%out_ok:
|
|
595
|
+
[END_MACRO]
|
|
596
|
+
|
|
597
|
+
// Rust method-name alias over SLICE_TRY_LAST_MUT_PTR_U64.
|
|
598
|
+
[MACRO] SLICE_TRY_LAST_MUT_PTR %out_ok, %out_ptr, %slice_reg
|
|
599
|
+
EXPAND SLICE_TRY_LAST_MUT_PTR_U64 %out_ok, %out_ptr, %slice_reg
|
|
600
|
+
[END_MACRO]
|
|
601
|
+
|
|
602
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST_U64 %out_ok, %out_value, %out_rest, %slice_reg
|
|
603
|
+
%out_rest = alloc Slice_SIZE
|
|
604
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
605
|
+
__slice_empty_%out_ok = eq __slice_len_%out_ok, 0
|
|
606
|
+
br __slice_empty_%out_ok -> L_SLICE_SPLIT_FIRST_MISS_%out_ok, L_SLICE_SPLIT_FIRST_HIT_%out_ok
|
|
607
|
+
|
|
608
|
+
L_SLICE_SPLIT_FIRST_HIT_%out_ok:
|
|
609
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
610
|
+
%out_value = load __slice_ptr_%out_ok+0 as u64
|
|
611
|
+
__slice_rest_ptr_%out_ok = ptr_add __slice_ptr_%out_ok, 8
|
|
612
|
+
__slice_rest_len_%out_ok = sub __slice_len_%out_ok, 1
|
|
613
|
+
EXPAND SLICE_NEW %out_rest, __slice_rest_ptr_%out_ok, __slice_rest_len_%out_ok
|
|
614
|
+
%out_ok = add 0, 1
|
|
615
|
+
!__slice_rest_len_%out_ok
|
|
616
|
+
!__slice_rest_ptr_%out_ok
|
|
617
|
+
!__slice_ptr_%out_ok
|
|
618
|
+
!__slice_empty_%out_ok
|
|
619
|
+
!__slice_len_%out_ok
|
|
620
|
+
jmp L_SLICE_SPLIT_FIRST_END_%out_ok
|
|
621
|
+
|
|
622
|
+
L_SLICE_SPLIT_FIRST_MISS_%out_ok:
|
|
623
|
+
__slice_empty_ptr_%out_ok = 0 as ptr
|
|
624
|
+
EXPAND SLICE_NEW %out_rest, __slice_empty_ptr_%out_ok, 0
|
|
625
|
+
%out_value = add 0, 0
|
|
626
|
+
%out_ok = add 0, 0
|
|
627
|
+
!__slice_empty_ptr_%out_ok
|
|
628
|
+
!__slice_empty_%out_ok
|
|
629
|
+
!__slice_len_%out_ok
|
|
630
|
+
|
|
631
|
+
L_SLICE_SPLIT_FIRST_END_%out_ok:
|
|
632
|
+
[END_MACRO]
|
|
633
|
+
|
|
634
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_FIRST_U64.
|
|
635
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST %out_ok, %out_value, %out_rest, %slice_reg
|
|
636
|
+
EXPAND SLICE_TRY_SPLIT_FIRST_U64 %out_ok, %out_value, %out_rest, %slice_reg
|
|
637
|
+
[END_MACRO]
|
|
638
|
+
|
|
639
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST_MUT_U64 %out_ok, %out_ptr, %out_rest, %slice_reg
|
|
640
|
+
%out_rest = alloc Slice_SIZE
|
|
641
|
+
__slice_mut_first_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
642
|
+
__slice_mut_first_empty_%out_ok = eq __slice_mut_first_len_%out_ok, 0
|
|
643
|
+
br __slice_mut_first_empty_%out_ok -> L_SLICE_SPLIT_FIRST_MUT_MISS_%out_ok, L_SLICE_SPLIT_FIRST_MUT_HIT_%out_ok
|
|
644
|
+
|
|
645
|
+
L_SLICE_SPLIT_FIRST_MUT_HIT_%out_ok:
|
|
646
|
+
__slice_mut_first_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
647
|
+
%out_ptr = ptr_add __slice_mut_first_ptr_%out_ok, 0
|
|
648
|
+
__slice_mut_first_rest_ptr_%out_ok = ptr_add __slice_mut_first_ptr_%out_ok, 8
|
|
649
|
+
__slice_mut_first_rest_len_%out_ok = sub __slice_mut_first_len_%out_ok, 1
|
|
650
|
+
EXPAND SLICE_NEW %out_rest, __slice_mut_first_rest_ptr_%out_ok, __slice_mut_first_rest_len_%out_ok
|
|
651
|
+
%out_ok = add 0, 1
|
|
652
|
+
!__slice_mut_first_rest_len_%out_ok
|
|
653
|
+
!__slice_mut_first_rest_ptr_%out_ok
|
|
654
|
+
!__slice_mut_first_ptr_%out_ok
|
|
655
|
+
!__slice_mut_first_empty_%out_ok
|
|
656
|
+
!__slice_mut_first_len_%out_ok
|
|
657
|
+
jmp L_SLICE_SPLIT_FIRST_MUT_END_%out_ok
|
|
658
|
+
|
|
659
|
+
L_SLICE_SPLIT_FIRST_MUT_MISS_%out_ok:
|
|
660
|
+
__slice_mut_first_empty_ptr_%out_ok = 0 as ptr
|
|
661
|
+
EXPAND SLICE_NEW %out_rest, __slice_mut_first_empty_ptr_%out_ok, 0
|
|
662
|
+
%out_ptr = 0 as ptr
|
|
663
|
+
%out_ok = add 0, 0
|
|
664
|
+
!__slice_mut_first_empty_ptr_%out_ok
|
|
665
|
+
!__slice_mut_first_empty_%out_ok
|
|
666
|
+
!__slice_mut_first_len_%out_ok
|
|
667
|
+
|
|
668
|
+
L_SLICE_SPLIT_FIRST_MUT_END_%out_ok:
|
|
669
|
+
[END_MACRO]
|
|
670
|
+
|
|
671
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_FIRST_MUT_U64.
|
|
672
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST_MUT %out_ok, %out_ptr, %out_rest, %slice_reg
|
|
673
|
+
EXPAND SLICE_TRY_SPLIT_FIRST_MUT_U64 %out_ok, %out_ptr, %out_rest, %slice_reg
|
|
674
|
+
[END_MACRO]
|
|
675
|
+
|
|
676
|
+
[MACRO] SLICE_TRY_SPLIT_LAST_U64 %out_ok, %out_value, %out_rest, %slice_reg
|
|
677
|
+
%out_rest = alloc Slice_SIZE
|
|
678
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
679
|
+
__slice_empty_%out_ok = eq __slice_len_%out_ok, 0
|
|
680
|
+
br __slice_empty_%out_ok -> L_SLICE_SPLIT_LAST_MISS_%out_ok, L_SLICE_SPLIT_LAST_HIT_%out_ok
|
|
681
|
+
|
|
682
|
+
L_SLICE_SPLIT_LAST_HIT_%out_ok:
|
|
683
|
+
__slice_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
684
|
+
__slice_last_%out_ok = sub __slice_len_%out_ok, 1
|
|
685
|
+
__slice_last_off_%out_ok = mul __slice_last_%out_ok, 8
|
|
686
|
+
__slice_last_ptr_%out_ok = ptr_add __slice_ptr_%out_ok, __slice_last_off_%out_ok
|
|
687
|
+
%out_value = load __slice_last_ptr_%out_ok+0 as u64
|
|
688
|
+
EXPAND SLICE_NEW %out_rest, __slice_ptr_%out_ok, __slice_last_%out_ok
|
|
689
|
+
%out_ok = add 0, 1
|
|
690
|
+
!__slice_last_ptr_%out_ok
|
|
691
|
+
!__slice_last_off_%out_ok
|
|
692
|
+
!__slice_last_%out_ok
|
|
693
|
+
!__slice_ptr_%out_ok
|
|
694
|
+
!__slice_empty_%out_ok
|
|
695
|
+
!__slice_len_%out_ok
|
|
696
|
+
jmp L_SLICE_SPLIT_LAST_END_%out_ok
|
|
697
|
+
|
|
698
|
+
L_SLICE_SPLIT_LAST_MISS_%out_ok:
|
|
699
|
+
__slice_empty_ptr_%out_ok = 0 as ptr
|
|
700
|
+
EXPAND SLICE_NEW %out_rest, __slice_empty_ptr_%out_ok, 0
|
|
701
|
+
%out_value = add 0, 0
|
|
702
|
+
%out_ok = add 0, 0
|
|
703
|
+
!__slice_empty_ptr_%out_ok
|
|
704
|
+
!__slice_empty_%out_ok
|
|
705
|
+
!__slice_len_%out_ok
|
|
706
|
+
|
|
707
|
+
L_SLICE_SPLIT_LAST_END_%out_ok:
|
|
708
|
+
[END_MACRO]
|
|
709
|
+
|
|
710
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_LAST_U64.
|
|
711
|
+
[MACRO] SLICE_TRY_SPLIT_LAST %out_ok, %out_value, %out_rest, %slice_reg
|
|
712
|
+
EXPAND SLICE_TRY_SPLIT_LAST_U64 %out_ok, %out_value, %out_rest, %slice_reg
|
|
713
|
+
[END_MACRO]
|
|
714
|
+
|
|
715
|
+
[MACRO] SLICE_TRY_SPLIT_LAST_MUT_U64 %out_ok, %out_ptr, %out_rest, %slice_reg
|
|
716
|
+
%out_rest = alloc Slice_SIZE
|
|
717
|
+
__slice_mut_last_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
718
|
+
__slice_mut_last_empty_%out_ok = eq __slice_mut_last_len_%out_ok, 0
|
|
719
|
+
br __slice_mut_last_empty_%out_ok -> L_SLICE_SPLIT_LAST_MUT_MISS_%out_ok, L_SLICE_SPLIT_LAST_MUT_HIT_%out_ok
|
|
720
|
+
|
|
721
|
+
L_SLICE_SPLIT_LAST_MUT_HIT_%out_ok:
|
|
722
|
+
__slice_mut_last_base_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
723
|
+
__slice_mut_last_idx_%out_ok = sub __slice_mut_last_len_%out_ok, 1
|
|
724
|
+
__slice_mut_last_off_%out_ok = mul __slice_mut_last_idx_%out_ok, 8
|
|
725
|
+
%out_ptr = ptr_add __slice_mut_last_base_%out_ok, __slice_mut_last_off_%out_ok
|
|
726
|
+
EXPAND SLICE_NEW %out_rest, __slice_mut_last_base_%out_ok, __slice_mut_last_idx_%out_ok
|
|
727
|
+
%out_ok = add 0, 1
|
|
728
|
+
!__slice_mut_last_off_%out_ok
|
|
729
|
+
!__slice_mut_last_idx_%out_ok
|
|
730
|
+
!__slice_mut_last_base_%out_ok
|
|
731
|
+
!__slice_mut_last_empty_%out_ok
|
|
732
|
+
!__slice_mut_last_len_%out_ok
|
|
733
|
+
jmp L_SLICE_SPLIT_LAST_MUT_END_%out_ok
|
|
734
|
+
|
|
735
|
+
L_SLICE_SPLIT_LAST_MUT_MISS_%out_ok:
|
|
736
|
+
__slice_mut_last_empty_ptr_%out_ok = 0 as ptr
|
|
737
|
+
EXPAND SLICE_NEW %out_rest, __slice_mut_last_empty_ptr_%out_ok, 0
|
|
738
|
+
%out_ptr = 0 as ptr
|
|
739
|
+
%out_ok = add 0, 0
|
|
740
|
+
!__slice_mut_last_empty_ptr_%out_ok
|
|
741
|
+
!__slice_mut_last_empty_%out_ok
|
|
742
|
+
!__slice_mut_last_len_%out_ok
|
|
743
|
+
|
|
744
|
+
L_SLICE_SPLIT_LAST_MUT_END_%out_ok:
|
|
745
|
+
[END_MACRO]
|
|
746
|
+
|
|
747
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_LAST_MUT_U64.
|
|
748
|
+
[MACRO] SLICE_TRY_SPLIT_LAST_MUT %out_ok, %out_ptr, %out_rest, %slice_reg
|
|
749
|
+
EXPAND SLICE_TRY_SPLIT_LAST_MUT_U64 %out_ok, %out_ptr, %out_rest, %slice_reg
|
|
750
|
+
[END_MACRO]
|
|
751
|
+
|
|
752
|
+
[MACRO] SLICE_CONTAINS_U64 %out_bool, %slice_reg, %needle
|
|
753
|
+
__slice_ptr_%out_bool = load %slice_reg+Slice_ptr as ptr
|
|
754
|
+
__slice_len_%out_bool = load %slice_reg+Slice_len as u64
|
|
755
|
+
__slice_idx_slot_%out_bool = stack_alloc 8
|
|
756
|
+
store __slice_idx_slot_%out_bool+0, 0 as u64
|
|
757
|
+
jmp L_SLICE_CONTAINS_HEAD_%out_bool
|
|
758
|
+
|
|
759
|
+
L_SLICE_CONTAINS_HEAD_%out_bool:
|
|
760
|
+
__slice_idx_%out_bool = load __slice_idx_slot_%out_bool+0 as u64
|
|
761
|
+
__slice_done_%out_bool = eq __slice_idx_%out_bool, __slice_len_%out_bool
|
|
762
|
+
br __slice_done_%out_bool -> L_SLICE_CONTAINS_MISS_%out_bool, L_SLICE_CONTAINS_BODY_%out_bool
|
|
763
|
+
|
|
764
|
+
L_SLICE_CONTAINS_BODY_%out_bool:
|
|
765
|
+
__slice_off_%out_bool = mul __slice_idx_%out_bool, 8
|
|
766
|
+
__slice_elem_ptr_%out_bool = ptr_add __slice_ptr_%out_bool, __slice_off_%out_bool
|
|
767
|
+
__slice_elem_%out_bool = load __slice_elem_ptr_%out_bool+0 as u64
|
|
768
|
+
__slice_match_%out_bool = eq __slice_elem_%out_bool, %needle
|
|
769
|
+
br __slice_match_%out_bool -> L_SLICE_CONTAINS_HIT_%out_bool, L_SLICE_CONTAINS_NEXT_%out_bool
|
|
770
|
+
|
|
771
|
+
L_SLICE_CONTAINS_NEXT_%out_bool:
|
|
772
|
+
__slice_next_%out_bool = add __slice_idx_%out_bool, 1
|
|
773
|
+
store __slice_idx_slot_%out_bool+0, __slice_next_%out_bool as u64
|
|
774
|
+
!__slice_next_%out_bool
|
|
775
|
+
!__slice_match_%out_bool
|
|
776
|
+
!__slice_elem_%out_bool
|
|
777
|
+
!__slice_elem_ptr_%out_bool
|
|
778
|
+
!__slice_off_%out_bool
|
|
779
|
+
!__slice_done_%out_bool
|
|
780
|
+
!__slice_idx_%out_bool
|
|
781
|
+
jmp L_SLICE_CONTAINS_HEAD_%out_bool
|
|
782
|
+
|
|
783
|
+
L_SLICE_CONTAINS_HIT_%out_bool:
|
|
784
|
+
%out_bool = add 0, 1
|
|
785
|
+
!__slice_match_%out_bool
|
|
786
|
+
!__slice_elem_%out_bool
|
|
787
|
+
!__slice_elem_ptr_%out_bool
|
|
788
|
+
!__slice_off_%out_bool
|
|
789
|
+
!__slice_done_%out_bool
|
|
790
|
+
!__slice_idx_%out_bool
|
|
791
|
+
!__slice_len_%out_bool
|
|
792
|
+
!__slice_ptr_%out_bool
|
|
793
|
+
jmp L_SLICE_CONTAINS_END_%out_bool
|
|
794
|
+
|
|
795
|
+
L_SLICE_CONTAINS_MISS_%out_bool:
|
|
796
|
+
%out_bool = add 0, 0
|
|
797
|
+
!__slice_done_%out_bool
|
|
798
|
+
!__slice_idx_%out_bool
|
|
799
|
+
!__slice_len_%out_bool
|
|
800
|
+
!__slice_ptr_%out_bool
|
|
801
|
+
|
|
802
|
+
L_SLICE_CONTAINS_END_%out_bool:
|
|
803
|
+
[END_MACRO]
|
|
804
|
+
|
|
805
|
+
// Rust method-name alias over SLICE_CONTAINS_U64.
|
|
806
|
+
[MACRO] SLICE_CONTAINS %out_bool, %slice_reg, %needle
|
|
807
|
+
EXPAND SLICE_CONTAINS_U64 %out_bool, %slice_reg, %needle
|
|
808
|
+
[END_MACRO]
|
|
809
|
+
|
|
810
|
+
[MACRO] SLICE_EQ_U64 %out_bool, %left_slice, %right_slice
|
|
811
|
+
__slice_eq_left_ptr_%out_bool = load %left_slice+Slice_ptr as ptr
|
|
812
|
+
__slice_eq_right_ptr_%out_bool = load %right_slice+Slice_ptr as ptr
|
|
813
|
+
__slice_eq_left_len_%out_bool = load %left_slice+Slice_len as u64
|
|
814
|
+
__slice_eq_right_len_%out_bool = load %right_slice+Slice_len as u64
|
|
815
|
+
__slice_eq_same_len_%out_bool = eq __slice_eq_left_len_%out_bool, __slice_eq_right_len_%out_bool
|
|
816
|
+
__slice_eq_idx_slot_%out_bool = stack_alloc 8
|
|
817
|
+
store __slice_eq_idx_slot_%out_bool+0, 0 as u64
|
|
818
|
+
br __slice_eq_same_len_%out_bool -> L_SLICE_EQ_HEAD_%out_bool, L_SLICE_EQ_FALSE_%out_bool
|
|
819
|
+
|
|
820
|
+
L_SLICE_EQ_HEAD_%out_bool:
|
|
821
|
+
__slice_eq_idx_%out_bool = load __slice_eq_idx_slot_%out_bool+0 as u64
|
|
822
|
+
__slice_eq_done_%out_bool = eq __slice_eq_idx_%out_bool, __slice_eq_left_len_%out_bool
|
|
823
|
+
br __slice_eq_done_%out_bool -> L_SLICE_EQ_TRUE_%out_bool, L_SLICE_EQ_BODY_%out_bool
|
|
824
|
+
|
|
825
|
+
L_SLICE_EQ_BODY_%out_bool:
|
|
826
|
+
__slice_eq_off_%out_bool = mul __slice_eq_idx_%out_bool, 8
|
|
827
|
+
__slice_eq_left_item_%out_bool = ptr_add __slice_eq_left_ptr_%out_bool, __slice_eq_off_%out_bool
|
|
828
|
+
__slice_eq_right_item_%out_bool = ptr_add __slice_eq_right_ptr_%out_bool, __slice_eq_off_%out_bool
|
|
829
|
+
__slice_eq_left_value_%out_bool = load __slice_eq_left_item_%out_bool+0 as u64
|
|
830
|
+
__slice_eq_right_value_%out_bool = load __slice_eq_right_item_%out_bool+0 as u64
|
|
831
|
+
__slice_eq_values_match_%out_bool = eq __slice_eq_left_value_%out_bool, __slice_eq_right_value_%out_bool
|
|
832
|
+
br __slice_eq_values_match_%out_bool -> L_SLICE_EQ_NEXT_%out_bool, L_SLICE_EQ_FALSE_LOOP_%out_bool
|
|
833
|
+
|
|
834
|
+
L_SLICE_EQ_NEXT_%out_bool:
|
|
835
|
+
__slice_eq_next_%out_bool = add __slice_eq_idx_%out_bool, 1
|
|
836
|
+
store __slice_eq_idx_slot_%out_bool+0, __slice_eq_next_%out_bool as u64
|
|
837
|
+
!__slice_eq_next_%out_bool
|
|
838
|
+
!__slice_eq_values_match_%out_bool
|
|
839
|
+
!__slice_eq_right_value_%out_bool
|
|
840
|
+
!__slice_eq_left_value_%out_bool
|
|
841
|
+
!__slice_eq_right_item_%out_bool
|
|
842
|
+
!__slice_eq_left_item_%out_bool
|
|
843
|
+
!__slice_eq_off_%out_bool
|
|
844
|
+
!__slice_eq_done_%out_bool
|
|
845
|
+
!__slice_eq_idx_%out_bool
|
|
846
|
+
jmp L_SLICE_EQ_HEAD_%out_bool
|
|
847
|
+
|
|
848
|
+
L_SLICE_EQ_TRUE_%out_bool:
|
|
849
|
+
%out_bool = add 0, 1
|
|
850
|
+
!__slice_eq_done_%out_bool
|
|
851
|
+
!__slice_eq_idx_%out_bool
|
|
852
|
+
!__slice_eq_same_len_%out_bool
|
|
853
|
+
!__slice_eq_right_len_%out_bool
|
|
854
|
+
!__slice_eq_left_len_%out_bool
|
|
855
|
+
!__slice_eq_right_ptr_%out_bool
|
|
856
|
+
!__slice_eq_left_ptr_%out_bool
|
|
857
|
+
jmp L_SLICE_EQ_END_%out_bool
|
|
858
|
+
|
|
859
|
+
L_SLICE_EQ_FALSE_LOOP_%out_bool:
|
|
860
|
+
%out_bool = add 0, 0
|
|
861
|
+
!__slice_eq_values_match_%out_bool
|
|
862
|
+
!__slice_eq_right_value_%out_bool
|
|
863
|
+
!__slice_eq_left_value_%out_bool
|
|
864
|
+
!__slice_eq_right_item_%out_bool
|
|
865
|
+
!__slice_eq_left_item_%out_bool
|
|
866
|
+
!__slice_eq_off_%out_bool
|
|
867
|
+
!__slice_eq_done_%out_bool
|
|
868
|
+
!__slice_eq_idx_%out_bool
|
|
869
|
+
!__slice_eq_same_len_%out_bool
|
|
870
|
+
!__slice_eq_right_len_%out_bool
|
|
871
|
+
!__slice_eq_left_len_%out_bool
|
|
872
|
+
!__slice_eq_right_ptr_%out_bool
|
|
873
|
+
!__slice_eq_left_ptr_%out_bool
|
|
874
|
+
jmp L_SLICE_EQ_END_%out_bool
|
|
875
|
+
|
|
876
|
+
L_SLICE_EQ_FALSE_%out_bool:
|
|
877
|
+
%out_bool = add 0, 0
|
|
878
|
+
!__slice_eq_same_len_%out_bool
|
|
879
|
+
!__slice_eq_right_len_%out_bool
|
|
880
|
+
!__slice_eq_left_len_%out_bool
|
|
881
|
+
!__slice_eq_right_ptr_%out_bool
|
|
882
|
+
!__slice_eq_left_ptr_%out_bool
|
|
883
|
+
|
|
884
|
+
L_SLICE_EQ_END_%out_bool:
|
|
885
|
+
[END_MACRO]
|
|
886
|
+
|
|
887
|
+
// Rust method-name alias over SLICE_EQ_U64.
|
|
888
|
+
[MACRO] SLICE_EQ %out_bool, %left_slice, %right_slice
|
|
889
|
+
EXPAND SLICE_EQ_U64 %out_bool, %left_slice, %right_slice
|
|
890
|
+
[END_MACRO]
|
|
891
|
+
|
|
892
|
+
[MACRO] SLICE_NE_U64 %out_bool, %left_slice, %right_slice
|
|
893
|
+
EXPAND SLICE_EQ_U64 __slice_ne_eq_%out_bool, %left_slice, %right_slice
|
|
894
|
+
%out_bool = eq __slice_ne_eq_%out_bool, 0
|
|
895
|
+
!__slice_ne_eq_%out_bool
|
|
896
|
+
[END_MACRO]
|
|
897
|
+
|
|
898
|
+
// Rust method-name alias over SLICE_NE_U64.
|
|
899
|
+
[MACRO] SLICE_NE %out_bool, %left_slice, %right_slice
|
|
900
|
+
EXPAND SLICE_NE_U64 %out_bool, %left_slice, %right_slice
|
|
901
|
+
[END_MACRO]
|
|
902
|
+
|
|
903
|
+
[MACRO] SLICE_CMP_U64 %out_ordering, %left_slice, %right_slice
|
|
904
|
+
__slice_cmp_left_ptr_%out_ordering = load %left_slice+Slice_ptr as ptr
|
|
905
|
+
__slice_cmp_right_ptr_%out_ordering = load %right_slice+Slice_ptr as ptr
|
|
906
|
+
__slice_cmp_left_len_%out_ordering = load %left_slice+Slice_len as u64
|
|
907
|
+
__slice_cmp_right_len_%out_ordering = load %right_slice+Slice_len as u64
|
|
908
|
+
__slice_cmp_idx_slot_%out_ordering = stack_alloc 8
|
|
909
|
+
store __slice_cmp_idx_slot_%out_ordering+0, 0 as u64
|
|
910
|
+
jmp L_SLICE_CMP_HEAD_%out_ordering
|
|
911
|
+
|
|
912
|
+
L_SLICE_CMP_HEAD_%out_ordering:
|
|
913
|
+
__slice_cmp_idx_%out_ordering = load __slice_cmp_idx_slot_%out_ordering+0 as u64
|
|
914
|
+
__slice_cmp_left_done_%out_ordering = eq __slice_cmp_idx_%out_ordering, __slice_cmp_left_len_%out_ordering
|
|
915
|
+
__slice_cmp_right_done_%out_ordering = eq __slice_cmp_idx_%out_ordering, __slice_cmp_right_len_%out_ordering
|
|
916
|
+
br __slice_cmp_left_done_%out_ordering -> L_SLICE_CMP_LEFT_DONE_%out_ordering, L_SLICE_CMP_LEFT_SOME_%out_ordering
|
|
917
|
+
|
|
918
|
+
L_SLICE_CMP_LEFT_SOME_%out_ordering:
|
|
919
|
+
br __slice_cmp_right_done_%out_ordering -> L_SLICE_CMP_GREATER_%out_ordering, L_SLICE_CMP_BODY_%out_ordering
|
|
920
|
+
|
|
921
|
+
L_SLICE_CMP_BODY_%out_ordering:
|
|
922
|
+
__slice_cmp_off_%out_ordering = mul __slice_cmp_idx_%out_ordering, 8
|
|
923
|
+
__slice_cmp_left_item_%out_ordering = ptr_add __slice_cmp_left_ptr_%out_ordering, __slice_cmp_off_%out_ordering
|
|
924
|
+
__slice_cmp_right_item_%out_ordering = ptr_add __slice_cmp_right_ptr_%out_ordering, __slice_cmp_off_%out_ordering
|
|
925
|
+
__slice_cmp_left_value_%out_ordering = load __slice_cmp_left_item_%out_ordering+0 as u64
|
|
926
|
+
__slice_cmp_right_value_%out_ordering = load __slice_cmp_right_item_%out_ordering+0 as u64
|
|
927
|
+
__slice_cmp_less_%out_ordering = ult __slice_cmp_left_value_%out_ordering, __slice_cmp_right_value_%out_ordering
|
|
928
|
+
br __slice_cmp_less_%out_ordering -> L_SLICE_CMP_LESS_LOOP_%out_ordering, L_SLICE_CMP_CHECK_GREATER_%out_ordering
|
|
929
|
+
|
|
930
|
+
L_SLICE_CMP_CHECK_GREATER_%out_ordering:
|
|
931
|
+
__slice_cmp_greater_%out_ordering = ugt __slice_cmp_left_value_%out_ordering, __slice_cmp_right_value_%out_ordering
|
|
932
|
+
br __slice_cmp_greater_%out_ordering -> L_SLICE_CMP_GREATER_LOOP_%out_ordering, L_SLICE_CMP_NEXT_%out_ordering
|
|
933
|
+
|
|
934
|
+
L_SLICE_CMP_NEXT_%out_ordering:
|
|
935
|
+
__slice_cmp_next_%out_ordering = add __slice_cmp_idx_%out_ordering, 1
|
|
936
|
+
store __slice_cmp_idx_slot_%out_ordering+0, __slice_cmp_next_%out_ordering as u64
|
|
937
|
+
!__slice_cmp_next_%out_ordering
|
|
938
|
+
!__slice_cmp_greater_%out_ordering
|
|
939
|
+
!__slice_cmp_less_%out_ordering
|
|
940
|
+
!__slice_cmp_right_value_%out_ordering
|
|
941
|
+
!__slice_cmp_left_value_%out_ordering
|
|
942
|
+
!__slice_cmp_right_item_%out_ordering
|
|
943
|
+
!__slice_cmp_left_item_%out_ordering
|
|
944
|
+
!__slice_cmp_off_%out_ordering
|
|
945
|
+
!__slice_cmp_right_done_%out_ordering
|
|
946
|
+
!__slice_cmp_left_done_%out_ordering
|
|
947
|
+
!__slice_cmp_idx_%out_ordering
|
|
948
|
+
jmp L_SLICE_CMP_HEAD_%out_ordering
|
|
949
|
+
|
|
950
|
+
L_SLICE_CMP_LEFT_DONE_%out_ordering:
|
|
951
|
+
br __slice_cmp_right_done_%out_ordering -> L_SLICE_CMP_EQUAL_%out_ordering, L_SLICE_CMP_LESS_%out_ordering
|
|
952
|
+
|
|
953
|
+
L_SLICE_CMP_LESS_LOOP_%out_ordering:
|
|
954
|
+
%out_ordering = sub 0, 1
|
|
955
|
+
!__slice_cmp_less_%out_ordering
|
|
956
|
+
!__slice_cmp_right_value_%out_ordering
|
|
957
|
+
!__slice_cmp_left_value_%out_ordering
|
|
958
|
+
!__slice_cmp_right_item_%out_ordering
|
|
959
|
+
!__slice_cmp_left_item_%out_ordering
|
|
960
|
+
!__slice_cmp_off_%out_ordering
|
|
961
|
+
!__slice_cmp_right_done_%out_ordering
|
|
962
|
+
!__slice_cmp_left_done_%out_ordering
|
|
963
|
+
!__slice_cmp_idx_%out_ordering
|
|
964
|
+
!__slice_cmp_right_len_%out_ordering
|
|
965
|
+
!__slice_cmp_left_len_%out_ordering
|
|
966
|
+
!__slice_cmp_right_ptr_%out_ordering
|
|
967
|
+
!__slice_cmp_left_ptr_%out_ordering
|
|
968
|
+
jmp L_SLICE_CMP_END_%out_ordering
|
|
969
|
+
|
|
970
|
+
L_SLICE_CMP_GREATER_LOOP_%out_ordering:
|
|
971
|
+
%out_ordering = add 0, 1
|
|
972
|
+
!__slice_cmp_greater_%out_ordering
|
|
973
|
+
!__slice_cmp_less_%out_ordering
|
|
974
|
+
!__slice_cmp_right_value_%out_ordering
|
|
975
|
+
!__slice_cmp_left_value_%out_ordering
|
|
976
|
+
!__slice_cmp_right_item_%out_ordering
|
|
977
|
+
!__slice_cmp_left_item_%out_ordering
|
|
978
|
+
!__slice_cmp_off_%out_ordering
|
|
979
|
+
!__slice_cmp_right_done_%out_ordering
|
|
980
|
+
!__slice_cmp_left_done_%out_ordering
|
|
981
|
+
!__slice_cmp_idx_%out_ordering
|
|
982
|
+
!__slice_cmp_right_len_%out_ordering
|
|
983
|
+
!__slice_cmp_left_len_%out_ordering
|
|
984
|
+
!__slice_cmp_right_ptr_%out_ordering
|
|
985
|
+
!__slice_cmp_left_ptr_%out_ordering
|
|
986
|
+
jmp L_SLICE_CMP_END_%out_ordering
|
|
987
|
+
|
|
988
|
+
L_SLICE_CMP_LESS_%out_ordering:
|
|
989
|
+
%out_ordering = sub 0, 1
|
|
990
|
+
!__slice_cmp_right_done_%out_ordering
|
|
991
|
+
!__slice_cmp_left_done_%out_ordering
|
|
992
|
+
!__slice_cmp_idx_%out_ordering
|
|
993
|
+
!__slice_cmp_right_len_%out_ordering
|
|
994
|
+
!__slice_cmp_left_len_%out_ordering
|
|
995
|
+
!__slice_cmp_right_ptr_%out_ordering
|
|
996
|
+
!__slice_cmp_left_ptr_%out_ordering
|
|
997
|
+
jmp L_SLICE_CMP_END_%out_ordering
|
|
998
|
+
|
|
999
|
+
L_SLICE_CMP_GREATER_%out_ordering:
|
|
1000
|
+
%out_ordering = add 0, 1
|
|
1001
|
+
!__slice_cmp_right_done_%out_ordering
|
|
1002
|
+
!__slice_cmp_left_done_%out_ordering
|
|
1003
|
+
!__slice_cmp_idx_%out_ordering
|
|
1004
|
+
!__slice_cmp_right_len_%out_ordering
|
|
1005
|
+
!__slice_cmp_left_len_%out_ordering
|
|
1006
|
+
!__slice_cmp_right_ptr_%out_ordering
|
|
1007
|
+
!__slice_cmp_left_ptr_%out_ordering
|
|
1008
|
+
jmp L_SLICE_CMP_END_%out_ordering
|
|
1009
|
+
|
|
1010
|
+
L_SLICE_CMP_EQUAL_%out_ordering:
|
|
1011
|
+
%out_ordering = add 0, 0
|
|
1012
|
+
!__slice_cmp_right_done_%out_ordering
|
|
1013
|
+
!__slice_cmp_left_done_%out_ordering
|
|
1014
|
+
!__slice_cmp_idx_%out_ordering
|
|
1015
|
+
!__slice_cmp_right_len_%out_ordering
|
|
1016
|
+
!__slice_cmp_left_len_%out_ordering
|
|
1017
|
+
!__slice_cmp_right_ptr_%out_ordering
|
|
1018
|
+
!__slice_cmp_left_ptr_%out_ordering
|
|
1019
|
+
|
|
1020
|
+
L_SLICE_CMP_END_%out_ordering:
|
|
1021
|
+
[END_MACRO]
|
|
1022
|
+
|
|
1023
|
+
// Rust method-name alias over SLICE_CMP_U64.
|
|
1024
|
+
[MACRO] SLICE_CMP %out_ordering, %left_slice, %right_slice
|
|
1025
|
+
EXPAND SLICE_CMP_U64 %out_ordering, %left_slice, %right_slice
|
|
1026
|
+
[END_MACRO]
|
|
1027
|
+
|
|
1028
|
+
[MACRO] SLICE_LT_U64 %out_bool, %left_slice, %right_slice
|
|
1029
|
+
EXPAND SLICE_CMP_U64 __slice_lt_order_%out_bool, %left_slice, %right_slice
|
|
1030
|
+
%out_bool = slt __slice_lt_order_%out_bool, 0
|
|
1031
|
+
!__slice_lt_order_%out_bool
|
|
1032
|
+
[END_MACRO]
|
|
1033
|
+
|
|
1034
|
+
// Rust method-name alias over SLICE_LT_U64.
|
|
1035
|
+
[MACRO] SLICE_LT %out_bool, %left_slice, %right_slice
|
|
1036
|
+
EXPAND SLICE_LT_U64 %out_bool, %left_slice, %right_slice
|
|
1037
|
+
[END_MACRO]
|
|
1038
|
+
|
|
1039
|
+
[MACRO] SLICE_LE_U64 %out_bool, %left_slice, %right_slice
|
|
1040
|
+
EXPAND SLICE_CMP_U64 __slice_le_order_%out_bool, %left_slice, %right_slice
|
|
1041
|
+
%out_bool = sle __slice_le_order_%out_bool, 0
|
|
1042
|
+
!__slice_le_order_%out_bool
|
|
1043
|
+
[END_MACRO]
|
|
1044
|
+
|
|
1045
|
+
// Rust method-name alias over SLICE_LE_U64.
|
|
1046
|
+
[MACRO] SLICE_LE %out_bool, %left_slice, %right_slice
|
|
1047
|
+
EXPAND SLICE_LE_U64 %out_bool, %left_slice, %right_slice
|
|
1048
|
+
[END_MACRO]
|
|
1049
|
+
|
|
1050
|
+
[MACRO] SLICE_GT_U64 %out_bool, %left_slice, %right_slice
|
|
1051
|
+
EXPAND SLICE_CMP_U64 __slice_gt_order_%out_bool, %left_slice, %right_slice
|
|
1052
|
+
%out_bool = sgt __slice_gt_order_%out_bool, 0
|
|
1053
|
+
!__slice_gt_order_%out_bool
|
|
1054
|
+
[END_MACRO]
|
|
1055
|
+
|
|
1056
|
+
// Rust method-name alias over SLICE_GT_U64.
|
|
1057
|
+
[MACRO] SLICE_GT %out_bool, %left_slice, %right_slice
|
|
1058
|
+
EXPAND SLICE_GT_U64 %out_bool, %left_slice, %right_slice
|
|
1059
|
+
[END_MACRO]
|
|
1060
|
+
|
|
1061
|
+
[MACRO] SLICE_GE_U64 %out_bool, %left_slice, %right_slice
|
|
1062
|
+
EXPAND SLICE_CMP_U64 __slice_ge_order_%out_bool, %left_slice, %right_slice
|
|
1063
|
+
%out_bool = sge __slice_ge_order_%out_bool, 0
|
|
1064
|
+
!__slice_ge_order_%out_bool
|
|
1065
|
+
[END_MACRO]
|
|
1066
|
+
|
|
1067
|
+
// Rust method-name alias over SLICE_GE_U64.
|
|
1068
|
+
[MACRO] SLICE_GE %out_bool, %left_slice, %right_slice
|
|
1069
|
+
EXPAND SLICE_GE_U64 %out_bool, %left_slice, %right_slice
|
|
1070
|
+
[END_MACRO]
|
|
1071
|
+
|
|
1072
|
+
[MACRO] SLICE_STARTS_WITH_U64 %out_bool, %slice_reg, %prefix_slice
|
|
1073
|
+
__slice_ptr_%out_bool = load %slice_reg+Slice_ptr as ptr
|
|
1074
|
+
__slice_prefix_ptr_%out_bool = load %prefix_slice+Slice_ptr as ptr
|
|
1075
|
+
__slice_len_%out_bool = load %slice_reg+Slice_len as u64
|
|
1076
|
+
__slice_prefix_len_%out_bool = load %prefix_slice+Slice_len as u64
|
|
1077
|
+
__slice_idx_slot_%out_bool = stack_alloc 8
|
|
1078
|
+
store __slice_idx_slot_%out_bool+0, 0 as u64
|
|
1079
|
+
__slice_can_match_%out_bool = ule __slice_prefix_len_%out_bool, __slice_len_%out_bool
|
|
1080
|
+
br __slice_can_match_%out_bool -> L_SLICE_STARTS_HEAD_%out_bool, L_SLICE_STARTS_FALSE_%out_bool
|
|
1081
|
+
|
|
1082
|
+
L_SLICE_STARTS_HEAD_%out_bool:
|
|
1083
|
+
__slice_idx_%out_bool = load __slice_idx_slot_%out_bool+0 as u64
|
|
1084
|
+
__slice_done_%out_bool = eq __slice_idx_%out_bool, __slice_prefix_len_%out_bool
|
|
1085
|
+
br __slice_done_%out_bool -> L_SLICE_STARTS_TRUE_%out_bool, L_SLICE_STARTS_BODY_%out_bool
|
|
1086
|
+
|
|
1087
|
+
L_SLICE_STARTS_BODY_%out_bool:
|
|
1088
|
+
__slice_off_%out_bool = mul __slice_idx_%out_bool, 8
|
|
1089
|
+
__slice_elem_ptr_%out_bool = ptr_add __slice_ptr_%out_bool, __slice_off_%out_bool
|
|
1090
|
+
__slice_prefix_elem_ptr_%out_bool = ptr_add __slice_prefix_ptr_%out_bool, __slice_off_%out_bool
|
|
1091
|
+
__slice_elem_%out_bool = load __slice_elem_ptr_%out_bool+0 as u64
|
|
1092
|
+
__slice_prefix_elem_%out_bool = load __slice_prefix_elem_ptr_%out_bool+0 as u64
|
|
1093
|
+
__slice_match_%out_bool = eq __slice_elem_%out_bool, __slice_prefix_elem_%out_bool
|
|
1094
|
+
br __slice_match_%out_bool -> L_SLICE_STARTS_NEXT_%out_bool, L_SLICE_STARTS_FALSE_LOOP_%out_bool
|
|
1095
|
+
|
|
1096
|
+
L_SLICE_STARTS_NEXT_%out_bool:
|
|
1097
|
+
__slice_next_%out_bool = add __slice_idx_%out_bool, 1
|
|
1098
|
+
store __slice_idx_slot_%out_bool+0, __slice_next_%out_bool as u64
|
|
1099
|
+
!__slice_next_%out_bool
|
|
1100
|
+
!__slice_match_%out_bool
|
|
1101
|
+
!__slice_prefix_elem_%out_bool
|
|
1102
|
+
!__slice_elem_%out_bool
|
|
1103
|
+
!__slice_prefix_elem_ptr_%out_bool
|
|
1104
|
+
!__slice_elem_ptr_%out_bool
|
|
1105
|
+
!__slice_off_%out_bool
|
|
1106
|
+
!__slice_done_%out_bool
|
|
1107
|
+
!__slice_idx_%out_bool
|
|
1108
|
+
jmp L_SLICE_STARTS_HEAD_%out_bool
|
|
1109
|
+
|
|
1110
|
+
L_SLICE_STARTS_TRUE_%out_bool:
|
|
1111
|
+
%out_bool = add 0, 1
|
|
1112
|
+
!__slice_done_%out_bool
|
|
1113
|
+
!__slice_idx_%out_bool
|
|
1114
|
+
!__slice_can_match_%out_bool
|
|
1115
|
+
!__slice_prefix_len_%out_bool
|
|
1116
|
+
!__slice_len_%out_bool
|
|
1117
|
+
!__slice_prefix_ptr_%out_bool
|
|
1118
|
+
!__slice_ptr_%out_bool
|
|
1119
|
+
jmp L_SLICE_STARTS_END_%out_bool
|
|
1120
|
+
|
|
1121
|
+
L_SLICE_STARTS_FALSE_LOOP_%out_bool:
|
|
1122
|
+
%out_bool = add 0, 0
|
|
1123
|
+
!__slice_match_%out_bool
|
|
1124
|
+
!__slice_prefix_elem_%out_bool
|
|
1125
|
+
!__slice_elem_%out_bool
|
|
1126
|
+
!__slice_prefix_elem_ptr_%out_bool
|
|
1127
|
+
!__slice_elem_ptr_%out_bool
|
|
1128
|
+
!__slice_off_%out_bool
|
|
1129
|
+
!__slice_done_%out_bool
|
|
1130
|
+
!__slice_idx_%out_bool
|
|
1131
|
+
!__slice_can_match_%out_bool
|
|
1132
|
+
!__slice_prefix_len_%out_bool
|
|
1133
|
+
!__slice_len_%out_bool
|
|
1134
|
+
!__slice_prefix_ptr_%out_bool
|
|
1135
|
+
!__slice_ptr_%out_bool
|
|
1136
|
+
jmp L_SLICE_STARTS_END_%out_bool
|
|
1137
|
+
|
|
1138
|
+
L_SLICE_STARTS_FALSE_%out_bool:
|
|
1139
|
+
%out_bool = add 0, 0
|
|
1140
|
+
!__slice_can_match_%out_bool
|
|
1141
|
+
!__slice_prefix_len_%out_bool
|
|
1142
|
+
!__slice_len_%out_bool
|
|
1143
|
+
!__slice_prefix_ptr_%out_bool
|
|
1144
|
+
!__slice_ptr_%out_bool
|
|
1145
|
+
|
|
1146
|
+
L_SLICE_STARTS_END_%out_bool:
|
|
1147
|
+
[END_MACRO]
|
|
1148
|
+
|
|
1149
|
+
// Rust method-name alias over SLICE_STARTS_WITH_U64.
|
|
1150
|
+
[MACRO] SLICE_STARTS_WITH %out_bool, %slice_reg, %prefix_slice
|
|
1151
|
+
EXPAND SLICE_STARTS_WITH_U64 %out_bool, %slice_reg, %prefix_slice
|
|
1152
|
+
[END_MACRO]
|
|
1153
|
+
|
|
1154
|
+
[MACRO] SLICE_ENDS_WITH_U64 %out_bool, %slice_reg, %suffix_slice
|
|
1155
|
+
__slice_ptr_%out_bool = load %slice_reg+Slice_ptr as ptr
|
|
1156
|
+
__slice_suffix_ptr_%out_bool = load %suffix_slice+Slice_ptr as ptr
|
|
1157
|
+
__slice_len_%out_bool = load %slice_reg+Slice_len as u64
|
|
1158
|
+
__slice_suffix_len_%out_bool = load %suffix_slice+Slice_len as u64
|
|
1159
|
+
__slice_idx_slot_%out_bool = stack_alloc 8
|
|
1160
|
+
store __slice_idx_slot_%out_bool+0, 0 as u64
|
|
1161
|
+
__slice_can_match_%out_bool = ule __slice_suffix_len_%out_bool, __slice_len_%out_bool
|
|
1162
|
+
br __slice_can_match_%out_bool -> L_SLICE_ENDS_INIT_%out_bool, L_SLICE_ENDS_FALSE_%out_bool
|
|
1163
|
+
|
|
1164
|
+
L_SLICE_ENDS_INIT_%out_bool:
|
|
1165
|
+
__slice_start_%out_bool = sub __slice_len_%out_bool, __slice_suffix_len_%out_bool
|
|
1166
|
+
jmp L_SLICE_ENDS_HEAD_%out_bool
|
|
1167
|
+
|
|
1168
|
+
L_SLICE_ENDS_HEAD_%out_bool:
|
|
1169
|
+
__slice_idx_%out_bool = load __slice_idx_slot_%out_bool+0 as u64
|
|
1170
|
+
__slice_done_%out_bool = eq __slice_idx_%out_bool, __slice_suffix_len_%out_bool
|
|
1171
|
+
br __slice_done_%out_bool -> L_SLICE_ENDS_TRUE_%out_bool, L_SLICE_ENDS_BODY_%out_bool
|
|
1172
|
+
|
|
1173
|
+
L_SLICE_ENDS_BODY_%out_bool:
|
|
1174
|
+
__slice_hay_idx_%out_bool = add __slice_start_%out_bool, __slice_idx_%out_bool
|
|
1175
|
+
__slice_hay_off_%out_bool = mul __slice_hay_idx_%out_bool, 8
|
|
1176
|
+
__slice_suffix_off_%out_bool = mul __slice_idx_%out_bool, 8
|
|
1177
|
+
__slice_elem_ptr_%out_bool = ptr_add __slice_ptr_%out_bool, __slice_hay_off_%out_bool
|
|
1178
|
+
__slice_suffix_elem_ptr_%out_bool = ptr_add __slice_suffix_ptr_%out_bool, __slice_suffix_off_%out_bool
|
|
1179
|
+
__slice_elem_%out_bool = load __slice_elem_ptr_%out_bool+0 as u64
|
|
1180
|
+
__slice_suffix_elem_%out_bool = load __slice_suffix_elem_ptr_%out_bool+0 as u64
|
|
1181
|
+
__slice_match_%out_bool = eq __slice_elem_%out_bool, __slice_suffix_elem_%out_bool
|
|
1182
|
+
br __slice_match_%out_bool -> L_SLICE_ENDS_NEXT_%out_bool, L_SLICE_ENDS_FALSE_LOOP_%out_bool
|
|
1183
|
+
|
|
1184
|
+
L_SLICE_ENDS_NEXT_%out_bool:
|
|
1185
|
+
__slice_next_%out_bool = add __slice_idx_%out_bool, 1
|
|
1186
|
+
store __slice_idx_slot_%out_bool+0, __slice_next_%out_bool as u64
|
|
1187
|
+
!__slice_next_%out_bool
|
|
1188
|
+
!__slice_match_%out_bool
|
|
1189
|
+
!__slice_suffix_elem_%out_bool
|
|
1190
|
+
!__slice_elem_%out_bool
|
|
1191
|
+
!__slice_suffix_elem_ptr_%out_bool
|
|
1192
|
+
!__slice_elem_ptr_%out_bool
|
|
1193
|
+
!__slice_suffix_off_%out_bool
|
|
1194
|
+
!__slice_hay_off_%out_bool
|
|
1195
|
+
!__slice_hay_idx_%out_bool
|
|
1196
|
+
!__slice_done_%out_bool
|
|
1197
|
+
!__slice_idx_%out_bool
|
|
1198
|
+
jmp L_SLICE_ENDS_HEAD_%out_bool
|
|
1199
|
+
|
|
1200
|
+
L_SLICE_ENDS_TRUE_%out_bool:
|
|
1201
|
+
%out_bool = add 0, 1
|
|
1202
|
+
!__slice_done_%out_bool
|
|
1203
|
+
!__slice_idx_%out_bool
|
|
1204
|
+
!__slice_start_%out_bool
|
|
1205
|
+
!__slice_can_match_%out_bool
|
|
1206
|
+
!__slice_suffix_len_%out_bool
|
|
1207
|
+
!__slice_len_%out_bool
|
|
1208
|
+
!__slice_suffix_ptr_%out_bool
|
|
1209
|
+
!__slice_ptr_%out_bool
|
|
1210
|
+
jmp L_SLICE_ENDS_END_%out_bool
|
|
1211
|
+
|
|
1212
|
+
L_SLICE_ENDS_FALSE_LOOP_%out_bool:
|
|
1213
|
+
%out_bool = add 0, 0
|
|
1214
|
+
!__slice_match_%out_bool
|
|
1215
|
+
!__slice_suffix_elem_%out_bool
|
|
1216
|
+
!__slice_elem_%out_bool
|
|
1217
|
+
!__slice_suffix_elem_ptr_%out_bool
|
|
1218
|
+
!__slice_elem_ptr_%out_bool
|
|
1219
|
+
!__slice_suffix_off_%out_bool
|
|
1220
|
+
!__slice_hay_off_%out_bool
|
|
1221
|
+
!__slice_hay_idx_%out_bool
|
|
1222
|
+
!__slice_done_%out_bool
|
|
1223
|
+
!__slice_idx_%out_bool
|
|
1224
|
+
!__slice_start_%out_bool
|
|
1225
|
+
!__slice_can_match_%out_bool
|
|
1226
|
+
!__slice_suffix_len_%out_bool
|
|
1227
|
+
!__slice_len_%out_bool
|
|
1228
|
+
!__slice_suffix_ptr_%out_bool
|
|
1229
|
+
!__slice_ptr_%out_bool
|
|
1230
|
+
jmp L_SLICE_ENDS_END_%out_bool
|
|
1231
|
+
|
|
1232
|
+
L_SLICE_ENDS_FALSE_%out_bool:
|
|
1233
|
+
%out_bool = add 0, 0
|
|
1234
|
+
!__slice_can_match_%out_bool
|
|
1235
|
+
!__slice_suffix_len_%out_bool
|
|
1236
|
+
!__slice_len_%out_bool
|
|
1237
|
+
!__slice_suffix_ptr_%out_bool
|
|
1238
|
+
!__slice_ptr_%out_bool
|
|
1239
|
+
|
|
1240
|
+
L_SLICE_ENDS_END_%out_bool:
|
|
1241
|
+
[END_MACRO]
|
|
1242
|
+
|
|
1243
|
+
// Rust method-name alias over SLICE_ENDS_WITH_U64.
|
|
1244
|
+
[MACRO] SLICE_ENDS_WITH %out_bool, %slice_reg, %suffix_slice
|
|
1245
|
+
EXPAND SLICE_ENDS_WITH_U64 %out_bool, %slice_reg, %suffix_slice
|
|
1246
|
+
[END_MACRO]
|
|
1247
|
+
|
|
1248
|
+
[MACRO] SLICE_TRY_STRIP_PREFIX_U64 %out_ok, %out_slice, %slice_reg, %prefix_slice
|
|
1249
|
+
%out_slice = alloc Slice_SIZE
|
|
1250
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1251
|
+
__slice_prefix_len_%out_ok = load %prefix_slice+Slice_len as u64
|
|
1252
|
+
EXPAND SLICE_STARTS_WITH_U64 __slice_strip_match_%out_ok, %slice_reg, %prefix_slice
|
|
1253
|
+
br __slice_strip_match_%out_ok -> L_SLICE_STRIP_PREFIX_HIT_%out_ok, L_SLICE_STRIP_PREFIX_MISS_%out_ok
|
|
1254
|
+
|
|
1255
|
+
L_SLICE_STRIP_PREFIX_HIT_%out_ok:
|
|
1256
|
+
__slice_rest_len_%out_ok = sub __slice_len_%out_ok, __slice_prefix_len_%out_ok
|
|
1257
|
+
__slice_src_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1258
|
+
__slice_prefix_bytes_%out_ok = mul __slice_prefix_len_%out_ok, 8
|
|
1259
|
+
__slice_rest_ptr_%out_ok = ptr_add __slice_src_ptr_%out_ok, __slice_prefix_bytes_%out_ok
|
|
1260
|
+
EXPAND SLICE_NEW %out_slice, __slice_rest_ptr_%out_ok, __slice_rest_len_%out_ok
|
|
1261
|
+
%out_ok = add 0, 1
|
|
1262
|
+
!__slice_rest_ptr_%out_ok
|
|
1263
|
+
!__slice_prefix_bytes_%out_ok
|
|
1264
|
+
!__slice_src_ptr_%out_ok
|
|
1265
|
+
!__slice_rest_len_%out_ok
|
|
1266
|
+
!__slice_strip_match_%out_ok
|
|
1267
|
+
!__slice_prefix_len_%out_ok
|
|
1268
|
+
!__slice_len_%out_ok
|
|
1269
|
+
jmp L_SLICE_STRIP_PREFIX_END_%out_ok
|
|
1270
|
+
|
|
1271
|
+
L_SLICE_STRIP_PREFIX_MISS_%out_ok:
|
|
1272
|
+
__slice_empty_ptr_%out_ok = 0 as ptr
|
|
1273
|
+
EXPAND SLICE_NEW %out_slice, __slice_empty_ptr_%out_ok, 0
|
|
1274
|
+
%out_ok = add 0, 0
|
|
1275
|
+
!__slice_empty_ptr_%out_ok
|
|
1276
|
+
!__slice_strip_match_%out_ok
|
|
1277
|
+
!__slice_prefix_len_%out_ok
|
|
1278
|
+
!__slice_len_%out_ok
|
|
1279
|
+
|
|
1280
|
+
L_SLICE_STRIP_PREFIX_END_%out_ok:
|
|
1281
|
+
[END_MACRO]
|
|
1282
|
+
|
|
1283
|
+
// Rust method-name alias over SLICE_TRY_STRIP_PREFIX_U64.
|
|
1284
|
+
[MACRO] SLICE_TRY_STRIP_PREFIX %out_ok, %out_slice, %slice_reg, %prefix_slice
|
|
1285
|
+
EXPAND SLICE_TRY_STRIP_PREFIX_U64 %out_ok, %out_slice, %slice_reg, %prefix_slice
|
|
1286
|
+
[END_MACRO]
|
|
1287
|
+
|
|
1288
|
+
[MACRO] SLICE_TRY_STRIP_SUFFIX_U64 %out_ok, %out_slice, %slice_reg, %suffix_slice
|
|
1289
|
+
%out_slice = alloc Slice_SIZE
|
|
1290
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1291
|
+
__slice_suffix_len_%out_ok = load %suffix_slice+Slice_len as u64
|
|
1292
|
+
EXPAND SLICE_ENDS_WITH_U64 __slice_strip_match_%out_ok, %slice_reg, %suffix_slice
|
|
1293
|
+
br __slice_strip_match_%out_ok -> L_SLICE_STRIP_SUFFIX_HIT_%out_ok, L_SLICE_STRIP_SUFFIX_MISS_%out_ok
|
|
1294
|
+
|
|
1295
|
+
L_SLICE_STRIP_SUFFIX_HIT_%out_ok:
|
|
1296
|
+
__slice_rest_len_%out_ok = sub __slice_len_%out_ok, __slice_suffix_len_%out_ok
|
|
1297
|
+
__slice_src_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1298
|
+
EXPAND SLICE_NEW %out_slice, __slice_src_ptr_%out_ok, __slice_rest_len_%out_ok
|
|
1299
|
+
%out_ok = add 0, 1
|
|
1300
|
+
!__slice_src_ptr_%out_ok
|
|
1301
|
+
!__slice_rest_len_%out_ok
|
|
1302
|
+
!__slice_strip_match_%out_ok
|
|
1303
|
+
!__slice_suffix_len_%out_ok
|
|
1304
|
+
!__slice_len_%out_ok
|
|
1305
|
+
jmp L_SLICE_STRIP_SUFFIX_END_%out_ok
|
|
1306
|
+
|
|
1307
|
+
L_SLICE_STRIP_SUFFIX_MISS_%out_ok:
|
|
1308
|
+
__slice_empty_ptr_%out_ok = 0 as ptr
|
|
1309
|
+
EXPAND SLICE_NEW %out_slice, __slice_empty_ptr_%out_ok, 0
|
|
1310
|
+
%out_ok = add 0, 0
|
|
1311
|
+
!__slice_empty_ptr_%out_ok
|
|
1312
|
+
!__slice_strip_match_%out_ok
|
|
1313
|
+
!__slice_suffix_len_%out_ok
|
|
1314
|
+
!__slice_len_%out_ok
|
|
1315
|
+
|
|
1316
|
+
L_SLICE_STRIP_SUFFIX_END_%out_ok:
|
|
1317
|
+
[END_MACRO]
|
|
1318
|
+
|
|
1319
|
+
// Rust method-name alias over SLICE_TRY_STRIP_SUFFIX_U64.
|
|
1320
|
+
[MACRO] SLICE_TRY_STRIP_SUFFIX %out_ok, %out_slice, %slice_reg, %suffix_slice
|
|
1321
|
+
EXPAND SLICE_TRY_STRIP_SUFFIX_U64 %out_ok, %out_slice, %slice_reg, %suffix_slice
|
|
1322
|
+
[END_MACRO]
|
|
1323
|
+
|
|
1324
|
+
[MACRO] SLICE_TRIM_PREFIX_U64 %out_slice, %slice_reg, %prefix_slice
|
|
1325
|
+
%out_slice = alloc Slice_SIZE
|
|
1326
|
+
__slice_len_%out_slice = load %slice_reg+Slice_len as u64
|
|
1327
|
+
__slice_prefix_len_%out_slice = load %prefix_slice+Slice_len as u64
|
|
1328
|
+
EXPAND SLICE_STARTS_WITH_U64 __slice_trim_match_%out_slice, %slice_reg, %prefix_slice
|
|
1329
|
+
br __slice_trim_match_%out_slice -> L_SLICE_TRIM_PREFIX_HIT_%out_slice, L_SLICE_TRIM_PREFIX_MISS_%out_slice
|
|
1330
|
+
|
|
1331
|
+
L_SLICE_TRIM_PREFIX_HIT_%out_slice:
|
|
1332
|
+
__slice_rest_len_%out_slice = sub __slice_len_%out_slice, __slice_prefix_len_%out_slice
|
|
1333
|
+
__slice_src_ptr_%out_slice = load %slice_reg+Slice_ptr as ptr
|
|
1334
|
+
__slice_prefix_bytes_%out_slice = mul __slice_prefix_len_%out_slice, 8
|
|
1335
|
+
__slice_rest_ptr_%out_slice = ptr_add __slice_src_ptr_%out_slice, __slice_prefix_bytes_%out_slice
|
|
1336
|
+
EXPAND SLICE_NEW %out_slice, __slice_rest_ptr_%out_slice, __slice_rest_len_%out_slice
|
|
1337
|
+
!__slice_rest_ptr_%out_slice
|
|
1338
|
+
!__slice_prefix_bytes_%out_slice
|
|
1339
|
+
!__slice_src_ptr_%out_slice
|
|
1340
|
+
!__slice_rest_len_%out_slice
|
|
1341
|
+
!__slice_trim_match_%out_slice
|
|
1342
|
+
!__slice_prefix_len_%out_slice
|
|
1343
|
+
!__slice_len_%out_slice
|
|
1344
|
+
jmp L_SLICE_TRIM_PREFIX_END_%out_slice
|
|
1345
|
+
|
|
1346
|
+
L_SLICE_TRIM_PREFIX_MISS_%out_slice:
|
|
1347
|
+
__slice_src_ptr_miss_%out_slice = load %slice_reg+Slice_ptr as ptr
|
|
1348
|
+
EXPAND SLICE_NEW %out_slice, __slice_src_ptr_miss_%out_slice, __slice_len_%out_slice
|
|
1349
|
+
!__slice_src_ptr_miss_%out_slice
|
|
1350
|
+
!__slice_trim_match_%out_slice
|
|
1351
|
+
!__slice_prefix_len_%out_slice
|
|
1352
|
+
!__slice_len_%out_slice
|
|
1353
|
+
|
|
1354
|
+
L_SLICE_TRIM_PREFIX_END_%out_slice:
|
|
1355
|
+
[END_MACRO]
|
|
1356
|
+
|
|
1357
|
+
// Rust method-name alias over SLICE_TRIM_PREFIX_U64.
|
|
1358
|
+
[MACRO] SLICE_TRIM_PREFIX %out_slice, %slice_reg, %prefix_slice
|
|
1359
|
+
EXPAND SLICE_TRIM_PREFIX_U64 %out_slice, %slice_reg, %prefix_slice
|
|
1360
|
+
[END_MACRO]
|
|
1361
|
+
|
|
1362
|
+
[MACRO] SLICE_TRIM_SUFFIX_U64 %out_slice, %slice_reg, %suffix_slice
|
|
1363
|
+
%out_slice = alloc Slice_SIZE
|
|
1364
|
+
__slice_len_%out_slice = load %slice_reg+Slice_len as u64
|
|
1365
|
+
__slice_suffix_len_%out_slice = load %suffix_slice+Slice_len as u64
|
|
1366
|
+
EXPAND SLICE_ENDS_WITH_U64 __slice_trim_match_%out_slice, %slice_reg, %suffix_slice
|
|
1367
|
+
br __slice_trim_match_%out_slice -> L_SLICE_TRIM_SUFFIX_HIT_%out_slice, L_SLICE_TRIM_SUFFIX_MISS_%out_slice
|
|
1368
|
+
|
|
1369
|
+
L_SLICE_TRIM_SUFFIX_HIT_%out_slice:
|
|
1370
|
+
__slice_rest_len_%out_slice = sub __slice_len_%out_slice, __slice_suffix_len_%out_slice
|
|
1371
|
+
__slice_src_ptr_%out_slice = load %slice_reg+Slice_ptr as ptr
|
|
1372
|
+
EXPAND SLICE_NEW %out_slice, __slice_src_ptr_%out_slice, __slice_rest_len_%out_slice
|
|
1373
|
+
!__slice_src_ptr_%out_slice
|
|
1374
|
+
!__slice_rest_len_%out_slice
|
|
1375
|
+
!__slice_trim_match_%out_slice
|
|
1376
|
+
!__slice_suffix_len_%out_slice
|
|
1377
|
+
!__slice_len_%out_slice
|
|
1378
|
+
jmp L_SLICE_TRIM_SUFFIX_END_%out_slice
|
|
1379
|
+
|
|
1380
|
+
L_SLICE_TRIM_SUFFIX_MISS_%out_slice:
|
|
1381
|
+
__slice_src_ptr_miss_%out_slice = load %slice_reg+Slice_ptr as ptr
|
|
1382
|
+
EXPAND SLICE_NEW %out_slice, __slice_src_ptr_miss_%out_slice, __slice_len_%out_slice
|
|
1383
|
+
!__slice_src_ptr_miss_%out_slice
|
|
1384
|
+
!__slice_trim_match_%out_slice
|
|
1385
|
+
!__slice_suffix_len_%out_slice
|
|
1386
|
+
!__slice_len_%out_slice
|
|
1387
|
+
|
|
1388
|
+
L_SLICE_TRIM_SUFFIX_END_%out_slice:
|
|
1389
|
+
[END_MACRO]
|
|
1390
|
+
|
|
1391
|
+
// Rust method-name alias over SLICE_TRIM_SUFFIX_U64.
|
|
1392
|
+
[MACRO] SLICE_TRIM_SUFFIX %out_slice, %slice_reg, %suffix_slice
|
|
1393
|
+
EXPAND SLICE_TRIM_SUFFIX_U64 %out_slice, %slice_reg, %suffix_slice
|
|
1394
|
+
[END_MACRO]
|
|
1395
|
+
|
|
1396
|
+
[MACRO] SLICE_TRY_SPLIT_AT_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1397
|
+
%out_left = alloc Slice_SIZE
|
|
1398
|
+
%out_right = alloc Slice_SIZE
|
|
1399
|
+
__slice_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1400
|
+
__slice_in_bounds_%out_ok = ule %mid, __slice_len_%out_ok
|
|
1401
|
+
br __slice_in_bounds_%out_ok -> L_SLICE_SPLIT_AT_HIT_%out_ok, L_SLICE_SPLIT_AT_MISS_%out_ok
|
|
1402
|
+
|
|
1403
|
+
L_SLICE_SPLIT_AT_HIT_%out_ok:
|
|
1404
|
+
__slice_src_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1405
|
+
__slice_right_len_%out_ok = sub __slice_len_%out_ok, %mid
|
|
1406
|
+
__slice_mid_bytes_%out_ok = mul %mid, 8
|
|
1407
|
+
__slice_right_ptr_%out_ok = ptr_add __slice_src_ptr_%out_ok, __slice_mid_bytes_%out_ok
|
|
1408
|
+
EXPAND SLICE_NEW %out_left, __slice_src_ptr_%out_ok, %mid
|
|
1409
|
+
EXPAND SLICE_NEW %out_right, __slice_right_ptr_%out_ok, __slice_right_len_%out_ok
|
|
1410
|
+
%out_ok = add 0, 1
|
|
1411
|
+
!__slice_right_ptr_%out_ok
|
|
1412
|
+
!__slice_mid_bytes_%out_ok
|
|
1413
|
+
!__slice_right_len_%out_ok
|
|
1414
|
+
!__slice_src_ptr_%out_ok
|
|
1415
|
+
!__slice_in_bounds_%out_ok
|
|
1416
|
+
!__slice_len_%out_ok
|
|
1417
|
+
jmp L_SLICE_SPLIT_AT_END_%out_ok
|
|
1418
|
+
|
|
1419
|
+
L_SLICE_SPLIT_AT_MISS_%out_ok:
|
|
1420
|
+
__slice_empty_ptr_%out_ok = 0 as ptr
|
|
1421
|
+
EXPAND SLICE_NEW %out_left, __slice_empty_ptr_%out_ok, 0
|
|
1422
|
+
EXPAND SLICE_NEW %out_right, __slice_empty_ptr_%out_ok, 0
|
|
1423
|
+
%out_ok = add 0, 0
|
|
1424
|
+
!__slice_empty_ptr_%out_ok
|
|
1425
|
+
!__slice_in_bounds_%out_ok
|
|
1426
|
+
!__slice_len_%out_ok
|
|
1427
|
+
|
|
1428
|
+
L_SLICE_SPLIT_AT_END_%out_ok:
|
|
1429
|
+
[END_MACRO]
|
|
1430
|
+
|
|
1431
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_AT_U64.
|
|
1432
|
+
[MACRO] SLICE_TRY_SPLIT_AT %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1433
|
+
EXPAND SLICE_TRY_SPLIT_AT_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1434
|
+
[END_MACRO]
|
|
1435
|
+
|
|
1436
|
+
[MACRO] SLICE_TRY_SPLIT_AT_MUT_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1437
|
+
EXPAND SLICE_TRY_SPLIT_AT_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1438
|
+
[END_MACRO]
|
|
1439
|
+
|
|
1440
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_AT_MUT_U64.
|
|
1441
|
+
[MACRO] SLICE_TRY_SPLIT_AT_MUT %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1442
|
+
EXPAND SLICE_TRY_SPLIT_AT_MUT_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1443
|
+
[END_MACRO]
|
|
1444
|
+
|
|
1445
|
+
[MACRO] SLICE_TRY_SPLIT_AT_CHECKED_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1446
|
+
EXPAND SLICE_TRY_SPLIT_AT_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1447
|
+
[END_MACRO]
|
|
1448
|
+
|
|
1449
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_AT_CHECKED_U64.
|
|
1450
|
+
[MACRO] SLICE_TRY_SPLIT_AT_CHECKED %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1451
|
+
EXPAND SLICE_TRY_SPLIT_AT_CHECKED_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1452
|
+
[END_MACRO]
|
|
1453
|
+
|
|
1454
|
+
[MACRO] SLICE_TRY_SPLIT_AT_MUT_CHECKED_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1455
|
+
EXPAND SLICE_TRY_SPLIT_AT_MUT_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1456
|
+
[END_MACRO]
|
|
1457
|
+
|
|
1458
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_AT_MUT_CHECKED_U64.
|
|
1459
|
+
[MACRO] SLICE_TRY_SPLIT_AT_MUT_CHECKED %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1460
|
+
EXPAND SLICE_TRY_SPLIT_AT_MUT_CHECKED_U64 %out_ok, %out_left, %out_right, %slice_reg, %mid
|
|
1461
|
+
[END_MACRO]
|
|
1462
|
+
|
|
1463
|
+
[MACRO] SLICE_SPLIT_AT_UNCHECKED_U64 %out_left, %out_right, %slice_reg, %mid
|
|
1464
|
+
%out_left = alloc Slice_SIZE
|
|
1465
|
+
%out_right = alloc Slice_SIZE
|
|
1466
|
+
__slice_split_unchecked_len_%out_left = load %slice_reg+Slice_len as u64
|
|
1467
|
+
__slice_split_unchecked_src_%out_left = load %slice_reg+Slice_ptr as ptr
|
|
1468
|
+
__slice_split_unchecked_right_len_%out_left = sub __slice_split_unchecked_len_%out_left, %mid
|
|
1469
|
+
__slice_split_unchecked_mid_bytes_%out_left = mul %mid, 8
|
|
1470
|
+
__slice_split_unchecked_right_ptr_%out_left = ptr_add __slice_split_unchecked_src_%out_left, __slice_split_unchecked_mid_bytes_%out_left
|
|
1471
|
+
EXPAND SLICE_NEW %out_left, __slice_split_unchecked_src_%out_left, %mid
|
|
1472
|
+
EXPAND SLICE_NEW %out_right, __slice_split_unchecked_right_ptr_%out_left, __slice_split_unchecked_right_len_%out_left
|
|
1473
|
+
!__slice_split_unchecked_right_ptr_%out_left
|
|
1474
|
+
!__slice_split_unchecked_mid_bytes_%out_left
|
|
1475
|
+
!__slice_split_unchecked_right_len_%out_left
|
|
1476
|
+
!__slice_split_unchecked_src_%out_left
|
|
1477
|
+
!__slice_split_unchecked_len_%out_left
|
|
1478
|
+
[END_MACRO]
|
|
1479
|
+
|
|
1480
|
+
// Rust method-name alias over SLICE_SPLIT_AT_UNCHECKED_U64.
|
|
1481
|
+
[MACRO] SLICE_SPLIT_AT_UNCHECKED %out_left, %out_right, %slice_reg, %mid
|
|
1482
|
+
EXPAND SLICE_SPLIT_AT_UNCHECKED_U64 %out_left, %out_right, %slice_reg, %mid
|
|
1483
|
+
[END_MACRO]
|
|
1484
|
+
|
|
1485
|
+
[MACRO] SLICE_SPLIT_AT_MUT_UNCHECKED_U64 %out_left, %out_right, %slice_reg, %mid
|
|
1486
|
+
EXPAND SLICE_SPLIT_AT_UNCHECKED_U64 %out_left, %out_right, %slice_reg, %mid
|
|
1487
|
+
[END_MACRO]
|
|
1488
|
+
|
|
1489
|
+
// Rust method-name alias over SLICE_SPLIT_AT_MUT_UNCHECKED_U64.
|
|
1490
|
+
[MACRO] SLICE_SPLIT_AT_MUT_UNCHECKED %out_left, %out_right, %slice_reg, %mid
|
|
1491
|
+
EXPAND SLICE_SPLIT_AT_MUT_UNCHECKED_U64 %out_left, %out_right, %slice_reg, %mid
|
|
1492
|
+
[END_MACRO]
|
|
1493
|
+
|
|
1494
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST_CHUNK_U64 %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1495
|
+
EXPAND SLICE_TRY_SPLIT_AT_U64 %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1496
|
+
[END_MACRO]
|
|
1497
|
+
|
|
1498
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_FIRST_CHUNK_U64.
|
|
1499
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST_CHUNK %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1500
|
+
EXPAND SLICE_TRY_SPLIT_FIRST_CHUNK_U64 %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1501
|
+
[END_MACRO]
|
|
1502
|
+
|
|
1503
|
+
[MACRO] SLICE_TRY_FIRST_CHUNK_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1504
|
+
EXPAND SLICE_TRY_SPLIT_FIRST_CHUNK_U64 %out_ok, %out_chunk, __slice_first_chunk_rest_%out_ok, %slice_reg, %chunk_len
|
|
1505
|
+
!__slice_first_chunk_rest_%out_ok
|
|
1506
|
+
[END_MACRO]
|
|
1507
|
+
|
|
1508
|
+
// Rust method-name alias over SLICE_TRY_FIRST_CHUNK_U64.
|
|
1509
|
+
[MACRO] SLICE_TRY_FIRST_CHUNK %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1510
|
+
EXPAND SLICE_TRY_FIRST_CHUNK_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1511
|
+
[END_MACRO]
|
|
1512
|
+
|
|
1513
|
+
[MACRO] SLICE_TRY_FIRST_CHUNK_MUT_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1514
|
+
EXPAND SLICE_TRY_FIRST_CHUNK_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1515
|
+
[END_MACRO]
|
|
1516
|
+
|
|
1517
|
+
// Rust method-name alias over SLICE_TRY_FIRST_CHUNK_MUT_U64.
|
|
1518
|
+
[MACRO] SLICE_TRY_FIRST_CHUNK_MUT %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1519
|
+
EXPAND SLICE_TRY_FIRST_CHUNK_MUT_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1520
|
+
[END_MACRO]
|
|
1521
|
+
|
|
1522
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST_CHUNK_MUT_U64 %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1523
|
+
EXPAND SLICE_TRY_SPLIT_FIRST_CHUNK_U64 %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1524
|
+
[END_MACRO]
|
|
1525
|
+
|
|
1526
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_FIRST_CHUNK_MUT_U64.
|
|
1527
|
+
[MACRO] SLICE_TRY_SPLIT_FIRST_CHUNK_MUT %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1528
|
+
EXPAND SLICE_TRY_SPLIT_FIRST_CHUNK_MUT_U64 %out_ok, %out_chunk, %out_rest, %slice_reg, %chunk_len
|
|
1529
|
+
[END_MACRO]
|
|
1530
|
+
|
|
1531
|
+
[MACRO] SLICE_TRY_SPLIT_LAST_CHUNK_U64 %out_ok, %out_rest, %out_chunk, %slice_reg, %chunk_len
|
|
1532
|
+
%out_rest = alloc Slice_SIZE
|
|
1533
|
+
%out_chunk = alloc Slice_SIZE
|
|
1534
|
+
__slice_last_chunk_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1535
|
+
__slice_last_chunk_fits_%out_ok = ule %chunk_len, __slice_last_chunk_len_%out_ok
|
|
1536
|
+
br __slice_last_chunk_fits_%out_ok -> L_SLICE_SPLIT_LAST_CHUNK_HIT_%out_ok, L_SLICE_SPLIT_LAST_CHUNK_MISS_%out_ok
|
|
1537
|
+
|
|
1538
|
+
L_SLICE_SPLIT_LAST_CHUNK_HIT_%out_ok:
|
|
1539
|
+
__slice_last_chunk_mid_%out_ok = sub __slice_last_chunk_len_%out_ok, %chunk_len
|
|
1540
|
+
__slice_last_chunk_base_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1541
|
+
__slice_last_chunk_off_%out_ok = mul __slice_last_chunk_mid_%out_ok, 8
|
|
1542
|
+
__slice_last_chunk_ptr_%out_ok = ptr_add __slice_last_chunk_base_%out_ok, __slice_last_chunk_off_%out_ok
|
|
1543
|
+
EXPAND SLICE_NEW %out_rest, __slice_last_chunk_base_%out_ok, __slice_last_chunk_mid_%out_ok
|
|
1544
|
+
EXPAND SLICE_NEW %out_chunk, __slice_last_chunk_ptr_%out_ok, %chunk_len
|
|
1545
|
+
%out_ok = add 0, 1
|
|
1546
|
+
!__slice_last_chunk_ptr_%out_ok
|
|
1547
|
+
!__slice_last_chunk_off_%out_ok
|
|
1548
|
+
!__slice_last_chunk_base_%out_ok
|
|
1549
|
+
!__slice_last_chunk_mid_%out_ok
|
|
1550
|
+
!__slice_last_chunk_fits_%out_ok
|
|
1551
|
+
!__slice_last_chunk_len_%out_ok
|
|
1552
|
+
jmp L_SLICE_SPLIT_LAST_CHUNK_END_%out_ok
|
|
1553
|
+
|
|
1554
|
+
L_SLICE_SPLIT_LAST_CHUNK_MISS_%out_ok:
|
|
1555
|
+
__slice_last_chunk_empty_ptr_%out_ok = 0 as ptr
|
|
1556
|
+
EXPAND SLICE_NEW %out_rest, __slice_last_chunk_empty_ptr_%out_ok, 0
|
|
1557
|
+
EXPAND SLICE_NEW %out_chunk, __slice_last_chunk_empty_ptr_%out_ok, 0
|
|
1558
|
+
%out_ok = add 0, 0
|
|
1559
|
+
!__slice_last_chunk_empty_ptr_%out_ok
|
|
1560
|
+
!__slice_last_chunk_fits_%out_ok
|
|
1561
|
+
!__slice_last_chunk_len_%out_ok
|
|
1562
|
+
|
|
1563
|
+
L_SLICE_SPLIT_LAST_CHUNK_END_%out_ok:
|
|
1564
|
+
[END_MACRO]
|
|
1565
|
+
|
|
1566
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_LAST_CHUNK_U64.
|
|
1567
|
+
[MACRO] SLICE_TRY_SPLIT_LAST_CHUNK %out_ok, %out_rest, %out_chunk, %slice_reg, %chunk_len
|
|
1568
|
+
EXPAND SLICE_TRY_SPLIT_LAST_CHUNK_U64 %out_ok, %out_rest, %out_chunk, %slice_reg, %chunk_len
|
|
1569
|
+
[END_MACRO]
|
|
1570
|
+
|
|
1571
|
+
[MACRO] SLICE_TRY_SPLIT_LAST_CHUNK_MUT_U64 %out_ok, %out_rest, %out_chunk, %slice_reg, %chunk_len
|
|
1572
|
+
EXPAND SLICE_TRY_SPLIT_LAST_CHUNK_U64 %out_ok, %out_rest, %out_chunk, %slice_reg, %chunk_len
|
|
1573
|
+
[END_MACRO]
|
|
1574
|
+
|
|
1575
|
+
// Rust method-name alias over SLICE_TRY_SPLIT_LAST_CHUNK_MUT_U64.
|
|
1576
|
+
[MACRO] SLICE_TRY_SPLIT_LAST_CHUNK_MUT %out_ok, %out_rest, %out_chunk, %slice_reg, %chunk_len
|
|
1577
|
+
EXPAND SLICE_TRY_SPLIT_LAST_CHUNK_MUT_U64 %out_ok, %out_rest, %out_chunk, %slice_reg, %chunk_len
|
|
1578
|
+
[END_MACRO]
|
|
1579
|
+
|
|
1580
|
+
[MACRO] SLICE_TRY_LAST_CHUNK_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1581
|
+
EXPAND SLICE_TRY_SPLIT_LAST_CHUNK_U64 %out_ok, __slice_last_chunk_rest_%out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1582
|
+
!__slice_last_chunk_rest_%out_ok
|
|
1583
|
+
[END_MACRO]
|
|
1584
|
+
|
|
1585
|
+
// Rust method-name alias over SLICE_TRY_LAST_CHUNK_U64.
|
|
1586
|
+
[MACRO] SLICE_TRY_LAST_CHUNK %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1587
|
+
EXPAND SLICE_TRY_LAST_CHUNK_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1588
|
+
[END_MACRO]
|
|
1589
|
+
|
|
1590
|
+
[MACRO] SLICE_TRY_LAST_CHUNK_MUT_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1591
|
+
EXPAND SLICE_TRY_LAST_CHUNK_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1592
|
+
[END_MACRO]
|
|
1593
|
+
|
|
1594
|
+
// Rust method-name alias over SLICE_TRY_LAST_CHUNK_MUT_U64.
|
|
1595
|
+
[MACRO] SLICE_TRY_LAST_CHUNK_MUT %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1596
|
+
EXPAND SLICE_TRY_LAST_CHUNK_MUT_U64 %out_ok, %out_chunk, %slice_reg, %chunk_len
|
|
1597
|
+
[END_MACRO]
|
|
1598
|
+
|
|
1599
|
+
[MACRO] SLICE_TRY_RANGE_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1600
|
+
%out_slice = alloc Slice_SIZE
|
|
1601
|
+
__slice_range_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1602
|
+
__slice_range_start_ok_%out_ok = ule %start, __slice_range_len_%out_ok
|
|
1603
|
+
br __slice_range_start_ok_%out_ok -> L_SLICE_RANGE_LEN_CHECK_%out_ok, L_SLICE_RANGE_MISS_START_%out_ok
|
|
1604
|
+
|
|
1605
|
+
L_SLICE_RANGE_LEN_CHECK_%out_ok:
|
|
1606
|
+
__slice_range_remaining_%out_ok = sub __slice_range_len_%out_ok, %start
|
|
1607
|
+
__slice_range_len_ok_%out_ok = ule %length, __slice_range_remaining_%out_ok
|
|
1608
|
+
br __slice_range_len_ok_%out_ok -> L_SLICE_RANGE_HIT_%out_ok, L_SLICE_RANGE_MISS_LEN_%out_ok
|
|
1609
|
+
|
|
1610
|
+
L_SLICE_RANGE_HIT_%out_ok:
|
|
1611
|
+
__slice_range_src_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1612
|
+
__slice_range_start_bytes_%out_ok = mul %start, 8
|
|
1613
|
+
__slice_range_ptr_%out_ok = ptr_add __slice_range_src_ptr_%out_ok, __slice_range_start_bytes_%out_ok
|
|
1614
|
+
EXPAND SLICE_NEW %out_slice, __slice_range_ptr_%out_ok, %length
|
|
1615
|
+
%out_ok = add 0, 1
|
|
1616
|
+
!__slice_range_ptr_%out_ok
|
|
1617
|
+
!__slice_range_start_bytes_%out_ok
|
|
1618
|
+
!__slice_range_src_ptr_%out_ok
|
|
1619
|
+
!__slice_range_len_ok_%out_ok
|
|
1620
|
+
!__slice_range_remaining_%out_ok
|
|
1621
|
+
!__slice_range_start_ok_%out_ok
|
|
1622
|
+
!__slice_range_len_%out_ok
|
|
1623
|
+
jmp L_SLICE_RANGE_END_%out_ok
|
|
1624
|
+
|
|
1625
|
+
L_SLICE_RANGE_MISS_LEN_%out_ok:
|
|
1626
|
+
__slice_range_empty_ptr_len_%out_ok = 0 as ptr
|
|
1627
|
+
EXPAND SLICE_NEW %out_slice, __slice_range_empty_ptr_len_%out_ok, 0
|
|
1628
|
+
%out_ok = add 0, 0
|
|
1629
|
+
!__slice_range_empty_ptr_len_%out_ok
|
|
1630
|
+
!__slice_range_len_ok_%out_ok
|
|
1631
|
+
!__slice_range_remaining_%out_ok
|
|
1632
|
+
!__slice_range_start_ok_%out_ok
|
|
1633
|
+
!__slice_range_len_%out_ok
|
|
1634
|
+
jmp L_SLICE_RANGE_END_%out_ok
|
|
1635
|
+
|
|
1636
|
+
L_SLICE_RANGE_MISS_START_%out_ok:
|
|
1637
|
+
__slice_range_empty_ptr_start_%out_ok = 0 as ptr
|
|
1638
|
+
EXPAND SLICE_NEW %out_slice, __slice_range_empty_ptr_start_%out_ok, 0
|
|
1639
|
+
%out_ok = add 0, 0
|
|
1640
|
+
!__slice_range_empty_ptr_start_%out_ok
|
|
1641
|
+
!__slice_range_start_ok_%out_ok
|
|
1642
|
+
!__slice_range_len_%out_ok
|
|
1643
|
+
|
|
1644
|
+
L_SLICE_RANGE_END_%out_ok:
|
|
1645
|
+
[END_MACRO]
|
|
1646
|
+
|
|
1647
|
+
// Rust method-name alias over SLICE_TRY_RANGE_U64.
|
|
1648
|
+
[MACRO] SLICE_TRY_RANGE %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1649
|
+
EXPAND SLICE_TRY_RANGE_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1650
|
+
[END_MACRO]
|
|
1651
|
+
|
|
1652
|
+
[MACRO] SLICE_TRY_GET_RANGE_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1653
|
+
EXPAND SLICE_TRY_RANGE_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1654
|
+
[END_MACRO]
|
|
1655
|
+
|
|
1656
|
+
// Rust method-name alias over SLICE_TRY_GET_RANGE_U64.
|
|
1657
|
+
[MACRO] SLICE_TRY_GET_RANGE %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1658
|
+
EXPAND SLICE_TRY_GET_RANGE_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1659
|
+
[END_MACRO]
|
|
1660
|
+
|
|
1661
|
+
[MACRO] SLICE_TRY_GET_RANGE_MUT_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1662
|
+
EXPAND SLICE_TRY_RANGE_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1663
|
+
[END_MACRO]
|
|
1664
|
+
|
|
1665
|
+
// Rust method-name alias over SLICE_TRY_GET_RANGE_MUT_U64.
|
|
1666
|
+
[MACRO] SLICE_TRY_GET_RANGE_MUT %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1667
|
+
EXPAND SLICE_TRY_GET_RANGE_MUT_U64 %out_ok, %out_slice, %slice_reg, %start, %length
|
|
1668
|
+
[END_MACRO]
|
|
1669
|
+
|
|
1670
|
+
[MACRO] SLICE_RANGE_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1671
|
+
%out_slice = alloc Slice_SIZE
|
|
1672
|
+
__slice_range_unchecked_src_%out_slice = load %slice_reg+Slice_ptr as ptr
|
|
1673
|
+
__slice_range_unchecked_bytes_%out_slice = mul %start, 8
|
|
1674
|
+
__slice_range_unchecked_ptr_%out_slice = ptr_add __slice_range_unchecked_src_%out_slice, __slice_range_unchecked_bytes_%out_slice
|
|
1675
|
+
EXPAND SLICE_NEW %out_slice, __slice_range_unchecked_ptr_%out_slice, %length
|
|
1676
|
+
!__slice_range_unchecked_ptr_%out_slice
|
|
1677
|
+
!__slice_range_unchecked_bytes_%out_slice
|
|
1678
|
+
!__slice_range_unchecked_src_%out_slice
|
|
1679
|
+
[END_MACRO]
|
|
1680
|
+
|
|
1681
|
+
// Rust method-name alias over SLICE_RANGE_UNCHECKED_U64.
|
|
1682
|
+
[MACRO] SLICE_RANGE_UNCHECKED %out_slice, %slice_reg, %start, %length
|
|
1683
|
+
EXPAND SLICE_RANGE_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1684
|
+
[END_MACRO]
|
|
1685
|
+
|
|
1686
|
+
[MACRO] SLICE_GET_RANGE_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1687
|
+
EXPAND SLICE_RANGE_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1688
|
+
[END_MACRO]
|
|
1689
|
+
|
|
1690
|
+
// Rust method-name alias over SLICE_GET_RANGE_UNCHECKED_U64.
|
|
1691
|
+
[MACRO] SLICE_GET_RANGE_UNCHECKED %out_slice, %slice_reg, %start, %length
|
|
1692
|
+
EXPAND SLICE_GET_RANGE_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1693
|
+
[END_MACRO]
|
|
1694
|
+
|
|
1695
|
+
[MACRO] SLICE_GET_RANGE_MUT_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1696
|
+
EXPAND SLICE_RANGE_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1697
|
+
[END_MACRO]
|
|
1698
|
+
|
|
1699
|
+
// Rust method-name alias over SLICE_GET_RANGE_MUT_UNCHECKED_U64.
|
|
1700
|
+
[MACRO] SLICE_GET_RANGE_MUT_UNCHECKED %out_slice, %slice_reg, %start, %length
|
|
1701
|
+
EXPAND SLICE_GET_RANGE_MUT_UNCHECKED_U64 %out_slice, %slice_reg, %start, %length
|
|
1702
|
+
[END_MACRO]
|
|
1703
|
+
|
|
1704
|
+
[MACRO] SLICE_CHUNK_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
1705
|
+
__slice_chunk_len_%out_count = load %slice_reg+Slice_len as u64
|
|
1706
|
+
__slice_chunk_zero_%out_count = eq %chunk_size, 0
|
|
1707
|
+
br __slice_chunk_zero_%out_count -> L_SLICE_CHUNK_COUNT_ZERO_%out_count, L_SLICE_CHUNK_COUNT_CALC_%out_count
|
|
1708
|
+
|
|
1709
|
+
L_SLICE_CHUNK_COUNT_CALC_%out_count:
|
|
1710
|
+
__slice_chunk_adjusted_%out_count = add __slice_chunk_len_%out_count, %chunk_size
|
|
1711
|
+
__slice_chunk_adjusted2_%out_count = sub __slice_chunk_adjusted_%out_count, 1
|
|
1712
|
+
%out_count = udiv __slice_chunk_adjusted2_%out_count, %chunk_size
|
|
1713
|
+
!__slice_chunk_adjusted2_%out_count
|
|
1714
|
+
!__slice_chunk_adjusted_%out_count
|
|
1715
|
+
!__slice_chunk_zero_%out_count
|
|
1716
|
+
!__slice_chunk_len_%out_count
|
|
1717
|
+
jmp L_SLICE_CHUNK_COUNT_END_%out_count
|
|
1718
|
+
|
|
1719
|
+
L_SLICE_CHUNK_COUNT_ZERO_%out_count:
|
|
1720
|
+
%out_count = add 0, 0
|
|
1721
|
+
!__slice_chunk_zero_%out_count
|
|
1722
|
+
!__slice_chunk_len_%out_count
|
|
1723
|
+
|
|
1724
|
+
L_SLICE_CHUNK_COUNT_END_%out_count:
|
|
1725
|
+
[END_MACRO]
|
|
1726
|
+
|
|
1727
|
+
// Rust method-name alias over SLICE_CHUNK_COUNT_U64.
|
|
1728
|
+
[MACRO] SLICE_CHUNK_COUNT %out_count, %slice_reg, %chunk_size
|
|
1729
|
+
EXPAND SLICE_CHUNK_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
1730
|
+
[END_MACRO]
|
|
1731
|
+
|
|
1732
|
+
[MACRO] SLICE_TRY_CHUNK_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1733
|
+
%out_slice = alloc Slice_SIZE
|
|
1734
|
+
__slice_chunk_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1735
|
+
__slice_chunk_zero_%out_ok = eq %chunk_size, 0
|
|
1736
|
+
br __slice_chunk_zero_%out_ok -> L_SLICE_CHUNK_AT_MISS_ZERO_%out_ok, L_SLICE_CHUNK_AT_START_%out_ok
|
|
1737
|
+
|
|
1738
|
+
L_SLICE_CHUNK_AT_START_%out_ok:
|
|
1739
|
+
__slice_chunk_start_%out_ok = mul %chunk_index, %chunk_size
|
|
1740
|
+
__slice_chunk_in_bounds_%out_ok = ult __slice_chunk_start_%out_ok, __slice_chunk_len_%out_ok
|
|
1741
|
+
br __slice_chunk_in_bounds_%out_ok -> L_SLICE_CHUNK_AT_LEN_%out_ok, L_SLICE_CHUNK_AT_MISS_BOUNDS_%out_ok
|
|
1742
|
+
|
|
1743
|
+
L_SLICE_CHUNK_AT_LEN_%out_ok:
|
|
1744
|
+
__slice_chunk_remaining_%out_ok = sub __slice_chunk_len_%out_ok, __slice_chunk_start_%out_ok
|
|
1745
|
+
__slice_chunk_full_%out_ok = ule %chunk_size, __slice_chunk_remaining_%out_ok
|
|
1746
|
+
br __slice_chunk_full_%out_ok -> L_SLICE_CHUNK_AT_FULL_%out_ok, L_SLICE_CHUNK_AT_TAIL_%out_ok
|
|
1747
|
+
|
|
1748
|
+
L_SLICE_CHUNK_AT_FULL_%out_ok:
|
|
1749
|
+
__slice_chunk_src_ptr_full_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1750
|
+
__slice_chunk_start_bytes_full_%out_ok = mul __slice_chunk_start_%out_ok, 8
|
|
1751
|
+
__slice_chunk_ptr_full_%out_ok = ptr_add __slice_chunk_src_ptr_full_%out_ok, __slice_chunk_start_bytes_full_%out_ok
|
|
1752
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunk_ptr_full_%out_ok, %chunk_size
|
|
1753
|
+
%out_ok = add 0, 1
|
|
1754
|
+
!__slice_chunk_ptr_full_%out_ok
|
|
1755
|
+
!__slice_chunk_start_bytes_full_%out_ok
|
|
1756
|
+
!__slice_chunk_src_ptr_full_%out_ok
|
|
1757
|
+
!__slice_chunk_full_%out_ok
|
|
1758
|
+
!__slice_chunk_remaining_%out_ok
|
|
1759
|
+
!__slice_chunk_in_bounds_%out_ok
|
|
1760
|
+
!__slice_chunk_start_%out_ok
|
|
1761
|
+
!__slice_chunk_zero_%out_ok
|
|
1762
|
+
!__slice_chunk_len_%out_ok
|
|
1763
|
+
jmp L_SLICE_CHUNK_AT_END_%out_ok
|
|
1764
|
+
|
|
1765
|
+
L_SLICE_CHUNK_AT_TAIL_%out_ok:
|
|
1766
|
+
__slice_chunk_src_ptr_tail_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1767
|
+
__slice_chunk_start_bytes_tail_%out_ok = mul __slice_chunk_start_%out_ok, 8
|
|
1768
|
+
__slice_chunk_ptr_tail_%out_ok = ptr_add __slice_chunk_src_ptr_tail_%out_ok, __slice_chunk_start_bytes_tail_%out_ok
|
|
1769
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunk_ptr_tail_%out_ok, __slice_chunk_remaining_%out_ok
|
|
1770
|
+
%out_ok = add 0, 1
|
|
1771
|
+
!__slice_chunk_ptr_tail_%out_ok
|
|
1772
|
+
!__slice_chunk_start_bytes_tail_%out_ok
|
|
1773
|
+
!__slice_chunk_src_ptr_tail_%out_ok
|
|
1774
|
+
!__slice_chunk_full_%out_ok
|
|
1775
|
+
!__slice_chunk_remaining_%out_ok
|
|
1776
|
+
!__slice_chunk_in_bounds_%out_ok
|
|
1777
|
+
!__slice_chunk_start_%out_ok
|
|
1778
|
+
!__slice_chunk_zero_%out_ok
|
|
1779
|
+
!__slice_chunk_len_%out_ok
|
|
1780
|
+
jmp L_SLICE_CHUNK_AT_END_%out_ok
|
|
1781
|
+
|
|
1782
|
+
L_SLICE_CHUNK_AT_MISS_BOUNDS_%out_ok:
|
|
1783
|
+
__slice_chunk_empty_ptr_bounds_%out_ok = 0 as ptr
|
|
1784
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunk_empty_ptr_bounds_%out_ok, 0
|
|
1785
|
+
%out_ok = add 0, 0
|
|
1786
|
+
!__slice_chunk_empty_ptr_bounds_%out_ok
|
|
1787
|
+
!__slice_chunk_in_bounds_%out_ok
|
|
1788
|
+
!__slice_chunk_start_%out_ok
|
|
1789
|
+
!__slice_chunk_zero_%out_ok
|
|
1790
|
+
!__slice_chunk_len_%out_ok
|
|
1791
|
+
jmp L_SLICE_CHUNK_AT_END_%out_ok
|
|
1792
|
+
|
|
1793
|
+
L_SLICE_CHUNK_AT_MISS_ZERO_%out_ok:
|
|
1794
|
+
__slice_chunk_empty_ptr_zero_%out_ok = 0 as ptr
|
|
1795
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunk_empty_ptr_zero_%out_ok, 0
|
|
1796
|
+
%out_ok = add 0, 0
|
|
1797
|
+
!__slice_chunk_empty_ptr_zero_%out_ok
|
|
1798
|
+
!__slice_chunk_zero_%out_ok
|
|
1799
|
+
!__slice_chunk_len_%out_ok
|
|
1800
|
+
|
|
1801
|
+
L_SLICE_CHUNK_AT_END_%out_ok:
|
|
1802
|
+
[END_MACRO]
|
|
1803
|
+
|
|
1804
|
+
// Rust method-name alias over SLICE_TRY_CHUNK_AT_U64.
|
|
1805
|
+
[MACRO] SLICE_TRY_CHUNK_AT %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1806
|
+
EXPAND SLICE_TRY_CHUNK_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1807
|
+
[END_MACRO]
|
|
1808
|
+
|
|
1809
|
+
[MACRO] SLICE_RCHUNK_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
1810
|
+
EXPAND SLICE_CHUNK_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
1811
|
+
[END_MACRO]
|
|
1812
|
+
|
|
1813
|
+
// Rust method-name alias over SLICE_RCHUNK_COUNT_U64.
|
|
1814
|
+
[MACRO] SLICE_RCHUNK_COUNT %out_count, %slice_reg, %chunk_size
|
|
1815
|
+
EXPAND SLICE_RCHUNK_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
1816
|
+
[END_MACRO]
|
|
1817
|
+
|
|
1818
|
+
[MACRO] SLICE_TRY_RCHUNK_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1819
|
+
%out_slice = alloc Slice_SIZE
|
|
1820
|
+
__slice_rchunk_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1821
|
+
__slice_rchunk_zero_%out_ok = eq %chunk_size, 0
|
|
1822
|
+
br __slice_rchunk_zero_%out_ok -> L_SLICE_RCHUNK_AT_MISS_ZERO_%out_ok, L_SLICE_RCHUNK_AT_COUNT_%out_ok
|
|
1823
|
+
|
|
1824
|
+
L_SLICE_RCHUNK_AT_COUNT_%out_ok:
|
|
1825
|
+
__slice_rchunk_adjusted_%out_ok = add __slice_rchunk_len_%out_ok, %chunk_size
|
|
1826
|
+
__slice_rchunk_adjusted2_%out_ok = sub __slice_rchunk_adjusted_%out_ok, 1
|
|
1827
|
+
__slice_rchunk_count_%out_ok = udiv __slice_rchunk_adjusted2_%out_ok, %chunk_size
|
|
1828
|
+
__slice_rchunk_in_bounds_%out_ok = ult %chunk_index, __slice_rchunk_count_%out_ok
|
|
1829
|
+
br __slice_rchunk_in_bounds_%out_ok -> L_SLICE_RCHUNK_AT_LEN_%out_ok, L_SLICE_RCHUNK_AT_MISS_BOUNDS_%out_ok
|
|
1830
|
+
|
|
1831
|
+
L_SLICE_RCHUNK_AT_LEN_%out_ok:
|
|
1832
|
+
__slice_rchunk_from_end_%out_ok = add %chunk_index, 1
|
|
1833
|
+
__slice_rchunk_tail_len_%out_ok = mul __slice_rchunk_from_end_%out_ok, %chunk_size
|
|
1834
|
+
__slice_rchunk_full_%out_ok = ule __slice_rchunk_tail_len_%out_ok, __slice_rchunk_len_%out_ok
|
|
1835
|
+
br __slice_rchunk_full_%out_ok -> L_SLICE_RCHUNK_AT_FULL_%out_ok, L_SLICE_RCHUNK_AT_PREFIX_%out_ok
|
|
1836
|
+
|
|
1837
|
+
L_SLICE_RCHUNK_AT_FULL_%out_ok:
|
|
1838
|
+
__slice_rchunk_start_full_%out_ok = sub __slice_rchunk_len_%out_ok, __slice_rchunk_tail_len_%out_ok
|
|
1839
|
+
__slice_rchunk_start_bytes_full_%out_ok = mul __slice_rchunk_start_full_%out_ok, 8
|
|
1840
|
+
__slice_rchunk_base_full_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1841
|
+
__slice_rchunk_ptr_full_%out_ok = ptr_add __slice_rchunk_base_full_%out_ok, __slice_rchunk_start_bytes_full_%out_ok
|
|
1842
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunk_ptr_full_%out_ok, %chunk_size
|
|
1843
|
+
%out_ok = add 0, 1
|
|
1844
|
+
!__slice_rchunk_ptr_full_%out_ok
|
|
1845
|
+
!__slice_rchunk_base_full_%out_ok
|
|
1846
|
+
!__slice_rchunk_start_bytes_full_%out_ok
|
|
1847
|
+
!__slice_rchunk_start_full_%out_ok
|
|
1848
|
+
!__slice_rchunk_full_%out_ok
|
|
1849
|
+
!__slice_rchunk_tail_len_%out_ok
|
|
1850
|
+
!__slice_rchunk_from_end_%out_ok
|
|
1851
|
+
!__slice_rchunk_in_bounds_%out_ok
|
|
1852
|
+
!__slice_rchunk_count_%out_ok
|
|
1853
|
+
!__slice_rchunk_adjusted2_%out_ok
|
|
1854
|
+
!__slice_rchunk_adjusted_%out_ok
|
|
1855
|
+
!__slice_rchunk_zero_%out_ok
|
|
1856
|
+
!__slice_rchunk_len_%out_ok
|
|
1857
|
+
jmp L_SLICE_RCHUNK_AT_END_%out_ok
|
|
1858
|
+
|
|
1859
|
+
L_SLICE_RCHUNK_AT_PREFIX_%out_ok:
|
|
1860
|
+
__slice_rchunk_prior_tail_%out_ok = mul %chunk_index, %chunk_size
|
|
1861
|
+
__slice_rchunk_prefix_len_%out_ok = sub __slice_rchunk_len_%out_ok, __slice_rchunk_prior_tail_%out_ok
|
|
1862
|
+
__slice_rchunk_base_prefix_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1863
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunk_base_prefix_%out_ok, __slice_rchunk_prefix_len_%out_ok
|
|
1864
|
+
%out_ok = add 0, 1
|
|
1865
|
+
!__slice_rchunk_base_prefix_%out_ok
|
|
1866
|
+
!__slice_rchunk_prefix_len_%out_ok
|
|
1867
|
+
!__slice_rchunk_prior_tail_%out_ok
|
|
1868
|
+
!__slice_rchunk_full_%out_ok
|
|
1869
|
+
!__slice_rchunk_tail_len_%out_ok
|
|
1870
|
+
!__slice_rchunk_from_end_%out_ok
|
|
1871
|
+
!__slice_rchunk_in_bounds_%out_ok
|
|
1872
|
+
!__slice_rchunk_count_%out_ok
|
|
1873
|
+
!__slice_rchunk_adjusted2_%out_ok
|
|
1874
|
+
!__slice_rchunk_adjusted_%out_ok
|
|
1875
|
+
!__slice_rchunk_zero_%out_ok
|
|
1876
|
+
!__slice_rchunk_len_%out_ok
|
|
1877
|
+
jmp L_SLICE_RCHUNK_AT_END_%out_ok
|
|
1878
|
+
|
|
1879
|
+
L_SLICE_RCHUNK_AT_MISS_BOUNDS_%out_ok:
|
|
1880
|
+
__slice_rchunk_empty_ptr_bounds_%out_ok = 0 as ptr
|
|
1881
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunk_empty_ptr_bounds_%out_ok, 0
|
|
1882
|
+
%out_ok = add 0, 0
|
|
1883
|
+
!__slice_rchunk_empty_ptr_bounds_%out_ok
|
|
1884
|
+
!__slice_rchunk_in_bounds_%out_ok
|
|
1885
|
+
!__slice_rchunk_count_%out_ok
|
|
1886
|
+
!__slice_rchunk_adjusted2_%out_ok
|
|
1887
|
+
!__slice_rchunk_adjusted_%out_ok
|
|
1888
|
+
!__slice_rchunk_zero_%out_ok
|
|
1889
|
+
!__slice_rchunk_len_%out_ok
|
|
1890
|
+
jmp L_SLICE_RCHUNK_AT_END_%out_ok
|
|
1891
|
+
|
|
1892
|
+
L_SLICE_RCHUNK_AT_MISS_ZERO_%out_ok:
|
|
1893
|
+
__slice_rchunk_empty_ptr_zero_%out_ok = 0 as ptr
|
|
1894
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunk_empty_ptr_zero_%out_ok, 0
|
|
1895
|
+
%out_ok = add 0, 0
|
|
1896
|
+
!__slice_rchunk_empty_ptr_zero_%out_ok
|
|
1897
|
+
!__slice_rchunk_zero_%out_ok
|
|
1898
|
+
!__slice_rchunk_len_%out_ok
|
|
1899
|
+
|
|
1900
|
+
L_SLICE_RCHUNK_AT_END_%out_ok:
|
|
1901
|
+
[END_MACRO]
|
|
1902
|
+
|
|
1903
|
+
// Rust method-name alias over SLICE_TRY_RCHUNK_AT_U64.
|
|
1904
|
+
[MACRO] SLICE_TRY_RCHUNK_AT %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1905
|
+
EXPAND SLICE_TRY_RCHUNK_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1906
|
+
[END_MACRO]
|
|
1907
|
+
|
|
1908
|
+
[MACRO] SLICE_TRY_RCHUNK_MUT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1909
|
+
EXPAND SLICE_TRY_RCHUNK_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1910
|
+
[END_MACRO]
|
|
1911
|
+
|
|
1912
|
+
// Rust method-name alias over SLICE_TRY_RCHUNK_MUT_AT_U64.
|
|
1913
|
+
[MACRO] SLICE_TRY_RCHUNK_MUT_AT %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1914
|
+
EXPAND SLICE_TRY_RCHUNK_MUT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1915
|
+
[END_MACRO]
|
|
1916
|
+
|
|
1917
|
+
[MACRO] SLICE_CHUNKS_EXACT_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
1918
|
+
__slice_chunks_exact_len_%out_count = load %slice_reg+Slice_len as u64
|
|
1919
|
+
__slice_chunks_exact_zero_%out_count = eq %chunk_size, 0
|
|
1920
|
+
br __slice_chunks_exact_zero_%out_count -> L_SLICE_CHUNKS_EXACT_COUNT_ZERO_%out_count, L_SLICE_CHUNKS_EXACT_COUNT_CALC_%out_count
|
|
1921
|
+
|
|
1922
|
+
L_SLICE_CHUNKS_EXACT_COUNT_CALC_%out_count:
|
|
1923
|
+
%out_count = udiv __slice_chunks_exact_len_%out_count, %chunk_size
|
|
1924
|
+
!__slice_chunks_exact_zero_%out_count
|
|
1925
|
+
!__slice_chunks_exact_len_%out_count
|
|
1926
|
+
jmp L_SLICE_CHUNKS_EXACT_COUNT_END_%out_count
|
|
1927
|
+
|
|
1928
|
+
L_SLICE_CHUNKS_EXACT_COUNT_ZERO_%out_count:
|
|
1929
|
+
%out_count = add 0, 0
|
|
1930
|
+
!__slice_chunks_exact_zero_%out_count
|
|
1931
|
+
!__slice_chunks_exact_len_%out_count
|
|
1932
|
+
|
|
1933
|
+
L_SLICE_CHUNKS_EXACT_COUNT_END_%out_count:
|
|
1934
|
+
[END_MACRO]
|
|
1935
|
+
|
|
1936
|
+
// Rust method-name alias over SLICE_CHUNKS_EXACT_COUNT_U64.
|
|
1937
|
+
[MACRO] SLICE_CHUNKS_EXACT_COUNT %out_count, %slice_reg, %chunk_size
|
|
1938
|
+
EXPAND SLICE_CHUNKS_EXACT_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
1939
|
+
[END_MACRO]
|
|
1940
|
+
|
|
1941
|
+
[MACRO] SLICE_CHUNKS_EXACT_REMAINDER_U64 %out_slice, %slice_reg, %chunk_size
|
|
1942
|
+
%out_slice = alloc Slice_SIZE
|
|
1943
|
+
__slice_chunks_exact_rem_len_%out_slice = load %slice_reg+Slice_len as u64
|
|
1944
|
+
__slice_chunks_exact_rem_zero_%out_slice = eq %chunk_size, 0
|
|
1945
|
+
br __slice_chunks_exact_rem_zero_%out_slice -> L_SLICE_CHUNKS_EXACT_REMAINDER_ZERO_%out_slice, L_SLICE_CHUNKS_EXACT_REMAINDER_CALC_%out_slice
|
|
1946
|
+
|
|
1947
|
+
L_SLICE_CHUNKS_EXACT_REMAINDER_CALC_%out_slice:
|
|
1948
|
+
__slice_chunks_exact_rem_count_%out_slice = udiv __slice_chunks_exact_rem_len_%out_slice, %chunk_size
|
|
1949
|
+
__slice_chunks_exact_rem_prefix_len_%out_slice = mul __slice_chunks_exact_rem_count_%out_slice, %chunk_size
|
|
1950
|
+
__slice_chunks_exact_rem_tail_len_%out_slice = sub __slice_chunks_exact_rem_len_%out_slice, __slice_chunks_exact_rem_prefix_len_%out_slice
|
|
1951
|
+
__slice_chunks_exact_rem_base_%out_slice = load %slice_reg+Slice_ptr as ptr
|
|
1952
|
+
__slice_chunks_exact_rem_prefix_bytes_%out_slice = mul __slice_chunks_exact_rem_prefix_len_%out_slice, 8
|
|
1953
|
+
__slice_chunks_exact_rem_ptr_%out_slice = ptr_add __slice_chunks_exact_rem_base_%out_slice, __slice_chunks_exact_rem_prefix_bytes_%out_slice
|
|
1954
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunks_exact_rem_ptr_%out_slice, __slice_chunks_exact_rem_tail_len_%out_slice
|
|
1955
|
+
!__slice_chunks_exact_rem_ptr_%out_slice
|
|
1956
|
+
!__slice_chunks_exact_rem_prefix_bytes_%out_slice
|
|
1957
|
+
!__slice_chunks_exact_rem_base_%out_slice
|
|
1958
|
+
!__slice_chunks_exact_rem_tail_len_%out_slice
|
|
1959
|
+
!__slice_chunks_exact_rem_prefix_len_%out_slice
|
|
1960
|
+
!__slice_chunks_exact_rem_count_%out_slice
|
|
1961
|
+
!__slice_chunks_exact_rem_zero_%out_slice
|
|
1962
|
+
!__slice_chunks_exact_rem_len_%out_slice
|
|
1963
|
+
jmp L_SLICE_CHUNKS_EXACT_REMAINDER_END_%out_slice
|
|
1964
|
+
|
|
1965
|
+
L_SLICE_CHUNKS_EXACT_REMAINDER_ZERO_%out_slice:
|
|
1966
|
+
__slice_chunks_exact_rem_empty_ptr_%out_slice = 0 as ptr
|
|
1967
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunks_exact_rem_empty_ptr_%out_slice, 0
|
|
1968
|
+
!__slice_chunks_exact_rem_empty_ptr_%out_slice
|
|
1969
|
+
!__slice_chunks_exact_rem_zero_%out_slice
|
|
1970
|
+
!__slice_chunks_exact_rem_len_%out_slice
|
|
1971
|
+
|
|
1972
|
+
L_SLICE_CHUNKS_EXACT_REMAINDER_END_%out_slice:
|
|
1973
|
+
[END_MACRO]
|
|
1974
|
+
|
|
1975
|
+
// Rust method-name alias over SLICE_CHUNKS_EXACT_REMAINDER_U64.
|
|
1976
|
+
[MACRO] SLICE_CHUNKS_EXACT_REMAINDER %out_slice, %slice_reg, %chunk_size
|
|
1977
|
+
EXPAND SLICE_CHUNKS_EXACT_REMAINDER_U64 %out_slice, %slice_reg, %chunk_size
|
|
1978
|
+
[END_MACRO]
|
|
1979
|
+
|
|
1980
|
+
[MACRO] SLICE_TRY_CHUNK_EXACT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
1981
|
+
%out_slice = alloc Slice_SIZE
|
|
1982
|
+
__slice_chunk_exact_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
1983
|
+
__slice_chunk_exact_zero_%out_ok = eq %chunk_size, 0
|
|
1984
|
+
br __slice_chunk_exact_zero_%out_ok -> L_SLICE_CHUNK_EXACT_AT_MISS_ZERO_%out_ok, L_SLICE_CHUNK_EXACT_AT_COUNT_%out_ok
|
|
1985
|
+
|
|
1986
|
+
L_SLICE_CHUNK_EXACT_AT_COUNT_%out_ok:
|
|
1987
|
+
__slice_chunk_exact_count_%out_ok = udiv __slice_chunk_exact_len_%out_ok, %chunk_size
|
|
1988
|
+
__slice_chunk_exact_in_bounds_%out_ok = ult %chunk_index, __slice_chunk_exact_count_%out_ok
|
|
1989
|
+
br __slice_chunk_exact_in_bounds_%out_ok -> L_SLICE_CHUNK_EXACT_AT_HIT_%out_ok, L_SLICE_CHUNK_EXACT_AT_MISS_BOUNDS_%out_ok
|
|
1990
|
+
|
|
1991
|
+
L_SLICE_CHUNK_EXACT_AT_HIT_%out_ok:
|
|
1992
|
+
__slice_chunk_exact_start_%out_ok = mul %chunk_index, %chunk_size
|
|
1993
|
+
__slice_chunk_exact_start_bytes_%out_ok = mul __slice_chunk_exact_start_%out_ok, 8
|
|
1994
|
+
__slice_chunk_exact_base_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
1995
|
+
__slice_chunk_exact_ptr_%out_ok = ptr_add __slice_chunk_exact_base_%out_ok, __slice_chunk_exact_start_bytes_%out_ok
|
|
1996
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunk_exact_ptr_%out_ok, %chunk_size
|
|
1997
|
+
%out_ok = add 0, 1
|
|
1998
|
+
!__slice_chunk_exact_ptr_%out_ok
|
|
1999
|
+
!__slice_chunk_exact_base_%out_ok
|
|
2000
|
+
!__slice_chunk_exact_start_bytes_%out_ok
|
|
2001
|
+
!__slice_chunk_exact_start_%out_ok
|
|
2002
|
+
!__slice_chunk_exact_in_bounds_%out_ok
|
|
2003
|
+
!__slice_chunk_exact_count_%out_ok
|
|
2004
|
+
!__slice_chunk_exact_zero_%out_ok
|
|
2005
|
+
!__slice_chunk_exact_len_%out_ok
|
|
2006
|
+
jmp L_SLICE_CHUNK_EXACT_AT_END_%out_ok
|
|
2007
|
+
|
|
2008
|
+
L_SLICE_CHUNK_EXACT_AT_MISS_BOUNDS_%out_ok:
|
|
2009
|
+
__slice_chunk_exact_empty_ptr_bounds_%out_ok = 0 as ptr
|
|
2010
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunk_exact_empty_ptr_bounds_%out_ok, 0
|
|
2011
|
+
%out_ok = add 0, 0
|
|
2012
|
+
!__slice_chunk_exact_empty_ptr_bounds_%out_ok
|
|
2013
|
+
!__slice_chunk_exact_in_bounds_%out_ok
|
|
2014
|
+
!__slice_chunk_exact_count_%out_ok
|
|
2015
|
+
!__slice_chunk_exact_zero_%out_ok
|
|
2016
|
+
!__slice_chunk_exact_len_%out_ok
|
|
2017
|
+
jmp L_SLICE_CHUNK_EXACT_AT_END_%out_ok
|
|
2018
|
+
|
|
2019
|
+
L_SLICE_CHUNK_EXACT_AT_MISS_ZERO_%out_ok:
|
|
2020
|
+
__slice_chunk_exact_empty_ptr_zero_%out_ok = 0 as ptr
|
|
2021
|
+
EXPAND SLICE_NEW %out_slice, __slice_chunk_exact_empty_ptr_zero_%out_ok, 0
|
|
2022
|
+
%out_ok = add 0, 0
|
|
2023
|
+
!__slice_chunk_exact_empty_ptr_zero_%out_ok
|
|
2024
|
+
!__slice_chunk_exact_zero_%out_ok
|
|
2025
|
+
!__slice_chunk_exact_len_%out_ok
|
|
2026
|
+
|
|
2027
|
+
L_SLICE_CHUNK_EXACT_AT_END_%out_ok:
|
|
2028
|
+
[END_MACRO]
|
|
2029
|
+
|
|
2030
|
+
// Rust method-name alias over SLICE_TRY_CHUNK_EXACT_AT_U64.
|
|
2031
|
+
[MACRO] SLICE_TRY_CHUNK_EXACT_AT %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2032
|
+
EXPAND SLICE_TRY_CHUNK_EXACT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2033
|
+
[END_MACRO]
|
|
2034
|
+
|
|
2035
|
+
[MACRO] SLICE_TRY_CHUNK_EXACT_MUT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2036
|
+
EXPAND SLICE_TRY_CHUNK_EXACT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2037
|
+
[END_MACRO]
|
|
2038
|
+
|
|
2039
|
+
// Rust method-name alias over SLICE_TRY_CHUNK_EXACT_MUT_AT_U64.
|
|
2040
|
+
[MACRO] SLICE_TRY_CHUNK_EXACT_MUT_AT %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2041
|
+
EXPAND SLICE_TRY_CHUNK_EXACT_MUT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2042
|
+
[END_MACRO]
|
|
2043
|
+
|
|
2044
|
+
[MACRO] SLICE_RCHUNKS_EXACT_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
2045
|
+
EXPAND SLICE_CHUNKS_EXACT_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
2046
|
+
[END_MACRO]
|
|
2047
|
+
|
|
2048
|
+
// Rust method-name alias over SLICE_RCHUNKS_EXACT_COUNT_U64.
|
|
2049
|
+
[MACRO] SLICE_RCHUNKS_EXACT_COUNT %out_count, %slice_reg, %chunk_size
|
|
2050
|
+
EXPAND SLICE_RCHUNKS_EXACT_COUNT_U64 %out_count, %slice_reg, %chunk_size
|
|
2051
|
+
[END_MACRO]
|
|
2052
|
+
|
|
2053
|
+
[MACRO] SLICE_RCHUNKS_EXACT_REMAINDER_U64 %out_slice, %slice_reg, %chunk_size
|
|
2054
|
+
%out_slice = alloc Slice_SIZE
|
|
2055
|
+
__slice_rchunks_exact_rem_len_%out_slice = load %slice_reg+Slice_len as u64
|
|
2056
|
+
__slice_rchunks_exact_rem_zero_%out_slice = eq %chunk_size, 0
|
|
2057
|
+
br __slice_rchunks_exact_rem_zero_%out_slice -> L_SLICE_RCHUNKS_EXACT_REMAINDER_ZERO_%out_slice, L_SLICE_RCHUNKS_EXACT_REMAINDER_CALC_%out_slice
|
|
2058
|
+
|
|
2059
|
+
L_SLICE_RCHUNKS_EXACT_REMAINDER_CALC_%out_slice:
|
|
2060
|
+
__slice_rchunks_exact_rem_count_%out_slice = udiv __slice_rchunks_exact_rem_len_%out_slice, %chunk_size
|
|
2061
|
+
__slice_rchunks_exact_rem_chunked_len_%out_slice = mul __slice_rchunks_exact_rem_count_%out_slice, %chunk_size
|
|
2062
|
+
__slice_rchunks_exact_rem_prefix_len_%out_slice = sub __slice_rchunks_exact_rem_len_%out_slice, __slice_rchunks_exact_rem_chunked_len_%out_slice
|
|
2063
|
+
__slice_rchunks_exact_rem_base_%out_slice = load %slice_reg+Slice_ptr as ptr
|
|
2064
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunks_exact_rem_base_%out_slice, __slice_rchunks_exact_rem_prefix_len_%out_slice
|
|
2065
|
+
!__slice_rchunks_exact_rem_base_%out_slice
|
|
2066
|
+
!__slice_rchunks_exact_rem_prefix_len_%out_slice
|
|
2067
|
+
!__slice_rchunks_exact_rem_chunked_len_%out_slice
|
|
2068
|
+
!__slice_rchunks_exact_rem_count_%out_slice
|
|
2069
|
+
!__slice_rchunks_exact_rem_zero_%out_slice
|
|
2070
|
+
!__slice_rchunks_exact_rem_len_%out_slice
|
|
2071
|
+
jmp L_SLICE_RCHUNKS_EXACT_REMAINDER_END_%out_slice
|
|
2072
|
+
|
|
2073
|
+
L_SLICE_RCHUNKS_EXACT_REMAINDER_ZERO_%out_slice:
|
|
2074
|
+
__slice_rchunks_exact_rem_empty_ptr_%out_slice = 0 as ptr
|
|
2075
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunks_exact_rem_empty_ptr_%out_slice, 0
|
|
2076
|
+
!__slice_rchunks_exact_rem_empty_ptr_%out_slice
|
|
2077
|
+
!__slice_rchunks_exact_rem_zero_%out_slice
|
|
2078
|
+
!__slice_rchunks_exact_rem_len_%out_slice
|
|
2079
|
+
|
|
2080
|
+
L_SLICE_RCHUNKS_EXACT_REMAINDER_END_%out_slice:
|
|
2081
|
+
[END_MACRO]
|
|
2082
|
+
|
|
2083
|
+
// Rust method-name alias over SLICE_RCHUNKS_EXACT_REMAINDER_U64.
|
|
2084
|
+
[MACRO] SLICE_RCHUNKS_EXACT_REMAINDER %out_slice, %slice_reg, %chunk_size
|
|
2085
|
+
EXPAND SLICE_RCHUNKS_EXACT_REMAINDER_U64 %out_slice, %slice_reg, %chunk_size
|
|
2086
|
+
[END_MACRO]
|
|
2087
|
+
|
|
2088
|
+
[MACRO] SLICE_TRY_RCHUNK_EXACT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2089
|
+
%out_slice = alloc Slice_SIZE
|
|
2090
|
+
__slice_rchunk_exact_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
2091
|
+
__slice_rchunk_exact_zero_%out_ok = eq %chunk_size, 0
|
|
2092
|
+
br __slice_rchunk_exact_zero_%out_ok -> L_SLICE_RCHUNK_EXACT_AT_MISS_ZERO_%out_ok, L_SLICE_RCHUNK_EXACT_AT_COUNT_%out_ok
|
|
2093
|
+
|
|
2094
|
+
L_SLICE_RCHUNK_EXACT_AT_COUNT_%out_ok:
|
|
2095
|
+
__slice_rchunk_exact_count_%out_ok = udiv __slice_rchunk_exact_len_%out_ok, %chunk_size
|
|
2096
|
+
__slice_rchunk_exact_in_bounds_%out_ok = ult %chunk_index, __slice_rchunk_exact_count_%out_ok
|
|
2097
|
+
br __slice_rchunk_exact_in_bounds_%out_ok -> L_SLICE_RCHUNK_EXACT_AT_HIT_%out_ok, L_SLICE_RCHUNK_EXACT_AT_MISS_BOUNDS_%out_ok
|
|
2098
|
+
|
|
2099
|
+
L_SLICE_RCHUNK_EXACT_AT_HIT_%out_ok:
|
|
2100
|
+
__slice_rchunk_exact_from_end_%out_ok = add %chunk_index, 1
|
|
2101
|
+
__slice_rchunk_exact_tail_len_%out_ok = mul __slice_rchunk_exact_from_end_%out_ok, %chunk_size
|
|
2102
|
+
__slice_rchunk_exact_start_%out_ok = sub __slice_rchunk_exact_len_%out_ok, __slice_rchunk_exact_tail_len_%out_ok
|
|
2103
|
+
__slice_rchunk_exact_start_bytes_%out_ok = mul __slice_rchunk_exact_start_%out_ok, 8
|
|
2104
|
+
__slice_rchunk_exact_base_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
2105
|
+
__slice_rchunk_exact_ptr_%out_ok = ptr_add __slice_rchunk_exact_base_%out_ok, __slice_rchunk_exact_start_bytes_%out_ok
|
|
2106
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunk_exact_ptr_%out_ok, %chunk_size
|
|
2107
|
+
%out_ok = add 0, 1
|
|
2108
|
+
!__slice_rchunk_exact_ptr_%out_ok
|
|
2109
|
+
!__slice_rchunk_exact_base_%out_ok
|
|
2110
|
+
!__slice_rchunk_exact_start_bytes_%out_ok
|
|
2111
|
+
!__slice_rchunk_exact_start_%out_ok
|
|
2112
|
+
!__slice_rchunk_exact_tail_len_%out_ok
|
|
2113
|
+
!__slice_rchunk_exact_from_end_%out_ok
|
|
2114
|
+
!__slice_rchunk_exact_in_bounds_%out_ok
|
|
2115
|
+
!__slice_rchunk_exact_count_%out_ok
|
|
2116
|
+
!__slice_rchunk_exact_zero_%out_ok
|
|
2117
|
+
!__slice_rchunk_exact_len_%out_ok
|
|
2118
|
+
jmp L_SLICE_RCHUNK_EXACT_AT_END_%out_ok
|
|
2119
|
+
|
|
2120
|
+
L_SLICE_RCHUNK_EXACT_AT_MISS_BOUNDS_%out_ok:
|
|
2121
|
+
__slice_rchunk_exact_empty_ptr_bounds_%out_ok = 0 as ptr
|
|
2122
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunk_exact_empty_ptr_bounds_%out_ok, 0
|
|
2123
|
+
%out_ok = add 0, 0
|
|
2124
|
+
!__slice_rchunk_exact_empty_ptr_bounds_%out_ok
|
|
2125
|
+
!__slice_rchunk_exact_in_bounds_%out_ok
|
|
2126
|
+
!__slice_rchunk_exact_count_%out_ok
|
|
2127
|
+
!__slice_rchunk_exact_zero_%out_ok
|
|
2128
|
+
!__slice_rchunk_exact_len_%out_ok
|
|
2129
|
+
jmp L_SLICE_RCHUNK_EXACT_AT_END_%out_ok
|
|
2130
|
+
|
|
2131
|
+
L_SLICE_RCHUNK_EXACT_AT_MISS_ZERO_%out_ok:
|
|
2132
|
+
__slice_rchunk_exact_empty_ptr_zero_%out_ok = 0 as ptr
|
|
2133
|
+
EXPAND SLICE_NEW %out_slice, __slice_rchunk_exact_empty_ptr_zero_%out_ok, 0
|
|
2134
|
+
%out_ok = add 0, 0
|
|
2135
|
+
!__slice_rchunk_exact_empty_ptr_zero_%out_ok
|
|
2136
|
+
!__slice_rchunk_exact_zero_%out_ok
|
|
2137
|
+
!__slice_rchunk_exact_len_%out_ok
|
|
2138
|
+
|
|
2139
|
+
L_SLICE_RCHUNK_EXACT_AT_END_%out_ok:
|
|
2140
|
+
[END_MACRO]
|
|
2141
|
+
|
|
2142
|
+
// Rust method-name alias over SLICE_TRY_RCHUNK_EXACT_AT_U64.
|
|
2143
|
+
[MACRO] SLICE_TRY_RCHUNK_EXACT_AT %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2144
|
+
EXPAND SLICE_TRY_RCHUNK_EXACT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2145
|
+
[END_MACRO]
|
|
2146
|
+
|
|
2147
|
+
[MACRO] SLICE_TRY_RCHUNK_EXACT_MUT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2148
|
+
EXPAND SLICE_TRY_RCHUNK_EXACT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2149
|
+
[END_MACRO]
|
|
2150
|
+
|
|
2151
|
+
// Rust method-name alias over SLICE_TRY_RCHUNK_EXACT_MUT_AT_U64.
|
|
2152
|
+
[MACRO] SLICE_TRY_RCHUNK_EXACT_MUT_AT %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2153
|
+
EXPAND SLICE_TRY_RCHUNK_EXACT_MUT_AT_U64 %out_ok, %out_slice, %slice_reg, %chunk_size, %chunk_index
|
|
2154
|
+
[END_MACRO]
|
|
2155
|
+
|
|
2156
|
+
[MACRO] SLICE_WINDOW_COUNT_U64 %out_count, %slice_reg, %window_size
|
|
2157
|
+
__slice_window_len_%out_count = load %slice_reg+Slice_len as u64
|
|
2158
|
+
__slice_window_zero_%out_count = eq %window_size, 0
|
|
2159
|
+
br __slice_window_zero_%out_count -> L_SLICE_WINDOW_COUNT_ZERO_%out_count, L_SLICE_WINDOW_COUNT_SIZE_%out_count
|
|
2160
|
+
|
|
2161
|
+
L_SLICE_WINDOW_COUNT_SIZE_%out_count:
|
|
2162
|
+
__slice_window_fits_%out_count = ule %window_size, __slice_window_len_%out_count
|
|
2163
|
+
br __slice_window_fits_%out_count -> L_SLICE_WINDOW_COUNT_CALC_%out_count, L_SLICE_WINDOW_COUNT_MISS_%out_count
|
|
2164
|
+
|
|
2165
|
+
L_SLICE_WINDOW_COUNT_CALC_%out_count:
|
|
2166
|
+
__slice_window_remaining_%out_count = sub __slice_window_len_%out_count, %window_size
|
|
2167
|
+
%out_count = add __slice_window_remaining_%out_count, 1
|
|
2168
|
+
!__slice_window_remaining_%out_count
|
|
2169
|
+
!__slice_window_fits_%out_count
|
|
2170
|
+
!__slice_window_zero_%out_count
|
|
2171
|
+
!__slice_window_len_%out_count
|
|
2172
|
+
jmp L_SLICE_WINDOW_COUNT_END_%out_count
|
|
2173
|
+
|
|
2174
|
+
L_SLICE_WINDOW_COUNT_MISS_%out_count:
|
|
2175
|
+
%out_count = add 0, 0
|
|
2176
|
+
!__slice_window_fits_%out_count
|
|
2177
|
+
!__slice_window_zero_%out_count
|
|
2178
|
+
!__slice_window_len_%out_count
|
|
2179
|
+
jmp L_SLICE_WINDOW_COUNT_END_%out_count
|
|
2180
|
+
|
|
2181
|
+
L_SLICE_WINDOW_COUNT_ZERO_%out_count:
|
|
2182
|
+
%out_count = add 0, 0
|
|
2183
|
+
!__slice_window_zero_%out_count
|
|
2184
|
+
!__slice_window_len_%out_count
|
|
2185
|
+
|
|
2186
|
+
L_SLICE_WINDOW_COUNT_END_%out_count:
|
|
2187
|
+
[END_MACRO]
|
|
2188
|
+
|
|
2189
|
+
// Rust method-name alias over SLICE_WINDOW_COUNT_U64.
|
|
2190
|
+
[MACRO] SLICE_WINDOW_COUNT %out_count, %slice_reg, %window_size
|
|
2191
|
+
EXPAND SLICE_WINDOW_COUNT_U64 %out_count, %slice_reg, %window_size
|
|
2192
|
+
[END_MACRO]
|
|
2193
|
+
|
|
2194
|
+
[MACRO] SLICE_TRY_WINDOW_AT_U64 %out_ok, %out_slice, %slice_reg, %window_size, %window_index
|
|
2195
|
+
%out_slice = alloc Slice_SIZE
|
|
2196
|
+
__slice_window_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
2197
|
+
__slice_window_zero_%out_ok = eq %window_size, 0
|
|
2198
|
+
br __slice_window_zero_%out_ok -> L_SLICE_WINDOW_AT_MISS_ZERO_%out_ok, L_SLICE_WINDOW_AT_SIZE_%out_ok
|
|
2199
|
+
|
|
2200
|
+
L_SLICE_WINDOW_AT_SIZE_%out_ok:
|
|
2201
|
+
__slice_window_start_ok_%out_ok = ule %window_index, __slice_window_len_%out_ok
|
|
2202
|
+
br __slice_window_start_ok_%out_ok -> L_SLICE_WINDOW_AT_LEN_%out_ok, L_SLICE_WINDOW_AT_MISS_START_%out_ok
|
|
2203
|
+
|
|
2204
|
+
L_SLICE_WINDOW_AT_LEN_%out_ok:
|
|
2205
|
+
__slice_window_remaining_%out_ok = sub __slice_window_len_%out_ok, %window_index
|
|
2206
|
+
__slice_window_fits_%out_ok = ule %window_size, __slice_window_remaining_%out_ok
|
|
2207
|
+
br __slice_window_fits_%out_ok -> L_SLICE_WINDOW_AT_HIT_%out_ok, L_SLICE_WINDOW_AT_MISS_LEN_%out_ok
|
|
2208
|
+
|
|
2209
|
+
L_SLICE_WINDOW_AT_HIT_%out_ok:
|
|
2210
|
+
__slice_window_src_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
2211
|
+
__slice_window_start_bytes_%out_ok = mul %window_index, 8
|
|
2212
|
+
__slice_window_ptr_%out_ok = ptr_add __slice_window_src_ptr_%out_ok, __slice_window_start_bytes_%out_ok
|
|
2213
|
+
EXPAND SLICE_NEW %out_slice, __slice_window_ptr_%out_ok, %window_size
|
|
2214
|
+
%out_ok = add 0, 1
|
|
2215
|
+
!__slice_window_ptr_%out_ok
|
|
2216
|
+
!__slice_window_start_bytes_%out_ok
|
|
2217
|
+
!__slice_window_src_ptr_%out_ok
|
|
2218
|
+
!__slice_window_fits_%out_ok
|
|
2219
|
+
!__slice_window_remaining_%out_ok
|
|
2220
|
+
!__slice_window_start_ok_%out_ok
|
|
2221
|
+
!__slice_window_zero_%out_ok
|
|
2222
|
+
!__slice_window_len_%out_ok
|
|
2223
|
+
jmp L_SLICE_WINDOW_AT_END_%out_ok
|
|
2224
|
+
|
|
2225
|
+
L_SLICE_WINDOW_AT_MISS_LEN_%out_ok:
|
|
2226
|
+
__slice_window_empty_ptr_len_%out_ok = 0 as ptr
|
|
2227
|
+
EXPAND SLICE_NEW %out_slice, __slice_window_empty_ptr_len_%out_ok, 0
|
|
2228
|
+
%out_ok = add 0, 0
|
|
2229
|
+
!__slice_window_empty_ptr_len_%out_ok
|
|
2230
|
+
!__slice_window_fits_%out_ok
|
|
2231
|
+
!__slice_window_remaining_%out_ok
|
|
2232
|
+
!__slice_window_start_ok_%out_ok
|
|
2233
|
+
!__slice_window_zero_%out_ok
|
|
2234
|
+
!__slice_window_len_%out_ok
|
|
2235
|
+
jmp L_SLICE_WINDOW_AT_END_%out_ok
|
|
2236
|
+
|
|
2237
|
+
L_SLICE_WINDOW_AT_MISS_START_%out_ok:
|
|
2238
|
+
__slice_window_empty_ptr_start_%out_ok = 0 as ptr
|
|
2239
|
+
EXPAND SLICE_NEW %out_slice, __slice_window_empty_ptr_start_%out_ok, 0
|
|
2240
|
+
%out_ok = add 0, 0
|
|
2241
|
+
!__slice_window_empty_ptr_start_%out_ok
|
|
2242
|
+
!__slice_window_start_ok_%out_ok
|
|
2243
|
+
!__slice_window_zero_%out_ok
|
|
2244
|
+
!__slice_window_len_%out_ok
|
|
2245
|
+
jmp L_SLICE_WINDOW_AT_END_%out_ok
|
|
2246
|
+
|
|
2247
|
+
L_SLICE_WINDOW_AT_MISS_ZERO_%out_ok:
|
|
2248
|
+
__slice_window_empty_ptr_zero_%out_ok = 0 as ptr
|
|
2249
|
+
EXPAND SLICE_NEW %out_slice, __slice_window_empty_ptr_zero_%out_ok, 0
|
|
2250
|
+
%out_ok = add 0, 0
|
|
2251
|
+
!__slice_window_empty_ptr_zero_%out_ok
|
|
2252
|
+
!__slice_window_zero_%out_ok
|
|
2253
|
+
!__slice_window_len_%out_ok
|
|
2254
|
+
|
|
2255
|
+
L_SLICE_WINDOW_AT_END_%out_ok:
|
|
2256
|
+
[END_MACRO]
|
|
2257
|
+
|
|
2258
|
+
// Rust method-name alias over SLICE_TRY_WINDOW_AT_U64.
|
|
2259
|
+
[MACRO] SLICE_TRY_WINDOW_AT %out_ok, %out_slice, %slice_reg, %window_size, %window_index
|
|
2260
|
+
EXPAND SLICE_TRY_WINDOW_AT_U64 %out_ok, %out_slice, %slice_reg, %window_size, %window_index
|
|
2261
|
+
[END_MACRO]
|
|
2262
|
+
|
|
2263
|
+
[MACRO] SLICE_SWAP_U64 %slice_reg, %left, %right
|
|
2264
|
+
__slice_swap_ptr_%slice_reg = load %slice_reg+Slice_ptr as ptr
|
|
2265
|
+
__slice_swap_left_off_%slice_reg = mul %left, 8
|
|
2266
|
+
__slice_swap_right_off_%slice_reg = mul %right, 8
|
|
2267
|
+
__slice_swap_left_ptr_%slice_reg = ptr_add __slice_swap_ptr_%slice_reg, __slice_swap_left_off_%slice_reg
|
|
2268
|
+
__slice_swap_right_ptr_%slice_reg = ptr_add __slice_swap_ptr_%slice_reg, __slice_swap_right_off_%slice_reg
|
|
2269
|
+
__slice_swap_left_value_%slice_reg = load __slice_swap_left_ptr_%slice_reg+0 as u64
|
|
2270
|
+
__slice_swap_right_value_%slice_reg = load __slice_swap_right_ptr_%slice_reg+0 as u64
|
|
2271
|
+
store __slice_swap_left_ptr_%slice_reg+0, __slice_swap_right_value_%slice_reg as u64
|
|
2272
|
+
store __slice_swap_right_ptr_%slice_reg+0, __slice_swap_left_value_%slice_reg as u64
|
|
2273
|
+
!__slice_swap_right_value_%slice_reg
|
|
2274
|
+
!__slice_swap_left_value_%slice_reg
|
|
2275
|
+
!__slice_swap_right_ptr_%slice_reg
|
|
2276
|
+
!__slice_swap_left_ptr_%slice_reg
|
|
2277
|
+
!__slice_swap_right_off_%slice_reg
|
|
2278
|
+
!__slice_swap_left_off_%slice_reg
|
|
2279
|
+
!__slice_swap_ptr_%slice_reg
|
|
2280
|
+
[END_MACRO]
|
|
2281
|
+
|
|
2282
|
+
// Rust method-name alias over SLICE_SWAP_U64.
|
|
2283
|
+
[MACRO] SLICE_SWAP %slice_reg, %left, %right
|
|
2284
|
+
EXPAND SLICE_SWAP_U64 %slice_reg, %left, %right
|
|
2285
|
+
[END_MACRO]
|
|
2286
|
+
|
|
2287
|
+
[MACRO] SLICE_TRY_SWAP_U64 %out_ok, %slice_reg, %left, %right
|
|
2288
|
+
__slice_swap_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
2289
|
+
__slice_swap_left_ok_%out_ok = ult %left, __slice_swap_len_%out_ok
|
|
2290
|
+
__slice_swap_right_ok_%out_ok = ult %right, __slice_swap_len_%out_ok
|
|
2291
|
+
__slice_swap_in_bounds_%out_ok = and __slice_swap_left_ok_%out_ok, __slice_swap_right_ok_%out_ok
|
|
2292
|
+
br __slice_swap_in_bounds_%out_ok -> L_SLICE_TRY_SWAP_HIT_%out_ok, L_SLICE_TRY_SWAP_MISS_%out_ok
|
|
2293
|
+
|
|
2294
|
+
L_SLICE_TRY_SWAP_HIT_%out_ok:
|
|
2295
|
+
EXPAND SLICE_SWAP_U64 %slice_reg, %left, %right
|
|
2296
|
+
%out_ok = add 0, 1
|
|
2297
|
+
!__slice_swap_in_bounds_%out_ok
|
|
2298
|
+
!__slice_swap_right_ok_%out_ok
|
|
2299
|
+
!__slice_swap_left_ok_%out_ok
|
|
2300
|
+
!__slice_swap_len_%out_ok
|
|
2301
|
+
jmp L_SLICE_TRY_SWAP_END_%out_ok
|
|
2302
|
+
|
|
2303
|
+
L_SLICE_TRY_SWAP_MISS_%out_ok:
|
|
2304
|
+
%out_ok = add 0, 0
|
|
2305
|
+
!__slice_swap_in_bounds_%out_ok
|
|
2306
|
+
!__slice_swap_right_ok_%out_ok
|
|
2307
|
+
!__slice_swap_left_ok_%out_ok
|
|
2308
|
+
!__slice_swap_len_%out_ok
|
|
2309
|
+
|
|
2310
|
+
L_SLICE_TRY_SWAP_END_%out_ok:
|
|
2311
|
+
[END_MACRO]
|
|
2312
|
+
|
|
2313
|
+
// Rust method-name alias over SLICE_TRY_SWAP_U64.
|
|
2314
|
+
[MACRO] SLICE_TRY_SWAP %out_ok, %slice_reg, %left, %right
|
|
2315
|
+
EXPAND SLICE_TRY_SWAP_U64 %out_ok, %slice_reg, %left, %right
|
|
2316
|
+
[END_MACRO]
|
|
2317
|
+
|
|
2318
|
+
[MACRO] SLICE_FILL_U64 %slice_reg, %value
|
|
2319
|
+
__slice_fill_ptr_%slice_reg = load %slice_reg+Slice_ptr as ptr
|
|
2320
|
+
__slice_fill_len_%slice_reg = load %slice_reg+Slice_len as u64
|
|
2321
|
+
__slice_fill_idx_slot_%slice_reg = stack_alloc 8
|
|
2322
|
+
store __slice_fill_idx_slot_%slice_reg+0, 0 as u64
|
|
2323
|
+
jmp L_SLICE_FILL_HEAD_%slice_reg
|
|
2324
|
+
|
|
2325
|
+
L_SLICE_FILL_HEAD_%slice_reg:
|
|
2326
|
+
__slice_fill_idx_%slice_reg = load __slice_fill_idx_slot_%slice_reg+0 as u64
|
|
2327
|
+
__slice_fill_done_%slice_reg = eq __slice_fill_idx_%slice_reg, __slice_fill_len_%slice_reg
|
|
2328
|
+
br __slice_fill_done_%slice_reg -> L_SLICE_FILL_END_%slice_reg, L_SLICE_FILL_BODY_%slice_reg
|
|
2329
|
+
|
|
2330
|
+
L_SLICE_FILL_BODY_%slice_reg:
|
|
2331
|
+
__slice_fill_off_%slice_reg = mul __slice_fill_idx_%slice_reg, 8
|
|
2332
|
+
__slice_fill_item_%slice_reg = ptr_add __slice_fill_ptr_%slice_reg, __slice_fill_off_%slice_reg
|
|
2333
|
+
store __slice_fill_item_%slice_reg+0, %value as u64
|
|
2334
|
+
__slice_fill_next_%slice_reg = add __slice_fill_idx_%slice_reg, 1
|
|
2335
|
+
store __slice_fill_idx_slot_%slice_reg+0, __slice_fill_next_%slice_reg as u64
|
|
2336
|
+
!__slice_fill_next_%slice_reg
|
|
2337
|
+
!__slice_fill_item_%slice_reg
|
|
2338
|
+
!__slice_fill_off_%slice_reg
|
|
2339
|
+
!__slice_fill_done_%slice_reg
|
|
2340
|
+
!__slice_fill_idx_%slice_reg
|
|
2341
|
+
jmp L_SLICE_FILL_HEAD_%slice_reg
|
|
2342
|
+
|
|
2343
|
+
L_SLICE_FILL_END_%slice_reg:
|
|
2344
|
+
!__slice_fill_done_%slice_reg
|
|
2345
|
+
!__slice_fill_idx_%slice_reg
|
|
2346
|
+
!__slice_fill_len_%slice_reg
|
|
2347
|
+
!__slice_fill_ptr_%slice_reg
|
|
2348
|
+
[END_MACRO]
|
|
2349
|
+
|
|
2350
|
+
// Rust method-name alias over SLICE_FILL_U64.
|
|
2351
|
+
[MACRO] SLICE_FILL %slice_reg, %value
|
|
2352
|
+
EXPAND SLICE_FILL_U64 %slice_reg, %value
|
|
2353
|
+
[END_MACRO]
|
|
2354
|
+
|
|
2355
|
+
[MACRO] SLICE_FILL_WITH_U64 %slice_reg, %gen_fn
|
|
2356
|
+
__slice_fill_with_ptr_%slice_reg = load %slice_reg+Slice_ptr as ptr
|
|
2357
|
+
__slice_fill_with_len_%slice_reg = load %slice_reg+Slice_len as u64
|
|
2358
|
+
__slice_fill_with_idx_slot_%slice_reg = stack_alloc 8
|
|
2359
|
+
store __slice_fill_with_idx_slot_%slice_reg+0, 0 as u64
|
|
2360
|
+
jmp L_SLICE_FILL_WITH_HEAD_%slice_reg
|
|
2361
|
+
|
|
2362
|
+
L_SLICE_FILL_WITH_HEAD_%slice_reg:
|
|
2363
|
+
__slice_fill_with_idx_%slice_reg = load __slice_fill_with_idx_slot_%slice_reg+0 as u64
|
|
2364
|
+
__slice_fill_with_done_%slice_reg = eq __slice_fill_with_idx_%slice_reg, __slice_fill_with_len_%slice_reg
|
|
2365
|
+
br __slice_fill_with_done_%slice_reg -> L_SLICE_FILL_WITH_END_%slice_reg, L_SLICE_FILL_WITH_BODY_%slice_reg
|
|
2366
|
+
|
|
2367
|
+
L_SLICE_FILL_WITH_BODY_%slice_reg:
|
|
2368
|
+
__slice_fill_with_off_%slice_reg = mul __slice_fill_with_idx_%slice_reg, 8
|
|
2369
|
+
__slice_fill_with_item_%slice_reg = ptr_add __slice_fill_with_ptr_%slice_reg, __slice_fill_with_off_%slice_reg
|
|
2370
|
+
__slice_fill_with_value_%slice_reg = call %gen_fn()
|
|
2371
|
+
store __slice_fill_with_item_%slice_reg+0, __slice_fill_with_value_%slice_reg as u64
|
|
2372
|
+
__slice_fill_with_next_%slice_reg = add __slice_fill_with_idx_%slice_reg, 1
|
|
2373
|
+
store __slice_fill_with_idx_slot_%slice_reg+0, __slice_fill_with_next_%slice_reg as u64
|
|
2374
|
+
!__slice_fill_with_next_%slice_reg
|
|
2375
|
+
!__slice_fill_with_value_%slice_reg
|
|
2376
|
+
!__slice_fill_with_item_%slice_reg
|
|
2377
|
+
!__slice_fill_with_off_%slice_reg
|
|
2378
|
+
!__slice_fill_with_done_%slice_reg
|
|
2379
|
+
!__slice_fill_with_idx_%slice_reg
|
|
2380
|
+
jmp L_SLICE_FILL_WITH_HEAD_%slice_reg
|
|
2381
|
+
|
|
2382
|
+
L_SLICE_FILL_WITH_END_%slice_reg:
|
|
2383
|
+
!__slice_fill_with_done_%slice_reg
|
|
2384
|
+
!__slice_fill_with_idx_%slice_reg
|
|
2385
|
+
!__slice_fill_with_len_%slice_reg
|
|
2386
|
+
!__slice_fill_with_ptr_%slice_reg
|
|
2387
|
+
[END_MACRO]
|
|
2388
|
+
|
|
2389
|
+
// Rust method-name alias over SLICE_FILL_WITH_U64.
|
|
2390
|
+
[MACRO] SLICE_FILL_WITH %slice_reg, %gen_fn
|
|
2391
|
+
EXPAND SLICE_FILL_WITH_U64 %slice_reg, %gen_fn
|
|
2392
|
+
[END_MACRO]
|
|
2393
|
+
|
|
2394
|
+
[MACRO] SLICE_REVERSE_U64 %slice_reg
|
|
2395
|
+
__slice_rev_len_%slice_reg = load %slice_reg+Slice_len as u64
|
|
2396
|
+
__slice_rev_small_%slice_reg = ule __slice_rev_len_%slice_reg, 1
|
|
2397
|
+
br __slice_rev_small_%slice_reg -> L_SLICE_REV_DONE_SMALL_%slice_reg, L_SLICE_REV_INIT_%slice_reg
|
|
2398
|
+
|
|
2399
|
+
L_SLICE_REV_INIT_%slice_reg:
|
|
2400
|
+
__slice_rev_ptr_%slice_reg = load %slice_reg+Slice_ptr as ptr
|
|
2401
|
+
__slice_rev_left_slot_%slice_reg = stack_alloc 8
|
|
2402
|
+
__slice_rev_right_slot_%slice_reg = stack_alloc 8
|
|
2403
|
+
__slice_rev_last_%slice_reg = sub __slice_rev_len_%slice_reg, 1
|
|
2404
|
+
store __slice_rev_left_slot_%slice_reg+0, 0 as u64
|
|
2405
|
+
store __slice_rev_right_slot_%slice_reg+0, __slice_rev_last_%slice_reg as u64
|
|
2406
|
+
!__slice_rev_last_%slice_reg
|
|
2407
|
+
jmp L_SLICE_REV_HEAD_%slice_reg
|
|
2408
|
+
|
|
2409
|
+
L_SLICE_REV_HEAD_%slice_reg:
|
|
2410
|
+
__slice_rev_left_%slice_reg = load __slice_rev_left_slot_%slice_reg+0 as u64
|
|
2411
|
+
__slice_rev_right_%slice_reg = load __slice_rev_right_slot_%slice_reg+0 as u64
|
|
2412
|
+
__slice_rev_continue_%slice_reg = ult __slice_rev_left_%slice_reg, __slice_rev_right_%slice_reg
|
|
2413
|
+
br __slice_rev_continue_%slice_reg -> L_SLICE_REV_BODY_%slice_reg, L_SLICE_REV_DONE_%slice_reg
|
|
2414
|
+
|
|
2415
|
+
L_SLICE_REV_BODY_%slice_reg:
|
|
2416
|
+
__slice_rev_left_off_%slice_reg = mul __slice_rev_left_%slice_reg, 8
|
|
2417
|
+
__slice_rev_right_off_%slice_reg = mul __slice_rev_right_%slice_reg, 8
|
|
2418
|
+
__slice_rev_left_ptr_%slice_reg = ptr_add __slice_rev_ptr_%slice_reg, __slice_rev_left_off_%slice_reg
|
|
2419
|
+
__slice_rev_right_ptr_%slice_reg = ptr_add __slice_rev_ptr_%slice_reg, __slice_rev_right_off_%slice_reg
|
|
2420
|
+
__slice_rev_left_value_%slice_reg = load __slice_rev_left_ptr_%slice_reg+0 as u64
|
|
2421
|
+
__slice_rev_right_value_%slice_reg = load __slice_rev_right_ptr_%slice_reg+0 as u64
|
|
2422
|
+
store __slice_rev_left_ptr_%slice_reg+0, __slice_rev_right_value_%slice_reg as u64
|
|
2423
|
+
store __slice_rev_right_ptr_%slice_reg+0, __slice_rev_left_value_%slice_reg as u64
|
|
2424
|
+
__slice_rev_next_left_%slice_reg = add __slice_rev_left_%slice_reg, 1
|
|
2425
|
+
__slice_rev_next_right_%slice_reg = sub __slice_rev_right_%slice_reg, 1
|
|
2426
|
+
store __slice_rev_left_slot_%slice_reg+0, __slice_rev_next_left_%slice_reg as u64
|
|
2427
|
+
store __slice_rev_right_slot_%slice_reg+0, __slice_rev_next_right_%slice_reg as u64
|
|
2428
|
+
!__slice_rev_next_right_%slice_reg
|
|
2429
|
+
!__slice_rev_next_left_%slice_reg
|
|
2430
|
+
!__slice_rev_right_value_%slice_reg
|
|
2431
|
+
!__slice_rev_left_value_%slice_reg
|
|
2432
|
+
!__slice_rev_right_ptr_%slice_reg
|
|
2433
|
+
!__slice_rev_left_ptr_%slice_reg
|
|
2434
|
+
!__slice_rev_right_off_%slice_reg
|
|
2435
|
+
!__slice_rev_left_off_%slice_reg
|
|
2436
|
+
!__slice_rev_continue_%slice_reg
|
|
2437
|
+
!__slice_rev_right_%slice_reg
|
|
2438
|
+
!__slice_rev_left_%slice_reg
|
|
2439
|
+
jmp L_SLICE_REV_HEAD_%slice_reg
|
|
2440
|
+
|
|
2441
|
+
L_SLICE_REV_DONE_%slice_reg:
|
|
2442
|
+
!__slice_rev_continue_%slice_reg
|
|
2443
|
+
!__slice_rev_right_%slice_reg
|
|
2444
|
+
!__slice_rev_left_%slice_reg
|
|
2445
|
+
!__slice_rev_ptr_%slice_reg
|
|
2446
|
+
!__slice_rev_small_%slice_reg
|
|
2447
|
+
!__slice_rev_len_%slice_reg
|
|
2448
|
+
jmp L_SLICE_REV_END_%slice_reg
|
|
2449
|
+
|
|
2450
|
+
L_SLICE_REV_DONE_SMALL_%slice_reg:
|
|
2451
|
+
!__slice_rev_small_%slice_reg
|
|
2452
|
+
!__slice_rev_len_%slice_reg
|
|
2453
|
+
|
|
2454
|
+
L_SLICE_REV_END_%slice_reg:
|
|
2455
|
+
[END_MACRO]
|
|
2456
|
+
|
|
2457
|
+
// Rust method-name alias over SLICE_REVERSE_U64.
|
|
2458
|
+
[MACRO] SLICE_REVERSE %slice_reg
|
|
2459
|
+
EXPAND SLICE_REVERSE_U64 %slice_reg
|
|
2460
|
+
[END_MACRO]
|
|
2461
|
+
|
|
2462
|
+
[MACRO] SLICE_TRY_ROTATE_LEFT_U64 %out_ok, %slice_reg, %count
|
|
2463
|
+
__slice_rot_left_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
2464
|
+
__slice_rot_left_round_slot_%out_ok = stack_alloc 8
|
|
2465
|
+
__slice_rot_left_idx_slot_%out_ok = stack_alloc 8
|
|
2466
|
+
__slice_rot_left_in_bounds_%out_ok = ule %count, __slice_rot_left_len_%out_ok
|
|
2467
|
+
br __slice_rot_left_in_bounds_%out_ok -> L_SLICE_ROT_LEFT_HIT_%out_ok, L_SLICE_ROT_LEFT_MISS_%out_ok
|
|
2468
|
+
|
|
2469
|
+
L_SLICE_ROT_LEFT_HIT_%out_ok:
|
|
2470
|
+
__slice_rot_left_noop_empty_%out_ok = eq __slice_rot_left_len_%out_ok, 0
|
|
2471
|
+
__slice_rot_left_noop_count_%out_ok = eq %count, 0
|
|
2472
|
+
__slice_rot_left_noop_%out_ok = or __slice_rot_left_noop_empty_%out_ok, __slice_rot_left_noop_count_%out_ok
|
|
2473
|
+
br __slice_rot_left_noop_%out_ok -> L_SLICE_ROT_LEFT_DONE_NOOP_%out_ok, L_SLICE_ROT_LEFT_INIT_%out_ok
|
|
2474
|
+
|
|
2475
|
+
L_SLICE_ROT_LEFT_INIT_%out_ok:
|
|
2476
|
+
__slice_rot_left_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
2477
|
+
store __slice_rot_left_round_slot_%out_ok+0, 0 as u64
|
|
2478
|
+
jmp L_SLICE_ROT_LEFT_ROUND_HEAD_%out_ok
|
|
2479
|
+
|
|
2480
|
+
L_SLICE_ROT_LEFT_ROUND_HEAD_%out_ok:
|
|
2481
|
+
__slice_rot_left_round_%out_ok = load __slice_rot_left_round_slot_%out_ok+0 as u64
|
|
2482
|
+
__slice_rot_left_round_done_%out_ok = eq __slice_rot_left_round_%out_ok, %count
|
|
2483
|
+
br __slice_rot_left_round_done_%out_ok -> L_SLICE_ROT_LEFT_DONE_%out_ok, L_SLICE_ROT_LEFT_SHIFT_INIT_%out_ok
|
|
2484
|
+
|
|
2485
|
+
L_SLICE_ROT_LEFT_SHIFT_INIT_%out_ok:
|
|
2486
|
+
__slice_rot_left_first_%out_ok = load __slice_rot_left_ptr_%out_ok+0 as u64
|
|
2487
|
+
store __slice_rot_left_idx_slot_%out_ok+0, 0 as u64
|
|
2488
|
+
jmp L_SLICE_ROT_LEFT_SHIFT_HEAD_%out_ok
|
|
2489
|
+
|
|
2490
|
+
L_SLICE_ROT_LEFT_SHIFT_HEAD_%out_ok:
|
|
2491
|
+
__slice_rot_left_idx_%out_ok = load __slice_rot_left_idx_slot_%out_ok+0 as u64
|
|
2492
|
+
__slice_rot_left_next_idx_%out_ok = add __slice_rot_left_idx_%out_ok, 1
|
|
2493
|
+
__slice_rot_left_shift_done_%out_ok = eq __slice_rot_left_next_idx_%out_ok, __slice_rot_left_len_%out_ok
|
|
2494
|
+
br __slice_rot_left_shift_done_%out_ok -> L_SLICE_ROT_LEFT_STORE_LAST_%out_ok, L_SLICE_ROT_LEFT_SHIFT_BODY_%out_ok
|
|
2495
|
+
|
|
2496
|
+
L_SLICE_ROT_LEFT_SHIFT_BODY_%out_ok:
|
|
2497
|
+
__slice_rot_left_dst_off_%out_ok = mul __slice_rot_left_idx_%out_ok, 8
|
|
2498
|
+
__slice_rot_left_src_off_%out_ok = mul __slice_rot_left_next_idx_%out_ok, 8
|
|
2499
|
+
__slice_rot_left_dst_ptr_%out_ok = ptr_add __slice_rot_left_ptr_%out_ok, __slice_rot_left_dst_off_%out_ok
|
|
2500
|
+
__slice_rot_left_src_ptr_%out_ok = ptr_add __slice_rot_left_ptr_%out_ok, __slice_rot_left_src_off_%out_ok
|
|
2501
|
+
__slice_rot_left_value_%out_ok = load __slice_rot_left_src_ptr_%out_ok+0 as u64
|
|
2502
|
+
store __slice_rot_left_dst_ptr_%out_ok+0, __slice_rot_left_value_%out_ok as u64
|
|
2503
|
+
store __slice_rot_left_idx_slot_%out_ok+0, __slice_rot_left_next_idx_%out_ok as u64
|
|
2504
|
+
!__slice_rot_left_value_%out_ok
|
|
2505
|
+
!__slice_rot_left_src_ptr_%out_ok
|
|
2506
|
+
!__slice_rot_left_dst_ptr_%out_ok
|
|
2507
|
+
!__slice_rot_left_src_off_%out_ok
|
|
2508
|
+
!__slice_rot_left_dst_off_%out_ok
|
|
2509
|
+
!__slice_rot_left_shift_done_%out_ok
|
|
2510
|
+
!__slice_rot_left_next_idx_%out_ok
|
|
2511
|
+
!__slice_rot_left_idx_%out_ok
|
|
2512
|
+
jmp L_SLICE_ROT_LEFT_SHIFT_HEAD_%out_ok
|
|
2513
|
+
|
|
2514
|
+
L_SLICE_ROT_LEFT_STORE_LAST_%out_ok:
|
|
2515
|
+
__slice_rot_left_last_idx_%out_ok = sub __slice_rot_left_len_%out_ok, 1
|
|
2516
|
+
__slice_rot_left_last_off_%out_ok = mul __slice_rot_left_last_idx_%out_ok, 8
|
|
2517
|
+
__slice_rot_left_last_ptr_%out_ok = ptr_add __slice_rot_left_ptr_%out_ok, __slice_rot_left_last_off_%out_ok
|
|
2518
|
+
store __slice_rot_left_last_ptr_%out_ok+0, __slice_rot_left_first_%out_ok as u64
|
|
2519
|
+
__slice_rot_left_next_round_%out_ok = add __slice_rot_left_round_%out_ok, 1
|
|
2520
|
+
store __slice_rot_left_round_slot_%out_ok+0, __slice_rot_left_next_round_%out_ok as u64
|
|
2521
|
+
!__slice_rot_left_next_round_%out_ok
|
|
2522
|
+
!__slice_rot_left_last_ptr_%out_ok
|
|
2523
|
+
!__slice_rot_left_last_off_%out_ok
|
|
2524
|
+
!__slice_rot_left_last_idx_%out_ok
|
|
2525
|
+
!__slice_rot_left_shift_done_%out_ok
|
|
2526
|
+
!__slice_rot_left_next_idx_%out_ok
|
|
2527
|
+
!__slice_rot_left_idx_%out_ok
|
|
2528
|
+
!__slice_rot_left_first_%out_ok
|
|
2529
|
+
!__slice_rot_left_round_done_%out_ok
|
|
2530
|
+
!__slice_rot_left_round_%out_ok
|
|
2531
|
+
jmp L_SLICE_ROT_LEFT_ROUND_HEAD_%out_ok
|
|
2532
|
+
|
|
2533
|
+
L_SLICE_ROT_LEFT_DONE_%out_ok:
|
|
2534
|
+
%out_ok = add 0, 1
|
|
2535
|
+
!__slice_rot_left_round_done_%out_ok
|
|
2536
|
+
!__slice_rot_left_round_%out_ok
|
|
2537
|
+
!__slice_rot_left_ptr_%out_ok
|
|
2538
|
+
!__slice_rot_left_noop_%out_ok
|
|
2539
|
+
!__slice_rot_left_noop_count_%out_ok
|
|
2540
|
+
!__slice_rot_left_noop_empty_%out_ok
|
|
2541
|
+
!__slice_rot_left_in_bounds_%out_ok
|
|
2542
|
+
!__slice_rot_left_len_%out_ok
|
|
2543
|
+
jmp L_SLICE_ROT_LEFT_END_%out_ok
|
|
2544
|
+
|
|
2545
|
+
L_SLICE_ROT_LEFT_DONE_NOOP_%out_ok:
|
|
2546
|
+
%out_ok = add 0, 1
|
|
2547
|
+
!__slice_rot_left_noop_%out_ok
|
|
2548
|
+
!__slice_rot_left_noop_count_%out_ok
|
|
2549
|
+
!__slice_rot_left_noop_empty_%out_ok
|
|
2550
|
+
!__slice_rot_left_in_bounds_%out_ok
|
|
2551
|
+
!__slice_rot_left_len_%out_ok
|
|
2552
|
+
jmp L_SLICE_ROT_LEFT_END_%out_ok
|
|
2553
|
+
|
|
2554
|
+
L_SLICE_ROT_LEFT_MISS_%out_ok:
|
|
2555
|
+
%out_ok = add 0, 0
|
|
2556
|
+
!__slice_rot_left_in_bounds_%out_ok
|
|
2557
|
+
!__slice_rot_left_len_%out_ok
|
|
2558
|
+
|
|
2559
|
+
L_SLICE_ROT_LEFT_END_%out_ok:
|
|
2560
|
+
[END_MACRO]
|
|
2561
|
+
|
|
2562
|
+
// Rust method-name alias over SLICE_TRY_ROTATE_LEFT_U64.
|
|
2563
|
+
[MACRO] SLICE_TRY_ROTATE_LEFT %out_ok, %slice_reg, %count
|
|
2564
|
+
EXPAND SLICE_TRY_ROTATE_LEFT_U64 %out_ok, %slice_reg, %count
|
|
2565
|
+
[END_MACRO]
|
|
2566
|
+
|
|
2567
|
+
[MACRO] SLICE_TRY_ROTATE_RIGHT_U64 %out_ok, %slice_reg, %count
|
|
2568
|
+
__slice_rot_right_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
2569
|
+
__slice_rot_right_round_slot_%out_ok = stack_alloc 8
|
|
2570
|
+
__slice_rot_right_idx_slot_%out_ok = stack_alloc 8
|
|
2571
|
+
__slice_rot_right_in_bounds_%out_ok = ule %count, __slice_rot_right_len_%out_ok
|
|
2572
|
+
br __slice_rot_right_in_bounds_%out_ok -> L_SLICE_ROT_RIGHT_HIT_%out_ok, L_SLICE_ROT_RIGHT_MISS_%out_ok
|
|
2573
|
+
|
|
2574
|
+
L_SLICE_ROT_RIGHT_HIT_%out_ok:
|
|
2575
|
+
__slice_rot_right_noop_empty_%out_ok = eq __slice_rot_right_len_%out_ok, 0
|
|
2576
|
+
__slice_rot_right_noop_count_%out_ok = eq %count, 0
|
|
2577
|
+
__slice_rot_right_noop_%out_ok = or __slice_rot_right_noop_empty_%out_ok, __slice_rot_right_noop_count_%out_ok
|
|
2578
|
+
br __slice_rot_right_noop_%out_ok -> L_SLICE_ROT_RIGHT_DONE_NOOP_%out_ok, L_SLICE_ROT_RIGHT_INIT_%out_ok
|
|
2579
|
+
|
|
2580
|
+
L_SLICE_ROT_RIGHT_INIT_%out_ok:
|
|
2581
|
+
__slice_rot_right_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
2582
|
+
store __slice_rot_right_round_slot_%out_ok+0, 0 as u64
|
|
2583
|
+
jmp L_SLICE_ROT_RIGHT_ROUND_HEAD_%out_ok
|
|
2584
|
+
|
|
2585
|
+
L_SLICE_ROT_RIGHT_ROUND_HEAD_%out_ok:
|
|
2586
|
+
__slice_rot_right_round_%out_ok = load __slice_rot_right_round_slot_%out_ok+0 as u64
|
|
2587
|
+
__slice_rot_right_round_done_%out_ok = eq __slice_rot_right_round_%out_ok, %count
|
|
2588
|
+
br __slice_rot_right_round_done_%out_ok -> L_SLICE_ROT_RIGHT_DONE_%out_ok, L_SLICE_ROT_RIGHT_SHIFT_INIT_%out_ok
|
|
2589
|
+
|
|
2590
|
+
L_SLICE_ROT_RIGHT_SHIFT_INIT_%out_ok:
|
|
2591
|
+
__slice_rot_right_last_idx_%out_ok = sub __slice_rot_right_len_%out_ok, 1
|
|
2592
|
+
__slice_rot_right_last_off_%out_ok = mul __slice_rot_right_last_idx_%out_ok, 8
|
|
2593
|
+
__slice_rot_right_last_ptr_%out_ok = ptr_add __slice_rot_right_ptr_%out_ok, __slice_rot_right_last_off_%out_ok
|
|
2594
|
+
__slice_rot_right_last_%out_ok = load __slice_rot_right_last_ptr_%out_ok+0 as u64
|
|
2595
|
+
store __slice_rot_right_idx_slot_%out_ok+0, __slice_rot_right_last_idx_%out_ok as u64
|
|
2596
|
+
!__slice_rot_right_last_ptr_%out_ok
|
|
2597
|
+
!__slice_rot_right_last_off_%out_ok
|
|
2598
|
+
jmp L_SLICE_ROT_RIGHT_SHIFT_HEAD_%out_ok
|
|
2599
|
+
|
|
2600
|
+
L_SLICE_ROT_RIGHT_SHIFT_HEAD_%out_ok:
|
|
2601
|
+
__slice_rot_right_idx_%out_ok = load __slice_rot_right_idx_slot_%out_ok+0 as u64
|
|
2602
|
+
__slice_rot_right_shift_done_%out_ok = eq __slice_rot_right_idx_%out_ok, 0
|
|
2603
|
+
br __slice_rot_right_shift_done_%out_ok -> L_SLICE_ROT_RIGHT_STORE_FIRST_%out_ok, L_SLICE_ROT_RIGHT_SHIFT_BODY_%out_ok
|
|
2604
|
+
|
|
2605
|
+
L_SLICE_ROT_RIGHT_SHIFT_BODY_%out_ok:
|
|
2606
|
+
__slice_rot_right_prev_idx_%out_ok = sub __slice_rot_right_idx_%out_ok, 1
|
|
2607
|
+
__slice_rot_right_dst_off_%out_ok = mul __slice_rot_right_idx_%out_ok, 8
|
|
2608
|
+
__slice_rot_right_src_off_%out_ok = mul __slice_rot_right_prev_idx_%out_ok, 8
|
|
2609
|
+
__slice_rot_right_dst_ptr_%out_ok = ptr_add __slice_rot_right_ptr_%out_ok, __slice_rot_right_dst_off_%out_ok
|
|
2610
|
+
__slice_rot_right_src_ptr_%out_ok = ptr_add __slice_rot_right_ptr_%out_ok, __slice_rot_right_src_off_%out_ok
|
|
2611
|
+
__slice_rot_right_value_%out_ok = load __slice_rot_right_src_ptr_%out_ok+0 as u64
|
|
2612
|
+
store __slice_rot_right_dst_ptr_%out_ok+0, __slice_rot_right_value_%out_ok as u64
|
|
2613
|
+
store __slice_rot_right_idx_slot_%out_ok+0, __slice_rot_right_prev_idx_%out_ok as u64
|
|
2614
|
+
!__slice_rot_right_value_%out_ok
|
|
2615
|
+
!__slice_rot_right_src_ptr_%out_ok
|
|
2616
|
+
!__slice_rot_right_dst_ptr_%out_ok
|
|
2617
|
+
!__slice_rot_right_src_off_%out_ok
|
|
2618
|
+
!__slice_rot_right_dst_off_%out_ok
|
|
2619
|
+
!__slice_rot_right_prev_idx_%out_ok
|
|
2620
|
+
!__slice_rot_right_shift_done_%out_ok
|
|
2621
|
+
!__slice_rot_right_idx_%out_ok
|
|
2622
|
+
jmp L_SLICE_ROT_RIGHT_SHIFT_HEAD_%out_ok
|
|
2623
|
+
|
|
2624
|
+
L_SLICE_ROT_RIGHT_STORE_FIRST_%out_ok:
|
|
2625
|
+
store __slice_rot_right_ptr_%out_ok+0, __slice_rot_right_last_%out_ok as u64
|
|
2626
|
+
__slice_rot_right_next_round_%out_ok = add __slice_rot_right_round_%out_ok, 1
|
|
2627
|
+
store __slice_rot_right_round_slot_%out_ok+0, __slice_rot_right_next_round_%out_ok as u64
|
|
2628
|
+
!__slice_rot_right_next_round_%out_ok
|
|
2629
|
+
!__slice_rot_right_shift_done_%out_ok
|
|
2630
|
+
!__slice_rot_right_idx_%out_ok
|
|
2631
|
+
!__slice_rot_right_last_%out_ok
|
|
2632
|
+
!__slice_rot_right_last_idx_%out_ok
|
|
2633
|
+
!__slice_rot_right_round_done_%out_ok
|
|
2634
|
+
!__slice_rot_right_round_%out_ok
|
|
2635
|
+
jmp L_SLICE_ROT_RIGHT_ROUND_HEAD_%out_ok
|
|
2636
|
+
|
|
2637
|
+
L_SLICE_ROT_RIGHT_DONE_%out_ok:
|
|
2638
|
+
%out_ok = add 0, 1
|
|
2639
|
+
!__slice_rot_right_round_done_%out_ok
|
|
2640
|
+
!__slice_rot_right_round_%out_ok
|
|
2641
|
+
!__slice_rot_right_ptr_%out_ok
|
|
2642
|
+
!__slice_rot_right_noop_%out_ok
|
|
2643
|
+
!__slice_rot_right_noop_count_%out_ok
|
|
2644
|
+
!__slice_rot_right_noop_empty_%out_ok
|
|
2645
|
+
!__slice_rot_right_in_bounds_%out_ok
|
|
2646
|
+
!__slice_rot_right_len_%out_ok
|
|
2647
|
+
jmp L_SLICE_ROT_RIGHT_END_%out_ok
|
|
2648
|
+
|
|
2649
|
+
L_SLICE_ROT_RIGHT_DONE_NOOP_%out_ok:
|
|
2650
|
+
%out_ok = add 0, 1
|
|
2651
|
+
!__slice_rot_right_noop_%out_ok
|
|
2652
|
+
!__slice_rot_right_noop_count_%out_ok
|
|
2653
|
+
!__slice_rot_right_noop_empty_%out_ok
|
|
2654
|
+
!__slice_rot_right_in_bounds_%out_ok
|
|
2655
|
+
!__slice_rot_right_len_%out_ok
|
|
2656
|
+
jmp L_SLICE_ROT_RIGHT_END_%out_ok
|
|
2657
|
+
|
|
2658
|
+
L_SLICE_ROT_RIGHT_MISS_%out_ok:
|
|
2659
|
+
%out_ok = add 0, 0
|
|
2660
|
+
!__slice_rot_right_in_bounds_%out_ok
|
|
2661
|
+
!__slice_rot_right_len_%out_ok
|
|
2662
|
+
|
|
2663
|
+
L_SLICE_ROT_RIGHT_END_%out_ok:
|
|
2664
|
+
[END_MACRO]
|
|
2665
|
+
|
|
2666
|
+
// Rust method-name alias over SLICE_TRY_ROTATE_RIGHT_U64.
|
|
2667
|
+
[MACRO] SLICE_TRY_ROTATE_RIGHT %out_ok, %slice_reg, %count
|
|
2668
|
+
EXPAND SLICE_TRY_ROTATE_RIGHT_U64 %out_ok, %slice_reg, %count
|
|
2669
|
+
[END_MACRO]
|
|
2670
|
+
|
|
2671
|
+
[MACRO] SLICE_TRY_SWAP_WITH_SLICE_U64 %out_ok, %left_slice, %right_slice
|
|
2672
|
+
__slice_sws_left_len_%out_ok = load %left_slice+Slice_len as u64
|
|
2673
|
+
__slice_sws_right_len_%out_ok = load %right_slice+Slice_len as u64
|
|
2674
|
+
__slice_sws_same_len_%out_ok = eq __slice_sws_left_len_%out_ok, __slice_sws_right_len_%out_ok
|
|
2675
|
+
br __slice_sws_same_len_%out_ok -> L_SLICE_SWS_INIT_%out_ok, L_SLICE_SWS_MISS_%out_ok
|
|
2676
|
+
|
|
2677
|
+
L_SLICE_SWS_INIT_%out_ok:
|
|
2678
|
+
__slice_sws_left_ptr_%out_ok = load %left_slice+Slice_ptr as ptr
|
|
2679
|
+
__slice_sws_right_ptr_%out_ok = load %right_slice+Slice_ptr as ptr
|
|
2680
|
+
__slice_sws_idx_slot_%out_ok = stack_alloc 8
|
|
2681
|
+
store __slice_sws_idx_slot_%out_ok+0, 0 as u64
|
|
2682
|
+
jmp L_SLICE_SWS_HEAD_%out_ok
|
|
2683
|
+
|
|
2684
|
+
L_SLICE_SWS_HEAD_%out_ok:
|
|
2685
|
+
__slice_sws_idx_%out_ok = load __slice_sws_idx_slot_%out_ok+0 as u64
|
|
2686
|
+
__slice_sws_done_%out_ok = eq __slice_sws_idx_%out_ok, __slice_sws_left_len_%out_ok
|
|
2687
|
+
br __slice_sws_done_%out_ok -> L_SLICE_SWS_HIT_%out_ok, L_SLICE_SWS_BODY_%out_ok
|
|
2688
|
+
|
|
2689
|
+
L_SLICE_SWS_BODY_%out_ok:
|
|
2690
|
+
__slice_sws_off_%out_ok = mul __slice_sws_idx_%out_ok, 8
|
|
2691
|
+
__slice_sws_left_item_%out_ok = ptr_add __slice_sws_left_ptr_%out_ok, __slice_sws_off_%out_ok
|
|
2692
|
+
__slice_sws_right_item_%out_ok = ptr_add __slice_sws_right_ptr_%out_ok, __slice_sws_off_%out_ok
|
|
2693
|
+
__slice_sws_left_value_%out_ok = load __slice_sws_left_item_%out_ok+0 as u64
|
|
2694
|
+
__slice_sws_right_value_%out_ok = load __slice_sws_right_item_%out_ok+0 as u64
|
|
2695
|
+
store __slice_sws_left_item_%out_ok+0, __slice_sws_right_value_%out_ok as u64
|
|
2696
|
+
store __slice_sws_right_item_%out_ok+0, __slice_sws_left_value_%out_ok as u64
|
|
2697
|
+
__slice_sws_next_%out_ok = add __slice_sws_idx_%out_ok, 1
|
|
2698
|
+
store __slice_sws_idx_slot_%out_ok+0, __slice_sws_next_%out_ok as u64
|
|
2699
|
+
!__slice_sws_next_%out_ok
|
|
2700
|
+
!__slice_sws_right_value_%out_ok
|
|
2701
|
+
!__slice_sws_left_value_%out_ok
|
|
2702
|
+
!__slice_sws_right_item_%out_ok
|
|
2703
|
+
!__slice_sws_left_item_%out_ok
|
|
2704
|
+
!__slice_sws_off_%out_ok
|
|
2705
|
+
!__slice_sws_done_%out_ok
|
|
2706
|
+
!__slice_sws_idx_%out_ok
|
|
2707
|
+
jmp L_SLICE_SWS_HEAD_%out_ok
|
|
2708
|
+
|
|
2709
|
+
L_SLICE_SWS_HIT_%out_ok:
|
|
2710
|
+
%out_ok = add 0, 1
|
|
2711
|
+
!__slice_sws_done_%out_ok
|
|
2712
|
+
!__slice_sws_idx_%out_ok
|
|
2713
|
+
!__slice_sws_right_ptr_%out_ok
|
|
2714
|
+
!__slice_sws_left_ptr_%out_ok
|
|
2715
|
+
!__slice_sws_same_len_%out_ok
|
|
2716
|
+
!__slice_sws_right_len_%out_ok
|
|
2717
|
+
!__slice_sws_left_len_%out_ok
|
|
2718
|
+
jmp L_SLICE_SWS_END_%out_ok
|
|
2719
|
+
|
|
2720
|
+
L_SLICE_SWS_MISS_%out_ok:
|
|
2721
|
+
%out_ok = add 0, 0
|
|
2722
|
+
!__slice_sws_same_len_%out_ok
|
|
2723
|
+
!__slice_sws_right_len_%out_ok
|
|
2724
|
+
!__slice_sws_left_len_%out_ok
|
|
2725
|
+
|
|
2726
|
+
L_SLICE_SWS_END_%out_ok:
|
|
2727
|
+
[END_MACRO]
|
|
2728
|
+
|
|
2729
|
+
// Rust method-name alias over SLICE_TRY_SWAP_WITH_SLICE_U64.
|
|
2730
|
+
[MACRO] SLICE_TRY_SWAP_WITH_SLICE %out_ok, %left_slice, %right_slice
|
|
2731
|
+
EXPAND SLICE_TRY_SWAP_WITH_SLICE_U64 %out_ok, %left_slice, %right_slice
|
|
2732
|
+
[END_MACRO]
|
|
2733
|
+
|
|
2734
|
+
[MACRO] SLICE_IS_SORTED_U64 %out_bool, %slice_reg
|
|
2735
|
+
__slice_sorted_len_%out_bool = load %slice_reg+Slice_len as u64
|
|
2736
|
+
__slice_sorted_small_%out_bool = ule __slice_sorted_len_%out_bool, 1
|
|
2737
|
+
br __slice_sorted_small_%out_bool -> L_SLICE_SORTED_TRUE_SMALL_%out_bool, L_SLICE_SORTED_INIT_%out_bool
|
|
2738
|
+
|
|
2739
|
+
L_SLICE_SORTED_INIT_%out_bool:
|
|
2740
|
+
__slice_sorted_ptr_%out_bool = load %slice_reg+Slice_ptr as ptr
|
|
2741
|
+
__slice_sorted_last_idx_%out_bool = sub __slice_sorted_len_%out_bool, 1
|
|
2742
|
+
__slice_sorted_idx_slot_%out_bool = stack_alloc 8
|
|
2743
|
+
store __slice_sorted_idx_slot_%out_bool+0, 0 as u64
|
|
2744
|
+
jmp L_SLICE_SORTED_HEAD_%out_bool
|
|
2745
|
+
|
|
2746
|
+
L_SLICE_SORTED_HEAD_%out_bool:
|
|
2747
|
+
__slice_sorted_idx_%out_bool = load __slice_sorted_idx_slot_%out_bool+0 as u64
|
|
2748
|
+
__slice_sorted_done_%out_bool = eq __slice_sorted_idx_%out_bool, __slice_sorted_last_idx_%out_bool
|
|
2749
|
+
br __slice_sorted_done_%out_bool -> L_SLICE_SORTED_TRUE_%out_bool, L_SLICE_SORTED_BODY_%out_bool
|
|
2750
|
+
|
|
2751
|
+
L_SLICE_SORTED_BODY_%out_bool:
|
|
2752
|
+
__slice_sorted_next_idx_%out_bool = add __slice_sorted_idx_%out_bool, 1
|
|
2753
|
+
__slice_sorted_off_%out_bool = mul __slice_sorted_idx_%out_bool, 8
|
|
2754
|
+
__slice_sorted_next_off_%out_bool = mul __slice_sorted_next_idx_%out_bool, 8
|
|
2755
|
+
__slice_sorted_left_ptr_%out_bool = ptr_add __slice_sorted_ptr_%out_bool, __slice_sorted_off_%out_bool
|
|
2756
|
+
__slice_sorted_right_ptr_%out_bool = ptr_add __slice_sorted_ptr_%out_bool, __slice_sorted_next_off_%out_bool
|
|
2757
|
+
__slice_sorted_left_%out_bool = load __slice_sorted_left_ptr_%out_bool+0 as u64
|
|
2758
|
+
__slice_sorted_right_%out_bool = load __slice_sorted_right_ptr_%out_bool+0 as u64
|
|
2759
|
+
__slice_sorted_pair_ok_%out_bool = ule __slice_sorted_left_%out_bool, __slice_sorted_right_%out_bool
|
|
2760
|
+
br __slice_sorted_pair_ok_%out_bool -> L_SLICE_SORTED_NEXT_%out_bool, L_SLICE_SORTED_FALSE_%out_bool
|
|
2761
|
+
|
|
2762
|
+
L_SLICE_SORTED_NEXT_%out_bool:
|
|
2763
|
+
store __slice_sorted_idx_slot_%out_bool+0, __slice_sorted_next_idx_%out_bool as u64
|
|
2764
|
+
!__slice_sorted_pair_ok_%out_bool
|
|
2765
|
+
!__slice_sorted_right_%out_bool
|
|
2766
|
+
!__slice_sorted_left_%out_bool
|
|
2767
|
+
!__slice_sorted_right_ptr_%out_bool
|
|
2768
|
+
!__slice_sorted_left_ptr_%out_bool
|
|
2769
|
+
!__slice_sorted_next_off_%out_bool
|
|
2770
|
+
!__slice_sorted_off_%out_bool
|
|
2771
|
+
!__slice_sorted_next_idx_%out_bool
|
|
2772
|
+
!__slice_sorted_done_%out_bool
|
|
2773
|
+
!__slice_sorted_idx_%out_bool
|
|
2774
|
+
jmp L_SLICE_SORTED_HEAD_%out_bool
|
|
2775
|
+
|
|
2776
|
+
L_SLICE_SORTED_TRUE_%out_bool:
|
|
2777
|
+
%out_bool = add 0, 1
|
|
2778
|
+
!__slice_sorted_done_%out_bool
|
|
2779
|
+
!__slice_sorted_idx_%out_bool
|
|
2780
|
+
!__slice_sorted_last_idx_%out_bool
|
|
2781
|
+
!__slice_sorted_ptr_%out_bool
|
|
2782
|
+
!__slice_sorted_small_%out_bool
|
|
2783
|
+
!__slice_sorted_len_%out_bool
|
|
2784
|
+
jmp L_SLICE_SORTED_END_%out_bool
|
|
2785
|
+
|
|
2786
|
+
L_SLICE_SORTED_FALSE_%out_bool:
|
|
2787
|
+
%out_bool = add 0, 0
|
|
2788
|
+
!__slice_sorted_pair_ok_%out_bool
|
|
2789
|
+
!__slice_sorted_right_%out_bool
|
|
2790
|
+
!__slice_sorted_left_%out_bool
|
|
2791
|
+
!__slice_sorted_right_ptr_%out_bool
|
|
2792
|
+
!__slice_sorted_left_ptr_%out_bool
|
|
2793
|
+
!__slice_sorted_next_off_%out_bool
|
|
2794
|
+
!__slice_sorted_off_%out_bool
|
|
2795
|
+
!__slice_sorted_next_idx_%out_bool
|
|
2796
|
+
!__slice_sorted_done_%out_bool
|
|
2797
|
+
!__slice_sorted_idx_%out_bool
|
|
2798
|
+
!__slice_sorted_last_idx_%out_bool
|
|
2799
|
+
!__slice_sorted_ptr_%out_bool
|
|
2800
|
+
!__slice_sorted_small_%out_bool
|
|
2801
|
+
!__slice_sorted_len_%out_bool
|
|
2802
|
+
jmp L_SLICE_SORTED_END_%out_bool
|
|
2803
|
+
|
|
2804
|
+
L_SLICE_SORTED_TRUE_SMALL_%out_bool:
|
|
2805
|
+
%out_bool = add 0, 1
|
|
2806
|
+
!__slice_sorted_small_%out_bool
|
|
2807
|
+
!__slice_sorted_len_%out_bool
|
|
2808
|
+
|
|
2809
|
+
L_SLICE_SORTED_END_%out_bool:
|
|
2810
|
+
[END_MACRO]
|
|
2811
|
+
|
|
2812
|
+
// Rust method-name alias over SLICE_IS_SORTED_U64.
|
|
2813
|
+
[MACRO] SLICE_IS_SORTED %out_bool, %slice_reg
|
|
2814
|
+
EXPAND SLICE_IS_SORTED_U64 %out_bool, %slice_reg
|
|
2815
|
+
[END_MACRO]
|
|
2816
|
+
|
|
2817
|
+
[MACRO] SLICE_IS_SORTED_BY_U64 %out_bool, %slice_reg, %compare_fn
|
|
2818
|
+
__slice_sorted_by_len_%out_bool = load %slice_reg+Slice_len as u64
|
|
2819
|
+
__slice_sorted_by_small_%out_bool = ule __slice_sorted_by_len_%out_bool, 1
|
|
2820
|
+
br __slice_sorted_by_small_%out_bool -> L_SLICE_SORTED_BY_TRUE_SMALL_%out_bool, L_SLICE_SORTED_BY_INIT_%out_bool
|
|
2821
|
+
|
|
2822
|
+
L_SLICE_SORTED_BY_INIT_%out_bool:
|
|
2823
|
+
__slice_sorted_by_ptr_%out_bool = load %slice_reg+Slice_ptr as ptr
|
|
2824
|
+
__slice_sorted_by_last_idx_%out_bool = sub __slice_sorted_by_len_%out_bool, 1
|
|
2825
|
+
__slice_sorted_by_idx_slot_%out_bool = stack_alloc 8
|
|
2826
|
+
store __slice_sorted_by_idx_slot_%out_bool+0, 0 as u64
|
|
2827
|
+
jmp L_SLICE_SORTED_BY_HEAD_%out_bool
|
|
2828
|
+
|
|
2829
|
+
L_SLICE_SORTED_BY_HEAD_%out_bool:
|
|
2830
|
+
__slice_sorted_by_idx_%out_bool = load __slice_sorted_by_idx_slot_%out_bool+0 as u64
|
|
2831
|
+
__slice_sorted_by_done_%out_bool = eq __slice_sorted_by_idx_%out_bool, __slice_sorted_by_last_idx_%out_bool
|
|
2832
|
+
br __slice_sorted_by_done_%out_bool -> L_SLICE_SORTED_BY_TRUE_%out_bool, L_SLICE_SORTED_BY_BODY_%out_bool
|
|
2833
|
+
|
|
2834
|
+
L_SLICE_SORTED_BY_BODY_%out_bool:
|
|
2835
|
+
__slice_sorted_by_next_idx_%out_bool = add __slice_sorted_by_idx_%out_bool, 1
|
|
2836
|
+
__slice_sorted_by_off_%out_bool = mul __slice_sorted_by_idx_%out_bool, 8
|
|
2837
|
+
__slice_sorted_by_next_off_%out_bool = mul __slice_sorted_by_next_idx_%out_bool, 8
|
|
2838
|
+
__slice_sorted_by_left_ptr_%out_bool = ptr_add __slice_sorted_by_ptr_%out_bool, __slice_sorted_by_off_%out_bool
|
|
2839
|
+
__slice_sorted_by_right_ptr_%out_bool = ptr_add __slice_sorted_by_ptr_%out_bool, __slice_sorted_by_next_off_%out_bool
|
|
2840
|
+
__slice_sorted_by_left_%out_bool = load __slice_sorted_by_left_ptr_%out_bool+0 as u64
|
|
2841
|
+
__slice_sorted_by_right_%out_bool = load __slice_sorted_by_right_ptr_%out_bool+0 as u64
|
|
2842
|
+
__slice_sorted_by_pair_ok_%out_bool = call %compare_fn(__slice_sorted_by_left_%out_bool, __slice_sorted_by_right_%out_bool)
|
|
2843
|
+
__slice_sorted_by_pair_bool_%out_bool = ne __slice_sorted_by_pair_ok_%out_bool, 0
|
|
2844
|
+
br __slice_sorted_by_pair_bool_%out_bool -> L_SLICE_SORTED_BY_NEXT_%out_bool, L_SLICE_SORTED_BY_FALSE_%out_bool
|
|
2845
|
+
|
|
2846
|
+
L_SLICE_SORTED_BY_NEXT_%out_bool:
|
|
2847
|
+
store __slice_sorted_by_idx_slot_%out_bool+0, __slice_sorted_by_next_idx_%out_bool as u64
|
|
2848
|
+
!__slice_sorted_by_pair_bool_%out_bool
|
|
2849
|
+
!__slice_sorted_by_pair_ok_%out_bool
|
|
2850
|
+
!__slice_sorted_by_right_%out_bool
|
|
2851
|
+
!__slice_sorted_by_left_%out_bool
|
|
2852
|
+
!__slice_sorted_by_right_ptr_%out_bool
|
|
2853
|
+
!__slice_sorted_by_left_ptr_%out_bool
|
|
2854
|
+
!__slice_sorted_by_next_off_%out_bool
|
|
2855
|
+
!__slice_sorted_by_off_%out_bool
|
|
2856
|
+
!__slice_sorted_by_next_idx_%out_bool
|
|
2857
|
+
!__slice_sorted_by_done_%out_bool
|
|
2858
|
+
!__slice_sorted_by_idx_%out_bool
|
|
2859
|
+
jmp L_SLICE_SORTED_BY_HEAD_%out_bool
|
|
2860
|
+
|
|
2861
|
+
L_SLICE_SORTED_BY_TRUE_%out_bool:
|
|
2862
|
+
%out_bool = add 0, 1
|
|
2863
|
+
!__slice_sorted_by_done_%out_bool
|
|
2864
|
+
!__slice_sorted_by_idx_%out_bool
|
|
2865
|
+
!__slice_sorted_by_last_idx_%out_bool
|
|
2866
|
+
!__slice_sorted_by_ptr_%out_bool
|
|
2867
|
+
!__slice_sorted_by_small_%out_bool
|
|
2868
|
+
!__slice_sorted_by_len_%out_bool
|
|
2869
|
+
jmp L_SLICE_SORTED_BY_END_%out_bool
|
|
2870
|
+
|
|
2871
|
+
L_SLICE_SORTED_BY_FALSE_%out_bool:
|
|
2872
|
+
%out_bool = add 0, 0
|
|
2873
|
+
!__slice_sorted_by_pair_bool_%out_bool
|
|
2874
|
+
!__slice_sorted_by_pair_ok_%out_bool
|
|
2875
|
+
!__slice_sorted_by_right_%out_bool
|
|
2876
|
+
!__slice_sorted_by_left_%out_bool
|
|
2877
|
+
!__slice_sorted_by_right_ptr_%out_bool
|
|
2878
|
+
!__slice_sorted_by_left_ptr_%out_bool
|
|
2879
|
+
!__slice_sorted_by_next_off_%out_bool
|
|
2880
|
+
!__slice_sorted_by_off_%out_bool
|
|
2881
|
+
!__slice_sorted_by_next_idx_%out_bool
|
|
2882
|
+
!__slice_sorted_by_done_%out_bool
|
|
2883
|
+
!__slice_sorted_by_idx_%out_bool
|
|
2884
|
+
!__slice_sorted_by_last_idx_%out_bool
|
|
2885
|
+
!__slice_sorted_by_ptr_%out_bool
|
|
2886
|
+
!__slice_sorted_by_small_%out_bool
|
|
2887
|
+
!__slice_sorted_by_len_%out_bool
|
|
2888
|
+
jmp L_SLICE_SORTED_BY_END_%out_bool
|
|
2889
|
+
|
|
2890
|
+
L_SLICE_SORTED_BY_TRUE_SMALL_%out_bool:
|
|
2891
|
+
%out_bool = add 0, 1
|
|
2892
|
+
!__slice_sorted_by_small_%out_bool
|
|
2893
|
+
!__slice_sorted_by_len_%out_bool
|
|
2894
|
+
|
|
2895
|
+
L_SLICE_SORTED_BY_END_%out_bool:
|
|
2896
|
+
[END_MACRO]
|
|
2897
|
+
|
|
2898
|
+
// Rust method-name alias over SLICE_IS_SORTED_BY_U64.
|
|
2899
|
+
[MACRO] SLICE_IS_SORTED_BY %out_bool, %slice_reg, %compare_fn
|
|
2900
|
+
EXPAND SLICE_IS_SORTED_BY_U64 %out_bool, %slice_reg, %compare_fn
|
|
2901
|
+
[END_MACRO]
|
|
2902
|
+
|
|
2903
|
+
[MACRO] SLICE_IS_SORTED_BY_KEY_U64 %out_bool, %slice_reg, %key_fn
|
|
2904
|
+
__slice_sorted_key_len_%out_bool = load %slice_reg+Slice_len as u64
|
|
2905
|
+
__slice_sorted_key_small_%out_bool = ule __slice_sorted_key_len_%out_bool, 1
|
|
2906
|
+
br __slice_sorted_key_small_%out_bool -> L_SLICE_SORTED_KEY_TRUE_SMALL_%out_bool, L_SLICE_SORTED_KEY_INIT_%out_bool
|
|
2907
|
+
|
|
2908
|
+
L_SLICE_SORTED_KEY_INIT_%out_bool:
|
|
2909
|
+
__slice_sorted_key_ptr_%out_bool = load %slice_reg+Slice_ptr as ptr
|
|
2910
|
+
__slice_sorted_key_last_idx_%out_bool = sub __slice_sorted_key_len_%out_bool, 1
|
|
2911
|
+
__slice_sorted_key_idx_slot_%out_bool = stack_alloc 8
|
|
2912
|
+
store __slice_sorted_key_idx_slot_%out_bool+0, 0 as u64
|
|
2913
|
+
jmp L_SLICE_SORTED_KEY_HEAD_%out_bool
|
|
2914
|
+
|
|
2915
|
+
L_SLICE_SORTED_KEY_HEAD_%out_bool:
|
|
2916
|
+
__slice_sorted_key_idx_%out_bool = load __slice_sorted_key_idx_slot_%out_bool+0 as u64
|
|
2917
|
+
__slice_sorted_key_done_%out_bool = eq __slice_sorted_key_idx_%out_bool, __slice_sorted_key_last_idx_%out_bool
|
|
2918
|
+
br __slice_sorted_key_done_%out_bool -> L_SLICE_SORTED_KEY_TRUE_%out_bool, L_SLICE_SORTED_KEY_BODY_%out_bool
|
|
2919
|
+
|
|
2920
|
+
L_SLICE_SORTED_KEY_BODY_%out_bool:
|
|
2921
|
+
__slice_sorted_key_next_idx_%out_bool = add __slice_sorted_key_idx_%out_bool, 1
|
|
2922
|
+
__slice_sorted_key_off_%out_bool = mul __slice_sorted_key_idx_%out_bool, 8
|
|
2923
|
+
__slice_sorted_key_next_off_%out_bool = mul __slice_sorted_key_next_idx_%out_bool, 8
|
|
2924
|
+
__slice_sorted_key_left_ptr_%out_bool = ptr_add __slice_sorted_key_ptr_%out_bool, __slice_sorted_key_off_%out_bool
|
|
2925
|
+
__slice_sorted_key_right_ptr_%out_bool = ptr_add __slice_sorted_key_ptr_%out_bool, __slice_sorted_key_next_off_%out_bool
|
|
2926
|
+
__slice_sorted_key_left_value_%out_bool = load __slice_sorted_key_left_ptr_%out_bool+0 as u64
|
|
2927
|
+
__slice_sorted_key_right_value_%out_bool = load __slice_sorted_key_right_ptr_%out_bool+0 as u64
|
|
2928
|
+
__slice_sorted_key_left_%out_bool = call %key_fn(__slice_sorted_key_left_value_%out_bool)
|
|
2929
|
+
__slice_sorted_key_right_%out_bool = call %key_fn(__slice_sorted_key_right_value_%out_bool)
|
|
2930
|
+
__slice_sorted_key_pair_ok_%out_bool = ule __slice_sorted_key_left_%out_bool, __slice_sorted_key_right_%out_bool
|
|
2931
|
+
br __slice_sorted_key_pair_ok_%out_bool -> L_SLICE_SORTED_KEY_NEXT_%out_bool, L_SLICE_SORTED_KEY_FALSE_%out_bool
|
|
2932
|
+
|
|
2933
|
+
L_SLICE_SORTED_KEY_NEXT_%out_bool:
|
|
2934
|
+
store __slice_sorted_key_idx_slot_%out_bool+0, __slice_sorted_key_next_idx_%out_bool as u64
|
|
2935
|
+
!__slice_sorted_key_pair_ok_%out_bool
|
|
2936
|
+
!__slice_sorted_key_right_%out_bool
|
|
2937
|
+
!__slice_sorted_key_left_%out_bool
|
|
2938
|
+
!__slice_sorted_key_right_value_%out_bool
|
|
2939
|
+
!__slice_sorted_key_left_value_%out_bool
|
|
2940
|
+
!__slice_sorted_key_right_ptr_%out_bool
|
|
2941
|
+
!__slice_sorted_key_left_ptr_%out_bool
|
|
2942
|
+
!__slice_sorted_key_next_off_%out_bool
|
|
2943
|
+
!__slice_sorted_key_off_%out_bool
|
|
2944
|
+
!__slice_sorted_key_next_idx_%out_bool
|
|
2945
|
+
!__slice_sorted_key_done_%out_bool
|
|
2946
|
+
!__slice_sorted_key_idx_%out_bool
|
|
2947
|
+
jmp L_SLICE_SORTED_KEY_HEAD_%out_bool
|
|
2948
|
+
|
|
2949
|
+
L_SLICE_SORTED_KEY_TRUE_%out_bool:
|
|
2950
|
+
%out_bool = add 0, 1
|
|
2951
|
+
!__slice_sorted_key_done_%out_bool
|
|
2952
|
+
!__slice_sorted_key_idx_%out_bool
|
|
2953
|
+
!__slice_sorted_key_last_idx_%out_bool
|
|
2954
|
+
!__slice_sorted_key_ptr_%out_bool
|
|
2955
|
+
!__slice_sorted_key_small_%out_bool
|
|
2956
|
+
!__slice_sorted_key_len_%out_bool
|
|
2957
|
+
jmp L_SLICE_SORTED_KEY_END_%out_bool
|
|
2958
|
+
|
|
2959
|
+
L_SLICE_SORTED_KEY_FALSE_%out_bool:
|
|
2960
|
+
%out_bool = add 0, 0
|
|
2961
|
+
!__slice_sorted_key_pair_ok_%out_bool
|
|
2962
|
+
!__slice_sorted_key_right_%out_bool
|
|
2963
|
+
!__slice_sorted_key_left_%out_bool
|
|
2964
|
+
!__slice_sorted_key_right_value_%out_bool
|
|
2965
|
+
!__slice_sorted_key_left_value_%out_bool
|
|
2966
|
+
!__slice_sorted_key_right_ptr_%out_bool
|
|
2967
|
+
!__slice_sorted_key_left_ptr_%out_bool
|
|
2968
|
+
!__slice_sorted_key_next_off_%out_bool
|
|
2969
|
+
!__slice_sorted_key_off_%out_bool
|
|
2970
|
+
!__slice_sorted_key_next_idx_%out_bool
|
|
2971
|
+
!__slice_sorted_key_done_%out_bool
|
|
2972
|
+
!__slice_sorted_key_idx_%out_bool
|
|
2973
|
+
!__slice_sorted_key_last_idx_%out_bool
|
|
2974
|
+
!__slice_sorted_key_ptr_%out_bool
|
|
2975
|
+
!__slice_sorted_key_small_%out_bool
|
|
2976
|
+
!__slice_sorted_key_len_%out_bool
|
|
2977
|
+
jmp L_SLICE_SORTED_KEY_END_%out_bool
|
|
2978
|
+
|
|
2979
|
+
L_SLICE_SORTED_KEY_TRUE_SMALL_%out_bool:
|
|
2980
|
+
%out_bool = add 0, 1
|
|
2981
|
+
!__slice_sorted_key_small_%out_bool
|
|
2982
|
+
!__slice_sorted_key_len_%out_bool
|
|
2983
|
+
|
|
2984
|
+
L_SLICE_SORTED_KEY_END_%out_bool:
|
|
2985
|
+
[END_MACRO]
|
|
2986
|
+
|
|
2987
|
+
// Rust method-name alias over SLICE_IS_SORTED_BY_KEY_U64.
|
|
2988
|
+
[MACRO] SLICE_IS_SORTED_BY_KEY %out_bool, %slice_reg, %key_fn
|
|
2989
|
+
EXPAND SLICE_IS_SORTED_BY_KEY_U64 %out_bool, %slice_reg, %key_fn
|
|
2990
|
+
[END_MACRO]
|
|
2991
|
+
|
|
2992
|
+
[MACRO] SLICE_SORT_U64 %slice_reg
|
|
2993
|
+
__slice_sort_len_%slice_reg = load %slice_reg+Slice_len as u64
|
|
2994
|
+
__slice_sort_small_%slice_reg = ule __slice_sort_len_%slice_reg, 1
|
|
2995
|
+
br __slice_sort_small_%slice_reg -> L_SLICE_SORT_DONE_SMALL_%slice_reg, L_SLICE_SORT_INIT_%slice_reg
|
|
2996
|
+
|
|
2997
|
+
L_SLICE_SORT_INIT_%slice_reg:
|
|
2998
|
+
__slice_sort_ptr_%slice_reg = load %slice_reg+Slice_ptr as ptr
|
|
2999
|
+
__slice_sort_i_slot_%slice_reg = stack_alloc 8
|
|
3000
|
+
__slice_sort_j_slot_%slice_reg = stack_alloc 8
|
|
3001
|
+
store __slice_sort_i_slot_%slice_reg+0, 0 as u64
|
|
3002
|
+
jmp L_SLICE_SORT_OUTER_HEAD_%slice_reg
|
|
3003
|
+
|
|
3004
|
+
L_SLICE_SORT_OUTER_HEAD_%slice_reg:
|
|
3005
|
+
__slice_sort_i_%slice_reg = load __slice_sort_i_slot_%slice_reg+0 as u64
|
|
3006
|
+
__slice_sort_done_%slice_reg = eq __slice_sort_i_%slice_reg, __slice_sort_len_%slice_reg
|
|
3007
|
+
br __slice_sort_done_%slice_reg -> L_SLICE_SORT_DONE_%slice_reg, L_SLICE_SORT_OUTER_BODY_%slice_reg
|
|
3008
|
+
|
|
3009
|
+
L_SLICE_SORT_OUTER_BODY_%slice_reg:
|
|
3010
|
+
store __slice_sort_j_slot_%slice_reg+0, 0 as u64
|
|
3011
|
+
jmp L_SLICE_SORT_INNER_HEAD_%slice_reg
|
|
3012
|
+
|
|
3013
|
+
L_SLICE_SORT_INNER_HEAD_%slice_reg:
|
|
3014
|
+
__slice_sort_j_%slice_reg = load __slice_sort_j_slot_%slice_reg+0 as u64
|
|
3015
|
+
__slice_sort_rem_%slice_reg = sub __slice_sort_len_%slice_reg, __slice_sort_i_%slice_reg
|
|
3016
|
+
__slice_sort_last_%slice_reg = sub __slice_sort_rem_%slice_reg, 1
|
|
3017
|
+
__slice_sort_inner_done_%slice_reg = uge __slice_sort_j_%slice_reg, __slice_sort_last_%slice_reg
|
|
3018
|
+
br __slice_sort_inner_done_%slice_reg -> L_SLICE_SORT_OUTER_NEXT_%slice_reg, L_SLICE_SORT_COMPARE_%slice_reg
|
|
3019
|
+
|
|
3020
|
+
L_SLICE_SORT_COMPARE_%slice_reg:
|
|
3021
|
+
__slice_sort_next_j_%slice_reg = add __slice_sort_j_%slice_reg, 1
|
|
3022
|
+
__slice_sort_left_off_%slice_reg = mul __slice_sort_j_%slice_reg, 8
|
|
3023
|
+
__slice_sort_right_off_%slice_reg = mul __slice_sort_next_j_%slice_reg, 8
|
|
3024
|
+
__slice_sort_left_ptr_%slice_reg = ptr_add __slice_sort_ptr_%slice_reg, __slice_sort_left_off_%slice_reg
|
|
3025
|
+
__slice_sort_right_ptr_%slice_reg = ptr_add __slice_sort_ptr_%slice_reg, __slice_sort_right_off_%slice_reg
|
|
3026
|
+
__slice_sort_left_%slice_reg = load __slice_sort_left_ptr_%slice_reg+0 as u64
|
|
3027
|
+
__slice_sort_right_%slice_reg = load __slice_sort_right_ptr_%slice_reg+0 as u64
|
|
3028
|
+
__slice_sort_swap_%slice_reg = ugt __slice_sort_left_%slice_reg, __slice_sort_right_%slice_reg
|
|
3029
|
+
br __slice_sort_swap_%slice_reg -> L_SLICE_SORT_SWAP_%slice_reg, L_SLICE_SORT_INNER_NEXT_%slice_reg
|
|
3030
|
+
|
|
3031
|
+
L_SLICE_SORT_SWAP_%slice_reg:
|
|
3032
|
+
store __slice_sort_left_ptr_%slice_reg+0, __slice_sort_right_%slice_reg as u64
|
|
3033
|
+
store __slice_sort_right_ptr_%slice_reg+0, __slice_sort_left_%slice_reg as u64
|
|
3034
|
+
jmp L_SLICE_SORT_INNER_NEXT_%slice_reg
|
|
3035
|
+
|
|
3036
|
+
L_SLICE_SORT_INNER_NEXT_%slice_reg:
|
|
3037
|
+
store __slice_sort_j_slot_%slice_reg+0, __slice_sort_next_j_%slice_reg as u64
|
|
3038
|
+
!__slice_sort_swap_%slice_reg
|
|
3039
|
+
!__slice_sort_right_%slice_reg
|
|
3040
|
+
!__slice_sort_left_%slice_reg
|
|
3041
|
+
!__slice_sort_right_ptr_%slice_reg
|
|
3042
|
+
!__slice_sort_left_ptr_%slice_reg
|
|
3043
|
+
!__slice_sort_right_off_%slice_reg
|
|
3044
|
+
!__slice_sort_left_off_%slice_reg
|
|
3045
|
+
!__slice_sort_next_j_%slice_reg
|
|
3046
|
+
!__slice_sort_inner_done_%slice_reg
|
|
3047
|
+
!__slice_sort_last_%slice_reg
|
|
3048
|
+
!__slice_sort_rem_%slice_reg
|
|
3049
|
+
!__slice_sort_j_%slice_reg
|
|
3050
|
+
jmp L_SLICE_SORT_INNER_HEAD_%slice_reg
|
|
3051
|
+
|
|
3052
|
+
L_SLICE_SORT_OUTER_NEXT_%slice_reg:
|
|
3053
|
+
__slice_sort_next_i_%slice_reg = add __slice_sort_i_%slice_reg, 1
|
|
3054
|
+
store __slice_sort_i_slot_%slice_reg+0, __slice_sort_next_i_%slice_reg as u64
|
|
3055
|
+
!__slice_sort_next_i_%slice_reg
|
|
3056
|
+
!__slice_sort_inner_done_%slice_reg
|
|
3057
|
+
!__slice_sort_last_%slice_reg
|
|
3058
|
+
!__slice_sort_rem_%slice_reg
|
|
3059
|
+
!__slice_sort_j_%slice_reg
|
|
3060
|
+
!__slice_sort_done_%slice_reg
|
|
3061
|
+
!__slice_sort_i_%slice_reg
|
|
3062
|
+
jmp L_SLICE_SORT_OUTER_HEAD_%slice_reg
|
|
3063
|
+
|
|
3064
|
+
L_SLICE_SORT_DONE_%slice_reg:
|
|
3065
|
+
!__slice_sort_done_%slice_reg
|
|
3066
|
+
!__slice_sort_i_%slice_reg
|
|
3067
|
+
!__slice_sort_ptr_%slice_reg
|
|
3068
|
+
!__slice_sort_small_%slice_reg
|
|
3069
|
+
!__slice_sort_len_%slice_reg
|
|
3070
|
+
jmp L_SLICE_SORT_END_%slice_reg
|
|
3071
|
+
|
|
3072
|
+
L_SLICE_SORT_DONE_SMALL_%slice_reg:
|
|
3073
|
+
!__slice_sort_small_%slice_reg
|
|
3074
|
+
!__slice_sort_len_%slice_reg
|
|
3075
|
+
|
|
3076
|
+
L_SLICE_SORT_END_%slice_reg:
|
|
3077
|
+
[END_MACRO]
|
|
3078
|
+
|
|
3079
|
+
// Rust method-name alias over SLICE_SORT_U64.
|
|
3080
|
+
[MACRO] SLICE_SORT %slice_reg
|
|
3081
|
+
EXPAND SLICE_SORT_U64 %slice_reg
|
|
3082
|
+
[END_MACRO]
|
|
3083
|
+
|
|
3084
|
+
[MACRO] SLICE_SORT_BY_U64 %slice_reg, %compare_fn
|
|
3085
|
+
__slice_sort_by_len_%slice_reg = load %slice_reg+Slice_len as u64
|
|
3086
|
+
__slice_sort_by_small_%slice_reg = ule __slice_sort_by_len_%slice_reg, 1
|
|
3087
|
+
br __slice_sort_by_small_%slice_reg -> L_SLICE_SORT_BY_DONE_SMALL_%slice_reg, L_SLICE_SORT_BY_INIT_%slice_reg
|
|
3088
|
+
|
|
3089
|
+
L_SLICE_SORT_BY_INIT_%slice_reg:
|
|
3090
|
+
__slice_sort_by_ptr_%slice_reg = load %slice_reg+Slice_ptr as ptr
|
|
3091
|
+
__slice_sort_by_i_slot_%slice_reg = stack_alloc 8
|
|
3092
|
+
__slice_sort_by_j_slot_%slice_reg = stack_alloc 8
|
|
3093
|
+
store __slice_sort_by_i_slot_%slice_reg+0, 0 as u64
|
|
3094
|
+
jmp L_SLICE_SORT_BY_OUTER_HEAD_%slice_reg
|
|
3095
|
+
|
|
3096
|
+
L_SLICE_SORT_BY_OUTER_HEAD_%slice_reg:
|
|
3097
|
+
__slice_sort_by_i_%slice_reg = load __slice_sort_by_i_slot_%slice_reg+0 as u64
|
|
3098
|
+
__slice_sort_by_done_%slice_reg = eq __slice_sort_by_i_%slice_reg, __slice_sort_by_len_%slice_reg
|
|
3099
|
+
br __slice_sort_by_done_%slice_reg -> L_SLICE_SORT_BY_DONE_%slice_reg, L_SLICE_SORT_BY_OUTER_BODY_%slice_reg
|
|
3100
|
+
|
|
3101
|
+
L_SLICE_SORT_BY_OUTER_BODY_%slice_reg:
|
|
3102
|
+
store __slice_sort_by_j_slot_%slice_reg+0, 0 as u64
|
|
3103
|
+
jmp L_SLICE_SORT_BY_INNER_HEAD_%slice_reg
|
|
3104
|
+
|
|
3105
|
+
L_SLICE_SORT_BY_INNER_HEAD_%slice_reg:
|
|
3106
|
+
__slice_sort_by_j_%slice_reg = load __slice_sort_by_j_slot_%slice_reg+0 as u64
|
|
3107
|
+
__slice_sort_by_rem_%slice_reg = sub __slice_sort_by_len_%slice_reg, __slice_sort_by_i_%slice_reg
|
|
3108
|
+
__slice_sort_by_last_%slice_reg = sub __slice_sort_by_rem_%slice_reg, 1
|
|
3109
|
+
__slice_sort_by_inner_done_%slice_reg = uge __slice_sort_by_j_%slice_reg, __slice_sort_by_last_%slice_reg
|
|
3110
|
+
br __slice_sort_by_inner_done_%slice_reg -> L_SLICE_SORT_BY_OUTER_NEXT_%slice_reg, L_SLICE_SORT_BY_COMPARE_%slice_reg
|
|
3111
|
+
|
|
3112
|
+
L_SLICE_SORT_BY_COMPARE_%slice_reg:
|
|
3113
|
+
__slice_sort_by_next_j_%slice_reg = add __slice_sort_by_j_%slice_reg, 1
|
|
3114
|
+
__slice_sort_by_left_off_%slice_reg = mul __slice_sort_by_j_%slice_reg, 8
|
|
3115
|
+
__slice_sort_by_right_off_%slice_reg = mul __slice_sort_by_next_j_%slice_reg, 8
|
|
3116
|
+
__slice_sort_by_left_ptr_%slice_reg = ptr_add __slice_sort_by_ptr_%slice_reg, __slice_sort_by_left_off_%slice_reg
|
|
3117
|
+
__slice_sort_by_right_ptr_%slice_reg = ptr_add __slice_sort_by_ptr_%slice_reg, __slice_sort_by_right_off_%slice_reg
|
|
3118
|
+
__slice_sort_by_left_%slice_reg = load __slice_sort_by_left_ptr_%slice_reg+0 as u64
|
|
3119
|
+
__slice_sort_by_right_%slice_reg = load __slice_sort_by_right_ptr_%slice_reg+0 as u64
|
|
3120
|
+
__slice_sort_by_order_ok_%slice_reg = call %compare_fn(__slice_sort_by_left_%slice_reg, __slice_sort_by_right_%slice_reg)
|
|
3121
|
+
__slice_sort_by_swap_%slice_reg = eq __slice_sort_by_order_ok_%slice_reg, 0
|
|
3122
|
+
br __slice_sort_by_swap_%slice_reg -> L_SLICE_SORT_BY_SWAP_%slice_reg, L_SLICE_SORT_BY_INNER_NEXT_%slice_reg
|
|
3123
|
+
|
|
3124
|
+
L_SLICE_SORT_BY_SWAP_%slice_reg:
|
|
3125
|
+
store __slice_sort_by_left_ptr_%slice_reg+0, __slice_sort_by_right_%slice_reg as u64
|
|
3126
|
+
store __slice_sort_by_right_ptr_%slice_reg+0, __slice_sort_by_left_%slice_reg as u64
|
|
3127
|
+
jmp L_SLICE_SORT_BY_INNER_NEXT_%slice_reg
|
|
3128
|
+
|
|
3129
|
+
L_SLICE_SORT_BY_INNER_NEXT_%slice_reg:
|
|
3130
|
+
store __slice_sort_by_j_slot_%slice_reg+0, __slice_sort_by_next_j_%slice_reg as u64
|
|
3131
|
+
!__slice_sort_by_swap_%slice_reg
|
|
3132
|
+
!__slice_sort_by_order_ok_%slice_reg
|
|
3133
|
+
!__slice_sort_by_right_%slice_reg
|
|
3134
|
+
!__slice_sort_by_left_%slice_reg
|
|
3135
|
+
!__slice_sort_by_right_ptr_%slice_reg
|
|
3136
|
+
!__slice_sort_by_left_ptr_%slice_reg
|
|
3137
|
+
!__slice_sort_by_right_off_%slice_reg
|
|
3138
|
+
!__slice_sort_by_left_off_%slice_reg
|
|
3139
|
+
!__slice_sort_by_next_j_%slice_reg
|
|
3140
|
+
!__slice_sort_by_inner_done_%slice_reg
|
|
3141
|
+
!__slice_sort_by_last_%slice_reg
|
|
3142
|
+
!__slice_sort_by_rem_%slice_reg
|
|
3143
|
+
!__slice_sort_by_j_%slice_reg
|
|
3144
|
+
jmp L_SLICE_SORT_BY_INNER_HEAD_%slice_reg
|
|
3145
|
+
|
|
3146
|
+
L_SLICE_SORT_BY_OUTER_NEXT_%slice_reg:
|
|
3147
|
+
__slice_sort_by_next_i_%slice_reg = add __slice_sort_by_i_%slice_reg, 1
|
|
3148
|
+
store __slice_sort_by_i_slot_%slice_reg+0, __slice_sort_by_next_i_%slice_reg as u64
|
|
3149
|
+
!__slice_sort_by_next_i_%slice_reg
|
|
3150
|
+
!__slice_sort_by_inner_done_%slice_reg
|
|
3151
|
+
!__slice_sort_by_last_%slice_reg
|
|
3152
|
+
!__slice_sort_by_rem_%slice_reg
|
|
3153
|
+
!__slice_sort_by_j_%slice_reg
|
|
3154
|
+
!__slice_sort_by_done_%slice_reg
|
|
3155
|
+
!__slice_sort_by_i_%slice_reg
|
|
3156
|
+
jmp L_SLICE_SORT_BY_OUTER_HEAD_%slice_reg
|
|
3157
|
+
|
|
3158
|
+
L_SLICE_SORT_BY_DONE_%slice_reg:
|
|
3159
|
+
!__slice_sort_by_done_%slice_reg
|
|
3160
|
+
!__slice_sort_by_i_%slice_reg
|
|
3161
|
+
!__slice_sort_by_ptr_%slice_reg
|
|
3162
|
+
!__slice_sort_by_small_%slice_reg
|
|
3163
|
+
!__slice_sort_by_len_%slice_reg
|
|
3164
|
+
jmp L_SLICE_SORT_BY_END_%slice_reg
|
|
3165
|
+
|
|
3166
|
+
L_SLICE_SORT_BY_DONE_SMALL_%slice_reg:
|
|
3167
|
+
!__slice_sort_by_small_%slice_reg
|
|
3168
|
+
!__slice_sort_by_len_%slice_reg
|
|
3169
|
+
|
|
3170
|
+
L_SLICE_SORT_BY_END_%slice_reg:
|
|
3171
|
+
[END_MACRO]
|
|
3172
|
+
|
|
3173
|
+
// Rust method-name alias over SLICE_SORT_BY_U64.
|
|
3174
|
+
[MACRO] SLICE_SORT_BY %slice_reg, %compare_fn
|
|
3175
|
+
EXPAND SLICE_SORT_BY_U64 %slice_reg, %compare_fn
|
|
3176
|
+
[END_MACRO]
|
|
3177
|
+
|
|
3178
|
+
[MACRO] SLICE_SORT_BY_KEY_U64 %slice_reg, %key_fn
|
|
3179
|
+
__slice_sort_key_len_%slice_reg = load %slice_reg+Slice_len as u64
|
|
3180
|
+
__slice_sort_key_small_%slice_reg = ule __slice_sort_key_len_%slice_reg, 1
|
|
3181
|
+
br __slice_sort_key_small_%slice_reg -> L_SLICE_SORT_KEY_DONE_SMALL_%slice_reg, L_SLICE_SORT_KEY_INIT_%slice_reg
|
|
3182
|
+
|
|
3183
|
+
L_SLICE_SORT_KEY_INIT_%slice_reg:
|
|
3184
|
+
__slice_sort_key_ptr_%slice_reg = load %slice_reg+Slice_ptr as ptr
|
|
3185
|
+
__slice_sort_key_i_slot_%slice_reg = stack_alloc 8
|
|
3186
|
+
__slice_sort_key_j_slot_%slice_reg = stack_alloc 8
|
|
3187
|
+
store __slice_sort_key_i_slot_%slice_reg+0, 0 as u64
|
|
3188
|
+
jmp L_SLICE_SORT_KEY_OUTER_HEAD_%slice_reg
|
|
3189
|
+
|
|
3190
|
+
L_SLICE_SORT_KEY_OUTER_HEAD_%slice_reg:
|
|
3191
|
+
__slice_sort_key_i_%slice_reg = load __slice_sort_key_i_slot_%slice_reg+0 as u64
|
|
3192
|
+
__slice_sort_key_done_%slice_reg = eq __slice_sort_key_i_%slice_reg, __slice_sort_key_len_%slice_reg
|
|
3193
|
+
br __slice_sort_key_done_%slice_reg -> L_SLICE_SORT_KEY_DONE_%slice_reg, L_SLICE_SORT_KEY_OUTER_BODY_%slice_reg
|
|
3194
|
+
|
|
3195
|
+
L_SLICE_SORT_KEY_OUTER_BODY_%slice_reg:
|
|
3196
|
+
store __slice_sort_key_j_slot_%slice_reg+0, 0 as u64
|
|
3197
|
+
jmp L_SLICE_SORT_KEY_INNER_HEAD_%slice_reg
|
|
3198
|
+
|
|
3199
|
+
L_SLICE_SORT_KEY_INNER_HEAD_%slice_reg:
|
|
3200
|
+
__slice_sort_key_j_%slice_reg = load __slice_sort_key_j_slot_%slice_reg+0 as u64
|
|
3201
|
+
__slice_sort_key_rem_%slice_reg = sub __slice_sort_key_len_%slice_reg, __slice_sort_key_i_%slice_reg
|
|
3202
|
+
__slice_sort_key_last_%slice_reg = sub __slice_sort_key_rem_%slice_reg, 1
|
|
3203
|
+
__slice_sort_key_inner_done_%slice_reg = uge __slice_sort_key_j_%slice_reg, __slice_sort_key_last_%slice_reg
|
|
3204
|
+
br __slice_sort_key_inner_done_%slice_reg -> L_SLICE_SORT_KEY_OUTER_NEXT_%slice_reg, L_SLICE_SORT_KEY_COMPARE_%slice_reg
|
|
3205
|
+
|
|
3206
|
+
L_SLICE_SORT_KEY_COMPARE_%slice_reg:
|
|
3207
|
+
__slice_sort_key_next_j_%slice_reg = add __slice_sort_key_j_%slice_reg, 1
|
|
3208
|
+
__slice_sort_key_left_off_%slice_reg = mul __slice_sort_key_j_%slice_reg, 8
|
|
3209
|
+
__slice_sort_key_right_off_%slice_reg = mul __slice_sort_key_next_j_%slice_reg, 8
|
|
3210
|
+
__slice_sort_key_left_ptr_%slice_reg = ptr_add __slice_sort_key_ptr_%slice_reg, __slice_sort_key_left_off_%slice_reg
|
|
3211
|
+
__slice_sort_key_right_ptr_%slice_reg = ptr_add __slice_sort_key_ptr_%slice_reg, __slice_sort_key_right_off_%slice_reg
|
|
3212
|
+
__slice_sort_key_left_value_%slice_reg = load __slice_sort_key_left_ptr_%slice_reg+0 as u64
|
|
3213
|
+
__slice_sort_key_right_value_%slice_reg = load __slice_sort_key_right_ptr_%slice_reg+0 as u64
|
|
3214
|
+
__slice_sort_key_left_%slice_reg = call %key_fn(__slice_sort_key_left_value_%slice_reg)
|
|
3215
|
+
__slice_sort_key_right_%slice_reg = call %key_fn(__slice_sort_key_right_value_%slice_reg)
|
|
3216
|
+
__slice_sort_key_swap_%slice_reg = ugt __slice_sort_key_left_%slice_reg, __slice_sort_key_right_%slice_reg
|
|
3217
|
+
br __slice_sort_key_swap_%slice_reg -> L_SLICE_SORT_KEY_SWAP_%slice_reg, L_SLICE_SORT_KEY_INNER_NEXT_%slice_reg
|
|
3218
|
+
|
|
3219
|
+
L_SLICE_SORT_KEY_SWAP_%slice_reg:
|
|
3220
|
+
store __slice_sort_key_left_ptr_%slice_reg+0, __slice_sort_key_right_value_%slice_reg as u64
|
|
3221
|
+
store __slice_sort_key_right_ptr_%slice_reg+0, __slice_sort_key_left_value_%slice_reg as u64
|
|
3222
|
+
jmp L_SLICE_SORT_KEY_INNER_NEXT_%slice_reg
|
|
3223
|
+
|
|
3224
|
+
L_SLICE_SORT_KEY_INNER_NEXT_%slice_reg:
|
|
3225
|
+
store __slice_sort_key_j_slot_%slice_reg+0, __slice_sort_key_next_j_%slice_reg as u64
|
|
3226
|
+
!__slice_sort_key_swap_%slice_reg
|
|
3227
|
+
!__slice_sort_key_right_%slice_reg
|
|
3228
|
+
!__slice_sort_key_left_%slice_reg
|
|
3229
|
+
!__slice_sort_key_right_value_%slice_reg
|
|
3230
|
+
!__slice_sort_key_left_value_%slice_reg
|
|
3231
|
+
!__slice_sort_key_right_ptr_%slice_reg
|
|
3232
|
+
!__slice_sort_key_left_ptr_%slice_reg
|
|
3233
|
+
!__slice_sort_key_right_off_%slice_reg
|
|
3234
|
+
!__slice_sort_key_left_off_%slice_reg
|
|
3235
|
+
!__slice_sort_key_next_j_%slice_reg
|
|
3236
|
+
!__slice_sort_key_inner_done_%slice_reg
|
|
3237
|
+
!__slice_sort_key_last_%slice_reg
|
|
3238
|
+
!__slice_sort_key_rem_%slice_reg
|
|
3239
|
+
!__slice_sort_key_j_%slice_reg
|
|
3240
|
+
jmp L_SLICE_SORT_KEY_INNER_HEAD_%slice_reg
|
|
3241
|
+
|
|
3242
|
+
L_SLICE_SORT_KEY_OUTER_NEXT_%slice_reg:
|
|
3243
|
+
__slice_sort_key_next_i_%slice_reg = add __slice_sort_key_i_%slice_reg, 1
|
|
3244
|
+
store __slice_sort_key_i_slot_%slice_reg+0, __slice_sort_key_next_i_%slice_reg as u64
|
|
3245
|
+
!__slice_sort_key_next_i_%slice_reg
|
|
3246
|
+
!__slice_sort_key_inner_done_%slice_reg
|
|
3247
|
+
!__slice_sort_key_last_%slice_reg
|
|
3248
|
+
!__slice_sort_key_rem_%slice_reg
|
|
3249
|
+
!__slice_sort_key_j_%slice_reg
|
|
3250
|
+
!__slice_sort_key_done_%slice_reg
|
|
3251
|
+
!__slice_sort_key_i_%slice_reg
|
|
3252
|
+
jmp L_SLICE_SORT_KEY_OUTER_HEAD_%slice_reg
|
|
3253
|
+
|
|
3254
|
+
L_SLICE_SORT_KEY_DONE_%slice_reg:
|
|
3255
|
+
!__slice_sort_key_done_%slice_reg
|
|
3256
|
+
!__slice_sort_key_i_%slice_reg
|
|
3257
|
+
!__slice_sort_key_ptr_%slice_reg
|
|
3258
|
+
!__slice_sort_key_small_%slice_reg
|
|
3259
|
+
!__slice_sort_key_len_%slice_reg
|
|
3260
|
+
jmp L_SLICE_SORT_KEY_END_%slice_reg
|
|
3261
|
+
|
|
3262
|
+
L_SLICE_SORT_KEY_DONE_SMALL_%slice_reg:
|
|
3263
|
+
!__slice_sort_key_small_%slice_reg
|
|
3264
|
+
!__slice_sort_key_len_%slice_reg
|
|
3265
|
+
|
|
3266
|
+
L_SLICE_SORT_KEY_END_%slice_reg:
|
|
3267
|
+
[END_MACRO]
|
|
3268
|
+
|
|
3269
|
+
// Rust method-name alias over SLICE_SORT_BY_KEY_U64.
|
|
3270
|
+
[MACRO] SLICE_SORT_BY_KEY %slice_reg, %key_fn
|
|
3271
|
+
EXPAND SLICE_SORT_BY_KEY_U64 %slice_reg, %key_fn
|
|
3272
|
+
[END_MACRO]
|
|
3273
|
+
|
|
3274
|
+
[MACRO] SLICE_SORT_BY_CACHED_KEY_U64 %slice_reg, %key_fn
|
|
3275
|
+
EXPAND SLICE_SORT_BY_KEY_U64 %slice_reg, %key_fn
|
|
3276
|
+
[END_MACRO]
|
|
3277
|
+
|
|
3278
|
+
// Rust method-name alias over SLICE_SORT_BY_CACHED_KEY_U64.
|
|
3279
|
+
[MACRO] SLICE_SORT_BY_CACHED_KEY %slice_reg, %key_fn
|
|
3280
|
+
EXPAND SLICE_SORT_BY_CACHED_KEY_U64 %slice_reg, %key_fn
|
|
3281
|
+
[END_MACRO]
|
|
3282
|
+
|
|
3283
|
+
[MACRO] SLICE_SORT_UNSTABLE_U64 %slice_reg
|
|
3284
|
+
EXPAND SLICE_SORT_U64 %slice_reg
|
|
3285
|
+
[END_MACRO]
|
|
3286
|
+
|
|
3287
|
+
// Rust method-name alias over SLICE_SORT_UNSTABLE_U64.
|
|
3288
|
+
[MACRO] SLICE_SORT_UNSTABLE %slice_reg
|
|
3289
|
+
EXPAND SLICE_SORT_UNSTABLE_U64 %slice_reg
|
|
3290
|
+
[END_MACRO]
|
|
3291
|
+
|
|
3292
|
+
[MACRO] SLICE_SORT_UNSTABLE_BY_U64 %slice_reg, %compare_fn
|
|
3293
|
+
EXPAND SLICE_SORT_BY_U64 %slice_reg, %compare_fn
|
|
3294
|
+
[END_MACRO]
|
|
3295
|
+
|
|
3296
|
+
// Rust method-name alias over SLICE_SORT_UNSTABLE_BY_U64.
|
|
3297
|
+
[MACRO] SLICE_SORT_UNSTABLE_BY %slice_reg, %compare_fn
|
|
3298
|
+
EXPAND SLICE_SORT_UNSTABLE_BY_U64 %slice_reg, %compare_fn
|
|
3299
|
+
[END_MACRO]
|
|
3300
|
+
|
|
3301
|
+
[MACRO] SLICE_SORT_UNSTABLE_BY_KEY_U64 %slice_reg, %key_fn
|
|
3302
|
+
EXPAND SLICE_SORT_BY_KEY_U64 %slice_reg, %key_fn
|
|
3303
|
+
[END_MACRO]
|
|
3304
|
+
|
|
3305
|
+
// Rust method-name alias over SLICE_SORT_UNSTABLE_BY_KEY_U64.
|
|
3306
|
+
[MACRO] SLICE_SORT_UNSTABLE_BY_KEY %slice_reg, %key_fn
|
|
3307
|
+
EXPAND SLICE_SORT_UNSTABLE_BY_KEY_U64 %slice_reg, %key_fn
|
|
3308
|
+
[END_MACRO]
|
|
3309
|
+
|
|
3310
|
+
[MACRO] SLICE_TRY_SELECT_NTH_UNSTABLE_U64 %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth
|
|
3311
|
+
%out_left = alloc Slice_SIZE
|
|
3312
|
+
%out_right = alloc Slice_SIZE
|
|
3313
|
+
__slice_select_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
3314
|
+
__slice_select_in_bounds_%out_ok = ult %nth, __slice_select_len_%out_ok
|
|
3315
|
+
br __slice_select_in_bounds_%out_ok -> L_SLICE_SELECT_NTH_HIT_%out_ok, L_SLICE_SELECT_NTH_MISS_%out_ok
|
|
3316
|
+
|
|
3317
|
+
L_SLICE_SELECT_NTH_HIT_%out_ok:
|
|
3318
|
+
!__slice_select_in_bounds_%out_ok
|
|
3319
|
+
!__slice_select_len_%out_ok
|
|
3320
|
+
__slice_select_sort_view_%out_ok = ptr_add %slice_reg, 0
|
|
3321
|
+
EXPAND SLICE_SORT_UNSTABLE_U64 __slice_select_sort_view_%out_ok
|
|
3322
|
+
__slice_select_len2_%out_ok = load __slice_select_sort_view_%out_ok+Slice_len as u64
|
|
3323
|
+
__slice_select_ptr_%out_ok = load __slice_select_sort_view_%out_ok+Slice_ptr as ptr
|
|
3324
|
+
__slice_select_pivot_off_%out_ok = mul %nth, 8
|
|
3325
|
+
%out_pivot_ptr = ptr_add __slice_select_ptr_%out_ok, __slice_select_pivot_off_%out_ok
|
|
3326
|
+
__slice_select_right_off_%out_ok = add __slice_select_pivot_off_%out_ok, 8
|
|
3327
|
+
__slice_select_right_ptr_%out_ok = ptr_add __slice_select_ptr_%out_ok, __slice_select_right_off_%out_ok
|
|
3328
|
+
__slice_select_after_pivot_%out_ok = add %nth, 1
|
|
3329
|
+
__slice_select_right_len_%out_ok = sub __slice_select_len2_%out_ok, __slice_select_after_pivot_%out_ok
|
|
3330
|
+
EXPAND SLICE_NEW %out_left, __slice_select_ptr_%out_ok, %nth
|
|
3331
|
+
EXPAND SLICE_NEW %out_right, __slice_select_right_ptr_%out_ok, __slice_select_right_len_%out_ok
|
|
3332
|
+
%out_ok = add 0, 1
|
|
3333
|
+
!__slice_select_right_len_%out_ok
|
|
3334
|
+
!__slice_select_after_pivot_%out_ok
|
|
3335
|
+
!__slice_select_right_ptr_%out_ok
|
|
3336
|
+
!__slice_select_right_off_%out_ok
|
|
3337
|
+
!__slice_select_pivot_off_%out_ok
|
|
3338
|
+
!__slice_select_ptr_%out_ok
|
|
3339
|
+
!__slice_select_len2_%out_ok
|
|
3340
|
+
!__slice_select_sort_view_%out_ok
|
|
3341
|
+
jmp L_SLICE_SELECT_NTH_END_%out_ok
|
|
3342
|
+
|
|
3343
|
+
L_SLICE_SELECT_NTH_MISS_%out_ok:
|
|
3344
|
+
__slice_select_empty_ptr_%out_ok = 0 as ptr
|
|
3345
|
+
EXPAND SLICE_NEW %out_left, __slice_select_empty_ptr_%out_ok, 0
|
|
3346
|
+
EXPAND SLICE_NEW %out_right, __slice_select_empty_ptr_%out_ok, 0
|
|
3347
|
+
%out_pivot_ptr = 0 as ptr
|
|
3348
|
+
%out_ok = add 0, 0
|
|
3349
|
+
!__slice_select_empty_ptr_%out_ok
|
|
3350
|
+
!__slice_select_in_bounds_%out_ok
|
|
3351
|
+
!__slice_select_len_%out_ok
|
|
3352
|
+
|
|
3353
|
+
L_SLICE_SELECT_NTH_END_%out_ok:
|
|
3354
|
+
[END_MACRO]
|
|
3355
|
+
|
|
3356
|
+
// Rust method-name alias over SLICE_TRY_SELECT_NTH_UNSTABLE_U64.
|
|
3357
|
+
[MACRO] SLICE_TRY_SELECT_NTH_UNSTABLE %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth
|
|
3358
|
+
EXPAND SLICE_TRY_SELECT_NTH_UNSTABLE_U64 %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth
|
|
3359
|
+
[END_MACRO]
|
|
3360
|
+
|
|
3361
|
+
[MACRO] SLICE_TRY_SELECT_NTH_UNSTABLE_BY_U64 %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth, %compare_fn
|
|
3362
|
+
%out_left = alloc Slice_SIZE
|
|
3363
|
+
%out_right = alloc Slice_SIZE
|
|
3364
|
+
__slice_select_by_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
3365
|
+
__slice_select_by_in_bounds_%out_ok = ult %nth, __slice_select_by_len_%out_ok
|
|
3366
|
+
br __slice_select_by_in_bounds_%out_ok -> L_SLICE_SELECT_NTH_BY_HIT_%out_ok, L_SLICE_SELECT_NTH_BY_MISS_%out_ok
|
|
3367
|
+
|
|
3368
|
+
L_SLICE_SELECT_NTH_BY_HIT_%out_ok:
|
|
3369
|
+
!__slice_select_by_in_bounds_%out_ok
|
|
3370
|
+
!__slice_select_by_len_%out_ok
|
|
3371
|
+
__slice_select_by_sort_view_%out_ok = ptr_add %slice_reg, 0
|
|
3372
|
+
EXPAND SLICE_SORT_UNSTABLE_BY_U64 __slice_select_by_sort_view_%out_ok, %compare_fn
|
|
3373
|
+
__slice_select_by_len2_%out_ok = load __slice_select_by_sort_view_%out_ok+Slice_len as u64
|
|
3374
|
+
__slice_select_by_ptr_%out_ok = load __slice_select_by_sort_view_%out_ok+Slice_ptr as ptr
|
|
3375
|
+
__slice_select_by_pivot_off_%out_ok = mul %nth, 8
|
|
3376
|
+
%out_pivot_ptr = ptr_add __slice_select_by_ptr_%out_ok, __slice_select_by_pivot_off_%out_ok
|
|
3377
|
+
__slice_select_by_right_off_%out_ok = add __slice_select_by_pivot_off_%out_ok, 8
|
|
3378
|
+
__slice_select_by_right_ptr_%out_ok = ptr_add __slice_select_by_ptr_%out_ok, __slice_select_by_right_off_%out_ok
|
|
3379
|
+
__slice_select_by_after_pivot_%out_ok = add %nth, 1
|
|
3380
|
+
__slice_select_by_right_len_%out_ok = sub __slice_select_by_len2_%out_ok, __slice_select_by_after_pivot_%out_ok
|
|
3381
|
+
EXPAND SLICE_NEW %out_left, __slice_select_by_ptr_%out_ok, %nth
|
|
3382
|
+
EXPAND SLICE_NEW %out_right, __slice_select_by_right_ptr_%out_ok, __slice_select_by_right_len_%out_ok
|
|
3383
|
+
%out_ok = add 0, 1
|
|
3384
|
+
!__slice_select_by_right_len_%out_ok
|
|
3385
|
+
!__slice_select_by_after_pivot_%out_ok
|
|
3386
|
+
!__slice_select_by_right_ptr_%out_ok
|
|
3387
|
+
!__slice_select_by_right_off_%out_ok
|
|
3388
|
+
!__slice_select_by_pivot_off_%out_ok
|
|
3389
|
+
!__slice_select_by_ptr_%out_ok
|
|
3390
|
+
!__slice_select_by_len2_%out_ok
|
|
3391
|
+
!__slice_select_by_sort_view_%out_ok
|
|
3392
|
+
jmp L_SLICE_SELECT_NTH_BY_END_%out_ok
|
|
3393
|
+
|
|
3394
|
+
L_SLICE_SELECT_NTH_BY_MISS_%out_ok:
|
|
3395
|
+
__slice_select_by_empty_ptr_%out_ok = 0 as ptr
|
|
3396
|
+
EXPAND SLICE_NEW %out_left, __slice_select_by_empty_ptr_%out_ok, 0
|
|
3397
|
+
EXPAND SLICE_NEW %out_right, __slice_select_by_empty_ptr_%out_ok, 0
|
|
3398
|
+
%out_pivot_ptr = 0 as ptr
|
|
3399
|
+
%out_ok = add 0, 0
|
|
3400
|
+
!__slice_select_by_empty_ptr_%out_ok
|
|
3401
|
+
!__slice_select_by_in_bounds_%out_ok
|
|
3402
|
+
!__slice_select_by_len_%out_ok
|
|
3403
|
+
|
|
3404
|
+
L_SLICE_SELECT_NTH_BY_END_%out_ok:
|
|
3405
|
+
[END_MACRO]
|
|
3406
|
+
|
|
3407
|
+
// Rust method-name alias over SLICE_TRY_SELECT_NTH_UNSTABLE_BY_U64.
|
|
3408
|
+
[MACRO] SLICE_TRY_SELECT_NTH_UNSTABLE_BY %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth, %compare_fn
|
|
3409
|
+
EXPAND SLICE_TRY_SELECT_NTH_UNSTABLE_BY_U64 %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth, %compare_fn
|
|
3410
|
+
[END_MACRO]
|
|
3411
|
+
|
|
3412
|
+
[MACRO] SLICE_TRY_SELECT_NTH_UNSTABLE_BY_KEY_U64 %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth, %key_fn
|
|
3413
|
+
%out_left = alloc Slice_SIZE
|
|
3414
|
+
%out_right = alloc Slice_SIZE
|
|
3415
|
+
__slice_select_key_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
3416
|
+
__slice_select_key_in_bounds_%out_ok = ult %nth, __slice_select_key_len_%out_ok
|
|
3417
|
+
br __slice_select_key_in_bounds_%out_ok -> L_SLICE_SELECT_NTH_KEY_HIT_%out_ok, L_SLICE_SELECT_NTH_KEY_MISS_%out_ok
|
|
3418
|
+
|
|
3419
|
+
L_SLICE_SELECT_NTH_KEY_HIT_%out_ok:
|
|
3420
|
+
!__slice_select_key_in_bounds_%out_ok
|
|
3421
|
+
!__slice_select_key_len_%out_ok
|
|
3422
|
+
__slice_select_key_sort_view_%out_ok = ptr_add %slice_reg, 0
|
|
3423
|
+
EXPAND SLICE_SORT_UNSTABLE_BY_KEY_U64 __slice_select_key_sort_view_%out_ok, %key_fn
|
|
3424
|
+
__slice_select_key_len2_%out_ok = load __slice_select_key_sort_view_%out_ok+Slice_len as u64
|
|
3425
|
+
__slice_select_key_ptr_%out_ok = load __slice_select_key_sort_view_%out_ok+Slice_ptr as ptr
|
|
3426
|
+
__slice_select_key_pivot_off_%out_ok = mul %nth, 8
|
|
3427
|
+
%out_pivot_ptr = ptr_add __slice_select_key_ptr_%out_ok, __slice_select_key_pivot_off_%out_ok
|
|
3428
|
+
__slice_select_key_right_off_%out_ok = add __slice_select_key_pivot_off_%out_ok, 8
|
|
3429
|
+
__slice_select_key_right_ptr_%out_ok = ptr_add __slice_select_key_ptr_%out_ok, __slice_select_key_right_off_%out_ok
|
|
3430
|
+
__slice_select_key_after_pivot_%out_ok = add %nth, 1
|
|
3431
|
+
__slice_select_key_right_len_%out_ok = sub __slice_select_key_len2_%out_ok, __slice_select_key_after_pivot_%out_ok
|
|
3432
|
+
EXPAND SLICE_NEW %out_left, __slice_select_key_ptr_%out_ok, %nth
|
|
3433
|
+
EXPAND SLICE_NEW %out_right, __slice_select_key_right_ptr_%out_ok, __slice_select_key_right_len_%out_ok
|
|
3434
|
+
%out_ok = add 0, 1
|
|
3435
|
+
!__slice_select_key_right_len_%out_ok
|
|
3436
|
+
!__slice_select_key_after_pivot_%out_ok
|
|
3437
|
+
!__slice_select_key_right_ptr_%out_ok
|
|
3438
|
+
!__slice_select_key_right_off_%out_ok
|
|
3439
|
+
!__slice_select_key_pivot_off_%out_ok
|
|
3440
|
+
!__slice_select_key_ptr_%out_ok
|
|
3441
|
+
!__slice_select_key_len2_%out_ok
|
|
3442
|
+
!__slice_select_key_sort_view_%out_ok
|
|
3443
|
+
jmp L_SLICE_SELECT_NTH_KEY_END_%out_ok
|
|
3444
|
+
|
|
3445
|
+
L_SLICE_SELECT_NTH_KEY_MISS_%out_ok:
|
|
3446
|
+
__slice_select_key_empty_ptr_%out_ok = 0 as ptr
|
|
3447
|
+
EXPAND SLICE_NEW %out_left, __slice_select_key_empty_ptr_%out_ok, 0
|
|
3448
|
+
EXPAND SLICE_NEW %out_right, __slice_select_key_empty_ptr_%out_ok, 0
|
|
3449
|
+
%out_pivot_ptr = 0 as ptr
|
|
3450
|
+
%out_ok = add 0, 0
|
|
3451
|
+
!__slice_select_key_empty_ptr_%out_ok
|
|
3452
|
+
!__slice_select_key_in_bounds_%out_ok
|
|
3453
|
+
!__slice_select_key_len_%out_ok
|
|
3454
|
+
|
|
3455
|
+
L_SLICE_SELECT_NTH_KEY_END_%out_ok:
|
|
3456
|
+
[END_MACRO]
|
|
3457
|
+
|
|
3458
|
+
// Rust method-name alias over SLICE_TRY_SELECT_NTH_UNSTABLE_BY_KEY_U64.
|
|
3459
|
+
[MACRO] SLICE_TRY_SELECT_NTH_UNSTABLE_BY_KEY %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth, %key_fn
|
|
3460
|
+
EXPAND SLICE_TRY_SELECT_NTH_UNSTABLE_BY_KEY_U64 %out_ok, %out_left, %out_pivot_ptr, %out_right, %slice_reg, %nth, %key_fn
|
|
3461
|
+
[END_MACRO]
|
|
3462
|
+
|
|
3463
|
+
[MACRO] SLICE_COPY_FROM_SLICE_U64 %out_ok, %dst_slice, %src_slice
|
|
3464
|
+
__slice_copy_dst_len_%out_ok = load %dst_slice+Slice_len as u64
|
|
3465
|
+
__slice_copy_src_len_%out_ok = load %src_slice+Slice_len as u64
|
|
3466
|
+
__slice_copy_same_len_%out_ok = eq __slice_copy_dst_len_%out_ok, __slice_copy_src_len_%out_ok
|
|
3467
|
+
br __slice_copy_same_len_%out_ok -> L_SLICE_COPY_INIT_%out_ok, L_SLICE_COPY_MISS_%out_ok
|
|
3468
|
+
|
|
3469
|
+
L_SLICE_COPY_INIT_%out_ok:
|
|
3470
|
+
__slice_copy_dst_ptr_%out_ok = load %dst_slice+Slice_ptr as ptr
|
|
3471
|
+
__slice_copy_src_ptr_%out_ok = load %src_slice+Slice_ptr as ptr
|
|
3472
|
+
__slice_copy_idx_slot_%out_ok = stack_alloc 8
|
|
3473
|
+
store __slice_copy_idx_slot_%out_ok+0, 0 as u64
|
|
3474
|
+
jmp L_SLICE_COPY_HEAD_%out_ok
|
|
3475
|
+
|
|
3476
|
+
L_SLICE_COPY_HEAD_%out_ok:
|
|
3477
|
+
__slice_copy_idx_%out_ok = load __slice_copy_idx_slot_%out_ok+0 as u64
|
|
3478
|
+
__slice_copy_done_%out_ok = eq __slice_copy_idx_%out_ok, __slice_copy_dst_len_%out_ok
|
|
3479
|
+
br __slice_copy_done_%out_ok -> L_SLICE_COPY_HIT_%out_ok, L_SLICE_COPY_BODY_%out_ok
|
|
3480
|
+
|
|
3481
|
+
L_SLICE_COPY_BODY_%out_ok:
|
|
3482
|
+
__slice_copy_off_%out_ok = mul __slice_copy_idx_%out_ok, 8
|
|
3483
|
+
__slice_copy_dst_item_%out_ok = ptr_add __slice_copy_dst_ptr_%out_ok, __slice_copy_off_%out_ok
|
|
3484
|
+
__slice_copy_src_item_%out_ok = ptr_add __slice_copy_src_ptr_%out_ok, __slice_copy_off_%out_ok
|
|
3485
|
+
__slice_copy_value_%out_ok = load __slice_copy_src_item_%out_ok+0 as u64
|
|
3486
|
+
store __slice_copy_dst_item_%out_ok+0, __slice_copy_value_%out_ok as u64
|
|
3487
|
+
__slice_copy_next_%out_ok = add __slice_copy_idx_%out_ok, 1
|
|
3488
|
+
store __slice_copy_idx_slot_%out_ok+0, __slice_copy_next_%out_ok as u64
|
|
3489
|
+
!__slice_copy_next_%out_ok
|
|
3490
|
+
!__slice_copy_value_%out_ok
|
|
3491
|
+
!__slice_copy_src_item_%out_ok
|
|
3492
|
+
!__slice_copy_dst_item_%out_ok
|
|
3493
|
+
!__slice_copy_off_%out_ok
|
|
3494
|
+
!__slice_copy_done_%out_ok
|
|
3495
|
+
!__slice_copy_idx_%out_ok
|
|
3496
|
+
jmp L_SLICE_COPY_HEAD_%out_ok
|
|
3497
|
+
|
|
3498
|
+
L_SLICE_COPY_HIT_%out_ok:
|
|
3499
|
+
%out_ok = add 0, 1
|
|
3500
|
+
!__slice_copy_done_%out_ok
|
|
3501
|
+
!__slice_copy_idx_%out_ok
|
|
3502
|
+
!__slice_copy_src_ptr_%out_ok
|
|
3503
|
+
!__slice_copy_dst_ptr_%out_ok
|
|
3504
|
+
!__slice_copy_same_len_%out_ok
|
|
3505
|
+
!__slice_copy_src_len_%out_ok
|
|
3506
|
+
!__slice_copy_dst_len_%out_ok
|
|
3507
|
+
jmp L_SLICE_COPY_END_%out_ok
|
|
3508
|
+
|
|
3509
|
+
L_SLICE_COPY_MISS_%out_ok:
|
|
3510
|
+
%out_ok = add 0, 0
|
|
3511
|
+
!__slice_copy_same_len_%out_ok
|
|
3512
|
+
!__slice_copy_src_len_%out_ok
|
|
3513
|
+
!__slice_copy_dst_len_%out_ok
|
|
3514
|
+
|
|
3515
|
+
L_SLICE_COPY_END_%out_ok:
|
|
3516
|
+
[END_MACRO]
|
|
3517
|
+
|
|
3518
|
+
// Rust method-name alias over SLICE_COPY_FROM_SLICE_U64.
|
|
3519
|
+
[MACRO] SLICE_COPY_FROM_SLICE %out_ok, %dst_slice, %src_slice
|
|
3520
|
+
EXPAND SLICE_COPY_FROM_SLICE_U64 %out_ok, %dst_slice, %src_slice
|
|
3521
|
+
[END_MACRO]
|
|
3522
|
+
|
|
3523
|
+
[MACRO] SLICE_CLONE_FROM_SLICE_U64 %out_ok, %dst_slice, %src_slice
|
|
3524
|
+
EXPAND SLICE_COPY_FROM_SLICE_U64 %out_ok, %dst_slice, %src_slice
|
|
3525
|
+
[END_MACRO]
|
|
3526
|
+
|
|
3527
|
+
// Rust method-name alias over SLICE_CLONE_FROM_SLICE_U64.
|
|
3528
|
+
[MACRO] SLICE_CLONE_FROM_SLICE %out_ok, %dst_slice, %src_slice
|
|
3529
|
+
EXPAND SLICE_CLONE_FROM_SLICE_U64 %out_ok, %dst_slice, %src_slice
|
|
3530
|
+
[END_MACRO]
|
|
3531
|
+
|
|
3532
|
+
[MACRO] SLICE_COPY_WITHIN_U64 %out_ok, %slice_reg, %src_start, %src_len, %dest
|
|
3533
|
+
__slice_cw_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
3534
|
+
__slice_cw_idx_slot_%out_ok = stack_alloc 8
|
|
3535
|
+
__slice_cw_src_start_ok_%out_ok = ule %src_start, __slice_cw_len_%out_ok
|
|
3536
|
+
br __slice_cw_src_start_ok_%out_ok -> L_SLICE_CW_SRC_LEN_CHECK_%out_ok, L_SLICE_CW_MISS_SRC_START_%out_ok
|
|
3537
|
+
|
|
3538
|
+
L_SLICE_CW_SRC_LEN_CHECK_%out_ok:
|
|
3539
|
+
__slice_cw_src_remaining_%out_ok = sub __slice_cw_len_%out_ok, %src_start
|
|
3540
|
+
__slice_cw_src_len_ok_%out_ok = ule %src_len, __slice_cw_src_remaining_%out_ok
|
|
3541
|
+
br __slice_cw_src_len_ok_%out_ok -> L_SLICE_CW_DEST_CHECK_%out_ok, L_SLICE_CW_MISS_SRC_LEN_%out_ok
|
|
3542
|
+
|
|
3543
|
+
L_SLICE_CW_DEST_CHECK_%out_ok:
|
|
3544
|
+
__slice_cw_dest_ok_%out_ok = ule %dest, __slice_cw_len_%out_ok
|
|
3545
|
+
br __slice_cw_dest_ok_%out_ok -> L_SLICE_CW_DEST_LEN_CHECK_%out_ok, L_SLICE_CW_MISS_DEST_%out_ok
|
|
3546
|
+
|
|
3547
|
+
L_SLICE_CW_DEST_LEN_CHECK_%out_ok:
|
|
3548
|
+
__slice_cw_dest_remaining_%out_ok = sub __slice_cw_len_%out_ok, %dest
|
|
3549
|
+
__slice_cw_dest_len_ok_%out_ok = ule %src_len, __slice_cw_dest_remaining_%out_ok
|
|
3550
|
+
br __slice_cw_dest_len_ok_%out_ok -> L_SLICE_CW_INIT_%out_ok, L_SLICE_CW_MISS_DEST_LEN_%out_ok
|
|
3551
|
+
|
|
3552
|
+
L_SLICE_CW_INIT_%out_ok:
|
|
3553
|
+
__slice_cw_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
3554
|
+
__slice_cw_dest_after_%out_ok = ugt %dest, %src_start
|
|
3555
|
+
br __slice_cw_dest_after_%out_ok -> L_SLICE_CW_BACK_INIT_%out_ok, L_SLICE_CW_FORWARD_INIT_%out_ok
|
|
3556
|
+
|
|
3557
|
+
L_SLICE_CW_FORWARD_INIT_%out_ok:
|
|
3558
|
+
store __slice_cw_idx_slot_%out_ok+0, 0 as u64
|
|
3559
|
+
jmp L_SLICE_CW_FORWARD_HEAD_%out_ok
|
|
3560
|
+
|
|
3561
|
+
L_SLICE_CW_FORWARD_HEAD_%out_ok:
|
|
3562
|
+
__slice_cw_fwd_idx_%out_ok = load __slice_cw_idx_slot_%out_ok+0 as u64
|
|
3563
|
+
__slice_cw_fwd_done_%out_ok = eq __slice_cw_fwd_idx_%out_ok, %src_len
|
|
3564
|
+
br __slice_cw_fwd_done_%out_ok -> L_SLICE_CW_FORWARD_HIT_%out_ok, L_SLICE_CW_FORWARD_BODY_%out_ok
|
|
3565
|
+
|
|
3566
|
+
L_SLICE_CW_FORWARD_BODY_%out_ok:
|
|
3567
|
+
__slice_cw_fwd_src_idx_%out_ok = add %src_start, __slice_cw_fwd_idx_%out_ok
|
|
3568
|
+
__slice_cw_fwd_dst_idx_%out_ok = add %dest, __slice_cw_fwd_idx_%out_ok
|
|
3569
|
+
__slice_cw_fwd_src_off_%out_ok = mul __slice_cw_fwd_src_idx_%out_ok, 8
|
|
3570
|
+
__slice_cw_fwd_dst_off_%out_ok = mul __slice_cw_fwd_dst_idx_%out_ok, 8
|
|
3571
|
+
__slice_cw_fwd_src_ptr_%out_ok = ptr_add __slice_cw_ptr_%out_ok, __slice_cw_fwd_src_off_%out_ok
|
|
3572
|
+
__slice_cw_fwd_dst_ptr_%out_ok = ptr_add __slice_cw_ptr_%out_ok, __slice_cw_fwd_dst_off_%out_ok
|
|
3573
|
+
__slice_cw_fwd_value_%out_ok = load __slice_cw_fwd_src_ptr_%out_ok+0 as u64
|
|
3574
|
+
store __slice_cw_fwd_dst_ptr_%out_ok+0, __slice_cw_fwd_value_%out_ok as u64
|
|
3575
|
+
__slice_cw_fwd_next_%out_ok = add __slice_cw_fwd_idx_%out_ok, 1
|
|
3576
|
+
store __slice_cw_idx_slot_%out_ok+0, __slice_cw_fwd_next_%out_ok as u64
|
|
3577
|
+
!__slice_cw_fwd_next_%out_ok
|
|
3578
|
+
!__slice_cw_fwd_value_%out_ok
|
|
3579
|
+
!__slice_cw_fwd_dst_ptr_%out_ok
|
|
3580
|
+
!__slice_cw_fwd_src_ptr_%out_ok
|
|
3581
|
+
!__slice_cw_fwd_dst_off_%out_ok
|
|
3582
|
+
!__slice_cw_fwd_src_off_%out_ok
|
|
3583
|
+
!__slice_cw_fwd_dst_idx_%out_ok
|
|
3584
|
+
!__slice_cw_fwd_src_idx_%out_ok
|
|
3585
|
+
!__slice_cw_fwd_done_%out_ok
|
|
3586
|
+
!__slice_cw_fwd_idx_%out_ok
|
|
3587
|
+
jmp L_SLICE_CW_FORWARD_HEAD_%out_ok
|
|
3588
|
+
|
|
3589
|
+
L_SLICE_CW_FORWARD_HIT_%out_ok:
|
|
3590
|
+
%out_ok = add 0, 1
|
|
3591
|
+
!__slice_cw_fwd_done_%out_ok
|
|
3592
|
+
!__slice_cw_fwd_idx_%out_ok
|
|
3593
|
+
!__slice_cw_dest_after_%out_ok
|
|
3594
|
+
!__slice_cw_ptr_%out_ok
|
|
3595
|
+
!__slice_cw_dest_len_ok_%out_ok
|
|
3596
|
+
!__slice_cw_dest_remaining_%out_ok
|
|
3597
|
+
!__slice_cw_dest_ok_%out_ok
|
|
3598
|
+
!__slice_cw_src_len_ok_%out_ok
|
|
3599
|
+
!__slice_cw_src_remaining_%out_ok
|
|
3600
|
+
!__slice_cw_src_start_ok_%out_ok
|
|
3601
|
+
!__slice_cw_len_%out_ok
|
|
3602
|
+
jmp L_SLICE_CW_END_%out_ok
|
|
3603
|
+
|
|
3604
|
+
L_SLICE_CW_BACK_INIT_%out_ok:
|
|
3605
|
+
store __slice_cw_idx_slot_%out_ok+0, %src_len as u64
|
|
3606
|
+
jmp L_SLICE_CW_BACK_HEAD_%out_ok
|
|
3607
|
+
|
|
3608
|
+
L_SLICE_CW_BACK_HEAD_%out_ok:
|
|
3609
|
+
__slice_cw_back_remaining_%out_ok = load __slice_cw_idx_slot_%out_ok+0 as u64
|
|
3610
|
+
__slice_cw_back_done_%out_ok = eq __slice_cw_back_remaining_%out_ok, 0
|
|
3611
|
+
br __slice_cw_back_done_%out_ok -> L_SLICE_CW_BACK_HIT_%out_ok, L_SLICE_CW_BACK_BODY_%out_ok
|
|
3612
|
+
|
|
3613
|
+
L_SLICE_CW_BACK_BODY_%out_ok:
|
|
3614
|
+
__slice_cw_back_idx_%out_ok = sub __slice_cw_back_remaining_%out_ok, 1
|
|
3615
|
+
__slice_cw_back_src_idx_%out_ok = add %src_start, __slice_cw_back_idx_%out_ok
|
|
3616
|
+
__slice_cw_back_dst_idx_%out_ok = add %dest, __slice_cw_back_idx_%out_ok
|
|
3617
|
+
__slice_cw_back_src_off_%out_ok = mul __slice_cw_back_src_idx_%out_ok, 8
|
|
3618
|
+
__slice_cw_back_dst_off_%out_ok = mul __slice_cw_back_dst_idx_%out_ok, 8
|
|
3619
|
+
__slice_cw_back_src_ptr_%out_ok = ptr_add __slice_cw_ptr_%out_ok, __slice_cw_back_src_off_%out_ok
|
|
3620
|
+
__slice_cw_back_dst_ptr_%out_ok = ptr_add __slice_cw_ptr_%out_ok, __slice_cw_back_dst_off_%out_ok
|
|
3621
|
+
__slice_cw_back_value_%out_ok = load __slice_cw_back_src_ptr_%out_ok+0 as u64
|
|
3622
|
+
store __slice_cw_back_dst_ptr_%out_ok+0, __slice_cw_back_value_%out_ok as u64
|
|
3623
|
+
store __slice_cw_idx_slot_%out_ok+0, __slice_cw_back_idx_%out_ok as u64
|
|
3624
|
+
!__slice_cw_back_value_%out_ok
|
|
3625
|
+
!__slice_cw_back_dst_ptr_%out_ok
|
|
3626
|
+
!__slice_cw_back_src_ptr_%out_ok
|
|
3627
|
+
!__slice_cw_back_dst_off_%out_ok
|
|
3628
|
+
!__slice_cw_back_src_off_%out_ok
|
|
3629
|
+
!__slice_cw_back_dst_idx_%out_ok
|
|
3630
|
+
!__slice_cw_back_src_idx_%out_ok
|
|
3631
|
+
!__slice_cw_back_idx_%out_ok
|
|
3632
|
+
!__slice_cw_back_done_%out_ok
|
|
3633
|
+
!__slice_cw_back_remaining_%out_ok
|
|
3634
|
+
jmp L_SLICE_CW_BACK_HEAD_%out_ok
|
|
3635
|
+
|
|
3636
|
+
L_SLICE_CW_BACK_HIT_%out_ok:
|
|
3637
|
+
%out_ok = add 0, 1
|
|
3638
|
+
!__slice_cw_back_done_%out_ok
|
|
3639
|
+
!__slice_cw_back_remaining_%out_ok
|
|
3640
|
+
!__slice_cw_dest_after_%out_ok
|
|
3641
|
+
!__slice_cw_ptr_%out_ok
|
|
3642
|
+
!__slice_cw_dest_len_ok_%out_ok
|
|
3643
|
+
!__slice_cw_dest_remaining_%out_ok
|
|
3644
|
+
!__slice_cw_dest_ok_%out_ok
|
|
3645
|
+
!__slice_cw_src_len_ok_%out_ok
|
|
3646
|
+
!__slice_cw_src_remaining_%out_ok
|
|
3647
|
+
!__slice_cw_src_start_ok_%out_ok
|
|
3648
|
+
!__slice_cw_len_%out_ok
|
|
3649
|
+
jmp L_SLICE_CW_END_%out_ok
|
|
3650
|
+
|
|
3651
|
+
L_SLICE_CW_MISS_DEST_LEN_%out_ok:
|
|
3652
|
+
%out_ok = add 0, 0
|
|
3653
|
+
!__slice_cw_dest_len_ok_%out_ok
|
|
3654
|
+
!__slice_cw_dest_remaining_%out_ok
|
|
3655
|
+
!__slice_cw_dest_ok_%out_ok
|
|
3656
|
+
!__slice_cw_src_len_ok_%out_ok
|
|
3657
|
+
!__slice_cw_src_remaining_%out_ok
|
|
3658
|
+
!__slice_cw_src_start_ok_%out_ok
|
|
3659
|
+
!__slice_cw_len_%out_ok
|
|
3660
|
+
jmp L_SLICE_CW_END_%out_ok
|
|
3661
|
+
|
|
3662
|
+
L_SLICE_CW_MISS_DEST_%out_ok:
|
|
3663
|
+
%out_ok = add 0, 0
|
|
3664
|
+
!__slice_cw_dest_ok_%out_ok
|
|
3665
|
+
!__slice_cw_src_len_ok_%out_ok
|
|
3666
|
+
!__slice_cw_src_remaining_%out_ok
|
|
3667
|
+
!__slice_cw_src_start_ok_%out_ok
|
|
3668
|
+
!__slice_cw_len_%out_ok
|
|
3669
|
+
jmp L_SLICE_CW_END_%out_ok
|
|
3670
|
+
|
|
3671
|
+
L_SLICE_CW_MISS_SRC_LEN_%out_ok:
|
|
3672
|
+
%out_ok = add 0, 0
|
|
3673
|
+
!__slice_cw_src_len_ok_%out_ok
|
|
3674
|
+
!__slice_cw_src_remaining_%out_ok
|
|
3675
|
+
!__slice_cw_src_start_ok_%out_ok
|
|
3676
|
+
!__slice_cw_len_%out_ok
|
|
3677
|
+
jmp L_SLICE_CW_END_%out_ok
|
|
3678
|
+
|
|
3679
|
+
L_SLICE_CW_MISS_SRC_START_%out_ok:
|
|
3680
|
+
%out_ok = add 0, 0
|
|
3681
|
+
!__slice_cw_src_start_ok_%out_ok
|
|
3682
|
+
!__slice_cw_len_%out_ok
|
|
3683
|
+
|
|
3684
|
+
L_SLICE_CW_END_%out_ok:
|
|
3685
|
+
[END_MACRO]
|
|
3686
|
+
|
|
3687
|
+
// Rust method-name alias over SLICE_COPY_WITHIN_U64.
|
|
3688
|
+
[MACRO] SLICE_COPY_WITHIN %out_ok, %slice_reg, %src_start, %src_len, %dest
|
|
3689
|
+
EXPAND SLICE_COPY_WITHIN_U64 %out_ok, %slice_reg, %src_start, %src_len, %dest
|
|
3690
|
+
[END_MACRO]
|
|
3691
|
+
|
|
3692
|
+
[MACRO] SLICE_TRY_BINARY_SEARCH_U64 %out_ok, %out_index, %slice_reg, %needle
|
|
3693
|
+
__slice_bs_ptr_%out_ok = load %slice_reg+Slice_ptr as ptr
|
|
3694
|
+
__slice_bs_len_%out_ok = load %slice_reg+Slice_len as u64
|
|
3695
|
+
__slice_bs_left_slot_%out_ok = stack_alloc 8
|
|
3696
|
+
__slice_bs_right_slot_%out_ok = stack_alloc 8
|
|
3697
|
+
store __slice_bs_left_slot_%out_ok+0, 0 as u64
|
|
3698
|
+
store __slice_bs_right_slot_%out_ok+0, __slice_bs_len_%out_ok as u64
|
|
3699
|
+
jmp L_SLICE_BS_HEAD_%out_ok
|
|
3700
|
+
|
|
3701
|
+
L_SLICE_BS_HEAD_%out_ok:
|
|
3702
|
+
__slice_bs_left_%out_ok = load __slice_bs_left_slot_%out_ok+0 as u64
|
|
3703
|
+
__slice_bs_right_%out_ok = load __slice_bs_right_slot_%out_ok+0 as u64
|
|
3704
|
+
__slice_bs_continue_%out_ok = ult __slice_bs_left_%out_ok, __slice_bs_right_%out_ok
|
|
3705
|
+
br __slice_bs_continue_%out_ok -> L_SLICE_BS_BODY_%out_ok, L_SLICE_BS_MISS_%out_ok
|
|
3706
|
+
|
|
3707
|
+
L_SLICE_BS_BODY_%out_ok:
|
|
3708
|
+
__slice_bs_span_%out_ok = sub __slice_bs_right_%out_ok, __slice_bs_left_%out_ok
|
|
3709
|
+
__slice_bs_half_%out_ok = udiv __slice_bs_span_%out_ok, 2
|
|
3710
|
+
__slice_bs_mid_%out_ok = add __slice_bs_left_%out_ok, __slice_bs_half_%out_ok
|
|
3711
|
+
__slice_bs_mid_off_%out_ok = mul __slice_bs_mid_%out_ok, 8
|
|
3712
|
+
__slice_bs_mid_ptr_%out_ok = ptr_add __slice_bs_ptr_%out_ok, __slice_bs_mid_off_%out_ok
|
|
3713
|
+
__slice_bs_value_%out_ok = load __slice_bs_mid_ptr_%out_ok+0 as u64
|
|
3714
|
+
__slice_bs_equal_%out_ok = eq __slice_bs_value_%out_ok, %needle
|
|
3715
|
+
br __slice_bs_equal_%out_ok -> L_SLICE_BS_HIT_%out_ok, L_SLICE_BS_ORDER_%out_ok
|
|
3716
|
+
|
|
3717
|
+
L_SLICE_BS_ORDER_%out_ok:
|
|
3718
|
+
__slice_bs_less_%out_ok = ult __slice_bs_value_%out_ok, %needle
|
|
3719
|
+
br __slice_bs_less_%out_ok -> L_SLICE_BS_MOVE_RIGHT_%out_ok, L_SLICE_BS_MOVE_LEFT_%out_ok
|
|
3720
|
+
|
|
3721
|
+
L_SLICE_BS_MOVE_RIGHT_%out_ok:
|
|
3722
|
+
__slice_bs_next_left_%out_ok = add __slice_bs_mid_%out_ok, 1
|
|
3723
|
+
store __slice_bs_left_slot_%out_ok+0, __slice_bs_next_left_%out_ok as u64
|
|
3724
|
+
!__slice_bs_next_left_%out_ok
|
|
3725
|
+
!__slice_bs_less_%out_ok
|
|
3726
|
+
!__slice_bs_equal_%out_ok
|
|
3727
|
+
!__slice_bs_value_%out_ok
|
|
3728
|
+
!__slice_bs_mid_ptr_%out_ok
|
|
3729
|
+
!__slice_bs_mid_off_%out_ok
|
|
3730
|
+
!__slice_bs_mid_%out_ok
|
|
3731
|
+
!__slice_bs_half_%out_ok
|
|
3732
|
+
!__slice_bs_span_%out_ok
|
|
3733
|
+
!__slice_bs_continue_%out_ok
|
|
3734
|
+
!__slice_bs_right_%out_ok
|
|
3735
|
+
!__slice_bs_left_%out_ok
|
|
3736
|
+
jmp L_SLICE_BS_HEAD_%out_ok
|
|
3737
|
+
|
|
3738
|
+
L_SLICE_BS_MOVE_LEFT_%out_ok:
|
|
3739
|
+
store __slice_bs_right_slot_%out_ok+0, __slice_bs_mid_%out_ok as u64
|
|
3740
|
+
!__slice_bs_less_%out_ok
|
|
3741
|
+
!__slice_bs_equal_%out_ok
|
|
3742
|
+
!__slice_bs_value_%out_ok
|
|
3743
|
+
!__slice_bs_mid_ptr_%out_ok
|
|
3744
|
+
!__slice_bs_mid_off_%out_ok
|
|
3745
|
+
!__slice_bs_mid_%out_ok
|
|
3746
|
+
!__slice_bs_half_%out_ok
|
|
3747
|
+
!__slice_bs_span_%out_ok
|
|
3748
|
+
!__slice_bs_continue_%out_ok
|
|
3749
|
+
!__slice_bs_right_%out_ok
|
|
3750
|
+
!__slice_bs_left_%out_ok
|
|
3751
|
+
jmp L_SLICE_BS_HEAD_%out_ok
|
|
3752
|
+
|
|
3753
|
+
L_SLICE_BS_HIT_%out_ok:
|
|
3754
|
+
%out_ok = add 0, 1
|
|
3755
|
+
%out_index = add __slice_bs_mid_%out_ok, 0
|
|
3756
|
+
!__slice_bs_equal_%out_ok
|
|
3757
|
+
!__slice_bs_value_%out_ok
|
|
3758
|
+
!__slice_bs_mid_ptr_%out_ok
|
|
3759
|
+
!__slice_bs_mid_off_%out_ok
|
|
3760
|
+
!__slice_bs_mid_%out_ok
|
|
3761
|
+
!__slice_bs_half_%out_ok
|
|
3762
|
+
!__slice_bs_span_%out_ok
|
|
3763
|
+
!__slice_bs_continue_%out_ok
|
|
3764
|
+
!__slice_bs_right_%out_ok
|
|
3765
|
+
!__slice_bs_left_%out_ok
|
|
3766
|
+
!__slice_bs_len_%out_ok
|
|
3767
|
+
!__slice_bs_ptr_%out_ok
|
|
3768
|
+
jmp L_SLICE_BS_END_%out_ok
|
|
3769
|
+
|
|
3770
|
+
L_SLICE_BS_MISS_%out_ok:
|
|
3771
|
+
%out_ok = add 0, 0
|
|
3772
|
+
%out_index = add __slice_bs_left_%out_ok, 0
|
|
3773
|
+
!__slice_bs_continue_%out_ok
|
|
3774
|
+
!__slice_bs_right_%out_ok
|
|
3775
|
+
!__slice_bs_left_%out_ok
|
|
3776
|
+
!__slice_bs_len_%out_ok
|
|
3777
|
+
!__slice_bs_ptr_%out_ok
|
|
3778
|
+
|
|
3779
|
+
L_SLICE_BS_END_%out_ok:
|
|
3780
|
+
[END_MACRO]
|
|
3781
|
+
|
|
3782
|
+
// Rust method-name alias over SLICE_TRY_BINARY_SEARCH_U64.
|
|
3783
|
+
[MACRO] SLICE_TRY_BINARY_SEARCH %out_ok, %out_index, %slice_reg, %needle
|
|
3784
|
+
EXPAND SLICE_TRY_BINARY_SEARCH_U64 %out_ok, %out_index, %slice_reg, %needle
|
|
3785
|
+
[END_MACRO]
|
|
3786
|
+
|
|
3787
|
+
[MACRO] SLICE_PARTITION_POINT_U64 %out_index, %slice_reg, %pred_fn
|
|
3788
|
+
__slice_pp_ptr_%out_index = load %slice_reg+Slice_ptr as ptr
|
|
3789
|
+
__slice_pp_len_%out_index = load %slice_reg+Slice_len as u64
|
|
3790
|
+
__slice_pp_left_slot_%out_index = stack_alloc 8
|
|
3791
|
+
__slice_pp_right_slot_%out_index = stack_alloc 8
|
|
3792
|
+
store __slice_pp_left_slot_%out_index+0, 0 as u64
|
|
3793
|
+
store __slice_pp_right_slot_%out_index+0, __slice_pp_len_%out_index as u64
|
|
3794
|
+
jmp L_SLICE_PP_HEAD_%out_index
|
|
3795
|
+
|
|
3796
|
+
L_SLICE_PP_HEAD_%out_index:
|
|
3797
|
+
__slice_pp_left_%out_index = load __slice_pp_left_slot_%out_index+0 as u64
|
|
3798
|
+
__slice_pp_right_%out_index = load __slice_pp_right_slot_%out_index+0 as u64
|
|
3799
|
+
__slice_pp_continue_%out_index = ult __slice_pp_left_%out_index, __slice_pp_right_%out_index
|
|
3800
|
+
br __slice_pp_continue_%out_index -> L_SLICE_PP_BODY_%out_index, L_SLICE_PP_DONE_%out_index
|
|
3801
|
+
|
|
3802
|
+
L_SLICE_PP_BODY_%out_index:
|
|
3803
|
+
__slice_pp_span_%out_index = sub __slice_pp_right_%out_index, __slice_pp_left_%out_index
|
|
3804
|
+
__slice_pp_half_%out_index = udiv __slice_pp_span_%out_index, 2
|
|
3805
|
+
__slice_pp_mid_%out_index = add __slice_pp_left_%out_index, __slice_pp_half_%out_index
|
|
3806
|
+
__slice_pp_mid_off_%out_index = mul __slice_pp_mid_%out_index, 8
|
|
3807
|
+
__slice_pp_mid_ptr_%out_index = ptr_add __slice_pp_ptr_%out_index, __slice_pp_mid_off_%out_index
|
|
3808
|
+
__slice_pp_value_%out_index = load __slice_pp_mid_ptr_%out_index+0 as u64
|
|
3809
|
+
__slice_pp_pred_%out_index = call %pred_fn(__slice_pp_value_%out_index)
|
|
3810
|
+
__slice_pp_keep_left_%out_index = ne __slice_pp_pred_%out_index, 0
|
|
3811
|
+
br __slice_pp_keep_left_%out_index -> L_SLICE_PP_MOVE_RIGHT_%out_index, L_SLICE_PP_MOVE_LEFT_%out_index
|
|
3812
|
+
|
|
3813
|
+
L_SLICE_PP_MOVE_RIGHT_%out_index:
|
|
3814
|
+
__slice_pp_next_left_%out_index = add __slice_pp_mid_%out_index, 1
|
|
3815
|
+
store __slice_pp_left_slot_%out_index+0, __slice_pp_next_left_%out_index as u64
|
|
3816
|
+
!__slice_pp_next_left_%out_index
|
|
3817
|
+
!__slice_pp_keep_left_%out_index
|
|
3818
|
+
!__slice_pp_pred_%out_index
|
|
3819
|
+
!__slice_pp_value_%out_index
|
|
3820
|
+
!__slice_pp_mid_ptr_%out_index
|
|
3821
|
+
!__slice_pp_mid_off_%out_index
|
|
3822
|
+
!__slice_pp_mid_%out_index
|
|
3823
|
+
!__slice_pp_half_%out_index
|
|
3824
|
+
!__slice_pp_span_%out_index
|
|
3825
|
+
!__slice_pp_continue_%out_index
|
|
3826
|
+
!__slice_pp_right_%out_index
|
|
3827
|
+
!__slice_pp_left_%out_index
|
|
3828
|
+
jmp L_SLICE_PP_HEAD_%out_index
|
|
3829
|
+
|
|
3830
|
+
L_SLICE_PP_MOVE_LEFT_%out_index:
|
|
3831
|
+
store __slice_pp_right_slot_%out_index+0, __slice_pp_mid_%out_index as u64
|
|
3832
|
+
!__slice_pp_keep_left_%out_index
|
|
3833
|
+
!__slice_pp_pred_%out_index
|
|
3834
|
+
!__slice_pp_value_%out_index
|
|
3835
|
+
!__slice_pp_mid_ptr_%out_index
|
|
3836
|
+
!__slice_pp_mid_off_%out_index
|
|
3837
|
+
!__slice_pp_mid_%out_index
|
|
3838
|
+
!__slice_pp_half_%out_index
|
|
3839
|
+
!__slice_pp_span_%out_index
|
|
3840
|
+
!__slice_pp_continue_%out_index
|
|
3841
|
+
!__slice_pp_right_%out_index
|
|
3842
|
+
!__slice_pp_left_%out_index
|
|
3843
|
+
jmp L_SLICE_PP_HEAD_%out_index
|
|
3844
|
+
|
|
3845
|
+
L_SLICE_PP_DONE_%out_index:
|
|
3846
|
+
%out_index = add __slice_pp_left_%out_index, 0
|
|
3847
|
+
!__slice_pp_continue_%out_index
|
|
3848
|
+
!__slice_pp_right_%out_index
|
|
3849
|
+
!__slice_pp_left_%out_index
|
|
3850
|
+
!__slice_pp_len_%out_index
|
|
3851
|
+
!__slice_pp_ptr_%out_index
|
|
3852
|
+
[END_MACRO]
|
|
3853
|
+
|
|
3854
|
+
// Rust method-name alias over SLICE_PARTITION_POINT_U64.
|
|
3855
|
+
[MACRO] SLICE_PARTITION_POINT %out_index, %slice_reg, %pred_fn
|
|
3856
|
+
EXPAND SLICE_PARTITION_POINT_U64 %out_index, %slice_reg, %pred_fn
|
|
3857
|
+
[END_MACRO]
|
|
3858
|
+
|
|
3859
|
+
[MACRO] SLICE_LOWER_BOUND_U64 %out_index, %slice_reg, %needle
|
|
3860
|
+
__slice_lb_ptr_%out_index = load %slice_reg+Slice_ptr as ptr
|
|
3861
|
+
__slice_lb_len_%out_index = load %slice_reg+Slice_len as u64
|
|
3862
|
+
__slice_lb_left_slot_%out_index = stack_alloc 8
|
|
3863
|
+
__slice_lb_right_slot_%out_index = stack_alloc 8
|
|
3864
|
+
store __slice_lb_left_slot_%out_index+0, 0 as u64
|
|
3865
|
+
store __slice_lb_right_slot_%out_index+0, __slice_lb_len_%out_index as u64
|
|
3866
|
+
jmp L_SLICE_LB_HEAD_%out_index
|
|
3867
|
+
|
|
3868
|
+
L_SLICE_LB_HEAD_%out_index:
|
|
3869
|
+
__slice_lb_left_%out_index = load __slice_lb_left_slot_%out_index+0 as u64
|
|
3870
|
+
__slice_lb_right_%out_index = load __slice_lb_right_slot_%out_index+0 as u64
|
|
3871
|
+
__slice_lb_continue_%out_index = ult __slice_lb_left_%out_index, __slice_lb_right_%out_index
|
|
3872
|
+
br __slice_lb_continue_%out_index -> L_SLICE_LB_BODY_%out_index, L_SLICE_LB_DONE_%out_index
|
|
3873
|
+
|
|
3874
|
+
L_SLICE_LB_BODY_%out_index:
|
|
3875
|
+
__slice_lb_span_%out_index = sub __slice_lb_right_%out_index, __slice_lb_left_%out_index
|
|
3876
|
+
__slice_lb_half_%out_index = udiv __slice_lb_span_%out_index, 2
|
|
3877
|
+
__slice_lb_mid_%out_index = add __slice_lb_left_%out_index, __slice_lb_half_%out_index
|
|
3878
|
+
__slice_lb_mid_off_%out_index = mul __slice_lb_mid_%out_index, 8
|
|
3879
|
+
__slice_lb_mid_ptr_%out_index = ptr_add __slice_lb_ptr_%out_index, __slice_lb_mid_off_%out_index
|
|
3880
|
+
__slice_lb_value_%out_index = load __slice_lb_mid_ptr_%out_index+0 as u64
|
|
3881
|
+
__slice_lb_less_%out_index = ult __slice_lb_value_%out_index, %needle
|
|
3882
|
+
br __slice_lb_less_%out_index -> L_SLICE_LB_MOVE_RIGHT_%out_index, L_SLICE_LB_MOVE_LEFT_%out_index
|
|
3883
|
+
|
|
3884
|
+
L_SLICE_LB_MOVE_RIGHT_%out_index:
|
|
3885
|
+
__slice_lb_next_left_%out_index = add __slice_lb_mid_%out_index, 1
|
|
3886
|
+
store __slice_lb_left_slot_%out_index+0, __slice_lb_next_left_%out_index as u64
|
|
3887
|
+
!__slice_lb_next_left_%out_index
|
|
3888
|
+
!__slice_lb_less_%out_index
|
|
3889
|
+
!__slice_lb_value_%out_index
|
|
3890
|
+
!__slice_lb_mid_ptr_%out_index
|
|
3891
|
+
!__slice_lb_mid_off_%out_index
|
|
3892
|
+
!__slice_lb_mid_%out_index
|
|
3893
|
+
!__slice_lb_half_%out_index
|
|
3894
|
+
!__slice_lb_span_%out_index
|
|
3895
|
+
!__slice_lb_continue_%out_index
|
|
3896
|
+
!__slice_lb_right_%out_index
|
|
3897
|
+
!__slice_lb_left_%out_index
|
|
3898
|
+
jmp L_SLICE_LB_HEAD_%out_index
|
|
3899
|
+
|
|
3900
|
+
L_SLICE_LB_MOVE_LEFT_%out_index:
|
|
3901
|
+
store __slice_lb_right_slot_%out_index+0, __slice_lb_mid_%out_index as u64
|
|
3902
|
+
!__slice_lb_less_%out_index
|
|
3903
|
+
!__slice_lb_value_%out_index
|
|
3904
|
+
!__slice_lb_mid_ptr_%out_index
|
|
3905
|
+
!__slice_lb_mid_off_%out_index
|
|
3906
|
+
!__slice_lb_mid_%out_index
|
|
3907
|
+
!__slice_lb_half_%out_index
|
|
3908
|
+
!__slice_lb_span_%out_index
|
|
3909
|
+
!__slice_lb_continue_%out_index
|
|
3910
|
+
!__slice_lb_right_%out_index
|
|
3911
|
+
!__slice_lb_left_%out_index
|
|
3912
|
+
jmp L_SLICE_LB_HEAD_%out_index
|
|
3913
|
+
|
|
3914
|
+
L_SLICE_LB_DONE_%out_index:
|
|
3915
|
+
%out_index = add __slice_lb_left_%out_index, 0
|
|
3916
|
+
!__slice_lb_continue_%out_index
|
|
3917
|
+
!__slice_lb_right_%out_index
|
|
3918
|
+
!__slice_lb_left_%out_index
|
|
3919
|
+
!__slice_lb_len_%out_index
|
|
3920
|
+
!__slice_lb_ptr_%out_index
|
|
3921
|
+
[END_MACRO]
|
|
3922
|
+
|
|
3923
|
+
// Rust method-name alias over SLICE_LOWER_BOUND_U64.
|
|
3924
|
+
[MACRO] SLICE_LOWER_BOUND %out_index, %slice_reg, %needle
|
|
3925
|
+
EXPAND SLICE_LOWER_BOUND_U64 %out_index, %slice_reg, %needle
|
|
3926
|
+
[END_MACRO]
|
|
3927
|
+
|
|
3928
|
+
[MACRO] SLICE_UPPER_BOUND_U64 %out_index, %slice_reg, %needle
|
|
3929
|
+
__slice_ub_ptr_%out_index = load %slice_reg+Slice_ptr as ptr
|
|
3930
|
+
__slice_ub_len_%out_index = load %slice_reg+Slice_len as u64
|
|
3931
|
+
__slice_ub_left_slot_%out_index = stack_alloc 8
|
|
3932
|
+
__slice_ub_right_slot_%out_index = stack_alloc 8
|
|
3933
|
+
store __slice_ub_left_slot_%out_index+0, 0 as u64
|
|
3934
|
+
store __slice_ub_right_slot_%out_index+0, __slice_ub_len_%out_index as u64
|
|
3935
|
+
jmp L_SLICE_UB_HEAD_%out_index
|
|
3936
|
+
|
|
3937
|
+
L_SLICE_UB_HEAD_%out_index:
|
|
3938
|
+
__slice_ub_left_%out_index = load __slice_ub_left_slot_%out_index+0 as u64
|
|
3939
|
+
__slice_ub_right_%out_index = load __slice_ub_right_slot_%out_index+0 as u64
|
|
3940
|
+
__slice_ub_continue_%out_index = ult __slice_ub_left_%out_index, __slice_ub_right_%out_index
|
|
3941
|
+
br __slice_ub_continue_%out_index -> L_SLICE_UB_BODY_%out_index, L_SLICE_UB_DONE_%out_index
|
|
3942
|
+
|
|
3943
|
+
L_SLICE_UB_BODY_%out_index:
|
|
3944
|
+
__slice_ub_span_%out_index = sub __slice_ub_right_%out_index, __slice_ub_left_%out_index
|
|
3945
|
+
__slice_ub_half_%out_index = udiv __slice_ub_span_%out_index, 2
|
|
3946
|
+
__slice_ub_mid_%out_index = add __slice_ub_left_%out_index, __slice_ub_half_%out_index
|
|
3947
|
+
__slice_ub_mid_off_%out_index = mul __slice_ub_mid_%out_index, 8
|
|
3948
|
+
__slice_ub_mid_ptr_%out_index = ptr_add __slice_ub_ptr_%out_index, __slice_ub_mid_off_%out_index
|
|
3949
|
+
__slice_ub_value_%out_index = load __slice_ub_mid_ptr_%out_index+0 as u64
|
|
3950
|
+
__slice_ub_le_%out_index = ule __slice_ub_value_%out_index, %needle
|
|
3951
|
+
br __slice_ub_le_%out_index -> L_SLICE_UB_MOVE_RIGHT_%out_index, L_SLICE_UB_MOVE_LEFT_%out_index
|
|
3952
|
+
|
|
3953
|
+
L_SLICE_UB_MOVE_RIGHT_%out_index:
|
|
3954
|
+
__slice_ub_next_left_%out_index = add __slice_ub_mid_%out_index, 1
|
|
3955
|
+
store __slice_ub_left_slot_%out_index+0, __slice_ub_next_left_%out_index as u64
|
|
3956
|
+
!__slice_ub_next_left_%out_index
|
|
3957
|
+
!__slice_ub_le_%out_index
|
|
3958
|
+
!__slice_ub_value_%out_index
|
|
3959
|
+
!__slice_ub_mid_ptr_%out_index
|
|
3960
|
+
!__slice_ub_mid_off_%out_index
|
|
3961
|
+
!__slice_ub_mid_%out_index
|
|
3962
|
+
!__slice_ub_half_%out_index
|
|
3963
|
+
!__slice_ub_span_%out_index
|
|
3964
|
+
!__slice_ub_continue_%out_index
|
|
3965
|
+
!__slice_ub_right_%out_index
|
|
3966
|
+
!__slice_ub_left_%out_index
|
|
3967
|
+
jmp L_SLICE_UB_HEAD_%out_index
|
|
3968
|
+
|
|
3969
|
+
L_SLICE_UB_MOVE_LEFT_%out_index:
|
|
3970
|
+
store __slice_ub_right_slot_%out_index+0, __slice_ub_mid_%out_index as u64
|
|
3971
|
+
!__slice_ub_le_%out_index
|
|
3972
|
+
!__slice_ub_value_%out_index
|
|
3973
|
+
!__slice_ub_mid_ptr_%out_index
|
|
3974
|
+
!__slice_ub_mid_off_%out_index
|
|
3975
|
+
!__slice_ub_mid_%out_index
|
|
3976
|
+
!__slice_ub_half_%out_index
|
|
3977
|
+
!__slice_ub_span_%out_index
|
|
3978
|
+
!__slice_ub_continue_%out_index
|
|
3979
|
+
!__slice_ub_right_%out_index
|
|
3980
|
+
!__slice_ub_left_%out_index
|
|
3981
|
+
jmp L_SLICE_UB_HEAD_%out_index
|
|
3982
|
+
|
|
3983
|
+
L_SLICE_UB_DONE_%out_index:
|
|
3984
|
+
%out_index = add __slice_ub_left_%out_index, 0
|
|
3985
|
+
!__slice_ub_continue_%out_index
|
|
3986
|
+
!__slice_ub_right_%out_index
|
|
3987
|
+
!__slice_ub_left_%out_index
|
|
3988
|
+
!__slice_ub_len_%out_index
|
|
3989
|
+
!__slice_ub_ptr_%out_index
|
|
3990
|
+
[END_MACRO]
|
|
3991
|
+
|
|
3992
|
+
// Rust method-name alias over SLICE_UPPER_BOUND_U64.
|
|
3993
|
+
[MACRO] SLICE_UPPER_BOUND %out_index, %slice_reg, %needle
|
|
3994
|
+
EXPAND SLICE_UPPER_BOUND_U64 %out_index, %slice_reg, %needle
|
|
3995
|
+
[END_MACRO]
|
|
3996
|
+
|
|
3997
|
+
[MACRO] SLICE_EQUAL_RANGE_U64 %out_start, %out_end, %slice_reg, %needle
|
|
3998
|
+
EXPAND SLICE_LOWER_BOUND_U64 %out_start, %slice_reg, %needle
|
|
3999
|
+
EXPAND SLICE_UPPER_BOUND_U64 %out_end, %slice_reg, %needle
|
|
4000
|
+
[END_MACRO]
|
|
4001
|
+
|
|
4002
|
+
// Rust method-name alias over SLICE_EQUAL_RANGE_U64.
|
|
4003
|
+
[MACRO] SLICE_EQUAL_RANGE %out_start, %out_end, %slice_reg, %needle
|
|
4004
|
+
EXPAND SLICE_EQUAL_RANGE_U64 %out_start, %out_end, %slice_reg, %needle
|
|
4005
|
+
[END_MACRO]
|
|
4006
|
+
|
|
4007
|
+
|
|
4008
|
+
[MACRO] SLICE_DEFAULT %slice_reg
|
|
4009
|
+
__slice_default_zero_%slice_reg = add 0, 0
|
|
4010
|
+
store %slice_reg+Slice_ptr, __slice_default_zero_%slice_reg as ptr
|
|
4011
|
+
store %slice_reg+Slice_len, __slice_default_zero_%slice_reg as u64
|
|
4012
|
+
!__slice_default_zero_%slice_reg
|
|
4013
|
+
[END_MACRO]
|
|
4014
|
+
|
|
4015
|
+
[MACRO] SLICE_ROTATE_LEFT %out_ok, %slice_reg, %count
|
|
4016
|
+
EXPAND SLICE_TRY_ROTATE_LEFT %out_ok, %slice_reg, %count
|
|
4017
|
+
[END_MACRO]
|
|
4018
|
+
|
|
4019
|
+
[MACRO] SLICE_ROTATE_RIGHT %out_ok, %slice_reg, %count
|
|
4020
|
+
EXPAND SLICE_TRY_ROTATE_RIGHT %out_ok, %slice_reg, %count
|
|
4021
|
+
[END_MACRO]
|