Created
October 6, 2020 17:37
-
-
Save ekpyron/1ccfd268aac1c49883b2d3379d388b29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
{ | |
mstore(64, memoryguard(0x0120)) | |
if iszero(lt(calldatasize(), 4)) | |
{ | |
switch shift_right_224_unsigned(calldataload(0)) | |
case 0x13d1aa2e { | |
let param_0, param_1 := abi_decode_tuple_t_uint256t_uint256(4, calldatasize()) | |
let ret_0 := fun_f_23(param_0, param_1) | |
let memPos := allocateMemory(0) | |
return(memPos, sub(abi_encode_tuple_t_uint256__to_t_uint256__fromStack(memPos, ret_0), memPos)) | |
} | |
case 0x28b5e32b { | |
abi_decode_tuple_(4, calldatasize()) | |
let ret_0_1, ret_1 := fun_call_77() | |
let ret_2 := mload(0x0100) | |
let ret_3 := mload(0xe0) | |
let memPos_2 := allocateMemory(0) | |
return(memPos_2, sub(abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256__to_t_uint256_t_uint256_t_uint256_t_uint256__fromStack(memPos_2, ret_0_1, ret_1, ret_2, ret_3), memPos_2)) | |
} | |
case 0xb3de648b { | |
let ret_0_5 := fun_f_11(abi_decode_tuple_t_uint256(4, calldatasize())) | |
let memPos_6 := allocateMemory(0) | |
return(memPos_6, sub(abi_encode_tuple_t_uint256__to_t_uint256__fromStack(memPos_6, ret_0_5), memPos_6)) | |
} | |
} | |
if iszero(calldatasize()) { stop() } | |
revert(0, 0) | |
} | |
function abi_decode_t_uint256(offset, end) -> value | |
{ | |
value := calldataload(offset) | |
validator_revert_t_uint256(value) | |
} | |
function abi_decode_t_uint256_fromMemory(offset_8, end_9) -> value_10 | |
{ | |
value_10 := mload(offset_8) | |
validator_revert_t_uint256(value_10) | |
} | |
function abi_decode_tuple_(headStart, dataEnd) | |
{ | |
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) } | |
} | |
function abi_decode_tuple_t_uint256(headStart_11, dataEnd_12) -> value0 | |
{ | |
if slt(sub(dataEnd_12, headStart_11), 32) { revert(value0, value0) } | |
value0 := abi_decode_t_uint256(add(headStart_11, value0), dataEnd_12) | |
} | |
function abi_decode_tuple_t_uint256_fromMemory(headStart_14, dataEnd_15) -> value0_16 | |
{ | |
if slt(sub(dataEnd_15, headStart_14), 32) { revert(value0_16, value0_16) } | |
value0_16 := abi_decode_t_uint256_fromMemory(add(headStart_14, value0_16), dataEnd_15) | |
} | |
function abi_decode_tuple_t_uint256t_uint256(headStart_18, dataEnd_19) -> value0_20, value1 | |
{ | |
if slt(sub(dataEnd_19, headStart_18), 64) { revert(value1, value1) } | |
value0_20 := abi_decode_t_uint256(add(headStart_18, value1), dataEnd_19) | |
value1 := abi_decode_t_uint256(add(headStart_18, 32), dataEnd_19) | |
} | |
function abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value_23, pos) | |
{ | |
mstore(pos, convert_t_rational_2_by_1_to_t_uint256(value_23)) | |
} | |
function abi_encode_t_rational_3_by_1_to_t_uint256_fromStack(value_24, pos_25) | |
{ | |
mstore(pos_25, convert_t_rational_3_by_1_to_t_uint256(value_24)) | |
} | |
function abi_encode_t_uint256_to_t_uint256_fromStack(value_26, pos_27) | |
{ | |
mstore(pos_27, cleanup_t_uint256(value_26)) | |
} | |
function abi_encode_tuple_t_rational_2_by_1__to_t_uint256__fromStack(headStart_28, value0_29) -> tail | |
{ | |
tail := add(headStart_28, 32) | |
abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value0_29, add(headStart_28, 0)) | |
} | |
function abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(headStart_30, value0_31, value1_32) -> tail_33 | |
{ | |
tail_33 := add(headStart_30, 64) | |
abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value0_31, add(headStart_30, 0)) | |
abi_encode_t_rational_3_by_1_to_t_uint256_fromStack(value1_32, add(headStart_30, 32)) | |
} | |
function abi_encode_tuple_t_uint256__to_t_uint256__fromStack(headStart_34, value0_35) -> tail_36 | |
{ | |
tail_36 := add(headStart_34, 32) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value0_35, add(headStart_34, 0)) | |
} | |
function abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256__to_t_uint256_t_uint256_t_uint256_t_uint256__fromStack(headStart_37, value0_38, value1_39, value2, value3) -> tail_40 | |
{ | |
tail_40 := add(headStart_37, 128) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value0_38, add(headStart_37, 0)) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value1_39, add(headStart_37, 32)) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value2, add(headStart_37, 64)) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value3, add(headStart_37, 96)) | |
} | |
function allocateMemory(size) -> memPtr | |
{ | |
memPtr := mload(64) | |
let newFreePtr := add(memPtr, size) | |
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error() } | |
mstore(64, newFreePtr) | |
} | |
function cleanup_t_uint160(value_41) -> cleaned | |
{ | |
cleaned := and(value_41, sub(shl(160, 1), 1)) | |
} | |
function cleanup_t_uint256(value_42) -> cleaned_43 | |
{ cleaned_43 := value_42 } | |
function convert_t_contract$_C_$82_to_t_address(value_44) -> converted | |
{ | |
converted := convert_t_contract$_C_$82_to_t_uint160(value_44) | |
} | |
function convert_t_contract$_C_$82_to_t_uint160(value_45) -> converted_46 | |
{ | |
converted_46 := cleanup_t_uint160(value_45) | |
} | |
function convert_t_rational_1000_by_1_to_t_uint256(value_47) -> converted_48 | |
{ | |
converted_48 := cleanup_t_uint256(value_47) | |
} | |
function convert_t_rational_10_by_1_to_t_uint256(value_49) -> converted_50 | |
{ | |
converted_50 := cleanup_t_uint256(value_49) | |
} | |
function convert_t_rational_1_by_1_to_t_uint256(value_51) -> converted_52 | |
{ | |
converted_52 := cleanup_t_uint256(value_51) | |
} | |
function convert_t_rational_2_by_1_to_t_uint256(value_53) -> converted_54 | |
{ | |
converted_54 := cleanup_t_uint256(value_53) | |
} | |
function convert_t_rational_3_by_1_to_t_uint256(value_55) -> converted_56 | |
{ | |
converted_56 := cleanup_t_uint256(value_55) | |
} | |
function fun_call_77() -> vloc_v_26, vloc_x_28 | |
{ | |
mstore(0x0100, 0) | |
mstore(0xe0, 0) | |
vloc_v_26 := zero_value_for_split_t_uint256() | |
vloc_x_28 := vloc_v_26 | |
mstore(0x0100, vloc_v_26) | |
mstore(0xe0, vloc_v_26) | |
mstore(0xa0, convert_t_contract$_C_$82_to_t_address(address())) | |
mstore(0xc0, convert_t_rational_10_by_1_to_t_uint256(0x0a)) | |
if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _5 := mload(64) | |
mstore(_5, shift_left_224(0xb3de648b)) | |
let _7 := call(gas(), mload(0xa0), mload(0xc0), _5, sub(abi_encode_tuple_t_rational_2_by_1__to_t_uint256__fromStack(add(_5, 4), 0x02), _5), _5, 32) | |
if iszero(_7) { revert_forward_1() } | |
let expr_40 | |
if _7 | |
{ | |
mstore(64, add(_5, round_up_to_mul_of_32(returndatasize()))) | |
expr_40 := abi_decode_tuple_t_uint256_fromMemory(_5, add(_5, returndatasize())) | |
} | |
vloc_v_26 := expr_40 | |
let expr_45_address := mload(0xa0) | |
mstore(0x80, convert_t_rational_1000_by_1_to_t_uint256(0x03e8)) | |
if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _8 := mload(64) | |
mstore(_8, shift_left_224(0x13d1aa2e)) | |
let _10 := call(mload(0x80), mload(0xa0), 0, _8, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_8, 4), 0x02, 0x03), _8), _8, 32) | |
if iszero(_10) { revert_forward_1() } | |
let expr_50 | |
if _10 | |
{ | |
mstore(64, add(_8, round_up_to_mul_of_32(returndatasize()))) | |
expr_50 := abi_decode_tuple_t_uint256_fromMemory(_8, add(_8, returndatasize())) | |
} | |
vloc_x_28 := expr_50 | |
let expr_55_address := mload(0xa0) | |
let expr_58_gas := mload(0x80) | |
let expr_58_value := mload(0xc0) | |
if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _11 := mload(64) | |
mstore(_11, shift_left_224(0x13d1aa2e)) | |
let _13 := call(mload(0x80), mload(0xa0), mload(0xc0), _11, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_11, 4), 0x02, 0x03), _11), _11, 32) | |
if iszero(_13) { revert_forward_1() } | |
let expr_61 | |
if _13 | |
{ | |
mstore(64, add(_11, round_up_to_mul_of_32(returndatasize()))) | |
expr_61 := abi_decode_tuple_t_uint256_fromMemory(_11, add(_11, returndatasize())) | |
} | |
mstore(0x0100, expr_61) | |
let expr_66_address := mload(0xa0) | |
let expr_68_gas := mload(0x80) | |
let expr_70_value := mload(0xc0) | |
if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _14 := mload(64) | |
mstore(_14, shift_left_224(0x13d1aa2e)) | |
let _16 := call(mload(0x80), mload(0xa0), mload(0xc0), _14, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_14, 4), 0x02, 0x03), _14), _14, 32) | |
if iszero(_16) { revert_forward_1() } | |
let expr_73 | |
if _16 | |
{ | |
mstore(64, add(_14, round_up_to_mul_of_32(returndatasize()))) | |
expr_73 := abi_decode_tuple_t_uint256_fromMemory(_14, add(_14, returndatasize())) | |
} | |
mstore(0xe0, expr_73) | |
} | |
function fun_f_11(vloc_x_3) -> vloc__6 | |
{ | |
vloc__6 := zero_value_for_split_t_uint256() | |
vloc__6 := convert_t_rational_1_by_1_to_t_uint256(0x01) | |
} | |
function fun_f_23(vloc_x_13, vloc_y_15) -> vloc__18 | |
{ | |
vloc__18 := zero_value_for_split_t_uint256() | |
vloc__18 := convert_t_rational_2_by_1_to_t_uint256(0x02) | |
} | |
function panic_error() | |
{ invalid() } | |
function revert_forward_1() | |
{ | |
returndatacopy(0, 0, returndatasize()) | |
revert(0, returndatasize()) | |
} | |
function round_up_to_mul_of_32(value_57) -> result | |
{ | |
result := and(add(value_57, 31), not(31)) | |
} | |
function shift_left_224(value_58) -> newValue | |
{ | |
newValue := shl(224, value_58) | |
} | |
function shift_right_224_unsigned(value_59) -> newValue_60 | |
{ | |
newValue_60 := shr(224, value_59) | |
} | |
function validator_revert_t_uint256(value_61) | |
{ | |
if iszero(eq(value_61, cleanup_t_uint256(value_61))) { revert(0, 0) } | |
} | |
function zero_value_for_split_t_uint256() -> ret | |
{ ret := ret } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
{ | |
mstore(64, memoryguard(128)) | |
if iszero(lt(calldatasize(), 4)) | |
{ | |
switch shift_right_224_unsigned(calldataload(0)) | |
case 0x13d1aa2e { | |
let param_0, param_1 := abi_decode_tuple_t_uint256t_uint256(4, calldatasize()) | |
let ret_0 := fun_f_23(param_0, param_1) | |
let memPos := allocateMemory(0) | |
return(memPos, sub(abi_encode_tuple_t_uint256__to_t_uint256__fromStack(memPos, ret_0), memPos)) | |
} | |
case 0x28b5e32b { | |
abi_decode_tuple_(4, calldatasize()) | |
let ret_0_1, ret_1, ret_2, ret_3 := fun_call_77() | |
let memPos_2 := allocateMemory(0) | |
return(memPos_2, sub(abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256__to_t_uint256_t_uint256_t_uint256_t_uint256__fromStack(memPos_2, ret_0_1, ret_1, ret_2, ret_3), memPos_2)) | |
} | |
case 0xb3de648b { | |
let ret_0_5 := fun_f_11(abi_decode_tuple_t_uint256(4, calldatasize())) | |
let memPos_6 := allocateMemory(0) | |
return(memPos_6, sub(abi_encode_tuple_t_uint256__to_t_uint256__fromStack(memPos_6, ret_0_5), memPos_6)) | |
} | |
} | |
if iszero(calldatasize()) { stop() } | |
revert(0, 0) | |
} | |
function abi_decode_t_uint256(offset, end) -> value | |
{ | |
value := calldataload(offset) | |
validator_revert_t_uint256(value) | |
} | |
function abi_decode_t_uint256_fromMemory(offset_8, end_9) -> value_10 | |
{ | |
value_10 := mload(offset_8) | |
validator_revert_t_uint256(value_10) | |
} | |
function abi_decode_tuple_(headStart, dataEnd) | |
{ | |
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) } | |
} | |
function abi_decode_tuple_t_uint256(headStart_11, dataEnd_12) -> value0 | |
{ | |
if slt(sub(dataEnd_12, headStart_11), 32) { revert(value0, value0) } | |
value0 := abi_decode_t_uint256(add(headStart_11, value0), dataEnd_12) | |
} | |
function abi_decode_tuple_t_uint256_fromMemory(headStart_14, dataEnd_15) -> value0_16 | |
{ | |
if slt(sub(dataEnd_15, headStart_14), 32) { revert(value0_16, value0_16) } | |
value0_16 := abi_decode_t_uint256_fromMemory(add(headStart_14, value0_16), dataEnd_15) | |
} | |
function abi_decode_tuple_t_uint256t_uint256(headStart_18, dataEnd_19) -> value0_20, value1 | |
{ | |
if slt(sub(dataEnd_19, headStart_18), 64) { revert(value1, value1) } | |
value0_20 := abi_decode_t_uint256(add(headStart_18, value1), dataEnd_19) | |
value1 := abi_decode_t_uint256(add(headStart_18, 32), dataEnd_19) | |
} | |
function abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value_23, pos) | |
{ | |
mstore(pos, convert_t_rational_2_by_1_to_t_uint256(value_23)) | |
} | |
function abi_encode_t_rational_3_by_1_to_t_uint256_fromStack(value_24, pos_25) | |
{ | |
mstore(pos_25, convert_t_rational_3_by_1_to_t_uint256(value_24)) | |
} | |
function abi_encode_t_uint256_to_t_uint256_fromStack(value_26, pos_27) | |
{ | |
mstore(pos_27, cleanup_t_uint256(value_26)) | |
} | |
function abi_encode_tuple_t_rational_2_by_1__to_t_uint256__fromStack(headStart_28, value0_29) -> tail | |
{ | |
tail := add(headStart_28, 32) | |
abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value0_29, add(headStart_28, 0)) | |
} | |
function abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(headStart_30, value0_31, value1_32) -> tail_33 | |
{ | |
tail_33 := add(headStart_30, 64) | |
abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value0_31, add(headStart_30, 0)) | |
abi_encode_t_rational_3_by_1_to_t_uint256_fromStack(value1_32, add(headStart_30, 32)) | |
} | |
function abi_encode_tuple_t_uint256__to_t_uint256__fromStack(headStart_34, value0_35) -> tail_36 | |
{ | |
tail_36 := add(headStart_34, 32) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value0_35, add(headStart_34, 0)) | |
} | |
function abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256__to_t_uint256_t_uint256_t_uint256_t_uint256__fromStack(headStart_37, value0_38, value1_39, value2, value3) -> tail_40 | |
{ | |
tail_40 := add(headStart_37, 128) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value0_38, add(headStart_37, 0)) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value1_39, add(headStart_37, 32)) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value2, add(headStart_37, 64)) | |
abi_encode_t_uint256_to_t_uint256_fromStack(value3, add(headStart_37, 96)) | |
} | |
function allocateMemory(size) -> memPtr | |
{ | |
memPtr := mload(64) | |
let newFreePtr := add(memPtr, size) | |
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error() } | |
mstore(64, newFreePtr) | |
} | |
function cleanup_t_uint160(value_41) -> cleaned | |
{ | |
cleaned := and(value_41, sub(shl(160, 1), 1)) | |
} | |
function cleanup_t_uint256(value_42) -> cleaned_43 | |
{ cleaned_43 := value_42 } | |
function convert_t_contract$_C_$82_to_t_address(value_44) -> converted | |
{ | |
converted := convert_t_contract$_C_$82_to_t_uint160(value_44) | |
} | |
function convert_t_contract$_C_$82_to_t_uint160(value_45) -> converted_46 | |
{ | |
converted_46 := cleanup_t_uint160(value_45) | |
} | |
function convert_t_rational_1000_by_1_to_t_uint256(value_47) -> converted_48 | |
{ | |
converted_48 := cleanup_t_uint256(value_47) | |
} | |
function convert_t_rational_10_by_1_to_t_uint256(value_49) -> converted_50 | |
{ | |
converted_50 := cleanup_t_uint256(value_49) | |
} | |
function convert_t_rational_1_by_1_to_t_uint256(value_51) -> converted_52 | |
{ | |
converted_52 := cleanup_t_uint256(value_51) | |
} | |
function convert_t_rational_2_by_1_to_t_uint256(value_53) -> converted_54 | |
{ | |
converted_54 := cleanup_t_uint256(value_53) | |
} | |
function convert_t_rational_3_by_1_to_t_uint256(value_55) -> converted_56 | |
{ | |
converted_56 := cleanup_t_uint256(value_55) | |
} | |
function fun_call_77() -> vloc_v_26, vloc_x_28, vloc_y_30, vloc_z_32 | |
{ | |
vloc_v_26 := zero_value_for_split_t_uint256() | |
vloc_x_28 := vloc_v_26 | |
vloc_y_30 := vloc_v_26 | |
vloc_z_32 := vloc_v_26 | |
let expr_36_address := convert_t_contract$_C_$82_to_t_address(address()) | |
let expr_38_value := convert_t_rational_10_by_1_to_t_uint256(0x0a) | |
if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
let _5 := mload(64) | |
mstore(_5, shift_left_224(0xb3de648b)) | |
let _7 := call(gas(), expr_36_address, expr_38_value, _5, sub(abi_encode_tuple_t_rational_2_by_1__to_t_uint256__fromStack(add(_5, 4), 0x02), _5), _5, 32) | |
if iszero(_7) { revert_forward_1() } | |
let expr_40 | |
if _7 | |
{ | |
mstore(64, add(_5, round_up_to_mul_of_32(returndatasize()))) | |
expr_40 := abi_decode_tuple_t_uint256_fromMemory(_5, add(_5, returndatasize())) | |
} | |
vloc_v_26 := expr_40 | |
let expr_45_address := expr_36_address | |
let expr_47_gas := convert_t_rational_1000_by_1_to_t_uint256(0x03e8) | |
if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
let _8 := mload(64) | |
mstore(_8, shift_left_224(0x13d1aa2e)) | |
let _10 := call(expr_47_gas, expr_36_address, 0, _8, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_8, 4), 0x02, 0x03), _8), _8, 32) | |
if iszero(_10) { revert_forward_1() } | |
let expr_50 | |
if _10 | |
{ | |
mstore(64, add(_8, round_up_to_mul_of_32(returndatasize()))) | |
expr_50 := abi_decode_tuple_t_uint256_fromMemory(_8, add(_8, returndatasize())) | |
} | |
vloc_x_28 := expr_50 | |
let expr_55_address := expr_36_address | |
let expr_58_gas := expr_47_gas | |
let expr_58_value := expr_38_value | |
if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
let _11 := mload(64) | |
mstore(_11, shift_left_224(0x13d1aa2e)) | |
let _13 := call(expr_47_gas, expr_36_address, expr_38_value, _11, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_11, 4), 0x02, 0x03), _11), _11, 32) | |
if iszero(_13) { revert_forward_1() } | |
let expr_61 | |
if _13 | |
{ | |
mstore(64, add(_11, round_up_to_mul_of_32(returndatasize()))) | |
expr_61 := abi_decode_tuple_t_uint256_fromMemory(_11, add(_11, returndatasize())) | |
} | |
vloc_y_30 := expr_61 | |
let expr_66_address := expr_36_address | |
let expr_68_gas := expr_47_gas | |
let expr_70_value := expr_38_value | |
if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
let _14 := mload(64) | |
mstore(_14, shift_left_224(0x13d1aa2e)) | |
let _16 := call(expr_47_gas, expr_36_address, expr_38_value, _14, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_14, 4), 0x02, 0x03), _14), _14, 32) | |
if iszero(_16) { revert_forward_1() } | |
let expr_73 | |
if _16 | |
{ | |
mstore(64, add(_14, round_up_to_mul_of_32(returndatasize()))) | |
expr_73 := abi_decode_tuple_t_uint256_fromMemory(_14, add(_14, returndatasize())) | |
} | |
vloc_z_32 := expr_73 | |
} | |
function fun_f_11(vloc_x_3) -> vloc__6 | |
{ | |
vloc__6 := zero_value_for_split_t_uint256() | |
vloc__6 := convert_t_rational_1_by_1_to_t_uint256(0x01) | |
} | |
function fun_f_23(vloc_x_13, vloc_y_15) -> vloc__18 | |
{ | |
vloc__18 := zero_value_for_split_t_uint256() | |
vloc__18 := convert_t_rational_2_by_1_to_t_uint256(0x02) | |
} | |
function panic_error() | |
{ invalid() } | |
function revert_forward_1() | |
{ | |
returndatacopy(0, 0, returndatasize()) | |
revert(0, returndatasize()) | |
} | |
function round_up_to_mul_of_32(value_57) -> result | |
{ | |
result := and(add(value_57, 31), not(31)) | |
} | |
function shift_left_224(value_58) -> newValue | |
{ | |
newValue := shl(224, value_58) | |
} | |
function shift_right_224_unsigned(value_59) -> newValue_60 | |
{ | |
newValue_60 := shr(224, value_59) | |
} | |
function validator_revert_t_uint256(value_61) | |
{ | |
if iszero(eq(value_61, cleanup_t_uint256(value_61))) { revert(0, 0) } | |
} | |
function zero_value_for_split_t_uint256() -> ret | |
{ ret := ret } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- before.yul 2020-10-06 17:32:27.371940173 +0200 | |
+++ after.yul 2020-10-06 19:34:53.722730752 +0200 | |
@@ -1,6 +1,6 @@ | |
{ | |
{ | |
- mstore(64, memoryguard(128)) | |
+ mstore(64, memoryguard(0x0120)) | |
if iszero(lt(calldatasize(), 4)) | |
{ | |
switch shift_right_224_unsigned(calldataload(0)) | |
@@ -12,7 +12,9 @@ | |
} | |
case 0x28b5e32b { | |
abi_decode_tuple_(4, calldatasize()) | |
- let ret_0_1, ret_1, ret_2, ret_3 := fun_call_77() | |
+ let ret_0_1, ret_1 := fun_call_77() | |
+ let ret_2 := mload(0x0100) | |
+ let ret_3 := mload(0xe0) | |
let memPos_2 := allocateMemory(0) | |
return(memPos_2, sub(abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256__to_t_uint256_t_uint256_t_uint256_t_uint256__fromStack(memPos_2, ret_0_1, ret_1, ret_2, ret_3), memPos_2)) | |
} | |
@@ -132,18 +134,20 @@ | |
{ | |
converted_56 := cleanup_t_uint256(value_55) | |
} | |
- function fun_call_77() -> vloc_v_26, vloc_x_28, vloc_y_30, vloc_z_32 | |
+ function fun_call_77() -> vloc_v_26, vloc_x_28 | |
{ | |
+ mstore(0x0100, 0) | |
+ mstore(0xe0, 0) | |
vloc_v_26 := zero_value_for_split_t_uint256() | |
vloc_x_28 := vloc_v_26 | |
- vloc_y_30 := vloc_v_26 | |
- vloc_z_32 := vloc_v_26 | |
- let expr_36_address := convert_t_contract$_C_$82_to_t_address(address()) | |
- let expr_38_value := convert_t_rational_10_by_1_to_t_uint256(0x0a) | |
- if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
+ mstore(0x0100, vloc_v_26) | |
+ mstore(0xe0, vloc_v_26) | |
+ mstore(0xa0, convert_t_contract$_C_$82_to_t_address(address())) | |
+ mstore(0xc0, convert_t_rational_10_by_1_to_t_uint256(0x0a)) | |
+ if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _5 := mload(64) | |
mstore(_5, shift_left_224(0xb3de648b)) | |
- let _7 := call(gas(), expr_36_address, expr_38_value, _5, sub(abi_encode_tuple_t_rational_2_by_1__to_t_uint256__fromStack(add(_5, 4), 0x02), _5), _5, 32) | |
+ let _7 := call(gas(), mload(0xa0), mload(0xc0), _5, sub(abi_encode_tuple_t_rational_2_by_1__to_t_uint256__fromStack(add(_5, 4), 0x02), _5), _5, 32) | |
if iszero(_7) { revert_forward_1() } | |
let expr_40 | |
if _7 | |
@@ -152,12 +156,12 @@ | |
expr_40 := abi_decode_tuple_t_uint256_fromMemory(_5, add(_5, returndatasize())) | |
} | |
vloc_v_26 := expr_40 | |
- let expr_45_address := expr_36_address | |
- let expr_47_gas := convert_t_rational_1000_by_1_to_t_uint256(0x03e8) | |
- if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
+ let expr_45_address := mload(0xa0) | |
+ mstore(0x80, convert_t_rational_1000_by_1_to_t_uint256(0x03e8)) | |
+ if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _8 := mload(64) | |
mstore(_8, shift_left_224(0x13d1aa2e)) | |
- let _10 := call(expr_47_gas, expr_36_address, 0, _8, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_8, 4), 0x02, 0x03), _8), _8, 32) | |
+ let _10 := call(mload(0x80), mload(0xa0), 0, _8, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_8, 4), 0x02, 0x03), _8), _8, 32) | |
if iszero(_10) { revert_forward_1() } | |
let expr_50 | |
if _10 | |
@@ -166,13 +170,13 @@ | |
expr_50 := abi_decode_tuple_t_uint256_fromMemory(_8, add(_8, returndatasize())) | |
} | |
vloc_x_28 := expr_50 | |
- let expr_55_address := expr_36_address | |
- let expr_58_gas := expr_47_gas | |
- let expr_58_value := expr_38_value | |
- if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
+ let expr_55_address := mload(0xa0) | |
+ let expr_58_gas := mload(0x80) | |
+ let expr_58_value := mload(0xc0) | |
+ if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _11 := mload(64) | |
mstore(_11, shift_left_224(0x13d1aa2e)) | |
- let _13 := call(expr_47_gas, expr_36_address, expr_38_value, _11, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_11, 4), 0x02, 0x03), _11), _11, 32) | |
+ let _13 := call(mload(0x80), mload(0xa0), mload(0xc0), _11, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_11, 4), 0x02, 0x03), _11), _11, 32) | |
if iszero(_13) { revert_forward_1() } | |
let expr_61 | |
if _13 | |
@@ -180,14 +184,14 @@ | |
mstore(64, add(_11, round_up_to_mul_of_32(returndatasize()))) | |
expr_61 := abi_decode_tuple_t_uint256_fromMemory(_11, add(_11, returndatasize())) | |
} | |
- vloc_y_30 := expr_61 | |
- let expr_66_address := expr_36_address | |
- let expr_68_gas := expr_47_gas | |
- let expr_70_value := expr_38_value | |
- if iszero(extcodesize(expr_36_address)) { revert(0, 0) } | |
+ mstore(0x0100, expr_61) | |
+ let expr_66_address := mload(0xa0) | |
+ let expr_68_gas := mload(0x80) | |
+ let expr_70_value := mload(0xc0) | |
+ if iszero(extcodesize(mload(0xa0))) { revert(0, 0) } | |
let _14 := mload(64) | |
mstore(_14, shift_left_224(0x13d1aa2e)) | |
- let _16 := call(expr_47_gas, expr_36_address, expr_38_value, _14, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_14, 4), 0x02, 0x03), _14), _14, 32) | |
+ let _16 := call(mload(0x80), mload(0xa0), mload(0xc0), _14, sub(abi_encode_tuple_t_rational_2_by_1_t_rational_3_by_1__to_t_uint256_t_uint256__fromStack(add(_14, 4), 0x02, 0x03), _14), _14, 32) | |
if iszero(_16) { revert_forward_1() } | |
let expr_73 | |
if _16 | |
@@ -195,7 +199,7 @@ | |
mstore(64, add(_14, round_up_to_mul_of_32(returndatasize()))) | |
expr_73 := abi_decode_tuple_t_uint256_fromMemory(_14, add(_14, returndatasize())) | |
} | |
- vloc_z_32 := expr_73 | |
+ mstore(0xe0, expr_73) | |
} | |
function fun_f_11(vloc_x_3) -> vloc__6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment