solidity/test/cmdlineTests/yul_source_locations/output.json

1183 lines
40 KiB
JSON
Raw Normal View History

{"contracts":{"C":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\", 1:\"D\", 2:\"#utility.yul\"
object \"C_54\" {
code {
/// @src 0:79:428
mstore(64, 160)
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
let _1 := copy_arguments_for_constructor_20_object_C_54()
constructor_C_54(_1)
let _2 := allocate_unbounded()
codecopy(_2, dataoffset(\"C_54_deployed\"), datasize(\"C_54_deployed\"))
setimmutable(_2, \"8\", mload(128))
return(_2, datasize(\"C_54_deployed\"))
function abi_decode_t_int256_fromMemory(offset, end) -> value {
value := mload(offset)
validator_revert_t_int256(value)
}
function abi_decode_tuple_t_int256_fromMemory(headStart, dataEnd) -> value0 {
if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
{
let offset := 0
value0 := abi_decode_t_int256_fromMemory(add(headStart, offset), dataEnd)
}
}
function allocate_memory(size) -> memPtr {
memPtr := allocate_unbounded()
finalize_allocation(memPtr, size)
}
function allocate_unbounded() -> memPtr {
memPtr := mload(64)
}
function cleanup_t_int256(value) -> cleaned {
cleaned := value
}
2021-08-05 11:23:50 +00:00
function cleanup_t_rational_42_by_1(value) -> cleaned {
cleaned := value
}
/// @src 0:175:223
function constructor_C_54(var__init_12) {
/// @src 0:175:223
/// @src 0:147:149
let expr_7 := 0x2a
let _3 := convert_t_rational_42_by_1_to_t_int256(expr_7)
mstore(128, _3)
/// @src 0:214:219
let _4 := var__init_12
let expr_16 := _4
/// @src 0:203:219
update_storage_value_offset_0t_int256_to_t_int256(0x00, expr_16)
let expr_17 := expr_16
}
/// @src 0:79:428
function convert_t_int256_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_int256(value)))
}
function convert_t_rational_42_by_1_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_rational_42_by_1(value)))
}
function copy_arguments_for_constructor_20_object_C_54() -> ret_param_0 {
let programSize := datasize(\"C_54\")
let argSize := sub(codesize(), programSize)
let memoryDataOffset := allocate_memory(argSize)
codecopy(memoryDataOffset, programSize, argSize)
ret_param_0 := abi_decode_tuple_t_int256_fromMemory(memoryDataOffset, add(memoryDataOffset, argSize))
}
function finalize_allocation(memPtr, size) {
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
// protect against overflow
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
}
2021-08-05 11:23:50 +00:00
function identity(value) -> ret {
ret := value
}
function panic_error_0x41() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x41)
revert(0, 0x24)
}
function prepare_store_t_int256(value) -> ret {
ret := value
}
function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {
revert(0, 0)
}
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
revert(0, 0)
}
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {
revert(0, 0)
}
function round_up_to_mul_of_32(value) -> result {
result := and(add(value, 31), not(31))
}
function shift_left_0(value) -> newValue {
newValue :=
shl(0, value)
}
function update_byte_slice_32_shift_0(value, toInsert) -> result {
let mask := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
toInsert := shift_left_0(toInsert)
value := and(value, not(mask))
result := or(value, and(toInsert, mask))
}
function update_storage_value_offset_0t_int256_to_t_int256(slot, value_0) {
let convertedValue_0 := convert_t_int256_to_t_int256(value_0)
sstore(slot, update_byte_slice_32_shift_0(sload(slot), prepare_store_t_int256(convertedValue_0)))
}
function validator_revert_t_int256(value) {
if iszero(eq(value, cleanup_t_int256(value))) { revert(0, 0) }
}
}
object \"C_54_deployed\" {
code {
/// @src 0:79:428
mstore(64, 128)
if iszero(lt(calldatasize(), 4))
{
let selector := shift_right_224_unsigned(calldataload(0))
switch selector
case 0x26121ff0
{
// f()
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
abi_decode_tuple_(4, calldatasize())
let ret_0 := fun_f_30()
let memPos := allocate_unbounded()
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
return(memPos, sub(memEnd, memPos))
}
case 0x793816ec
{
// stateVar()
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
abi_decode_tuple_(4, calldatasize())
let ret_0 := getter_fun_stateVar_10()
let memPos := allocate_unbounded()
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
return(memPos, sub(memEnd, memPos))
}
case 0x9942ec6f
{
// f2()
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
abi_decode_tuple_(4, calldatasize())
let ret_0 := fun_f2_53()
let memPos := allocate_unbounded()
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
return(memPos, sub(memEnd, memPos))
}
default {}
}
if iszero(calldatasize()) { }
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
function abi_decode_t_int256_fromMemory(offset, end) -> value {
value := mload(offset)
validator_revert_t_int256(value)
}
function abi_decode_tuple_(headStart, dataEnd) {
if slt(sub(dataEnd, headStart), 0) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
}
function abi_decode_tuple_t_int256_fromMemory(headStart, dataEnd) -> value0 {
if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
{
let offset := 0
value0 := abi_decode_t_int256_fromMemory(add(headStart, offset), dataEnd)
}
}
function abi_encode_t_int256_to_t_int256_fromStack(value, pos) {
mstore(pos, cleanup_t_int256(value))
}
function abi_encode_tuple__to__fromStack(headStart ) -> tail {
tail := add(headStart, 0)
}
function abi_encode_tuple_t_int256__to_t_int256__fromStack(headStart , value0) -> tail {
tail := add(headStart, 32)
abi_encode_t_int256_to_t_int256_fromStack(value0, add(headStart, 0))
}
function allocate_unbounded() -> memPtr {
memPtr := mload(64)
}
function checked_add_t_int256(x, y) -> sum {
x := cleanup_t_int256(x)
y := cleanup_t_int256(y)
// overflow, if x >= 0 and y > (maxValue - x)
if and(iszero(slt(x, 0)), sgt(y, sub(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, x))) { panic_error_0x11() }
// underflow, if x < 0 and y < (minValue - x)
if and(slt(x, 0), slt(y, sub(0x8000000000000000000000000000000000000000000000000000000000000000, x))) { panic_error_0x11() }
sum := add(x, y)
}
function cleanup_from_storage_t_int256(value) -> cleaned {
cleaned := value
}
function cleanup_t_int256(value) -> cleaned {
cleaned := value
}
2021-08-05 11:23:50 +00:00
function cleanup_t_rational_41_by_1(value) -> cleaned {
cleaned := value
}
function cleanup_t_uint160(value) -> cleaned {
cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)
}
/// @src 0:93:119
function constant_constVar_5() -> ret {
/// @src 0:117:119
let expr_4 := 0x29
let _2 := convert_t_rational_41_by_1_to_t_int256(expr_4)
ret := _2
}
function convert_t_contract$_C_$54_to_t_address(value) -> converted {
2021-08-04 13:48:10 +00:00
converted := convert_t_uint160_to_t_address(value)
}
function convert_t_int256_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_int256(value)))
}
function convert_t_rational_41_by_1_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_rational_41_by_1(value)))
}
2021-08-04 13:48:10 +00:00
function convert_t_uint160_to_t_address(value) -> converted {
converted := convert_t_uint160_to_t_uint160(value)
}
function convert_t_uint160_to_t_uint160(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_uint160(identity(cleanup_t_uint160(value)))
2021-08-04 13:48:10 +00:00
}
function extract_from_storage_value_dynamict_int256(slot_value, offset) -> value {
value := cleanup_from_storage_t_int256(shift_right_unsigned_dynamic(mul(offset, 8), slot_value))
}
function extract_from_storage_value_offset_0t_int256(slot_value) -> value {
value := cleanup_from_storage_t_int256(shift_right_0_unsigned(slot_value))
}
function finalize_allocation(memPtr, size) {
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
// protect against overflow
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
}
/// @src 0:343:426
function fun_f2_53() -> var__42 {
/// @src 0:375:378
let zero_t_int256_4 := zero_value_for_split_t_int256()
var__42 := zero_t_int256_4
var__42 := modifier_m_40(var__42)
}
/// @src 0:79:428
/// @src 0:343:426
function fun_f2_53_inner(_8) -> var__42 {
var__42 := _8
/// @src 0:392:400
let _9 := read_from_storage_split_offset_0_t_int256(0x00)
let expr_44 := _9
/// @src 0:403:407
let expr_45_address := address()
/// @src 0:403:409
let expr_46_address := convert_t_contract$_C_$54_to_t_address(expr_45_address)
let expr_46_functionSelector := 0x26121ff0
/// @src 0:403:411
if iszero(extcodesize(expr_46_address)) { revert_error_0cc013b6b3b6beabea4e3a74a6d380f0df81852ca99887912475e1f66b2a2c20() }
// storage for arguments and returned data
let _10 := allocate_unbounded()
mstore(_10, shift_left_224(expr_46_functionSelector))
let _11 := abi_encode_tuple__to__fromStack(add(_10, 4) )
let _12 := staticcall(gas(), expr_46_address, _10, sub(_11, _10), _10, 32)
if iszero(_12) { revert_forward_1() }
let expr_47
if _12 {
// update freeMemoryPointer according to dynamic return size
finalize_allocation(_10, returndatasize())
// decode return parameters from external try-call into retVars
expr_47 := abi_decode_tuple_t_int256_fromMemory(_10, add(_10, returndatasize()))
}
/// @src 0:392:411
let expr_48 := checked_add_t_int256(expr_44, expr_47)
/// @src 0:414:422
let _13 := loadimmutable(\"8\")
let expr_49 := _13
/// @src 0:392:422
let expr_50 := checked_add_t_int256(expr_48, expr_49)
/// @src 0:385:422
var__42 := expr_50
leave
}
/// @src 0:79:428
/// @src 0:226:302
function fun_f_30() -> var__23 {
/// @src 0:262:265
let zero_t_int256_1 := zero_value_for_split_t_int256()
var__23 := zero_t_int256_1
/// @src 0:279:287
let expr_25 := constant_constVar_5()
/// @src 0:290:298
let _3 := loadimmutable(\"8\")
let expr_26 := _3
/// @src 0:279:298
let expr_27 := checked_add_t_int256(expr_25, expr_26)
/// @src 0:272:298
var__23 := expr_27
leave
}
/// @src 0:79:428
/// @src 0:152:171
function getter_fun_stateVar_10() -> ret {
let slot := 0
let offset := 0
ret := read_from_storage_split_dynamic_t_int256(slot, offset)
}
/// @src 0:79:428
2021-08-05 11:23:50 +00:00
function identity(value) -> ret {
ret := value
}
function increment_t_int256(value) -> ret {
value := cleanup_t_int256(value)
if eq(value, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) { panic_error_0x11() }
ret := add(value, 1)
}
/// @src 0:304:341
function modifier_m_40(var__42) -> _5 {
_5 := var__42
/// @src 0:322:332
let _7 := read_from_storage_split_offset_0_t_int256(0x00)
let _6 := increment_t_int256(_7)
update_storage_value_offset_0t_int256_to_t_int256(0x00, _6)
let expr_33 := _7
/// @src 0:336:337
_5 := fun_f2_53_inner(var__42)
}
/// @src 0:79:428
function panic_error_0x11() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x11)
revert(0, 0x24)
}
function panic_error_0x41() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x41)
revert(0, 0x24)
}
function prepare_store_t_int256(value) -> ret {
ret := value
}
function read_from_storage_split_dynamic_t_int256(slot, offset) -> value {
value := extract_from_storage_value_dynamict_int256(sload(slot), offset)
}
function read_from_storage_split_offset_0_t_int256(slot) -> value {
value := extract_from_storage_value_offset_0t_int256(sload(slot))
}
function revert_error_0cc013b6b3b6beabea4e3a74a6d380f0df81852ca99887912475e1f66b2a2c20() {
revert(0, 0)
}
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
revert(0, 0)
}
function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {
revert(0, 0)
}
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
revert(0, 0)
}
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {
revert(0, 0)
}
function revert_forward_1() {
let pos := allocate_unbounded()
returndatacopy(pos, 0, returndatasize())
revert(pos, returndatasize())
}
function round_up_to_mul_of_32(value) -> result {
result := and(add(value, 31), not(31))
}
function shift_left_0(value) -> newValue {
newValue :=
shl(0, value)
}
function shift_left_224(value) -> newValue {
newValue :=
shl(224, value)
}
function shift_right_0_unsigned(value) -> newValue {
newValue :=
shr(0, value)
}
function shift_right_224_unsigned(value) -> newValue {
newValue :=
shr(224, value)
}
function shift_right_unsigned_dynamic(bits, value) -> newValue {
newValue :=
shr(bits, value)
}
function update_byte_slice_32_shift_0(value, toInsert) -> result {
let mask := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
toInsert := shift_left_0(toInsert)
value := and(value, not(mask))
result := or(value, and(toInsert, mask))
}
function update_storage_value_offset_0t_int256_to_t_int256(slot, value_0) {
let convertedValue_0 := convert_t_int256_to_t_int256(value_0)
sstore(slot, update_byte_slice_32_shift_0(sload(slot), prepare_store_t_int256(convertedValue_0)))
}
function validator_revert_t_int256(value) {
if iszero(eq(value, cleanup_t_int256(value))) { revert(0, 0) }
}
function zero_value_for_split_t_int256() -> ret {
ret := 0
}
}
data \".metadata\" hex\"<BYTECODE REMOVED>\"
}
}
"}},"D":{"D":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\", 1:\"D\", 2:\"#utility.yul\"
object \"D_72\" {
code {
/// @src 1:91:166
mstore(64, 160)
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
let _1 := copy_arguments_for_constructor_71_object_D_72()
constructor_D_72(_1)
let _2 := allocate_unbounded()
codecopy(_2, dataoffset(\"D_72_deployed\"), datasize(\"D_72_deployed\"))
setimmutable(_2, \"8\", mload(128))
return(_2, datasize(\"D_72_deployed\"))
function abi_decode_t_int256_fromMemory(offset, end) -> value {
value := mload(offset)
validator_revert_t_int256(value)
}
function abi_decode_tuple_t_int256_fromMemory(headStart, dataEnd) -> value0 {
if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
{
let offset := 0
value0 := abi_decode_t_int256_fromMemory(add(headStart, offset), dataEnd)
}
}
function allocate_memory(size) -> memPtr {
memPtr := allocate_unbounded()
finalize_allocation(memPtr, size)
}
function allocate_unbounded() -> memPtr {
memPtr := mload(64)
}
function checked_add_t_int256(x, y) -> sum {
x := cleanup_t_int256(x)
y := cleanup_t_int256(y)
// overflow, if x >= 0 and y > (maxValue - x)
if and(iszero(slt(x, 0)), sgt(y, sub(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, x))) { panic_error_0x11() }
// underflow, if x < 0 and y < (minValue - x)
if and(slt(x, 0), slt(y, sub(0x8000000000000000000000000000000000000000000000000000000000000000, x))) { panic_error_0x11() }
sum := add(x, y)
}
function cleanup_from_storage_t_int256(value) -> cleaned {
cleaned := value
}
function cleanup_t_int256(value) -> cleaned {
cleaned := value
}
2021-08-05 11:23:50 +00:00
function cleanup_t_rational_3_by_1(value) -> cleaned {
cleaned := value
}
function cleanup_t_rational_42_by_1(value) -> cleaned {
cleaned := value
}
/// @src 0:175:223
function constructor_C_54(var__init_12) {
/// @src 0:175:223
/// @src 0:147:149
let expr_7 := 0x2a
let _6 := convert_t_rational_42_by_1_to_t_int256(expr_7)
mstore(128, _6)
/// @src 0:214:219
let _7 := var__init_12
let expr_16 := _7
/// @src 0:203:219
update_storage_value_offset_0t_int256_to_t_int256(0x00, expr_16)
let expr_17 := expr_16
}
/// @src 1:91:166
/// @src 1:113:164
function constructor_D_72(var__init2_63) {
/// @src 1:107:108
let expr_60 := 0x03
let _3 := convert_t_rational_3_by_1_to_t_int256(expr_60)
/// @src 1:113:164
constructor_C_54(_3)
/// @src 1:154:160
let _4 := var__init2_63
let expr_67 := _4
/// @src 1:142:160
let _5 := read_from_storage_split_offset_0_t_int256(0x00)
let expr_68 := checked_add_t_int256(_5, expr_67)
update_storage_value_offset_0t_int256_to_t_int256(0x00, expr_68)
}
/// @src 1:91:166
function convert_t_int256_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_int256(value)))
}
function convert_t_rational_3_by_1_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_rational_3_by_1(value)))
}
function convert_t_rational_42_by_1_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_rational_42_by_1(value)))
}
function copy_arguments_for_constructor_71_object_D_72() -> ret_param_0 {
let programSize := datasize(\"D_72\")
let argSize := sub(codesize(), programSize)
let memoryDataOffset := allocate_memory(argSize)
codecopy(memoryDataOffset, programSize, argSize)
ret_param_0 := abi_decode_tuple_t_int256_fromMemory(memoryDataOffset, add(memoryDataOffset, argSize))
}
function extract_from_storage_value_offset_0t_int256(slot_value) -> value {
value := cleanup_from_storage_t_int256(shift_right_0_unsigned(slot_value))
}
function finalize_allocation(memPtr, size) {
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
// protect against overflow
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
}
2021-08-05 11:23:50 +00:00
function identity(value) -> ret {
ret := value
}
function panic_error_0x11() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x11)
revert(0, 0x24)
}
function panic_error_0x41() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x41)
revert(0, 0x24)
}
function prepare_store_t_int256(value) -> ret {
ret := value
}
function read_from_storage_split_offset_0_t_int256(slot) -> value {
value := extract_from_storage_value_offset_0t_int256(sload(slot))
}
function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {
revert(0, 0)
}
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
revert(0, 0)
}
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {
revert(0, 0)
}
function round_up_to_mul_of_32(value) -> result {
result := and(add(value, 31), not(31))
}
function shift_left_0(value) -> newValue {
newValue :=
shl(0, value)
}
function shift_right_0_unsigned(value) -> newValue {
newValue :=
shr(0, value)
}
function update_byte_slice_32_shift_0(value, toInsert) -> result {
let mask := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
toInsert := shift_left_0(toInsert)
value := and(value, not(mask))
result := or(value, and(toInsert, mask))
}
function update_storage_value_offset_0t_int256_to_t_int256(slot, value_0) {
let convertedValue_0 := convert_t_int256_to_t_int256(value_0)
sstore(slot, update_byte_slice_32_shift_0(sload(slot), prepare_store_t_int256(convertedValue_0)))
}
function validator_revert_t_int256(value) {
if iszero(eq(value, cleanup_t_int256(value))) { revert(0, 0) }
}
}
object \"D_72_deployed\" {
code {
/// @src 1:91:166
mstore(64, 128)
if iszero(lt(calldatasize(), 4))
{
let selector := shift_right_224_unsigned(calldataload(0))
switch selector
case 0x26121ff0
{
// f()
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
abi_decode_tuple_(4, calldatasize())
let ret_0 := fun_f_30()
let memPos := allocate_unbounded()
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
return(memPos, sub(memEnd, memPos))
}
case 0x793816ec
{
// stateVar()
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
abi_decode_tuple_(4, calldatasize())
let ret_0 := getter_fun_stateVar_10()
let memPos := allocate_unbounded()
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
return(memPos, sub(memEnd, memPos))
}
case 0x9942ec6f
{
// f2()
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
abi_decode_tuple_(4, calldatasize())
let ret_0 := fun_f2_53()
let memPos := allocate_unbounded()
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
return(memPos, sub(memEnd, memPos))
}
default {}
}
if iszero(calldatasize()) { }
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
function abi_decode_t_int256_fromMemory(offset, end) -> value {
value := mload(offset)
validator_revert_t_int256(value)
}
function abi_decode_tuple_(headStart, dataEnd) {
if slt(sub(dataEnd, headStart), 0) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
}
function abi_decode_tuple_t_int256_fromMemory(headStart, dataEnd) -> value0 {
if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
{
let offset := 0
value0 := abi_decode_t_int256_fromMemory(add(headStart, offset), dataEnd)
}
}
function abi_encode_t_int256_to_t_int256_fromStack(value, pos) {
mstore(pos, cleanup_t_int256(value))
}
function abi_encode_tuple__to__fromStack(headStart ) -> tail {
tail := add(headStart, 0)
}
function abi_encode_tuple_t_int256__to_t_int256__fromStack(headStart , value0) -> tail {
tail := add(headStart, 32)
abi_encode_t_int256_to_t_int256_fromStack(value0, add(headStart, 0))
}
function allocate_unbounded() -> memPtr {
memPtr := mload(64)
}
function checked_add_t_int256(x, y) -> sum {
x := cleanup_t_int256(x)
y := cleanup_t_int256(y)
// overflow, if x >= 0 and y > (maxValue - x)
if and(iszero(slt(x, 0)), sgt(y, sub(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, x))) { panic_error_0x11() }
// underflow, if x < 0 and y < (minValue - x)
if and(slt(x, 0), slt(y, sub(0x8000000000000000000000000000000000000000000000000000000000000000, x))) { panic_error_0x11() }
sum := add(x, y)
}
function cleanup_from_storage_t_int256(value) -> cleaned {
cleaned := value
}
function cleanup_t_int256(value) -> cleaned {
cleaned := value
}
2021-08-05 11:23:50 +00:00
function cleanup_t_rational_41_by_1(value) -> cleaned {
cleaned := value
}
function cleanup_t_uint160(value) -> cleaned {
cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)
}
/// @src 0:93:119
function constant_constVar_5() -> ret {
/// @src 0:117:119
let expr_4 := 0x29
let _2 := convert_t_rational_41_by_1_to_t_int256(expr_4)
ret := _2
}
function convert_t_contract$_C_$54_to_t_address(value) -> converted {
2021-08-04 13:48:10 +00:00
converted := convert_t_uint160_to_t_address(value)
}
function convert_t_int256_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_int256(value)))
}
function convert_t_rational_41_by_1_to_t_int256(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_int256(identity(cleanup_t_rational_41_by_1(value)))
}
2021-08-04 13:48:10 +00:00
function convert_t_uint160_to_t_address(value) -> converted {
converted := convert_t_uint160_to_t_uint160(value)
}
function convert_t_uint160_to_t_uint160(value) -> converted {
2021-08-05 11:23:50 +00:00
converted := cleanup_t_uint160(identity(cleanup_t_uint160(value)))
2021-08-04 13:48:10 +00:00
}
function extract_from_storage_value_dynamict_int256(slot_value, offset) -> value {
value := cleanup_from_storage_t_int256(shift_right_unsigned_dynamic(mul(offset, 8), slot_value))
}
function extract_from_storage_value_offset_0t_int256(slot_value) -> value {
value := cleanup_from_storage_t_int256(shift_right_0_unsigned(slot_value))
}
function finalize_allocation(memPtr, size) {
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
// protect against overflow
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
}
/// @src 0:343:426
function fun_f2_53() -> var__42 {
/// @src 0:375:378
let zero_t_int256_4 := zero_value_for_split_t_int256()
var__42 := zero_t_int256_4
var__42 := modifier_m_40(var__42)
}
/// @src 1:91:166
/// @src 0:343:426
function fun_f2_53_inner(_8) -> var__42 {
var__42 := _8
/// @src 0:392:400
let _9 := read_from_storage_split_offset_0_t_int256(0x00)
let expr_44 := _9
/// @src 0:403:407
let expr_45_address := address()
/// @src 0:403:409
let expr_46_address := convert_t_contract$_C_$54_to_t_address(expr_45_address)
let expr_46_functionSelector := 0x26121ff0
/// @src 0:403:411
if iszero(extcodesize(expr_46_address)) { revert_error_0cc013b6b3b6beabea4e3a74a6d380f0df81852ca99887912475e1f66b2a2c20() }
// storage for arguments and returned data
let _10 := allocate_unbounded()
mstore(_10, shift_left_224(expr_46_functionSelector))
let _11 := abi_encode_tuple__to__fromStack(add(_10, 4) )
let _12 := staticcall(gas(), expr_46_address, _10, sub(_11, _10), _10, 32)
if iszero(_12) { revert_forward_1() }
let expr_47
if _12 {
// update freeMemoryPointer according to dynamic return size
finalize_allocation(_10, returndatasize())
// decode return parameters from external try-call into retVars
expr_47 := abi_decode_tuple_t_int256_fromMemory(_10, add(_10, returndatasize()))
}
/// @src 0:392:411
let expr_48 := checked_add_t_int256(expr_44, expr_47)
/// @src 0:414:422
let _13 := loadimmutable(\"8\")
let expr_49 := _13
/// @src 0:392:422
let expr_50 := checked_add_t_int256(expr_48, expr_49)
/// @src 0:385:422
var__42 := expr_50
leave
}
/// @src 1:91:166
/// @src 0:226:302
function fun_f_30() -> var__23 {
/// @src 0:262:265
let zero_t_int256_1 := zero_value_for_split_t_int256()
var__23 := zero_t_int256_1
/// @src 0:279:287
let expr_25 := constant_constVar_5()
/// @src 0:290:298
let _3 := loadimmutable(\"8\")
let expr_26 := _3
/// @src 0:279:298
let expr_27 := checked_add_t_int256(expr_25, expr_26)
/// @src 0:272:298
var__23 := expr_27
leave
}
/// @src 1:91:166
/// @src 0:152:171
function getter_fun_stateVar_10() -> ret {
let slot := 0
let offset := 0
ret := read_from_storage_split_dynamic_t_int256(slot, offset)
}
/// @src 1:91:166
2021-08-05 11:23:50 +00:00
function identity(value) -> ret {
ret := value
}
function increment_t_int256(value) -> ret {
value := cleanup_t_int256(value)
if eq(value, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) { panic_error_0x11() }
ret := add(value, 1)
}
/// @src 0:304:341
function modifier_m_40(var__42) -> _5 {
_5 := var__42
/// @src 0:322:332
let _7 := read_from_storage_split_offset_0_t_int256(0x00)
let _6 := increment_t_int256(_7)
update_storage_value_offset_0t_int256_to_t_int256(0x00, _6)
let expr_33 := _7
/// @src 0:336:337
_5 := fun_f2_53_inner(var__42)
}
/// @src 1:91:166
function panic_error_0x11() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x11)
revert(0, 0x24)
}
function panic_error_0x41() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x41)
revert(0, 0x24)
}
function prepare_store_t_int256(value) -> ret {
ret := value
}
function read_from_storage_split_dynamic_t_int256(slot, offset) -> value {
value := extract_from_storage_value_dynamict_int256(sload(slot), offset)
}
function read_from_storage_split_offset_0_t_int256(slot) -> value {
value := extract_from_storage_value_offset_0t_int256(sload(slot))
}
function revert_error_0cc013b6b3b6beabea4e3a74a6d380f0df81852ca99887912475e1f66b2a2c20() {
revert(0, 0)
}
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
revert(0, 0)
}
function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {
revert(0, 0)
}
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
revert(0, 0)
}
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {
revert(0, 0)
}
function revert_forward_1() {
let pos := allocate_unbounded()
returndatacopy(pos, 0, returndatasize())
revert(pos, returndatasize())
}
function round_up_to_mul_of_32(value) -> result {
result := and(add(value, 31), not(31))
}
function shift_left_0(value) -> newValue {
newValue :=
shl(0, value)
}
function shift_left_224(value) -> newValue {
newValue :=
shl(224, value)
}
function shift_right_0_unsigned(value) -> newValue {
newValue :=
shr(0, value)
}
function shift_right_224_unsigned(value) -> newValue {
newValue :=
shr(224, value)
}
function shift_right_unsigned_dynamic(bits, value) -> newValue {
newValue :=
shr(bits, value)
}
function update_byte_slice_32_shift_0(value, toInsert) -> result {
let mask := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
toInsert := shift_left_0(toInsert)
value := and(value, not(mask))
result := or(value, and(toInsert, mask))
}
function update_storage_value_offset_0t_int256_to_t_int256(slot, value_0) {
let convertedValue_0 := convert_t_int256_to_t_int256(value_0)
sstore(slot, update_byte_slice_32_shift_0(sload(slot), prepare_store_t_int256(convertedValue_0)))
}
function validator_revert_t_int256(value) {
if iszero(eq(value, cleanup_t_int256(value))) { revert(0, 0) }
}
function zero_value_for_split_t_int256() -> ret {
ret := 0
}
}
data \".metadata\" hex\"<BYTECODE REMOVED>\"
}
}
"}}},"sources":{"C":{"id":0},"D":{"id":1}}}