crit_bit
Module0x9911…a9ec
- Move path
- 0x859e…b7cb::crit_bit
- Functions
- 2614 public, 0 entry
- Structs
- 3
- Friend modules
- None
Bytecode1392 lines
The on-chain disassembly. Offsets are bytecode positions within each function.
// Move bytecode v6
module 859eb18bd5b5e8cc32deb6dfb1c39941008ab3c6e27f0b8ce2364be7102bb7cb.crit_bit {
use 0000000000000000000000000000000000000000000000000000000000000002::table;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
struct Leaf<Ty0> has drop, store {
key: u64,
value: Ty0,
parent: u64
}
struct InternalNode has drop, store {
mask: u64,
left_child: u64,
right_child: u64,
parent: u64
}
struct CritbitTree<Ty0: store> has store {
root: u64,
internal_nodes: Table<u64, InternalNode>,
leaves: Table<u64, Leaf<Ty0>>,
min_leaf: u64,
max_leaf: u64,
next_internal_node_index: u64,
next_leaf_index: u64
}
public new<Ty0: store>(Arg0: &mut TxContext): CritbitTree<Ty0> {
B0:
0LdConst[6](u64: 9223..)
1CopyLoc[0](Arg0: &mut TxContext)
2Call table::new<u64, InternalNode>(&mut TxContext): Table<u64, InternalNode>
3MoveLoc[0](Arg0: &mut TxContext)
4Call table::new<u64, Leaf<Ty0>>(&mut TxContext): Table<u64, Leaf<Ty0>>
5LdConst[6](u64: 9223..)
6LdConst[6](u64: 9223..)
7LdU64(0)
8LdU64(0)
9PackGeneric[0](CritbitTree<Ty0>)
10Ret
}
public size<Ty0: store>(Arg0: &CritbitTree<Ty0>): u64 {
B0:
0MoveLoc[0](Arg0: &CritbitTree<Ty0>)
1ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
2Call table::length<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>): u64
3Ret
}
public is_empty<Ty0: store>(Arg0: &CritbitTree<Ty0>): bool {
B0:
0MoveLoc[0](Arg0: &CritbitTree<Ty0>)
1ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
2Call table::is_empty<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>): bool
3Ret
}
public min_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>): u64 * u64 {
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1Call is_empty<Ty0>(&CritbitTree<Ty0>): bool
2Not
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[0](Arg0: &CritbitTree<Ty0>)
6Pop
7LdConst[3](u64: 4)
8Abort
B3:
9CopyLoc[0](Arg0: &CritbitTree<Ty0>)
10ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
11CopyLoc[0](Arg0: &CritbitTree<Ty0>)
12ImmBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
13ReadRef
14Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
15ImmBorrowFieldGeneric[2](Leaf.key: u64)
16ReadRef
17MoveLoc[0](Arg0: &CritbitTree<Ty0>)
18ImmBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
19ReadRef
20Ret
}
public max_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>): u64 * u64 {
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1Call is_empty<Ty0>(&CritbitTree<Ty0>): bool
2Not
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[0](Arg0: &CritbitTree<Ty0>)
6Pop
7LdConst[3](u64: 4)
8Abort
B3:
9CopyLoc[0](Arg0: &CritbitTree<Ty0>)
10ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
11CopyLoc[0](Arg0: &CritbitTree<Ty0>)
12ImmBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
13ReadRef
14Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
15ImmBorrowFieldGeneric[2](Leaf.key: u64)
16ReadRef
17MoveLoc[0](Arg0: &CritbitTree<Ty0>)
18ImmBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
19ReadRef
20Ret
}
public previous_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): u64 * u64 {
L2: loc0: bool
L3: loc1: u64
L4: loc2: u64
L5: loc3: u64
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1MoveLoc[1](Arg1: u64)
2Call find_leaf<Ty0>(&CritbitTree<Ty0>, u64): bool * u64
3StLoc[3](loc1: u64)
4Pop
5CopyLoc[3](loc1: u64)
6LdConst[6](u64: 9223..)
7Neq
8BrFalse(10)
B1:
9Branch(14)
B2:
10MoveLoc[0](Arg0: &CritbitTree<Ty0>)
11Pop
12LdConst[3](u64: 4)
13Abort
B3:
14LdConst[7](u64: 1844..)
15CopyLoc[3](loc1: u64)
16Sub
17StLoc[5](loc3: u64)
18CopyLoc[0](Arg0: &CritbitTree<Ty0>)
19ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
20MoveLoc[3](loc1: u64)
21Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
22ImmBorrowFieldGeneric[4](Leaf.parent: u64)
23ReadRef
24StLoc[4](loc2: u64)
B4:
25CopyLoc[4](loc2: u64)
26LdConst[6](u64: 9223..)
27Neq
28BrFalse(36)
B5:
29Branch(30)
B6:
30CopyLoc[0](Arg0: &CritbitTree<Ty0>)
31CopyLoc[4](loc2: u64)
32MoveLoc[5](loc3: u64)
33Call is_left_child<Ty0>(&CritbitTree<Ty0>, u64, u64): bool
34StLoc[2](loc0: bool)
35Branch(38)
B7:
36LdFalse
37StLoc[2](loc0: bool)
B8:
38MoveLoc[2](loc0: bool)
39BrFalse(50)
B9:
40MoveLoc[4](loc2: u64)
41StLoc[5](loc3: u64)
42CopyLoc[0](Arg0: &CritbitTree<Ty0>)
43ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
44CopyLoc[5](loc3: u64)
45Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
46ImmBorrowField[6](InternalNode.parent: u64)
47ReadRef
48StLoc[4](loc2: u64)
49Branch(25)
B10:
50CopyLoc[4](loc2: u64)
51LdConst[6](u64: 9223..)
52Eq
53BrFalse(59)
B11:
54MoveLoc[0](Arg0: &CritbitTree<Ty0>)
55Pop
56LdU64(0)
57LdConst[6](u64: 9223..)
58Ret
B12:
59LdConst[7](u64: 1844..)
60CopyLoc[0](Arg0: &CritbitTree<Ty0>)
61CopyLoc[0](Arg0: &CritbitTree<Ty0>)
62ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
63MoveLoc[4](loc2: u64)
64Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
65ImmBorrowField[7](InternalNode.left_child: u64)
66ReadRef
67Call right_most_leaf<Ty0>(&CritbitTree<Ty0>, u64): u64
68Sub
69StLoc[3](loc1: u64)
70MoveLoc[0](Arg0: &CritbitTree<Ty0>)
71ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
72CopyLoc[3](loc1: u64)
73Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
74ImmBorrowFieldGeneric[2](Leaf.key: u64)
75ReadRef
76MoveLoc[3](loc1: u64)
77Ret
}
public(friend) next_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): u64 * u64 {
L2: loc0: bool
L3: loc1: u64
L4: loc2: u64
L5: loc3: u64
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1MoveLoc[1](Arg1: u64)
2Call find_leaf<Ty0>(&CritbitTree<Ty0>, u64): bool * u64
3StLoc[3](loc1: u64)
4Pop
5CopyLoc[3](loc1: u64)
6LdConst[6](u64: 9223..)
7Neq
8BrFalse(10)
B1:
9Branch(14)
B2:
10MoveLoc[0](Arg0: &CritbitTree<Ty0>)
11Pop
12LdConst[3](u64: 4)
13Abort
B3:
14LdConst[7](u64: 1844..)
15CopyLoc[3](loc1: u64)
16Sub
17StLoc[5](loc3: u64)
18CopyLoc[0](Arg0: &CritbitTree<Ty0>)
19ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
20MoveLoc[3](loc1: u64)
21Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
22ImmBorrowFieldGeneric[4](Leaf.parent: u64)
23ReadRef
24StLoc[4](loc2: u64)
B4:
25CopyLoc[4](loc2: u64)
26LdConst[6](u64: 9223..)
27Neq
28BrFalse(37)
B5:
29Branch(30)
B6:
30CopyLoc[0](Arg0: &CritbitTree<Ty0>)
31CopyLoc[4](loc2: u64)
32MoveLoc[5](loc3: u64)
33Call is_left_child<Ty0>(&CritbitTree<Ty0>, u64, u64): bool
34Not
35StLoc[2](loc0: bool)
36Branch(39)
B7:
37LdFalse
38StLoc[2](loc0: bool)
B8:
39MoveLoc[2](loc0: bool)
40BrFalse(51)
B9:
41MoveLoc[4](loc2: u64)
42StLoc[5](loc3: u64)
43CopyLoc[0](Arg0: &CritbitTree<Ty0>)
44ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
45CopyLoc[5](loc3: u64)
46Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
47ImmBorrowField[6](InternalNode.parent: u64)
48ReadRef
49StLoc[4](loc2: u64)
50Branch(25)
B10:
51CopyLoc[4](loc2: u64)
52LdConst[6](u64: 9223..)
53Eq
54BrFalse(60)
B11:
55MoveLoc[0](Arg0: &CritbitTree<Ty0>)
56Pop
57LdU64(0)
58LdConst[6](u64: 9223..)
59Ret
B12:
60LdConst[7](u64: 1844..)
61CopyLoc[0](Arg0: &CritbitTree<Ty0>)
62CopyLoc[0](Arg0: &CritbitTree<Ty0>)
63ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
64MoveLoc[4](loc2: u64)
65Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
66ImmBorrowField[8](InternalNode.right_child: u64)
67ReadRef
68Call left_most_leaf<Ty0>(&CritbitTree<Ty0>, u64): u64
69Sub
70StLoc[3](loc1: u64)
71MoveLoc[0](Arg0: &CritbitTree<Ty0>)
72ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
73CopyLoc[3](loc1: u64)
74Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
75ImmBorrowFieldGeneric[2](Leaf.key: u64)
76ReadRef
77MoveLoc[3](loc1: u64)
78Ret
}
left_most_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): u64 {
L2: loc0: u64
B0:
0MoveLoc[1](Arg1: u64)
1StLoc[2](loc0: u64)
B1:
2CopyLoc[2](loc0: u64)
3LdConst[6](u64: 9223..)
4Lt
5BrFalse(15)
B2:
6Branch(7)
B3:
7CopyLoc[0](Arg0: &CritbitTree<Ty0>)
8ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
9MoveLoc[2](loc0: u64)
10Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
11ImmBorrowField[7](InternalNode.left_child: u64)
12ReadRef
13StLoc[2](loc0: u64)
14Branch(2)
B4:
15MoveLoc[0](Arg0: &CritbitTree<Ty0>)
16Pop
17MoveLoc[2](loc0: u64)
18Ret
}
right_most_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): u64 {
L2: loc0: u64
B0:
0MoveLoc[1](Arg1: u64)
1StLoc[2](loc0: u64)
B1:
2CopyLoc[2](loc0: u64)
3LdConst[6](u64: 9223..)
4Lt
5BrFalse(15)
B2:
6Branch(7)
B3:
7CopyLoc[0](Arg0: &CritbitTree<Ty0>)
8ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
9MoveLoc[2](loc0: u64)
10Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
11ImmBorrowField[8](InternalNode.right_child: u64)
12ReadRef
13StLoc[2](loc0: u64)
14Branch(2)
B4:
15MoveLoc[0](Arg0: &CritbitTree<Ty0>)
16Pop
17MoveLoc[2](loc0: u64)
18Ret
}
public insert_leaf<Ty0: store>(Arg0: &mut CritbitTree<Ty0>, Arg1: u64, Arg2: Ty0): u64 {
L3: loc0: u64
L4: loc1: u64
L5: loc2: u64
L6: loc3: u64
L7: loc4: u64
L8: loc5: u8
L9: loc6: &InternalNode
L10: loc7: bool
L11: loc8: bool
L12: loc9: InternalNode
L13: loc10: u64
L14: loc11: u64
L15: loc12: Leaf<Ty0>
L16: loc13: u64
L17: loc14: u64
L18: loc15: u64
B0:
0CopyLoc[1](Arg1: u64)
1MoveLoc[2](Arg2: Ty0)
2LdConst[6](u64: 9223..)
3PackGeneric[1](Leaf<Ty0>)
4StLoc[15](loc12: Leaf<Ty0>)
5CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
6ImmBorrowFieldGeneric[6](CritbitTree.next_leaf_index: u64)
7ReadRef
8StLoc[16](loc13: u64)
9CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
10ImmBorrowFieldGeneric[6](CritbitTree.next_leaf_index: u64)
11ReadRef
12LdU64(1)
13Add
14CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
15MutBorrowFieldGeneric[6](CritbitTree.next_leaf_index: u64)
16WriteRef
17CopyLoc[16](loc13: u64)
18LdConst[8](u64: 9223..)
19LdU64(1)
20Sub
21Lt
22BrFalse(24)
B1:
23Branch(28)
B2:
24MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
25Pop
26LdConst[0](u64: 1)
27Abort
B3:
28CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
29MutBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
30CopyLoc[16](loc13: u64)
31MoveLoc[15](loc12: Leaf<Ty0>)
32Call table::add<u64, Leaf<Ty0>>(&mut Table<u64, Leaf<Ty0>>, u64, Leaf<Ty0>)
33CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
34CopyLoc[1](Arg1: u64)
35StLoc[3](loc0: u64)
36FreezeRef
37MoveLoc[3](loc0: u64)
38Call get_closest_leaf_index_by_key<Ty0>(&CritbitTree<Ty0>, u64): u64
39StLoc[7](loc4: u64)
40CopyLoc[7](loc4: u64)
41LdConst[6](u64: 9223..)
42Eq
43BrFalse(69)
B4:
44CopyLoc[16](loc13: u64)
45LdU64(0)
46Eq
47BrFalse(49)
B5:
48Branch(53)
B6:
49MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
50Pop
51LdConst[1](u64: 2)
52Abort
B7:
53LdConst[7](u64: 1844..)
54CopyLoc[16](loc13: u64)
55Sub
56CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
57MutBorrowFieldGeneric[7](CritbitTree.root: u64)
58WriteRef
59CopyLoc[16](loc13: u64)
60CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
61MutBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
62WriteRef
63MoveLoc[16](loc13: u64)
64MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
65MutBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
66WriteRef
67LdU64(0)
68Ret
B8:
69CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
70ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
71MoveLoc[7](loc4: u64)
72Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
73ImmBorrowFieldGeneric[2](Leaf.key: u64)
74ReadRef
75StLoc[6](loc3: u64)
76CopyLoc[6](loc3: u64)
77CopyLoc[1](Arg1: u64)
78Neq
79BrFalse(81)
B9:
80Branch(85)
B10:
81MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
82Pop
83LdConst[2](u64: 3)
84Abort
B11:
85LdU8(64)
86MoveLoc[6](loc3: u64)
87CopyLoc[1](Arg1: u64)
88Xor
89CastU128
90Call count_leading_zeros(u128): u8
91LdU8(64)
92Sub
93Sub
94StLoc[8](loc5: u8)
95LdU64(1)
96MoveLoc[8](loc5: u8)
97LdU8(1)
98Sub
99Shl
100StLoc[17](loc14: u64)
101CopyLoc[17](loc14: u64)
102LdConst[6](u64: 9223..)
103LdConst[6](u64: 9223..)
104LdConst[6](u64: 9223..)
105Pack[1](InternalNode)
106StLoc[12](loc9: InternalNode)
107CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
108ImmBorrowFieldGeneric[8](CritbitTree.next_internal_node_index: u64)
109ReadRef
110StLoc[13](loc10: u64)
111CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
112ImmBorrowFieldGeneric[8](CritbitTree.next_internal_node_index: u64)
113ReadRef
114LdU64(1)
115Add
116CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
117MutBorrowFieldGeneric[8](CritbitTree.next_internal_node_index: u64)
118WriteRef
119CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
120MutBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
121CopyLoc[13](loc10: u64)
122MoveLoc[12](loc9: InternalNode)
123Call table::add<u64, InternalNode>(&mut Table<u64, InternalNode>, u64, InternalNode)
124CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
125ImmBorrowFieldGeneric[7](CritbitTree.root: u64)
126ReadRef
127StLoc[18](loc15: u64)
128LdConst[6](u64: 9223..)
129StLoc[14](loc11: u64)
B12:
130CopyLoc[18](loc15: u64)
131LdConst[6](u64: 9223..)
132Lt
133BrFalse(169)
B13:
134Branch(135)
B14:
135CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
136ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
137CopyLoc[18](loc15: u64)
138Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
139StLoc[9](loc6: &InternalNode)
140CopyLoc[17](loc14: u64)
141CopyLoc[9](loc6: &InternalNode)
142ImmBorrowField[12](InternalNode.mask: u64)
143ReadRef
144Gt
145BrFalse(149)
B15:
146MoveLoc[9](loc6: &InternalNode)
147Pop
148Branch(169)
B16:
149MoveLoc[18](loc15: u64)
150StLoc[14](loc11: u64)
151CopyLoc[1](Arg1: u64)
152CopyLoc[9](loc6: &InternalNode)
153ImmBorrowField[12](InternalNode.mask: u64)
154ReadRef
155BitAnd
156LdU64(0)
157Eq
158BrFalse(164)
B17:
159MoveLoc[9](loc6: &InternalNode)
160ImmBorrowField[7](InternalNode.left_child: u64)
161ReadRef
162StLoc[18](loc15: u64)
163Branch(168)
B18:
164MoveLoc[9](loc6: &InternalNode)
165ImmBorrowField[8](InternalNode.right_child: u64)
166ReadRef
167StLoc[18](loc15: u64)
B19:
168Branch(130)
B20:
169CopyLoc[14](loc11: u64)
170LdConst[6](u64: 9223..)
171Eq
172BrFalse(178)
B21:
173CopyLoc[13](loc10: u64)
174CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
175MutBorrowFieldGeneric[7](CritbitTree.root: u64)
176WriteRef
177Branch(193)
B22:
178CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
179CopyLoc[14](loc11: u64)
180CopyLoc[18](loc15: u64)
181StLoc[5](loc2: u64)
182StLoc[4](loc1: u64)
183FreezeRef
184MoveLoc[4](loc1: u64)
185MoveLoc[5](loc2: u64)
186Call is_left_child<Ty0>(&CritbitTree<Ty0>, u64, u64): bool
187StLoc[10](loc7: bool)
188CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
189MoveLoc[14](loc11: u64)
190CopyLoc[13](loc10: u64)
191MoveLoc[10](loc7: bool)
192Call update_child<Ty0>(&mut CritbitTree<Ty0>, u64, u64, bool)
B23:
193MoveLoc[17](loc14: u64)
194CopyLoc[1](Arg1: u64)
195BitAnd
196LdU64(0)
197Eq
198StLoc[11](loc8: bool)
199CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
200CopyLoc[13](loc10: u64)
201LdConst[7](u64: 1844..)
202CopyLoc[16](loc13: u64)
203Sub
204CopyLoc[11](loc8: bool)
205Call update_child<Ty0>(&mut CritbitTree<Ty0>, u64, u64, bool)
206CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
207MoveLoc[13](loc10: u64)
208MoveLoc[18](loc15: u64)
209MoveLoc[11](loc8: bool)
210Not
211Call update_child<Ty0>(&mut CritbitTree<Ty0>, u64, u64, bool)
212CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
213ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
214CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
215ImmBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
216ReadRef
217Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
218ImmBorrowFieldGeneric[2](Leaf.key: u64)
219ReadRef
220CopyLoc[1](Arg1: u64)
221Gt
222BrFalse(227)
B24:
223CopyLoc[16](loc13: u64)
224CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
225MutBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
226WriteRef
B25:
227CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
228ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
229CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
230ImmBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
231ReadRef
232Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
233ImmBorrowFieldGeneric[2](Leaf.key: u64)
234ReadRef
235MoveLoc[1](Arg1: u64)
236Lt
237BrFalse(243)
B26:
238CopyLoc[16](loc13: u64)
239MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
240MutBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
241WriteRef
242Branch(245)
B27:
243MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
244Pop
B28:
245MoveLoc[16](loc13: u64)
246Ret
}
public find_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): bool * u64 {
L2: loc0: u64
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1Call is_empty<Ty0>(&CritbitTree<Ty0>): bool
2BrFalse(8)
B1:
3MoveLoc[0](Arg0: &CritbitTree<Ty0>)
4Pop
5LdFalse
6LdConst[6](u64: 9223..)
7Ret
B2:
8CopyLoc[0](Arg0: &CritbitTree<Ty0>)
9CopyLoc[1](Arg1: u64)
10Call get_closest_leaf_index_by_key<Ty0>(&CritbitTree<Ty0>, u64): u64
11StLoc[2](loc0: u64)
12MoveLoc[0](Arg0: &CritbitTree<Ty0>)
13ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
14CopyLoc[2](loc0: u64)
15Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
16ImmBorrowFieldGeneric[2](Leaf.key: u64)
17ReadRef
18MoveLoc[1](Arg1: u64)
19Neq
20BrFalse(24)
B3:
21LdFalse
22LdConst[6](u64: 9223..)
23Ret
B4:
24LdTrue
25MoveLoc[2](loc0: u64)
26Ret
}
public(friend) find_closest_key<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): u64 {
L2: loc0: u64
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1Call is_empty<Ty0>(&CritbitTree<Ty0>): bool
2BrFalse(7)
B1:
3MoveLoc[0](Arg0: &CritbitTree<Ty0>)
4Pop
5LdU64(0)
6Ret
B2:
7CopyLoc[0](Arg0: &CritbitTree<Ty0>)
8MoveLoc[1](Arg1: u64)
9Call get_closest_leaf_index_by_key<Ty0>(&CritbitTree<Ty0>, u64): u64
10StLoc[2](loc0: u64)
11MoveLoc[0](Arg0: &CritbitTree<Ty0>)
12ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
13MoveLoc[2](loc0: u64)
14Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
15ImmBorrowFieldGeneric[2](Leaf.key: u64)
16ReadRef
17Ret
}
public remove_leaf_by_key<Ty0: store>(Arg0: &mut CritbitTree<Ty0>, Arg1: u64): Ty0 {
L2: loc0: u64
L3: loc1: u64
B0:
0CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
1MoveLoc[1](Arg1: u64)
2StLoc[2](loc0: u64)
3FreezeRef
4MoveLoc[2](loc0: u64)
5Call find_leaf<Ty0>(&CritbitTree<Ty0>, u64): bool * u64
6StLoc[3](loc1: u64)
7BrFalse(9)
B1:
8Branch(13)
B2:
9MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
10Pop
11LdConst[3](u64: 4)
12Abort
B3:
13MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
14MoveLoc[3](loc1: u64)
15Call remove_leaf_by_index<Ty0>(&mut CritbitTree<Ty0>, u64): Ty0
16Ret
}
public(friend) remove_leaf_by_index<Ty0: store>(Arg0: &mut CritbitTree<Ty0>, Arg1: u64): Ty0 {
L2: loc0: u64
L3: loc1: u64
L4: loc2: u64
L5: loc3: u64
L6: loc4: u64
L7: loc5: u64
L8: loc6: u64
L9: loc7: u64
L10: loc8: u64
L11: loc9: bool
L12: loc10: u64
L13: loc11: u64
L14: loc12: &InternalNode
L15: loc13: u64
L16: loc14: u64
L17: loc15: Ty0
B0:
0CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
1ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
2CopyLoc[1](Arg1: u64)
3Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
4ImmBorrowFieldGeneric[2](Leaf.key: u64)
5ReadRef
6StLoc[12](loc10: u64)
7CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
8ImmBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
9ReadRef
10CopyLoc[1](Arg1: u64)
11Eq
12BrFalse(25)
B1:
13CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
14CopyLoc[12](loc10: u64)
15StLoc[4](loc2: u64)
16FreezeRef
17MoveLoc[4](loc2: u64)
18Call next_leaf<Ty0>(&CritbitTree<Ty0>, u64): u64 * u64
19StLoc[9](loc7: u64)
20Pop
21MoveLoc[9](loc7: u64)
22CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
23MutBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
24WriteRef
B2:
25CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
26ImmBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
27ReadRef
28CopyLoc[1](Arg1: u64)
29Eq
30BrFalse(43)
B3:
31CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
32MoveLoc[12](loc10: u64)
33StLoc[5](loc3: u64)
34FreezeRef
35MoveLoc[5](loc3: u64)
36Call previous_leaf<Ty0>(&CritbitTree<Ty0>, u64): u64 * u64
37StLoc[10](loc8: u64)
38Pop
39MoveLoc[10](loc8: u64)
40CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
41MutBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
42WriteRef
B4:
43CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
44MutBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
45CopyLoc[1](Arg1: u64)
46Call table::remove<u64, Leaf<Ty0>>(&mut Table<u64, Leaf<Ty0>>, u64): Leaf<Ty0>
47UnpackGeneric[1](Leaf<Ty0>)
48StLoc[15](loc13: u64)
49StLoc[17](loc15: Ty0)
50Pop
51CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
52FreezeRef
53Call size<Ty0>(&CritbitTree<Ty0>): u64
54LdU64(0)
55Eq
56BrFalse(78)
B5:
57LdConst[6](u64: 9223..)
58CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
59MutBorrowFieldGeneric[7](CritbitTree.root: u64)
60WriteRef
61LdConst[6](u64: 9223..)
62CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
63MutBorrowFieldGeneric[1](CritbitTree.min_leaf: u64)
64WriteRef
65LdConst[6](u64: 9223..)
66CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
67MutBorrowFieldGeneric[3](CritbitTree.max_leaf: u64)
68WriteRef
69LdU64(0)
70CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
71MutBorrowFieldGeneric[8](CritbitTree.next_internal_node_index: u64)
72WriteRef
73LdU64(0)
74MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
75MutBorrowFieldGeneric[6](CritbitTree.next_leaf_index: u64)
76WriteRef
77Branch(169)
B6:
78CopyLoc[15](loc13: u64)
79LdConst[6](u64: 9223..)
80Neq
81BrFalse(83)
B7:
82Branch(87)
B8:
83MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
84Pop
85LdConst[4](u64: 6)
86Abort
B9:
87CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
88ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
89CopyLoc[15](loc13: u64)
90Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
91StLoc[14](loc12: &InternalNode)
92CopyLoc[14](loc12: &InternalNode)
93ImmBorrowField[6](InternalNode.parent: u64)
94ReadRef
95StLoc[13](loc11: u64)
96CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
97CopyLoc[15](loc13: u64)
98LdConst[7](u64: 1844..)
99MoveLoc[1](Arg1: u64)
100Sub
101StLoc[7](loc5: u64)
102StLoc[6](loc4: u64)
103FreezeRef
104MoveLoc[6](loc4: u64)
105MoveLoc[7](loc5: u64)
106Call is_left_child<Ty0>(&CritbitTree<Ty0>, u64, u64): bool
107BrFalse(113)
B10:
108MoveLoc[14](loc12: &InternalNode)
109ImmBorrowField[8](InternalNode.right_child: u64)
110ReadRef
111StLoc[8](loc6: u64)
112Branch(117)
B11:
113MoveLoc[14](loc12: &InternalNode)
114ImmBorrowField[7](InternalNode.left_child: u64)
115ReadRef
116StLoc[8](loc6: u64)
B12:
117MoveLoc[8](loc6: u64)
118StLoc[16](loc14: u64)
119CopyLoc[13](loc11: u64)
120LdConst[6](u64: 9223..)
121Eq
122BrFalse(149)
B13:
123CopyLoc[16](loc14: u64)
124LdConst[6](u64: 9223..)
125Lt
126BrFalse(135)
B14:
127LdConst[6](u64: 9223..)
128CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
129MutBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
130CopyLoc[16](loc14: u64)
131Call table::borrow_mut<u64, InternalNode>(&mut Table<u64, InternalNode>, u64): &mut InternalNode
132MutBorrowField[6](InternalNode.parent: u64)
133WriteRef
134Branch(144)
B15:
135LdConst[6](u64: 9223..)
136CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
137MutBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
138LdConst[7](u64: 1844..)
139CopyLoc[16](loc14: u64)
140Sub
141Call table::borrow_mut<u64, Leaf<Ty0>>(&mut Table<u64, Leaf<Ty0>>, u64): &mut Leaf<Ty0>
142MutBorrowFieldGeneric[4](Leaf.parent: u64)
143WriteRef
B16:
144MoveLoc[16](loc14: u64)
145CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
146MutBorrowFieldGeneric[7](CritbitTree.root: u64)
147WriteRef
148Branch(164)
B17:
149CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
150CopyLoc[13](loc11: u64)
151CopyLoc[15](loc13: u64)
152StLoc[3](loc1: u64)
153StLoc[2](loc0: u64)
154FreezeRef
155MoveLoc[2](loc0: u64)
156MoveLoc[3](loc1: u64)
157Call is_left_child<Ty0>(&CritbitTree<Ty0>, u64, u64): bool
158StLoc[11](loc9: bool)
159CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
160MoveLoc[13](loc11: u64)
161MoveLoc[16](loc14: u64)
162MoveLoc[11](loc9: bool)
163Call update_child<Ty0>(&mut CritbitTree<Ty0>, u64, u64, bool)
B18:
164MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
165MutBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
166MoveLoc[15](loc13: u64)
167Call table::remove<u64, InternalNode>(&mut Table<u64, InternalNode>, u64): InternalNode
168Pop
B19:
169MoveLoc[17](loc15: Ty0)
170Ret
}
public(friend) borrow_mut_leaf_by_index<Ty0: store>(Arg0: &mut CritbitTree<Ty0>, Arg1: u64): &mut Ty0 {
B0:
0MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
1MutBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
2MoveLoc[1](Arg1: u64)
3Call table::borrow_mut<u64, Leaf<Ty0>>(&mut Table<u64, Leaf<Ty0>>, u64): &mut Leaf<Ty0>
4MutBorrowFieldGeneric[9](Leaf.value: Ty0)
5Ret
}
public borrow_leaf_by_index<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): &Ty0 {
B0:
0MoveLoc[0](Arg0: &CritbitTree<Ty0>)
1ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
2MoveLoc[1](Arg1: u64)
3Call table::borrow<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>, u64): &Leaf<Ty0>
4ImmBorrowFieldGeneric[9](Leaf.value: Ty0)
5Ret
}
public borrow_leaf_by_key<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): &Ty0 {
L2: loc0: u64
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1MoveLoc[1](Arg1: u64)
2Call find_leaf<Ty0>(&CritbitTree<Ty0>, u64): bool * u64
3StLoc[2](loc0: u64)
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &CritbitTree<Ty0>)
7Pop
8LdConst[3](u64: 4)
9Abort
B3:
10MoveLoc[0](Arg0: &CritbitTree<Ty0>)
11MoveLoc[2](loc0: u64)
12Call borrow_leaf_by_index<Ty0>(&CritbitTree<Ty0>, u64): &Ty0
13Ret
}
public borrow_mut_leaf_by_key<Ty0: store>(Arg0: &mut CritbitTree<Ty0>, Arg1: u64): &mut Ty0 {
L2: loc0: u64
L3: loc1: u64
B0:
0CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
1MoveLoc[1](Arg1: u64)
2StLoc[2](loc0: u64)
3FreezeRef
4MoveLoc[2](loc0: u64)
5Call find_leaf<Ty0>(&CritbitTree<Ty0>, u64): bool * u64
6StLoc[3](loc1: u64)
7BrFalse(9)
B1:
8Branch(13)
B2:
9MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
10Pop
11LdConst[3](u64: 4)
12Abort
B3:
13MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
14MoveLoc[3](loc1: u64)
15Call borrow_mut_leaf_by_index<Ty0>(&mut CritbitTree<Ty0>, u64): &mut Ty0
16Ret
}
public(friend) drop<Ty0: drop + store>(Arg0: CritbitTree<Ty0>) {
L1: loc0: Table<u64, InternalNode>
L2: loc1: Table<u64, Leaf<Ty0>>
B0:
0MoveLoc[0](Arg0: CritbitTree<Ty0>)
1UnpackGeneric[0](CritbitTree<Ty0>)
2Pop
3Pop
4Pop
5Pop
6StLoc[2](loc1: Table<u64, Leaf<Ty0>>)
7StLoc[1](loc0: Table<u64, InternalNode>)
8Pop
9MoveLoc[1](loc0: Table<u64, InternalNode>)
10Call table::drop<u64, InternalNode>(Table<u64, InternalNode>)
11MoveLoc[2](loc1: Table<u64, Leaf<Ty0>>)
12Call table::drop<u64, Leaf<Ty0>>(Table<u64, Leaf<Ty0>>)
13Ret
}
public(friend) destroy_empty<Ty0: store>(Arg0: CritbitTree<Ty0>) {
L1: loc0: Table<u64, InternalNode>
L2: loc1: Table<u64, Leaf<Ty0>>
B0:
0ImmBorrowLoc[0](Arg0: CritbitTree<Ty0>)
1ImmBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
2Call table::length<u64, Leaf<Ty0>>(&Table<u64, Leaf<Ty0>>): u64
3LdU64(0)
4Eq
5BrFalse(7)
B1:
6Branch(9)
B2:
7LdU64(0)
8Abort
B3:
9MoveLoc[0](Arg0: CritbitTree<Ty0>)
10UnpackGeneric[0](CritbitTree<Ty0>)
11Pop
12Pop
13Pop
14Pop
15StLoc[2](loc1: Table<u64, Leaf<Ty0>>)
16StLoc[1](loc0: Table<u64, InternalNode>)
17Pop
18MoveLoc[2](loc1: Table<u64, Leaf<Ty0>>)
19Call table::destroy_empty<u64, Leaf<Ty0>>(Table<u64, Leaf<Ty0>>)
20MoveLoc[1](loc0: Table<u64, InternalNode>)
21Call table::destroy_empty<u64, InternalNode>(Table<u64, InternalNode>)
22Ret
}
public has_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): bool {
B0:
0MoveLoc[0](Arg0: &CritbitTree<Ty0>)
1MoveLoc[1](Arg1: u64)
2Call find_leaf<Ty0>(&CritbitTree<Ty0>, u64): bool * u64
3Pop
4Ret
}
public assert_has_leaf<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64) {
B0:
0MoveLoc[0](Arg0: &CritbitTree<Ty0>)
1MoveLoc[1](Arg1: u64)
2Call find_leaf<Ty0>(&CritbitTree<Ty0>, u64): bool * u64
3Pop
4BrFalse(6)
B1:
5Branch(8)
B2:
6LdConst[3](u64: 4)
7Abort
B3:
8Ret
}
get_closest_leaf_index_by_key<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64): u64 {
L2: loc0: &InternalNode
L3: loc1: u64
B0:
0CopyLoc[0](Arg0: &CritbitTree<Ty0>)
1ImmBorrowFieldGeneric[7](CritbitTree.root: u64)
2ReadRef
3StLoc[3](loc1: u64)
4CopyLoc[3](loc1: u64)
5LdConst[6](u64: 9223..)
6Eq
7BrFalse(12)
B1:
8MoveLoc[0](Arg0: &CritbitTree<Ty0>)
9Pop
10LdConst[6](u64: 9223..)
11Ret
B2:
12CopyLoc[3](loc1: u64)
13LdConst[6](u64: 9223..)
14Lt
15BrFalse(40)
B3:
16Branch(17)
B4:
17CopyLoc[0](Arg0: &CritbitTree<Ty0>)
18ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
19MoveLoc[3](loc1: u64)
20Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
21StLoc[2](loc0: &InternalNode)
22CopyLoc[1](Arg1: u64)
23CopyLoc[2](loc0: &InternalNode)
24ImmBorrowField[12](InternalNode.mask: u64)
25ReadRef
26BitAnd
27LdU64(0)
28Eq
29BrFalse(35)
B5:
30MoveLoc[2](loc0: &InternalNode)
31ImmBorrowField[7](InternalNode.left_child: u64)
32ReadRef
33StLoc[3](loc1: u64)
34Branch(39)
B6:
35MoveLoc[2](loc0: &InternalNode)
36ImmBorrowField[8](InternalNode.right_child: u64)
37ReadRef
38StLoc[3](loc1: u64)
B7:
39Branch(12)
B8:
40MoveLoc[0](Arg0: &CritbitTree<Ty0>)
41Pop
42LdConst[7](u64: 1844..)
43MoveLoc[3](loc1: u64)
44Sub
45Ret
}
update_child<Ty0: store>(Arg0: &mut CritbitTree<Ty0>, Arg1: u64, Arg2: u64, Arg3: bool) {
B0:
0CopyLoc[1](Arg1: u64)
1LdConst[6](u64: 9223..)
2Neq
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
6Pop
7LdConst[5](u64: 7)
8Abort
B3:
9MoveLoc[3](Arg3: bool)
10BrFalse(19)
B4:
11CopyLoc[2](Arg2: u64)
12CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
13MutBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
14CopyLoc[1](Arg1: u64)
15Call table::borrow_mut<u64, InternalNode>(&mut Table<u64, InternalNode>, u64): &mut InternalNode
16MutBorrowField[7](InternalNode.left_child: u64)
17WriteRef
18Branch(26)
B5:
19CopyLoc[2](Arg2: u64)
20CopyLoc[0](Arg0: &mut CritbitTree<Ty0>)
21MutBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
22CopyLoc[1](Arg1: u64)
23Call table::borrow_mut<u64, InternalNode>(&mut Table<u64, InternalNode>, u64): &mut InternalNode
24MutBorrowField[8](InternalNode.right_child: u64)
25WriteRef
B6:
26CopyLoc[2](Arg2: u64)
27LdConst[6](u64: 9223..)
28Neq
29BrFalse(52)
B7:
30CopyLoc[2](Arg2: u64)
31LdConst[6](u64: 9223..)
32Gt
33BrFalse(44)
B8:
34MoveLoc[1](Arg1: u64)
35MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
36MutBorrowFieldGeneric[0](CritbitTree.leaves: Table<u64, Leaf<Ty0>>)
37LdConst[7](u64: 1844..)
38MoveLoc[2](Arg2: u64)
39Sub
40Call table::borrow_mut<u64, Leaf<Ty0>>(&mut Table<u64, Leaf<Ty0>>, u64): &mut Leaf<Ty0>
41MutBorrowFieldGeneric[4](Leaf.parent: u64)
42WriteRef
43Branch(51)
B9:
44MoveLoc[1](Arg1: u64)
45MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
46MutBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
47MoveLoc[2](Arg2: u64)
48Call table::borrow_mut<u64, InternalNode>(&mut Table<u64, InternalNode>, u64): &mut InternalNode
49MutBorrowField[6](InternalNode.parent: u64)
50WriteRef
B10:
51Branch(54)
B11:
52MoveLoc[0](Arg0: &mut CritbitTree<Ty0>)
53Pop
B12:
54Ret
}
is_left_child<Ty0: store>(Arg0: &CritbitTree<Ty0>, Arg1: u64, Arg2: u64): bool {
B0:
0MoveLoc[0](Arg0: &CritbitTree<Ty0>)
1ImmBorrowFieldGeneric[5](CritbitTree.internal_nodes: Table<u64, InternalNode>)
2MoveLoc[1](Arg1: u64)
3Call table::borrow<u64, InternalNode>(&Table<u64, InternalNode>, u64): &InternalNode
4ImmBorrowField[7](InternalNode.left_child: u64)
5ReadRef
6MoveLoc[2](Arg2: u64)
7Eq
8Ret
}
count_leading_zeros(Arg0: u128): u8 {
L1: loc0: u8
L2: loc1: u8
B0:
0CopyLoc[0](Arg0: u128)
1LdU128(0)
2Eq
3BrFalse(7)
B1:
4LdU8(128)
5StLoc[1](loc0: u8)
6Branch(105)
B2:
7LdU8(0)
8StLoc[2](loc1: u8)
9CopyLoc[0](Arg0: u128)
10LdU128(340282366920938463444927863358058659840)
11BitAnd
12LdU128(0)
13Eq
14BrFalse(23)
B3:
15MoveLoc[0](Arg0: u128)
16LdU8(64)
17Shl
18StLoc[0](Arg0: u128)
19MoveLoc[2](loc1: u8)
20LdU8(64)
21Add
22StLoc[2](loc1: u8)
B4:
23CopyLoc[0](Arg0: u128)
24LdU128(340282366841710300949110269838224261120)
25BitAnd
26LdU128(0)
27Eq
28BrFalse(37)
B5:
29MoveLoc[0](Arg0: u128)
30LdU8(32)
31Shl
32StLoc[0](Arg0: u128)
33MoveLoc[2](loc1: u8)
34LdU8(32)
35Add
36StLoc[2](loc1: u8)
B6:
37CopyLoc[0](Arg0: u128)
38LdU128(340277174624079928635746076935438991360)
39BitAnd
40LdU128(0)
41Eq
42BrFalse(51)
B7:
43MoveLoc[0](Arg0: u128)
44LdU8(16)
45Shl
46StLoc[0](Arg0: u128)
47MoveLoc[2](loc1: u8)
48LdU8(16)
49Add
50StLoc[2](loc1: u8)
B8:
51CopyLoc[0](Arg0: u128)
52LdU128(338953138925153547590470800371487866880)
53BitAnd
54LdU128(0)
55Eq
56BrFalse(65)
B9:
57MoveLoc[0](Arg0: u128)
58LdU8(8)
59Shl
60StLoc[0](Arg0: u128)
61MoveLoc[2](loc1: u8)
62LdU8(8)
63Add
64StLoc[2](loc1: u8)
B10:
65CopyLoc[0](Arg0: u128)
66LdU128(319014718988379809496913694467282698240)
67BitAnd
68LdU128(0)
69Eq
70BrFalse(79)
B11:
71MoveLoc[0](Arg0: u128)
72LdU8(4)
73Shl
74StLoc[0](Arg0: u128)
75MoveLoc[2](loc1: u8)
76LdU8(4)
77Add
78StLoc[2](loc1: u8)
B12:
79CopyLoc[0](Arg0: u128)
80LdU128(255211775190703847597530955573826158592)
81BitAnd
82LdU128(0)
83Eq
84BrFalse(93)
B13:
85MoveLoc[0](Arg0: u128)
86LdU8(2)
87Shl
88StLoc[0](Arg0: u128)
89MoveLoc[2](loc1: u8)
90LdU8(2)
91Add
92StLoc[2](loc1: u8)
B14:
93MoveLoc[0](Arg0: u128)
94LdU128(170141183460469231731687303715884105728)
95BitAnd
96LdU128(0)
97Eq
98BrFalse(103)
B15:
99MoveLoc[2](loc1: u8)
100LdU8(1)
101Add
102StLoc[2](loc1: u8)
B16:
103MoveLoc[2](loc1: u8)
104StLoc[1](loc0: u8)
B17:
105MoveLoc[1](loc0: u8)
106Ret
}
Constants [
0 => u64: 1
1 => u64: 2
2 => u64: 3
3 => u64: 4
4 => u64: 6
5 => u64: 7
6 => u64: 9223372036854775808
7 => u64: 18446744073709551615
8 => u64: 9223372036854775807
]
}