Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

bottle

Module0x3466…98bb
Move path
0xce7f…4db2::bottle
Functions
5322 public, 0 entry
Structs
2
Friend modules
bucket
bottle

Bytecode2038 lines

The on-chain disassembly. Offsets are instruction numbers within each function.

// Move bytecode v7
module ce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2.bottle {
use 00db9a10bb9536ab367b7d1ffa404c1d6c55f009076df1139dc108dd86608bbe::linked_table;
use 00db9a10bb9536ab367b7d1ffa404c1d6c55f009076df1139dc108dd86608bbe::math;
use f145ee6d09aae034924f80672bc76db2415dfd1b1bed863ac289af9d94e2c4fc::bucket_oracle;
use ce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::constants;
use ce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::interest;
use ce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::math as 0math;
use 0000000000000000000000000000000000000000000000000000000000000001::option;
use 0000000000000000000000000000000000000000000000000000000000000001::u64;
use 0000000000000000000000000000000000000000000000000000000000000002::clock;
use 0000000000000000000000000000000000000000000000000000000000000002::dynamic_object_field;
use 0000000000000000000000000000000000000000000000000000000000000002::object;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
 
struct BottleTable has store, key {
id: UID,
table: LinkedTable<address, Bottle>,
total_stake: u64,
total_stake_snapshot: u64,
total_collateral_snapshot: u64,
debt_per_unit_stake: u128,
reward_per_unit_stake: u128,
last_reward_error: u128,
last_debt_error: u128
}
 
struct Bottle has store, key {
id: UID,
collateral_amount: u64,
buck_amount: u64,
stake_amount: u64,
reward_coll_snapshot: u128,
reward_debt_snapshot: u128
}
 
public(friend) new(Arg0: &BottleTable, Arg1: &mut TxContext): Bottle {
B0:
0MoveLoc[1](Arg1: &mut TxContext)
1Call object::new(&mut TxContext): UID
2LdU64(0)
3LdU64(0)
4LdU64(0)
5CopyLoc[0](Arg0: &BottleTable)
6ImmBorrowField[0](BottleTable.reward_per_unit_stake: u128)
7ReadRef
8MoveLoc[0](Arg0: &BottleTable)
9ImmBorrowField[1](BottleTable.debt_per_unit_stake: u128)
10ReadRef
11Pack[1](Bottle)
12Ret
}
 
public(friend) new_table(Arg0: &mut TxContext): BottleTable {
B0:
0CopyLoc[0](Arg0: &mut TxContext)
1Call object::new(&mut TxContext): UID
2MoveLoc[0](Arg0: &mut TxContext)
3Call linked_table::new<address, Bottle>(&mut TxContext): LinkedTable<address, Bottle>
4LdU64(0)
5LdU64(0)
6LdU64(0)
7LdU128(0)
8LdU128(0)
9LdU128(0)
10LdU128(0)
11Pack[0](BottleTable)
12Ret
}
 
public(friend) add_interest_index_to_bottle(Arg0: &mut Bottle, Arg1: u256, Arg2: &mut TxContext) {
B0:
0CopyLoc[0](Arg0: &mut Bottle)
1FreezeRef
2Call is_interest_index_exists(&Bottle): bool
3Not
4BrFalse(13)
B1:
5MoveLoc[0](Arg0: &mut Bottle)
6MutBorrowField[2](Bottle.id: UID)
7LdConst[8](vector<u8>: "int..)
8MoveLoc[1](Arg1: u256)
9MoveLoc[2](Arg2: &mut TxContext)
10Call interest::new_bottle_interest_index(u256, &mut TxContext): BottleInterestIndex
11Call dynamic_object_field::add<vector<u8>, BottleInterestIndex>(&mut UID, vector<u8>, BottleInterestIndex)
12Branch(17)
B2:
13MoveLoc[2](Arg2: &mut TxContext)
14Pop
15MoveLoc[0](Arg0: &mut Bottle)
16Pop
B3:
17Ret
}
 
public(friend) record_borrow(Arg0: &mut Bottle, Arg1: u64, Arg2: u64, Arg3: u64) {
B0:
0CopyLoc[0](Arg0: &mut Bottle)
1ImmBorrowField[3](Bottle.collateral_amount: u64)
2ReadRef
3MoveLoc[1](Arg1: u64)
4Add
5CopyLoc[0](Arg0: &mut Bottle)
6MutBorrowField[3](Bottle.collateral_amount: u64)
7WriteRef
8CopyLoc[0](Arg0: &mut Bottle)
9ImmBorrowField[4](Bottle.buck_amount: u64)
10ReadRef
11MoveLoc[2](Arg2: u64)
12Add
13CopyLoc[0](Arg0: &mut Bottle)
14MutBorrowField[4](Bottle.buck_amount: u64)
15WriteRef
16MoveLoc[0](Arg0: &mut Bottle)
17ImmBorrowField[4](Bottle.buck_amount: u64)
18ReadRef
19MoveLoc[3](Arg3: u64)
20Ge
21BrFalse(23)
B1:
22Branch(25)
B2:
23LdConst[2](u64: 3)
24Abort
B3:
25Ret
}
 
public(friend) record_top_up(Arg0: &mut Bottle, Arg1: u64) {
B0:
0CopyLoc[0](Arg0: &mut Bottle)
1ImmBorrowField[3](Bottle.collateral_amount: u64)
2ReadRef
3MoveLoc[1](Arg1: u64)
4Add
5MoveLoc[0](Arg0: &mut Bottle)
6MutBorrowField[3](Bottle.collateral_amount: u64)
7WriteRef
8Ret
}
 
public(friend) record_repay(Arg0: &mut Bottle, Arg1: u64, Arg2: u64, Arg3: bool): bool * u64 {
L4: loc0: bool
L5: loc1: u64
L6: loc2: u64
L7: loc3: u64
B0:
0CopyLoc[1](Arg1: u64)
1CopyLoc[0](Arg0: &mut Bottle)
2ImmBorrowField[4](Bottle.buck_amount: u64)
3ReadRef
4Ge
5BrFalse(23)
B1:
6CopyLoc[0](Arg0: &mut Bottle)
7ImmBorrowField[3](Bottle.collateral_amount: u64)
8ReadRef
9StLoc[6](loc2: u64)
10LdU64(0)
11CopyLoc[0](Arg0: &mut Bottle)
12MutBorrowField[3](Bottle.collateral_amount: u64)
13WriteRef
14LdU64(0)
15MoveLoc[0](Arg0: &mut Bottle)
16MutBorrowField[4](Bottle.buck_amount: u64)
17WriteRef
18LdTrue
19MoveLoc[6](loc2: u64)
20StLoc[5](loc1: u64)
21StLoc[4](loc0: bool)
22Branch(66)
B2:
23CopyLoc[0](Arg0: &mut Bottle)
24ImmBorrowField[3](Bottle.collateral_amount: u64)
25ReadRef
26CopyLoc[1](Arg1: u64)
27CopyLoc[0](Arg0: &mut Bottle)
28ImmBorrowField[4](Bottle.buck_amount: u64)
29ReadRef
30Call math::mul_factor(u64, u64, u64): u64
31StLoc[7](loc3: u64)
32CopyLoc[0](Arg0: &mut Bottle)
33ImmBorrowField[3](Bottle.collateral_amount: u64)
34ReadRef
35CopyLoc[7](loc3: u64)
36Sub
37CopyLoc[0](Arg0: &mut Bottle)
38MutBorrowField[3](Bottle.collateral_amount: u64)
39WriteRef
40CopyLoc[0](Arg0: &mut Bottle)
41ImmBorrowField[4](Bottle.buck_amount: u64)
42ReadRef
43MoveLoc[1](Arg1: u64)
44Sub
45CopyLoc[0](Arg0: &mut Bottle)
46MutBorrowField[4](Bottle.buck_amount: u64)
47WriteRef
48MoveLoc[3](Arg3: bool)
49BrFalse(60)
B3:
50MoveLoc[0](Arg0: &mut Bottle)
51ImmBorrowField[4](Bottle.buck_amount: u64)
52ReadRef
53MoveLoc[2](Arg2: u64)
54Ge
55BrFalse(57)
B4:
56Branch(59)
B5:
57LdConst[2](u64: 3)
58Abort
B6:
59Branch(62)
B7:
60MoveLoc[0](Arg0: &mut Bottle)
61Pop
B8:
62LdFalse
63MoveLoc[7](loc3: u64)
64StLoc[5](loc1: u64)
65StLoc[4](loc0: bool)
B9:
66MoveLoc[4](loc0: bool)
67MoveLoc[5](loc1: u64)
68Ret
}
 
public(friend) record_withdraw(Arg0: &mut Bottle, Arg1: u64) {
B0:
0CopyLoc[0](Arg0: &mut Bottle)
1ImmBorrowField[3](Bottle.collateral_amount: u64)
2ReadRef
3MoveLoc[1](Arg1: u64)
4Sub
5MoveLoc[0](Arg0: &mut Bottle)
6MutBorrowField[3](Bottle.collateral_amount: u64)
7WriteRef
8Ret
}
 
compute_buck_value_to_collateral(Arg0: u64, Arg1: u8, Arg2: u64, Arg3: u64): u64 {
L4: loc0: u64
L5: loc1: u64
B0:
0MoveLoc[0](Arg0: u64)
1MoveLoc[3](Arg3: u64)
2MoveLoc[2](Arg2: u64)
3Call math::mul_factor(u64, u64, u64): u64
4StLoc[5](loc1: u64)
5Call constants::buck_decimal(): u8
6CopyLoc[1](Arg1: u8)
7Ge
8BrFalse(18)
B1:
9MoveLoc[5](loc1: u64)
10LdU64(10)
11Call constants::buck_decimal(): u8
12MoveLoc[1](Arg1: u8)
13Sub
14Call u64::pow(u64, u8): u64
15Div
16StLoc[4](loc0: u64)
17Branch(26)
B2:
18MoveLoc[5](loc1: u64)
19LdU64(10)
20MoveLoc[1](Arg1: u8)
21Call constants::buck_decimal(): u8
22Sub
23Call u64::pow(u64, u8): u64
24Mul
25StLoc[4](loc0: u64)
B3:
26MoveLoc[4](loc0: u64)
27Ret
}
 
public(friend) record_repay_capped<Ty0>(Arg0: &mut Bottle, Arg1: u64, Arg2: &BucketOracle, Arg3: &Clock, Arg4: u64, Arg5: u8): bool * u64 {
L6: loc0: bool
L7: loc1: u64
L8: loc2: u64
L9: loc3: u64
L10: loc4: u64
L11: loc5: u64
B0:
0MoveLoc[2](Arg2: &BucketOracle)
1MoveLoc[3](Arg3: &Clock)
2Call bucket_oracle::get_price<Ty0>(&BucketOracle, &Clock): u64 * u64
3StLoc[8](loc2: u64)
4StLoc[9](loc3: u64)
5CopyLoc[1](Arg1: u64)
6MoveLoc[4](Arg4: u64)
7Mul
8LdU64(100)
9Div
10MoveLoc[5](Arg5: u8)
11MoveLoc[9](loc3: u64)
12MoveLoc[8](loc2: u64)
13Call compute_buck_value_to_collateral(u64, u8, u64, u64): u64
14StLoc[11](loc5: u64)
15CopyLoc[1](Arg1: u64)
16CopyLoc[0](Arg0: &mut Bottle)
17ImmBorrowField[4](Bottle.buck_amount: u64)
18ReadRef
19Ge
20BrFalse(48)
B1:
21CopyLoc[0](Arg0: &mut Bottle)
22ImmBorrowField[3](Bottle.collateral_amount: u64)
23ReadRef
24CopyLoc[11](loc5: u64)
25Lt
26BrFalse(31)
B2:
27CopyLoc[0](Arg0: &mut Bottle)
28ImmBorrowField[3](Bottle.collateral_amount: u64)
29ReadRef
30StLoc[11](loc5: u64)
B3:
31CopyLoc[0](Arg0: &mut Bottle)
32ImmBorrowField[3](Bottle.collateral_amount: u64)
33ReadRef
34CopyLoc[11](loc5: u64)
35Sub
36CopyLoc[0](Arg0: &mut Bottle)
37MutBorrowField[3](Bottle.collateral_amount: u64)
38WriteRef
39LdU64(0)
40MoveLoc[0](Arg0: &mut Bottle)
41MutBorrowField[4](Bottle.buck_amount: u64)
42WriteRef
43LdTrue
44MoveLoc[11](loc5: u64)
45StLoc[7](loc1: u64)
46StLoc[6](loc0: bool)
47Branch(83)
B4:
48CopyLoc[0](Arg0: &mut Bottle)
49ImmBorrowField[3](Bottle.collateral_amount: u64)
50ReadRef
51CopyLoc[1](Arg1: u64)
52CopyLoc[0](Arg0: &mut Bottle)
53ImmBorrowField[4](Bottle.buck_amount: u64)
54ReadRef
55Call math::mul_factor(u64, u64, u64): u64
56StLoc[10](loc4: u64)
57CopyLoc[10](loc4: u64)
58CopyLoc[11](loc5: u64)
59Lt
60BrFalse(63)
B5:
61MoveLoc[10](loc4: u64)
62StLoc[11](loc5: u64)
B6:
63CopyLoc[0](Arg0: &mut Bottle)
64ImmBorrowField[3](Bottle.collateral_amount: u64)
65ReadRef
66CopyLoc[11](loc5: u64)
67Sub
68CopyLoc[0](Arg0: &mut Bottle)
69MutBorrowField[3](Bottle.collateral_amount: u64)
70WriteRef
71CopyLoc[0](Arg0: &mut Bottle)
72ImmBorrowField[4](Bottle.buck_amount: u64)
73ReadRef
74MoveLoc[1](Arg1: u64)
75Sub
76MoveLoc[0](Arg0: &mut Bottle)
77MutBorrowField[4](Bottle.buck_amount: u64)
78WriteRef
79LdFalse
80MoveLoc[11](loc5: u64)
81StLoc[7](loc1: u64)
82StLoc[6](loc0: bool)
B7:
83MoveLoc[6](loc0: bool)
84MoveLoc[7](loc1: u64)
85Ret
}
 
public(friend) record_redeem(Arg0: &mut Bottle, Arg1: u64, Arg2: u64) {
B0:
0CopyLoc[0](Arg0: &mut Bottle)
1ImmBorrowField[3](Bottle.collateral_amount: u64)
2ReadRef
3CopyLoc[1](Arg1: u64)
4Ge
5BrFalse(7)
B1:
6Branch(11)
B2:
7MoveLoc[0](Arg0: &mut Bottle)
8Pop
9LdConst[0](u64: 1)
10Abort
B3:
11CopyLoc[0](Arg0: &mut Bottle)
12ImmBorrowField[3](Bottle.collateral_amount: u64)
13ReadRef
14MoveLoc[1](Arg1: u64)
15Sub
16CopyLoc[0](Arg0: &mut Bottle)
17MutBorrowField[3](Bottle.collateral_amount: u64)
18WriteRef
19CopyLoc[0](Arg0: &mut Bottle)
20ImmBorrowField[4](Bottle.buck_amount: u64)
21ReadRef
22MoveLoc[2](Arg2: u64)
23Sub
24MoveLoc[0](Arg0: &mut Bottle)
25MutBorrowField[4](Bottle.buck_amount: u64)
26WriteRef
27Ret
}
 
public(friend) destroy_surplus_bottle(Arg0: Bottle): u64 {
L1: loc0: u64
B0:
0MoveLoc[0](Arg0: Bottle)
1Unpack[1](Bottle)
2Pop
3Pop
4Pop
5Pop
6StLoc[1](loc0: u64)
7Call object::delete(UID)
8MoveLoc[1](loc0: u64)
9Ret
}
 
public(friend) remove_bottle_stake(Arg0: &mut BottleTable, Arg1: address) {
L2: loc0: &mut Bottle
L3: loc1: u64
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1MoveLoc[1](Arg1: address)
2Call borrow_bottle_mut(&mut BottleTable, address): &mut Bottle
3StLoc[2](loc0: &mut Bottle)
4CopyLoc[2](loc0: &mut Bottle)
5ImmBorrowField[5](Bottle.stake_amount: u64)
6ReadRef
7StLoc[3](loc1: u64)
8LdU64(0)
9MoveLoc[2](loc0: &mut Bottle)
10MutBorrowField[5](Bottle.stake_amount: u64)
11WriteRef
12CopyLoc[0](Arg0: &mut BottleTable)
13ImmBorrowField[6](BottleTable.total_stake: u64)
14ReadRef
15MoveLoc[3](loc1: u64)
16Sub
17MoveLoc[0](Arg0: &mut BottleTable)
18MutBorrowField[6](BottleTable.total_stake: u64)
19WriteRef
20Ret
}
 
public destroy_bottle(Arg0: &mut BottleTable, Arg1: address) {
L2: loc0: bool
L3: loc1: u64
L4: loc2: u64
L5: loc3: UID
L6: loc4: u64
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1MoveLoc[1](Arg1: address)
2Call remove_bottle(&mut BottleTable, address): Bottle
3Unpack[1](Bottle)
4Pop
5Pop
6StLoc[6](loc4: u64)
7StLoc[3](loc1: u64)
8StLoc[4](loc2: u64)
9StLoc[5](loc3: UID)
10MoveLoc[4](loc2: u64)
11LdU64(0)
12Eq
13BrFalse(19)
B1:
14MoveLoc[3](loc1: u64)
15LdU64(0)
16Eq
17StLoc[2](loc0: bool)
18Branch(21)
B2:
19LdFalse
20StLoc[2](loc0: bool)
B3:
21MoveLoc[2](loc0: bool)
22BrFalse(24)
B4:
23Branch(28)
B5:
24MoveLoc[0](Arg0: &mut BottleTable)
25Pop
26LdConst[1](u64: 2)
27Abort
B6:
28MoveLoc[5](loc3: UID)
29Call object::delete(UID)
30CopyLoc[0](Arg0: &mut BottleTable)
31ImmBorrowField[6](BottleTable.total_stake: u64)
32ReadRef
33MoveLoc[6](loc4: u64)
34Sub
35MoveLoc[0](Arg0: &mut BottleTable)
36MutBorrowField[6](BottleTable.total_stake: u64)
37WriteRef
38Ret
}
 
public get_table_length(Arg0: &BottleTable): u64 {
B0:
0MoveLoc[0](Arg0: &BottleTable)
1Call borrow_table(&BottleTable): &LinkedTable<address, Bottle>
2Call linked_table::length<address, Bottle>(&LinkedTable<address, Bottle>): u64
3Ret
}
 
public bottle_exists(Arg0: &BottleTable, Arg1: address): bool {
B0:
0MoveLoc[0](Arg0: &BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2MoveLoc[1](Arg1: address)
3Call linked_table::contains<address, Bottle>(&LinkedTable<address, Bottle>, address): bool
4Ret
}
 
public borrow_bottle(Arg0: &BottleTable, Arg1: address): &Bottle {
B0:
0CopyLoc[0](Arg0: &BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2CopyLoc[1](Arg1: address)
3Call linked_table::contains<address, Bottle>(&LinkedTable<address, Bottle>, address): bool
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &BottleTable)
7Pop
8LdConst[3](u64: 4)
9Abort
B3:
10MoveLoc[0](Arg0: &BottleTable)
11ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
12MoveLoc[1](Arg1: address)
13Call linked_table::borrow<address, Bottle>(&LinkedTable<address, Bottle>, address): &Bottle
14Ret
}
 
public(friend) borrow_bottle_mut(Arg0: &mut BottleTable, Arg1: address): &mut Bottle {
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2CopyLoc[1](Arg1: address)
3Call linked_table::contains<address, Bottle>(&LinkedTable<address, Bottle>, address): bool
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &mut BottleTable)
7Pop
8LdConst[3](u64: 4)
9Abort
B3:
10MoveLoc[0](Arg0: &mut BottleTable)
11MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
12MoveLoc[1](Arg1: address)
13Call linked_table::borrow_mut<address, Bottle>(&mut LinkedTable<address, Bottle>, address): &mut Bottle
14Ret
}
 
public borrow_interest_index(Arg0: &Bottle): &BottleInterestIndex {
B0:
0CopyLoc[0](Arg0: &Bottle)
1Call is_interest_index_exists(&Bottle): bool
2BrFalse(4)
B1:
3Branch(8)
B2:
4MoveLoc[0](Arg0: &Bottle)
5Pop
6LdConst[7](u64: 8)
7Abort
B3:
8MoveLoc[0](Arg0: &Bottle)
9ImmBorrowField[2](Bottle.id: UID)
10LdConst[8](vector<u8>: "int..)
11Call dynamic_object_field::borrow<vector<u8>, BottleInterestIndex>(&UID, vector<u8>): &BottleInterestIndex
12Ret
}
 
public(friend) borrow_interest_index_mut(Arg0: &mut Bottle): &mut BottleInterestIndex {
B0:
0CopyLoc[0](Arg0: &mut Bottle)
1FreezeRef
2Call is_interest_index_exists(&Bottle): bool
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[0](Arg0: &mut Bottle)
6Pop
7LdConst[7](u64: 8)
8Abort
B3:
9MoveLoc[0](Arg0: &mut Bottle)
10MutBorrowField[2](Bottle.id: UID)
11LdConst[8](vector<u8>: "int..)
12Call dynamic_object_field::borrow_mut<vector<u8>, BottleInterestIndex>(&mut UID, vector<u8>): &mut BottleInterestIndex
13Ret
}
 
public(friend) remove_bottle(Arg0: &mut BottleTable, Arg1: address): Bottle {
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2CopyLoc[1](Arg1: address)
3Call linked_table::contains<address, Bottle>(&LinkedTable<address, Bottle>, address): bool
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &mut BottleTable)
7Pop
8LdConst[3](u64: 4)
9Abort
B3:
10MoveLoc[0](Arg0: &mut BottleTable)
11MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
12MoveLoc[1](Arg1: address)
13Call linked_table::remove<address, Bottle>(&mut LinkedTable<address, Bottle>, address): Bottle
14Ret
}
 
public(friend) pop_front(Arg0: &mut BottleTable): address * Bottle {
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2Call linked_table::front<address, Bottle>(&LinkedTable<address, Bottle>): &Option<address>
3Call option::is_some<address>(&Option<address>): bool
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &mut BottleTable)
7Pop
8LdConst[3](u64: 4)
9Abort
B3:
10MoveLoc[0](Arg0: &mut BottleTable)
11MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
12Call linked_table::pop_front<address, Bottle>(&mut LinkedTable<address, Bottle>): address * Bottle
13Ret
}
 
public get_lowest_cr_debtor(Arg0: &BottleTable): Option<address> {
B0:
0MoveLoc[0](Arg0: &BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2Call linked_table::front<address, Bottle>(&LinkedTable<address, Bottle>): &Option<address>
3ReadRef
4Ret
}
 
public get_bottle_info(Arg0: &BottleTable, Arg1: &Bottle): u64 * u64 {
L2: loc0: u64
L3: loc1: u64
B0:
0CopyLoc[1](Arg1: &Bottle)
1CopyLoc[0](Arg0: &BottleTable)
2Call get_pending_coll(&Bottle, &BottleTable): u64
3StLoc[2](loc0: u64)
4CopyLoc[1](Arg1: &Bottle)
5MoveLoc[0](Arg0: &BottleTable)
6Call get_pending_debt(&Bottle, &BottleTable): u64
7StLoc[3](loc1: u64)
8CopyLoc[1](Arg1: &Bottle)
9ImmBorrowField[3](Bottle.collateral_amount: u64)
10ReadRef
11MoveLoc[2](loc0: u64)
12Add
13MoveLoc[1](Arg1: &Bottle)
14ImmBorrowField[4](Bottle.buck_amount: u64)
15ReadRef
16MoveLoc[3](loc1: u64)
17Add
18Ret
}
 
public get_bottle_info_by_debtor(Arg0: &BottleTable, Arg1: address): u64 * u64 {
L2: loc0: &Bottle
L3: loc1: u64
L4: loc2: u64
B0:
0CopyLoc[0](Arg0: &BottleTable)
1MoveLoc[1](Arg1: address)
2Call borrow_bottle(&BottleTable, address): &Bottle
3StLoc[2](loc0: &Bottle)
4CopyLoc[2](loc0: &Bottle)
5CopyLoc[0](Arg0: &BottleTable)
6Call get_pending_coll(&Bottle, &BottleTable): u64
7StLoc[3](loc1: u64)
8CopyLoc[2](loc0: &Bottle)
9MoveLoc[0](Arg0: &BottleTable)
10Call get_pending_debt(&Bottle, &BottleTable): u64
11StLoc[4](loc2: u64)
12CopyLoc[2](loc0: &Bottle)
13ImmBorrowField[3](Bottle.collateral_amount: u64)
14ReadRef
15MoveLoc[3](loc1: u64)
16Add
17MoveLoc[2](loc0: &Bottle)
18ImmBorrowField[4](Bottle.buck_amount: u64)
19ReadRef
20MoveLoc[4](loc2: u64)
21Add
22Ret
}
 
public get_bottle_raw_info_by_debator(Arg0: &BottleTable, Arg1: address): u64 * u64 {
L2: loc0: &Bottle
B0:
0MoveLoc[0](Arg0: &BottleTable)
1MoveLoc[1](Arg1: address)
2Call borrow_bottle(&BottleTable, address): &Bottle
3StLoc[2](loc0: &Bottle)
4CopyLoc[2](loc0: &Bottle)
5ImmBorrowField[3](Bottle.collateral_amount: u64)
6ReadRef
7MoveLoc[2](loc0: &Bottle)
8ImmBorrowField[4](Bottle.buck_amount: u64)
9ReadRef
10Ret
}
 
public get_bottle_raw_info(Arg0: &Bottle): u64 * u64 {
B0:
0CopyLoc[0](Arg0: &Bottle)
1ImmBorrowField[3](Bottle.collateral_amount: u64)
2ReadRef
3MoveLoc[0](Arg0: &Bottle)
4ImmBorrowField[4](Bottle.buck_amount: u64)
5ReadRef
6Ret
}
 
public get_bottle_info_with_interest(Arg0: &BottleTable, Arg1: &Bottle, Arg2: &InterestTable, Arg3: &Clock): u64 * u64 {
L4: loc0: u64
L5: loc1: u64
L6: loc2: u64
B0:
0CopyLoc[1](Arg1: &Bottle)
1CopyLoc[0](Arg0: &BottleTable)
2Call get_pending_coll(&Bottle, &BottleTable): u64
3StLoc[5](loc1: u64)
4CopyLoc[1](Arg1: &Bottle)
5MoveLoc[0](Arg0: &BottleTable)
6Call get_pending_debt(&Bottle, &BottleTable): u64
7StLoc[6](loc2: u64)
8CopyLoc[1](Arg1: &Bottle)
9MoveLoc[2](Arg2: &InterestTable)
10CopyLoc[1](Arg1: &Bottle)
11ImmBorrowField[4](Bottle.buck_amount: u64)
12ReadRef
13MoveLoc[3](Arg3: &Clock)
14Call get_debt_amount_with_interest(&Bottle, &InterestTable, u64, &Clock): u64
15StLoc[4](loc0: u64)
16MoveLoc[1](Arg1: &Bottle)
17ImmBorrowField[3](Bottle.collateral_amount: u64)
18ReadRef
19MoveLoc[5](loc1: u64)
20Add
21MoveLoc[4](loc0: u64)
22MoveLoc[6](loc2: u64)
23Add
24Ret
}
 
public get_bottle_info_with_interest_by_debtor(Arg0: &BottleTable, Arg1: address, Arg2: &InterestTable, Arg3: &Clock): u64 * u64 {
L4: loc0: &Bottle
L5: loc1: u64
L6: loc2: u64
L7: loc3: u64
B0:
0CopyLoc[0](Arg0: &BottleTable)
1MoveLoc[1](Arg1: address)
2Call borrow_bottle(&BottleTable, address): &Bottle
3StLoc[4](loc0: &Bottle)
4CopyLoc[4](loc0: &Bottle)
5CopyLoc[0](Arg0: &BottleTable)
6Call get_pending_coll(&Bottle, &BottleTable): u64
7StLoc[6](loc2: u64)
8CopyLoc[4](loc0: &Bottle)
9MoveLoc[0](Arg0: &BottleTable)
10Call get_pending_debt(&Bottle, &BottleTable): u64
11StLoc[7](loc3: u64)
12CopyLoc[4](loc0: &Bottle)
13MoveLoc[2](Arg2: &InterestTable)
14CopyLoc[4](loc0: &Bottle)
15ImmBorrowField[4](Bottle.buck_amount: u64)
16ReadRef
17MoveLoc[3](Arg3: &Clock)
18Call get_debt_amount_with_interest(&Bottle, &InterestTable, u64, &Clock): u64
19StLoc[5](loc1: u64)
20MoveLoc[4](loc0: &Bottle)
21ImmBorrowField[3](Bottle.collateral_amount: u64)
22ReadRef
23MoveLoc[6](loc2: u64)
24Add
25MoveLoc[5](loc1: u64)
26MoveLoc[7](loc3: u64)
27Add
28Ret
}
 
get_debt_amount_with_interest(Arg0: &Bottle, Arg1: &InterestTable, Arg2: u64, Arg3: &Clock): u64 {
L4: loc0: u64
L5: loc1: u256
L6: loc2: u256
L7: loc3: u256
B0:
0CopyLoc[0](Arg0: &Bottle)
1Call is_interest_index_exists(&Bottle): bool
2BrFalse(42)
B1:
3MoveLoc[2](Arg2: u64)
4CastU256
5StLoc[7](loc3: u256)
6MoveLoc[0](Arg0: &Bottle)
7Call borrow_interest_index(&Bottle): &BottleInterestIndex
8Call interest::get_bottle_interest_index(&BottleInterestIndex): u256
9StLoc[5](loc1: u256)
10CopyLoc[5](loc1: u256)
11LdU256(0)
12Gt
13BrFalse(26)
B2:
14MoveLoc[1](Arg1: &InterestTable)
15MoveLoc[3](Arg3: &Clock)
16Call interest::calculate_interest_index(&InterestTable, &Clock): u256 * u256
17Pop
18StLoc[6](loc2: u256)
19MoveLoc[7](loc3: u256)
20CastU256
21MoveLoc[6](loc2: u256)
22MoveLoc[5](loc1: u256)
23Call 0math::mul_factor_u256(u256, u256, u256): u256
24StLoc[7](loc3: u256)
25Branch(30)
B3:
26MoveLoc[1](Arg1: &InterestTable)
27Pop
28MoveLoc[3](Arg3: &Clock)
29Pop
B4:
30CopyLoc[7](loc3: u256)
31Call constants::max_u64(): u64
32CastU256
33Le
34BrFalse(36)
B5:
35Branch(38)
B6:
36LdConst[6](u64: 7)
37Abort
B7:
38MoveLoc[7](loc3: u256)
39CastU64
40StLoc[4](loc0: u64)
41Branch(50)
B8:
42MoveLoc[1](Arg1: &InterestTable)
43Pop
44MoveLoc[3](Arg3: &Clock)
45Pop
46MoveLoc[0](Arg0: &Bottle)
47Pop
48MoveLoc[2](Arg2: u64)
49StLoc[4](loc0: u64)
B9:
50MoveLoc[4](loc0: u64)
51Ret
}
 
public get_pending_coll(Arg0: &Bottle, Arg1: &BottleTable): u64 {
B0:
0CopyLoc[0](Arg0: &Bottle)
1ImmBorrowField[5](Bottle.stake_amount: u64)
2ReadRef
3CastU128
4MoveLoc[1](Arg1: &BottleTable)
5ImmBorrowField[0](BottleTable.reward_per_unit_stake: u128)
6ReadRef
7MoveLoc[0](Arg0: &Bottle)
8ImmBorrowField[8](Bottle.reward_coll_snapshot: u128)
9ReadRef
10Sub
11CastU128
12Call constants::distribution_precision(): u128
13Call math::mul_factor_u128(u128, u128, u128): u128
14CastU64
15Ret
}
 
public get_pending_debt(Arg0: &Bottle, Arg1: &BottleTable): u64 {
B0:
0CopyLoc[0](Arg0: &Bottle)
1ImmBorrowField[5](Bottle.stake_amount: u64)
2ReadRef
3CastU128
4MoveLoc[1](Arg1: &BottleTable)
5ImmBorrowField[1](BottleTable.debt_per_unit_stake: u128)
6ReadRef
7MoveLoc[0](Arg0: &Bottle)
8ImmBorrowField[9](Bottle.reward_debt_snapshot: u128)
9ReadRef
10Sub
11CastU128
12Call constants::distribution_precision(): u128
13Call math::mul_factor_u128(u128, u128, u128): u128
14CastU64
15Ret
}
 
public borrow_table(Arg0: &BottleTable): &LinkedTable<address, Bottle> {
B0:
0MoveLoc[0](Arg0: &BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2Ret
}
 
public(friend) get_bottle_info_after_update(Arg0: &mut BottleTable, Arg1: address): u64 * u64 {
L2: loc0: address
L3: loc1: &Bottle
L4: loc2: &mut Bottle
L5: loc3: u64
L6: loc4: u64
L7: loc5: u128
L8: loc6: u128
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[0](BottleTable.reward_per_unit_stake: u128)
2ReadRef
3StLoc[8](loc6: u128)
4CopyLoc[0](Arg0: &mut BottleTable)
5ImmBorrowField[1](BottleTable.debt_per_unit_stake: u128)
6ReadRef
7StLoc[7](loc5: u128)
8CopyLoc[0](Arg0: &mut BottleTable)
9CopyLoc[1](Arg1: address)
10StLoc[2](loc0: address)
11FreezeRef
12MoveLoc[2](loc0: address)
13Call borrow_bottle(&BottleTable, address): &Bottle
14StLoc[3](loc1: &Bottle)
15CopyLoc[3](loc1: &Bottle)
16CopyLoc[0](Arg0: &mut BottleTable)
17FreezeRef
18Call get_pending_coll(&Bottle, &BottleTable): u64
19StLoc[5](loc3: u64)
20MoveLoc[3](loc1: &Bottle)
21CopyLoc[0](Arg0: &mut BottleTable)
22FreezeRef
23Call get_pending_debt(&Bottle, &BottleTable): u64
24StLoc[6](loc4: u64)
25MoveLoc[0](Arg0: &mut BottleTable)
26MoveLoc[1](Arg1: address)
27Call borrow_bottle_mut(&mut BottleTable, address): &mut Bottle
28StLoc[4](loc2: &mut Bottle)
29CopyLoc[4](loc2: &mut Bottle)
30ImmBorrowField[3](Bottle.collateral_amount: u64)
31ReadRef
32MoveLoc[5](loc3: u64)
33Add
34CopyLoc[4](loc2: &mut Bottle)
35MutBorrowField[3](Bottle.collateral_amount: u64)
36WriteRef
37CopyLoc[4](loc2: &mut Bottle)
38ImmBorrowField[4](Bottle.buck_amount: u64)
39ReadRef
40MoveLoc[6](loc4: u64)
41Add
42CopyLoc[4](loc2: &mut Bottle)
43MutBorrowField[4](Bottle.buck_amount: u64)
44WriteRef
45MoveLoc[8](loc6: u128)
46CopyLoc[4](loc2: &mut Bottle)
47MutBorrowField[8](Bottle.reward_coll_snapshot: u128)
48WriteRef
49MoveLoc[7](loc5: u128)
50CopyLoc[4](loc2: &mut Bottle)
51MutBorrowField[9](Bottle.reward_debt_snapshot: u128)
52WriteRef
53CopyLoc[4](loc2: &mut Bottle)
54ImmBorrowField[3](Bottle.collateral_amount: u64)
55ReadRef
56MoveLoc[4](loc2: &mut Bottle)
57ImmBorrowField[4](Bottle.buck_amount: u64)
58ReadRef
59Ret
}
 
public(friend) update_snapshot(Arg0: &mut BottleTable, Arg1: u64) {
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[6](BottleTable.total_stake: u64)
2ReadRef
3CopyLoc[0](Arg0: &mut BottleTable)
4MutBorrowField[10](BottleTable.total_stake_snapshot: u64)
5WriteRef
6MoveLoc[1](Arg1: u64)
7MoveLoc[0](Arg0: &mut BottleTable)
8MutBorrowField[11](BottleTable.total_collateral_snapshot: u64)
9WriteRef
10Ret
}
 
public(friend) update_bottle_debt_and_interest_index(Arg0: &mut Bottle, Arg1: u64, Arg2: u256) {
B0:
0CopyLoc[0](Arg0: &mut Bottle)
1ImmBorrowField[4](Bottle.buck_amount: u64)
2ReadRef
3CopyLoc[1](Arg1: u64)
4Le
5BrFalse(7)
B1:
6Branch(11)
B2:
7MoveLoc[0](Arg0: &mut Bottle)
8Pop
9LdConst[5](u64: 6)
10Abort
B3:
11CopyLoc[0](Arg0: &mut Bottle)
12FreezeRef
13Call is_interest_index_exists(&Bottle): bool
14BrFalse(24)
B4:
15MoveLoc[1](Arg1: u64)
16CopyLoc[0](Arg0: &mut Bottle)
17MutBorrowField[4](Bottle.buck_amount: u64)
18WriteRef
19MoveLoc[0](Arg0: &mut Bottle)
20Call borrow_interest_index_mut(&mut Bottle): &mut BottleInterestIndex
21MoveLoc[2](Arg2: u256)
22Call interest::update_bottle_interest_index(&mut BottleInterestIndex, u256)
23Branch(26)
B5:
24MoveLoc[0](Arg0: &mut Bottle)
25Pop
B6:
26Ret
}
 
public(friend) update_stake_and_total_stake(Arg0: &mut BottleTable, Arg1: &mut Bottle) {
L2: loc0: u64
L3: loc1: u64
L4: loc2: u64
L5: loc3: u64
B0:
0CopyLoc[1](Arg1: &mut Bottle)
1FreezeRef
2Call get_bottle_raw_info(&Bottle): u64 * u64
3Pop
4StLoc[4](loc2: u64)
5CopyLoc[0](Arg0: &mut BottleTable)
6MoveLoc[4](loc2: u64)
7StLoc[2](loc0: u64)
8FreezeRef
9MoveLoc[2](loc0: u64)
10Call compute_new_stake(&BottleTable, u64): u64
11StLoc[5](loc3: u64)
12CopyLoc[0](Arg0: &mut BottleTable)
13ImmBorrowField[6](BottleTable.total_stake: u64)
14ReadRef
15CopyLoc[1](Arg1: &mut Bottle)
16ImmBorrowField[5](Bottle.stake_amount: u64)
17ReadRef
18Ge
19BrFalse(29)
B1:
20CopyLoc[0](Arg0: &mut BottleTable)
21ImmBorrowField[6](BottleTable.total_stake: u64)
22ReadRef
23CopyLoc[1](Arg1: &mut Bottle)
24ImmBorrowField[5](Bottle.stake_amount: u64)
25ReadRef
26Sub
27StLoc[3](loc1: u64)
28Branch(31)
B2:
29LdU64(0)
30StLoc[3](loc1: u64)
B3:
31MoveLoc[3](loc1: u64)
32CopyLoc[5](loc3: u64)
33Add
34MoveLoc[0](Arg0: &mut BottleTable)
35MutBorrowField[6](BottleTable.total_stake: u64)
36WriteRef
37MoveLoc[5](loc3: u64)
38MoveLoc[1](Arg1: &mut Bottle)
39MutBorrowField[5](Bottle.stake_amount: u64)
40WriteRef
41Ret
}
 
public(friend) update_stake_and_total_stake_by_debtor(Arg0: &mut BottleTable, Arg1: address) {
L2: loc0: address
L3: loc1: u64
L4: loc2: u64
L5: loc3: &mut Bottle
L6: loc4: u64
L7: loc5: u64
L8: loc6: u64
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1CopyLoc[1](Arg1: address)
2StLoc[2](loc0: address)
3FreezeRef
4MoveLoc[2](loc0: address)
5Call get_bottle_raw_info_by_debator(&BottleTable, address): u64 * u64
6Pop
7StLoc[7](loc5: u64)
8CopyLoc[0](Arg0: &mut BottleTable)
9MoveLoc[7](loc5: u64)
10StLoc[3](loc1: u64)
11FreezeRef
12MoveLoc[3](loc1: u64)
13Call compute_new_stake(&BottleTable, u64): u64
14StLoc[8](loc6: u64)
15CopyLoc[0](Arg0: &mut BottleTable)
16MoveLoc[1](Arg1: address)
17Call borrow_bottle_mut(&mut BottleTable, address): &mut Bottle
18StLoc[5](loc3: &mut Bottle)
19CopyLoc[5](loc3: &mut Bottle)
20ImmBorrowField[5](Bottle.stake_amount: u64)
21ReadRef
22StLoc[6](loc4: u64)
23CopyLoc[8](loc6: u64)
24MoveLoc[5](loc3: &mut Bottle)
25MutBorrowField[5](Bottle.stake_amount: u64)
26WriteRef
27CopyLoc[0](Arg0: &mut BottleTable)
28ImmBorrowField[6](BottleTable.total_stake: u64)
29ReadRef
30CopyLoc[6](loc4: u64)
31Ge
32BrFalse(40)
B1:
33CopyLoc[0](Arg0: &mut BottleTable)
34ImmBorrowField[6](BottleTable.total_stake: u64)
35ReadRef
36MoveLoc[6](loc4: u64)
37Sub
38StLoc[4](loc2: u64)
39Branch(42)
B2:
40LdU64(0)
41StLoc[4](loc2: u64)
B3:
42MoveLoc[4](loc2: u64)
43MoveLoc[8](loc6: u64)
44Add
45MoveLoc[0](Arg0: &mut BottleTable)
46MutBorrowField[6](BottleTable.total_stake: u64)
47WriteRef
48Ret
}
 
public(friend) new_surplus_bottle(Arg0: u64, Arg1: &mut TxContext): Bottle {
B0:
0MoveLoc[1](Arg1: &mut TxContext)
1Call object::new(&mut TxContext): UID
2MoveLoc[0](Arg0: u64)
3LdU64(0)
4LdU64(0)
5LdU128(0)
6LdU128(0)
7Pack[1](Bottle)
8Ret
}
 
compute_new_stake(Arg0: &BottleTable, Arg1: u64): u64 {
L2: loc0: u64
B0:
0CopyLoc[0](Arg0: &BottleTable)
1ImmBorrowField[11](BottleTable.total_collateral_snapshot: u64)
2ReadRef
3LdU64(0)
4Eq
5BrFalse(11)
B1:
6MoveLoc[0](Arg0: &BottleTable)
7Pop
8MoveLoc[1](Arg1: u64)
9StLoc[2](loc0: u64)
10Branch(20)
B2:
11MoveLoc[1](Arg1: u64)
12CopyLoc[0](Arg0: &BottleTable)
13ImmBorrowField[10](BottleTable.total_stake_snapshot: u64)
14ReadRef
15MoveLoc[0](Arg0: &BottleTable)
16ImmBorrowField[11](BottleTable.total_collateral_snapshot: u64)
17ReadRef
18Call math::mul_factor(u64, u64, u64): u64
19StLoc[2](loc0: u64)
B3:
20MoveLoc[2](loc0: u64)
21Ret
}
 
public(friend) record_redistribution(Arg0: &mut BottleTable, Arg1: u64, Arg2: u64, Arg3: address) {
L4: loc0: &mut Bottle
L5: loc1: u128
L6: loc2: u128
L7: loc3: u128
L8: loc4: u128
L9: loc5: u128
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[6](BottleTable.total_stake: u64)
2ReadRef
3CastU128
4StLoc[9](loc5: u128)
5MoveLoc[1](Arg1: u64)
6CastU128
7Call constants::distribution_precision(): u128
8LdU128(1)
9Call math::mul_factor_u128(u128, u128, u128): u128
10CopyLoc[0](Arg0: &mut BottleTable)
11ImmBorrowField[12](BottleTable.last_reward_error: u128)
12ReadRef
13Add
14StLoc[7](loc3: u128)
15MoveLoc[2](Arg2: u64)
16CastU128
17Call constants::distribution_precision(): u128
18LdU128(1)
19Call math::mul_factor_u128(u128, u128, u128): u128
20CopyLoc[0](Arg0: &mut BottleTable)
21ImmBorrowField[13](BottleTable.last_debt_error: u128)
22ReadRef
23Add
24StLoc[5](loc1: u128)
25CopyLoc[7](loc3: u128)
26CopyLoc[9](loc5: u128)
27Div
28StLoc[8](loc4: u128)
29CopyLoc[5](loc1: u128)
30CopyLoc[9](loc5: u128)
31Div
32StLoc[6](loc2: u128)
33MoveLoc[7](loc3: u128)
34CopyLoc[8](loc4: u128)
35CopyLoc[9](loc5: u128)
36Mul
37Sub
38CopyLoc[0](Arg0: &mut BottleTable)
39MutBorrowField[12](BottleTable.last_reward_error: u128)
40WriteRef
41MoveLoc[5](loc1: u128)
42CopyLoc[6](loc2: u128)
43MoveLoc[9](loc5: u128)
44Mul
45Sub
46CopyLoc[0](Arg0: &mut BottleTable)
47MutBorrowField[13](BottleTable.last_debt_error: u128)
48WriteRef
49CopyLoc[0](Arg0: &mut BottleTable)
50ImmBorrowField[0](BottleTable.reward_per_unit_stake: u128)
51ReadRef
52MoveLoc[8](loc4: u128)
53Add
54CopyLoc[0](Arg0: &mut BottleTable)
55MutBorrowField[0](BottleTable.reward_per_unit_stake: u128)
56WriteRef
57CopyLoc[0](Arg0: &mut BottleTable)
58ImmBorrowField[1](BottleTable.debt_per_unit_stake: u128)
59ReadRef
60MoveLoc[6](loc2: u128)
61Add
62CopyLoc[0](Arg0: &mut BottleTable)
63MutBorrowField[1](BottleTable.debt_per_unit_stake: u128)
64WriteRef
65MoveLoc[0](Arg0: &mut BottleTable)
66MoveLoc[3](Arg3: address)
67Call borrow_bottle_mut(&mut BottleTable, address): &mut Bottle
68StLoc[4](loc0: &mut Bottle)
69LdU64(0)
70CopyLoc[4](loc0: &mut Bottle)
71MutBorrowField[4](Bottle.buck_amount: u64)
72WriteRef
73LdU64(0)
74CopyLoc[4](loc0: &mut Bottle)
75MutBorrowField[3](Bottle.collateral_amount: u64)
76WriteRef
77LdU128(0)
78CopyLoc[4](loc0: &mut Bottle)
79MutBorrowField[8](Bottle.reward_coll_snapshot: u128)
80WriteRef
81LdU128(0)
82MoveLoc[4](loc0: &mut Bottle)
83MutBorrowField[9](Bottle.reward_debt_snapshot: u128)
84WriteRef
85Ret
}
 
public(friend) insert(Arg0: &mut BottleTable, Arg1: address, Arg2: Bottle, Arg3: Option<address>) {
L4: loc0: &Bottle
L5: loc1: &Bottle
L6: loc2: Option<address>
L7: loc3: Option<address>
L8: loc4: Option<address>
L9: loc5: &Bottle
L10: loc6: address
B0:
0ImmBorrowLoc[3](Arg3: Option<address>)
1Call option::is_none<address>(&Option<address>): bool
2BrFalse(14)
B1:
3CopyLoc[0](Arg0: &mut BottleTable)
4ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
5Call linked_table::front<address, Bottle>(&LinkedTable<address, Bottle>): &Option<address>
6ReadRef
7StLoc[6](loc2: Option<address>)
8MoveLoc[0](Arg0: &mut BottleTable)
9MoveLoc[1](Arg1: address)
10MoveLoc[2](Arg2: Bottle)
11MoveLoc[6](loc2: Option<address>)
12Call find_upward_and_insert(&mut BottleTable, address, Bottle, Option<address>)
13Ret
B2:
14MoveLoc[3](Arg3: Option<address>)
15Call option::destroy_some<address>(Option<address>): address
16StLoc[10](loc6: address)
17CopyLoc[0](Arg0: &mut BottleTable)
18ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
19CopyLoc[1](Arg1: address)
20Call linked_table::contains<address, Bottle>(&LinkedTable<address, Bottle>, address): bool
21Not
22BrFalse(24)
B3:
23Branch(28)
B4:
24MoveLoc[0](Arg0: &mut BottleTable)
25Pop
26LdConst[4](u64: 5)
27Abort
B5:
28CopyLoc[0](Arg0: &mut BottleTable)
29ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
30CopyLoc[10](loc6: address)
31Call linked_table::borrow<address, Bottle>(&LinkedTable<address, Bottle>, address): &Bottle
32StLoc[9](loc5: &Bottle)
33CopyLoc[0](Arg0: &mut BottleTable)
34ImmBorrowLoc[2](Arg2: Bottle)
35MoveLoc[9](loc5: &Bottle)
36StLoc[5](loc1: &Bottle)
37StLoc[4](loc0: &Bottle)
38FreezeRef
39MoveLoc[4](loc0: &Bottle)
40MoveLoc[5](loc1: &Bottle)
41Call cr_greater(&BottleTable, &Bottle, &Bottle): bool
42BrFalse(55)
B6:
43CopyLoc[0](Arg0: &mut BottleTable)
44ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
45MoveLoc[10](loc6: address)
46Call linked_table::next<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
47ReadRef
48StLoc[7](loc3: Option<address>)
49MoveLoc[0](Arg0: &mut BottleTable)
50MoveLoc[1](Arg1: address)
51MoveLoc[2](Arg2: Bottle)
52MoveLoc[7](loc3: Option<address>)
53Call find_upward_and_insert(&mut BottleTable, address, Bottle, Option<address>)
54Branch(66)
B7:
55CopyLoc[0](Arg0: &mut BottleTable)
56ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
57MoveLoc[10](loc6: address)
58Call linked_table::prev<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
59ReadRef
60StLoc[8](loc4: Option<address>)
61MoveLoc[0](Arg0: &mut BottleTable)
62MoveLoc[1](Arg1: address)
63MoveLoc[2](Arg2: Bottle)
64MoveLoc[8](loc4: Option<address>)
65Call find_downward_and_insert(&mut BottleTable, address, Bottle, Option<address>)
B8:
66Ret
}
 
public(friend) insert_bottle(Arg0: &mut BottleTable, Arg1: &InterestTable, Arg2: address, Arg3: Bottle, Arg4: Option<address>, Arg5: &Clock) {
L6: loc0: &InterestTable
L7: loc1: &Bottle
L8: loc2: &Bottle
L9: loc3: &Clock
L10: loc4: Option<address>
L11: loc5: Option<address>
L12: loc6: Option<address>
L13: loc7: &Bottle
L14: loc8: address
B0:
0ImmBorrowLoc[4](Arg4: Option<address>)
1Call option::is_none<address>(&Option<address>): bool
2BrFalse(16)
B1:
3CopyLoc[0](Arg0: &mut BottleTable)
4ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
5Call linked_table::front<address, Bottle>(&LinkedTable<address, Bottle>): &Option<address>
6ReadRef
7StLoc[10](loc4: Option<address>)
8MoveLoc[0](Arg0: &mut BottleTable)
9MoveLoc[1](Arg1: &InterestTable)
10MoveLoc[2](Arg2: address)
11MoveLoc[3](Arg3: Bottle)
12MoveLoc[10](loc4: Option<address>)
13MoveLoc[5](Arg5: &Clock)
14Call find_upward_and_insert_with_interest(&mut BottleTable, &InterestTable, address, Bottle, Option<address>, &Clock)
15Ret
B2:
16MoveLoc[4](Arg4: Option<address>)
17Call option::destroy_some<address>(Option<address>): address
18StLoc[14](loc8: address)
19CopyLoc[0](Arg0: &mut BottleTable)
20ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
21CopyLoc[2](Arg2: address)
22Call linked_table::contains<address, Bottle>(&LinkedTable<address, Bottle>, address): bool
23Not
24BrFalse(26)
B3:
25Branch(34)
B4:
26MoveLoc[0](Arg0: &mut BottleTable)
27Pop
28MoveLoc[1](Arg1: &InterestTable)
29Pop
30MoveLoc[5](Arg5: &Clock)
31Pop
32LdConst[4](u64: 5)
33Abort
B5:
34CopyLoc[0](Arg0: &mut BottleTable)
35ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
36CopyLoc[14](loc8: address)
37Call linked_table::borrow<address, Bottle>(&LinkedTable<address, Bottle>, address): &Bottle
38StLoc[13](loc7: &Bottle)
39CopyLoc[0](Arg0: &mut BottleTable)
40CopyLoc[1](Arg1: &InterestTable)
41ImmBorrowLoc[3](Arg3: Bottle)
42MoveLoc[13](loc7: &Bottle)
43CopyLoc[5](Arg5: &Clock)
44StLoc[9](loc3: &Clock)
45StLoc[8](loc2: &Bottle)
46StLoc[7](loc1: &Bottle)
47StLoc[6](loc0: &InterestTable)
48FreezeRef
49MoveLoc[6](loc0: &InterestTable)
50MoveLoc[7](loc1: &Bottle)
51MoveLoc[8](loc2: &Bottle)
52MoveLoc[9](loc3: &Clock)
53Call cr_greater_with_interest(&BottleTable, &InterestTable, &Bottle, &Bottle, &Clock): bool
54BrFalse(69)
B6:
55CopyLoc[0](Arg0: &mut BottleTable)
56ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
57MoveLoc[14](loc8: address)
58Call linked_table::next<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
59ReadRef
60StLoc[11](loc5: Option<address>)
61MoveLoc[0](Arg0: &mut BottleTable)
62MoveLoc[1](Arg1: &InterestTable)
63MoveLoc[2](Arg2: address)
64MoveLoc[3](Arg3: Bottle)
65MoveLoc[11](loc5: Option<address>)
66MoveLoc[5](Arg5: &Clock)
67Call find_upward_and_insert_with_interest(&mut BottleTable, &InterestTable, address, Bottle, Option<address>, &Clock)
68Branch(82)
B7:
69CopyLoc[0](Arg0: &mut BottleTable)
70ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
71MoveLoc[14](loc8: address)
72Call linked_table::prev<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
73ReadRef
74StLoc[12](loc6: Option<address>)
75MoveLoc[0](Arg0: &mut BottleTable)
76MoveLoc[1](Arg1: &InterestTable)
77MoveLoc[2](Arg2: address)
78MoveLoc[3](Arg3: Bottle)
79MoveLoc[12](loc6: Option<address>)
80MoveLoc[5](Arg5: &Clock)
81Call find_downward_and_insert_with_interest(&mut BottleTable, &InterestTable, address, Bottle, Option<address>, &Clock)
B8:
82Ret
}
 
find_upward_and_insert_with_interest(Arg0: &mut BottleTable, Arg1: &InterestTable, Arg2: address, Arg3: Bottle, Arg4: Option<address>, Arg5: &Clock) {
L6: loc0: &InterestTable
L7: loc1: &Bottle
L8: loc2: &Bottle
L9: loc3: &Clock
L10: loc4: &Bottle
L11: loc5: address
B0:
0ImmBorrowLoc[4](Arg4: Option<address>)
1Call option::is_some<address>(&Option<address>): bool
2BrFalse(47)
B1:
3Branch(4)
B2:
4ImmBorrowLoc[4](Arg4: Option<address>)
5Call option::borrow<address>(&Option<address>): &address
6ReadRef
7StLoc[11](loc5: address)
8CopyLoc[0](Arg0: &mut BottleTable)
9ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
10CopyLoc[11](loc5: address)
11Call linked_table::borrow<address, Bottle>(&LinkedTable<address, Bottle>, address): &Bottle
12StLoc[10](loc4: &Bottle)
13CopyLoc[0](Arg0: &mut BottleTable)
14CopyLoc[1](Arg1: &InterestTable)
15ImmBorrowLoc[3](Arg3: Bottle)
16MoveLoc[10](loc4: &Bottle)
17CopyLoc[5](Arg5: &Clock)
18StLoc[9](loc3: &Clock)
19StLoc[8](loc2: &Bottle)
20StLoc[7](loc1: &Bottle)
21StLoc[6](loc0: &InterestTable)
22FreezeRef
23MoveLoc[6](loc0: &InterestTable)
24MoveLoc[7](loc1: &Bottle)
25MoveLoc[8](loc2: &Bottle)
26MoveLoc[9](loc3: &Clock)
27Call cr_less_or_equal_with_interest(&BottleTable, &InterestTable, &Bottle, &Bottle, &Clock): bool
28BrFalse(40)
B3:
29MoveLoc[1](Arg1: &InterestTable)
30Pop
31MoveLoc[5](Arg5: &Clock)
32Pop
33MoveLoc[0](Arg0: &mut BottleTable)
34MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
35MoveLoc[4](Arg4: Option<address>)
36MoveLoc[2](Arg2: address)
37MoveLoc[3](Arg3: Bottle)
38Call linked_table::insert_front<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
39Ret
B4:
40CopyLoc[0](Arg0: &mut BottleTable)
41ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
42MoveLoc[11](loc5: address)
43Call linked_table::next<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
44ReadRef
45StLoc[4](Arg4: Option<address>)
46Branch(0)
B5:
47MoveLoc[1](Arg1: &InterestTable)
48Pop
49MoveLoc[5](Arg5: &Clock)
50Pop
51MoveLoc[0](Arg0: &mut BottleTable)
52MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
53MoveLoc[4](Arg4: Option<address>)
54MoveLoc[2](Arg2: address)
55MoveLoc[3](Arg3: Bottle)
56Call linked_table::insert_front<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
57Ret
}
 
find_upward_and_insert(Arg0: &mut BottleTable, Arg1: address, Arg2: Bottle, Arg3: Option<address>) {
L4: loc0: &Bottle
L5: loc1: &Bottle
L6: loc2: &Bottle
L7: loc3: address
B0:
0ImmBorrowLoc[3](Arg3: Option<address>)
1Call option::is_some<address>(&Option<address>): bool
2BrFalse(37)
B1:
3Branch(4)
B2:
4ImmBorrowLoc[3](Arg3: Option<address>)
5Call option::borrow<address>(&Option<address>): &address
6ReadRef
7StLoc[7](loc3: address)
8CopyLoc[0](Arg0: &mut BottleTable)
9ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
10CopyLoc[7](loc3: address)
11Call linked_table::borrow<address, Bottle>(&LinkedTable<address, Bottle>, address): &Bottle
12StLoc[6](loc2: &Bottle)
13CopyLoc[0](Arg0: &mut BottleTable)
14ImmBorrowLoc[2](Arg2: Bottle)
15MoveLoc[6](loc2: &Bottle)
16StLoc[5](loc1: &Bottle)
17StLoc[4](loc0: &Bottle)
18FreezeRef
19MoveLoc[4](loc0: &Bottle)
20MoveLoc[5](loc1: &Bottle)
21Call cr_less_or_equal(&BottleTable, &Bottle, &Bottle): bool
22BrFalse(30)
B3:
23MoveLoc[0](Arg0: &mut BottleTable)
24MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
25MoveLoc[3](Arg3: Option<address>)
26MoveLoc[1](Arg1: address)
27MoveLoc[2](Arg2: Bottle)
28Call linked_table::insert_front<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
29Ret
B4:
30CopyLoc[0](Arg0: &mut BottleTable)
31ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
32MoveLoc[7](loc3: address)
33Call linked_table::next<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
34ReadRef
35StLoc[3](Arg3: Option<address>)
36Branch(0)
B5:
37MoveLoc[0](Arg0: &mut BottleTable)
38MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
39MoveLoc[3](Arg3: Option<address>)
40MoveLoc[1](Arg1: address)
41MoveLoc[2](Arg2: Bottle)
42Call linked_table::insert_front<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
43Ret
}
 
find_downward_and_insert(Arg0: &mut BottleTable, Arg1: address, Arg2: Bottle, Arg3: Option<address>) {
L4: loc0: &Bottle
L5: loc1: &Bottle
L6: loc2: &Bottle
L7: loc3: address
B0:
0ImmBorrowLoc[3](Arg3: Option<address>)
1Call option::is_some<address>(&Option<address>): bool
2BrFalse(37)
B1:
3Branch(4)
B2:
4ImmBorrowLoc[3](Arg3: Option<address>)
5Call option::borrow<address>(&Option<address>): &address
6ReadRef
7StLoc[7](loc3: address)
8CopyLoc[0](Arg0: &mut BottleTable)
9ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
10CopyLoc[7](loc3: address)
11Call linked_table::borrow<address, Bottle>(&LinkedTable<address, Bottle>, address): &Bottle
12StLoc[6](loc2: &Bottle)
13CopyLoc[0](Arg0: &mut BottleTable)
14ImmBorrowLoc[2](Arg2: Bottle)
15MoveLoc[6](loc2: &Bottle)
16StLoc[5](loc1: &Bottle)
17StLoc[4](loc0: &Bottle)
18FreezeRef
19MoveLoc[4](loc0: &Bottle)
20MoveLoc[5](loc1: &Bottle)
21Call cr_greater(&BottleTable, &Bottle, &Bottle): bool
22BrFalse(30)
B3:
23MoveLoc[0](Arg0: &mut BottleTable)
24MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
25MoveLoc[3](Arg3: Option<address>)
26MoveLoc[1](Arg1: address)
27MoveLoc[2](Arg2: Bottle)
28Call linked_table::insert_back<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
29Ret
B4:
30CopyLoc[0](Arg0: &mut BottleTable)
31ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
32MoveLoc[7](loc3: address)
33Call linked_table::prev<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
34ReadRef
35StLoc[3](Arg3: Option<address>)
36Branch(0)
B5:
37MoveLoc[0](Arg0: &mut BottleTable)
38MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
39MoveLoc[3](Arg3: Option<address>)
40MoveLoc[1](Arg1: address)
41MoveLoc[2](Arg2: Bottle)
42Call linked_table::insert_back<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
43Ret
}
 
find_downward_and_insert_with_interest(Arg0: &mut BottleTable, Arg1: &InterestTable, Arg2: address, Arg3: Bottle, Arg4: Option<address>, Arg5: &Clock) {
L6: loc0: &InterestTable
L7: loc1: &Bottle
L8: loc2: &Bottle
L9: loc3: &Clock
L10: loc4: &Bottle
L11: loc5: address
B0:
0ImmBorrowLoc[4](Arg4: Option<address>)
1Call option::is_some<address>(&Option<address>): bool
2BrFalse(47)
B1:
3Branch(4)
B2:
4ImmBorrowLoc[4](Arg4: Option<address>)
5Call option::borrow<address>(&Option<address>): &address
6ReadRef
7StLoc[11](loc5: address)
8CopyLoc[0](Arg0: &mut BottleTable)
9ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
10CopyLoc[11](loc5: address)
11Call linked_table::borrow<address, Bottle>(&LinkedTable<address, Bottle>, address): &Bottle
12StLoc[10](loc4: &Bottle)
13CopyLoc[0](Arg0: &mut BottleTable)
14CopyLoc[1](Arg1: &InterestTable)
15ImmBorrowLoc[3](Arg3: Bottle)
16MoveLoc[10](loc4: &Bottle)
17CopyLoc[5](Arg5: &Clock)
18StLoc[9](loc3: &Clock)
19StLoc[8](loc2: &Bottle)
20StLoc[7](loc1: &Bottle)
21StLoc[6](loc0: &InterestTable)
22FreezeRef
23MoveLoc[6](loc0: &InterestTable)
24MoveLoc[7](loc1: &Bottle)
25MoveLoc[8](loc2: &Bottle)
26MoveLoc[9](loc3: &Clock)
27Call cr_greater_with_interest(&BottleTable, &InterestTable, &Bottle, &Bottle, &Clock): bool
28BrFalse(40)
B3:
29MoveLoc[1](Arg1: &InterestTable)
30Pop
31MoveLoc[5](Arg5: &Clock)
32Pop
33MoveLoc[0](Arg0: &mut BottleTable)
34MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
35MoveLoc[4](Arg4: Option<address>)
36MoveLoc[2](Arg2: address)
37MoveLoc[3](Arg3: Bottle)
38Call linked_table::insert_back<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
39Ret
B4:
40CopyLoc[0](Arg0: &mut BottleTable)
41ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
42MoveLoc[11](loc5: address)
43Call linked_table::prev<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
44ReadRef
45StLoc[4](Arg4: Option<address>)
46Branch(0)
B5:
47MoveLoc[1](Arg1: &InterestTable)
48Pop
49MoveLoc[5](Arg5: &Clock)
50Pop
51MoveLoc[0](Arg0: &mut BottleTable)
52MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
53MoveLoc[4](Arg4: Option<address>)
54MoveLoc[2](Arg2: address)
55MoveLoc[3](Arg3: Bottle)
56Call linked_table::insert_back<address, Bottle>(&mut LinkedTable<address, Bottle>, Option<address>, address, Bottle)
57Ret
}
 
public cr_greater(Arg0: &BottleTable, Arg1: &Bottle, Arg2: &Bottle): bool {
L3: loc0: u64
L4: loc1: u64
L5: loc2: u64
L6: loc3: u64
B0:
0CopyLoc[0](Arg0: &BottleTable)
1MoveLoc[1](Arg1: &Bottle)
2Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
3StLoc[3](loc0: u64)
4StLoc[5](loc2: u64)
5MoveLoc[0](Arg0: &BottleTable)
6MoveLoc[2](Arg2: &Bottle)
7Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
8StLoc[4](loc1: u64)
9StLoc[6](loc3: u64)
10MoveLoc[5](loc2: u64)
11CastU128
12MoveLoc[4](loc1: u64)
13CastU128
14Mul
15MoveLoc[6](loc3: u64)
16CastU128
17MoveLoc[3](loc0: u64)
18CastU128
19Mul
20Gt
21Ret
}
 
public cr_greater_with_interest(Arg0: &BottleTable, Arg1: &InterestTable, Arg2: &Bottle, Arg3: &Bottle, Arg4: &Clock): bool {
L5: loc0: u64
L6: loc1: u64
L7: loc2: u64
L8: loc3: u64
L9: loc4: u64
L10: loc5: u64
L11: loc6: u64
L12: loc7: u64
B0:
0CopyLoc[2](Arg2: &Bottle)
1Call is_interest_index_exists(&Bottle): bool
2BrFalse(11)
B1:
3CopyLoc[0](Arg0: &BottleTable)
4MoveLoc[2](Arg2: &Bottle)
5CopyLoc[1](Arg1: &InterestTable)
6CopyLoc[4](Arg4: &Clock)
7Call get_bottle_info_with_interest(&BottleTable, &Bottle, &InterestTable, &Clock): u64 * u64
8StLoc[6](loc1: u64)
9StLoc[5](loc0: u64)
10Branch(16)
B2:
11CopyLoc[0](Arg0: &BottleTable)
12MoveLoc[2](Arg2: &Bottle)
13Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
14StLoc[6](loc1: u64)
15StLoc[5](loc0: u64)
B3:
16MoveLoc[5](loc0: u64)
17MoveLoc[6](loc1: u64)
18StLoc[9](loc4: u64)
19StLoc[11](loc6: u64)
20CopyLoc[3](Arg3: &Bottle)
21Call is_interest_index_exists(&Bottle): bool
22BrFalse(31)
B4:
23MoveLoc[0](Arg0: &BottleTable)
24MoveLoc[3](Arg3: &Bottle)
25MoveLoc[1](Arg1: &InterestTable)
26MoveLoc[4](Arg4: &Clock)
27Call get_bottle_info_with_interest(&BottleTable, &Bottle, &InterestTable, &Clock): u64 * u64
28StLoc[8](loc3: u64)
29StLoc[7](loc2: u64)
30Branch(40)
B5:
31MoveLoc[1](Arg1: &InterestTable)
32Pop
33MoveLoc[4](Arg4: &Clock)
34Pop
35MoveLoc[0](Arg0: &BottleTable)
36MoveLoc[3](Arg3: &Bottle)
37Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
38StLoc[8](loc3: u64)
39StLoc[7](loc2: u64)
B6:
40MoveLoc[7](loc2: u64)
41MoveLoc[8](loc3: u64)
42StLoc[10](loc5: u64)
43StLoc[12](loc7: u64)
44MoveLoc[11](loc6: u64)
45CastU128
46MoveLoc[10](loc5: u64)
47CastU128
48Mul
49MoveLoc[12](loc7: u64)
50CastU128
51MoveLoc[9](loc4: u64)
52CastU128
53Mul
54Gt
55Ret
}
 
public cr_less_or_equal(Arg0: &BottleTable, Arg1: &Bottle, Arg2: &Bottle): bool {
L3: loc0: u64
L4: loc1: u64
L5: loc2: u64
L6: loc3: u64
B0:
0CopyLoc[0](Arg0: &BottleTable)
1MoveLoc[1](Arg1: &Bottle)
2Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
3StLoc[3](loc0: u64)
4StLoc[5](loc2: u64)
5MoveLoc[0](Arg0: &BottleTable)
6MoveLoc[2](Arg2: &Bottle)
7Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
8StLoc[4](loc1: u64)
9StLoc[6](loc3: u64)
10MoveLoc[5](loc2: u64)
11CastU128
12MoveLoc[4](loc1: u64)
13CastU128
14Mul
15MoveLoc[6](loc3: u64)
16CastU128
17MoveLoc[3](loc0: u64)
18CastU128
19Mul
20Le
21Ret
}
 
public cr_less_or_equal_with_interest(Arg0: &BottleTable, Arg1: &InterestTable, Arg2: &Bottle, Arg3: &Bottle, Arg4: &Clock): bool {
L5: loc0: u64
L6: loc1: u64
L7: loc2: u64
L8: loc3: u64
L9: loc4: u64
L10: loc5: u64
L11: loc6: u64
L12: loc7: u64
B0:
0CopyLoc[2](Arg2: &Bottle)
1Call is_interest_index_exists(&Bottle): bool
2BrFalse(11)
B1:
3CopyLoc[0](Arg0: &BottleTable)
4MoveLoc[2](Arg2: &Bottle)
5CopyLoc[1](Arg1: &InterestTable)
6CopyLoc[4](Arg4: &Clock)
7Call get_bottle_info_with_interest(&BottleTable, &Bottle, &InterestTable, &Clock): u64 * u64
8StLoc[6](loc1: u64)
9StLoc[5](loc0: u64)
10Branch(16)
B2:
11CopyLoc[0](Arg0: &BottleTable)
12MoveLoc[2](Arg2: &Bottle)
13Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
14StLoc[6](loc1: u64)
15StLoc[5](loc0: u64)
B3:
16MoveLoc[5](loc0: u64)
17MoveLoc[6](loc1: u64)
18StLoc[9](loc4: u64)
19StLoc[11](loc6: u64)
20CopyLoc[3](Arg3: &Bottle)
21Call is_interest_index_exists(&Bottle): bool
22BrFalse(31)
B4:
23MoveLoc[0](Arg0: &BottleTable)
24MoveLoc[3](Arg3: &Bottle)
25MoveLoc[1](Arg1: &InterestTable)
26MoveLoc[4](Arg4: &Clock)
27Call get_bottle_info_with_interest(&BottleTable, &Bottle, &InterestTable, &Clock): u64 * u64
28StLoc[8](loc3: u64)
29StLoc[7](loc2: u64)
30Branch(40)
B5:
31MoveLoc[1](Arg1: &InterestTable)
32Pop
33MoveLoc[4](Arg4: &Clock)
34Pop
35MoveLoc[0](Arg0: &BottleTable)
36MoveLoc[3](Arg3: &Bottle)
37Call get_bottle_info(&BottleTable, &Bottle): u64 * u64
38StLoc[8](loc3: u64)
39StLoc[7](loc2: u64)
B6:
40MoveLoc[7](loc2: u64)
41MoveLoc[8](loc3: u64)
42StLoc[10](loc5: u64)
43StLoc[12](loc7: u64)
44MoveLoc[11](loc6: u64)
45CastU128
46MoveLoc[10](loc5: u64)
47CastU128
48Mul
49MoveLoc[12](loc7: u64)
50CastU128
51MoveLoc[9](loc4: u64)
52CastU128
53Mul
54Le
55Ret
}
 
public re_insert(Arg0: &mut BottleTable, Arg1: address) {
L2: loc0: Bottle
L3: loc1: Option<address>
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2CopyLoc[1](Arg1: address)
3Call linked_table::prev<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
4ReadRef
5StLoc[3](loc1: Option<address>)
6CopyLoc[0](Arg0: &mut BottleTable)
7MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
8CopyLoc[1](Arg1: address)
9Call linked_table::remove<address, Bottle>(&mut LinkedTable<address, Bottle>, address): Bottle
10StLoc[2](loc0: Bottle)
11MoveLoc[0](Arg0: &mut BottleTable)
12MoveLoc[1](Arg1: address)
13MoveLoc[2](loc0: Bottle)
14MoveLoc[3](loc1: Option<address>)
15Call insert(&mut BottleTable, address, Bottle, Option<address>)
16Ret
}
 
public re_insert_bottle(Arg0: &mut BottleTable, Arg1: &InterestTable, Arg2: address, Arg3: &Clock) {
L4: loc0: Bottle
L5: loc1: Option<address>
B0:
0CopyLoc[0](Arg0: &mut BottleTable)
1ImmBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
2CopyLoc[2](Arg2: address)
3Call linked_table::prev<address, Bottle>(&LinkedTable<address, Bottle>, address): &Option<address>
4ReadRef
5StLoc[5](loc1: Option<address>)
6CopyLoc[0](Arg0: &mut BottleTable)
7MutBorrowField[7](BottleTable.table: LinkedTable<address, Bottle>)
8CopyLoc[2](Arg2: address)
9Call linked_table::remove<address, Bottle>(&mut LinkedTable<address, Bottle>, address): Bottle
10StLoc[4](loc0: Bottle)
11MoveLoc[0](Arg0: &mut BottleTable)
12MoveLoc[1](Arg1: &InterestTable)
13MoveLoc[2](Arg2: address)
14MoveLoc[4](loc0: Bottle)
15MoveLoc[5](loc1: Option<address>)
16MoveLoc[3](Arg3: &Clock)
17Call insert_bottle(&mut BottleTable, &InterestTable, address, Bottle, Option<address>, &Clock)
18Ret
}
 
public is_interest_index_exists(Arg0: &Bottle): bool {
B0:
0MoveLoc[0](Arg0: &Bottle)
1ImmBorrowField[2](Bottle.id: UID)
2LdConst[8](vector<u8>: "int..)
3Call dynamic_object_field::exists<vector<u8>>(&UID, vector<u8>): bool
4Ret
}
 
Constants [
0 => u64: 1
1 => u64: 2
2 => u64: 3
3 => u64: 4
4 => u64: 5
5 => u64: 6
6 => u64: 7
7 => u64: 8
8 => vector<u8>: "interest_index" // interpreted as UTF8 string
]
}