2021-05-27 20:05:21 +00:00
|
|
|
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
|
2019-11-21 17:56:25 +00:00
|
|
|
* WARNING *
|
|
|
|
* Solidity to Yul compilation is still EXPERIMENTAL *
|
|
|
|
* It can result in LOSS OF FUNDS or worse *
|
|
|
|
* !USE AT YOUR OWN RISK! *
|
2021-05-27 20:05:21 +00:00
|
|
|
*=====================================================*/
|
2019-11-21 17:56:25 +00:00
|
|
|
|
|
|
|
|
2021-08-31 10:57:13 +00:00
|
|
|
/// @use-src 0:\"A\"
|
2020-11-26 21:33:36 +00:00
|
|
|
object \"C_11\" {
|
2019-11-21 17:56:25 +00:00
|
|
|
code {
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:78:243 \"contract C { function f() external pure returns (string memory) { return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"; } }\"
|
2021-09-15 15:01:40 +00:00
|
|
|
mstore(64, memoryguard(128))
|
2021-04-29 14:26:21 +00:00
|
|
|
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
2019-11-21 17:56:25 +00:00
|
|
|
|
2020-11-26 21:33:36 +00:00
|
|
|
constructor_C_11()
|
2019-11-21 17:56:25 +00:00
|
|
|
|
2021-04-29 09:43:27 +00:00
|
|
|
let _1 := allocate_unbounded()
|
|
|
|
codecopy(_1, dataoffset(\"C_11_deployed\"), datasize(\"C_11_deployed\"))
|
2020-04-27 17:35:35 +00:00
|
|
|
|
2021-04-29 09:43:27 +00:00
|
|
|
return(_1, datasize(\"C_11_deployed\"))
|
|
|
|
|
|
|
|
function allocate_unbounded() -> memPtr {
|
|
|
|
memPtr := mload(64)
|
|
|
|
}
|
2019-11-21 17:56:25 +00:00
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:78:243 \"contract C { function f() external pure returns (string memory) { return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"; } }\"
|
2020-11-26 21:33:36 +00:00
|
|
|
function constructor_C_11() {
|
2020-04-06 15:26:59 +00:00
|
|
|
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:78:243 \"contract C { function f() external pure returns (string memory) { return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"; } }\"
|
2021-05-27 20:05:21 +00:00
|
|
|
|
2020-04-06 15:26:59 +00:00
|
|
|
}
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:78:243 \"contract C { function f() external pure returns (string memory) { return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"; } }\"
|
2020-04-06 15:26:59 +00:00
|
|
|
|
2019-11-21 17:56:25 +00:00
|
|
|
}
|
2021-08-31 10:57:13 +00:00
|
|
|
/// @use-src 0:\"A\"
|
2020-11-26 21:33:36 +00:00
|
|
|
object \"C_11_deployed\" {
|
2019-11-21 17:56:25 +00:00
|
|
|
code {
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:78:243 \"contract C { function f() external pure returns (string memory) { return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"; } }\"
|
2021-09-15 15:01:40 +00:00
|
|
|
mstore(64, memoryguard(128))
|
2019-11-21 17:56:25 +00:00
|
|
|
|
|
|
|
if iszero(lt(calldatasize(), 4))
|
|
|
|
{
|
|
|
|
let selector := shift_right_224_unsigned(calldataload(0))
|
|
|
|
switch selector
|
|
|
|
|
|
|
|
case 0x26121ff0
|
|
|
|
{
|
|
|
|
// f()
|
2021-01-04 16:18:09 +00:00
|
|
|
|
2022-02-15 11:20:28 +00:00
|
|
|
external_fun_f_10()
|
2019-11-21 17:56:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
default {}
|
|
|
|
}
|
2021-10-12 13:25:28 +00:00
|
|
|
|
2021-04-29 14:26:21 +00:00
|
|
|
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
|
2019-11-21 17:56:25 +00:00
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function shift_right_224_unsigned(value) -> newValue {
|
|
|
|
newValue :=
|
2020-12-22 22:11:53 +00:00
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
shr(224, value)
|
2020-12-22 22:11:53 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-01-14 16:27:55 +00:00
|
|
|
function allocate_unbounded() -> memPtr {
|
|
|
|
memPtr := mload(64)
|
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
2020-12-22 22:11:53 +00:00
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
2020-12-22 22:11:53 +00:00
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function abi_decode_tuple_(headStart, dataEnd) {
|
|
|
|
if slt(sub(dataEnd, headStart), 0) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
|
2020-12-22 22:11:53 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-11-21 17:56:25 +00:00
|
|
|
function array_length_t_string_memory_ptr(value) -> length {
|
|
|
|
|
|
|
|
length := mload(value)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {
|
|
|
|
mstore(pos, length)
|
|
|
|
updated_pos := add(pos, 0x20)
|
|
|
|
}
|
|
|
|
|
|
|
|
function copy_memory_to_memory(src, dst, length) {
|
|
|
|
let i := 0
|
|
|
|
for { } lt(i, length) { i := add(i, 32) }
|
|
|
|
{
|
|
|
|
mstore(add(dst, i), mload(add(src, i)))
|
|
|
|
}
|
|
|
|
if gt(i, length)
|
|
|
|
{
|
|
|
|
// clear end
|
|
|
|
mstore(add(dst, length), 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function round_up_to_mul_of_32(value) -> result {
|
|
|
|
result := and(add(value, 31), not(31))
|
2021-01-14 16:27:55 +00:00
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {
|
|
|
|
let length := array_length_t_string_memory_ptr(value)
|
|
|
|
pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)
|
|
|
|
copy_memory_to_memory(add(value, 0x20), pos, length)
|
|
|
|
end := add(pos, round_up_to_mul_of_32(length))
|
|
|
|
}
|
2020-03-02 20:42:46 +00:00
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(headStart , value0) -> tail {
|
|
|
|
tail := add(headStart, 32)
|
|
|
|
|
|
|
|
mstore(add(headStart, 0), sub(tail, headStart))
|
|
|
|
tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)
|
2019-11-21 17:56:25 +00:00
|
|
|
|
|
|
|
}
|
2021-09-07 16:00:20 +00:00
|
|
|
|
2022-02-15 11:20:28 +00:00
|
|
|
function external_fun_f_10() {
|
|
|
|
|
|
|
|
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
|
|
|
abi_decode_tuple_(4, calldatasize())
|
|
|
|
let ret_0 := fun_f_10()
|
|
|
|
let memPos := allocate_unbounded()
|
|
|
|
let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0)
|
|
|
|
return(memPos, sub(memEnd, memPos))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
function zero_value_for_split_t_string_memory_ptr() -> ret {
|
|
|
|
ret := 96
|
|
|
|
}
|
2019-11-21 17:56:25 +00:00
|
|
|
|
2020-10-13 11:28:39 +00:00
|
|
|
function panic_error_0x41() {
|
|
|
|
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
|
|
|
|
mstore(4, 0x41)
|
|
|
|
revert(0, 0x24)
|
2020-09-24 13:45:45 +00:00
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
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-04-29 14:26:21 +00:00
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function allocate_memory(size) -> memPtr {
|
|
|
|
memPtr := allocate_unbounded()
|
|
|
|
finalize_allocation(memPtr, size)
|
2021-04-29 14:26:21 +00:00
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function array_allocation_size_t_string_memory_ptr(length) -> size {
|
|
|
|
// Make sure we can allocate memory without overflow
|
|
|
|
if gt(length, 0xffffffffffffffff) { panic_error_0x41() }
|
|
|
|
|
|
|
|
size := round_up_to_mul_of_32(length)
|
|
|
|
|
|
|
|
// add length slot
|
|
|
|
size := add(size, 0x20)
|
2021-04-29 14:26:21 +00:00
|
|
|
|
2019-11-21 17:56:25 +00:00
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function allocate_memory_array_t_string_memory_ptr(length) -> memPtr {
|
|
|
|
let allocSize := array_allocation_size_t_string_memory_ptr(length)
|
|
|
|
memPtr := allocate_memory(allocSize)
|
2019-11-21 17:56:25 +00:00
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
mstore(memPtr, length)
|
2019-11-21 17:56:25 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-22 22:11:53 +00:00
|
|
|
function store_literal_in_memory_d6604f85ac07e2b33103a620b3d3d75b0473c7214912beded67b9b624d41c571(memPtr) {
|
|
|
|
|
|
|
|
mstore(add(memPtr, 0), \"abcdabcdcafecafeabcdabcdcafecafe\")
|
|
|
|
|
|
|
|
mstore(add(memPtr, 32), \"ffffzzzzoooo0123456789,.<,>.?:;'\")
|
|
|
|
|
|
|
|
mstore(add(memPtr, 64), \"[{]}|`~!@#$%^&*()-_=+\")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-09-07 16:00:20 +00:00
|
|
|
function copy_literal_to_memory_d6604f85ac07e2b33103a620b3d3d75b0473c7214912beded67b9b624d41c571() -> memPtr {
|
|
|
|
memPtr := allocate_memory_array_t_string_memory_ptr(85)
|
|
|
|
store_literal_in_memory_d6604f85ac07e2b33103a620b3d3d75b0473c7214912beded67b9b624d41c571(add(memPtr, 32))
|
|
|
|
}
|
|
|
|
|
|
|
|
function convert_t_stringliteral_d6604f85ac07e2b33103a620b3d3d75b0473c7214912beded67b9b624d41c571_to_t_string_memory_ptr() -> converted {
|
|
|
|
converted := copy_literal_to_memory_d6604f85ac07e2b33103a620b3d3d75b0473c7214912beded67b9b624d41c571()
|
2020-03-02 20:42:46 +00:00
|
|
|
}
|
|
|
|
|
2021-09-15 15:40:11 +00:00
|
|
|
/// @ast-id 10
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:91:241 \"function f() external pure returns (string memory) { return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"; }\"
|
2021-09-07 16:00:20 +00:00
|
|
|
function fun_f_10() -> var__5_mpos {
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:127:140 \"string memory\"
|
2021-09-07 16:00:20 +00:00
|
|
|
let zero_t_string_memory_ptr_1_mpos := zero_value_for_split_t_string_memory_ptr()
|
|
|
|
var__5_mpos := zero_t_string_memory_ptr_1_mpos
|
|
|
|
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:144:238 \"return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"\"
|
2021-09-07 16:00:20 +00:00
|
|
|
var__5_mpos := convert_t_stringliteral_d6604f85ac07e2b33103a620b3d3d75b0473c7214912beded67b9b624d41c571_to_t_string_memory_ptr()
|
|
|
|
leave
|
|
|
|
|
|
|
|
}
|
2021-08-31 13:10:40 +00:00
|
|
|
/// @src 0:78:243 \"contract C { function f() external pure returns (string memory) { return \\\"abcdabcdcafecafeabcdabcdcafecafeffffzzzzoooo0123456789,.<,>.?:;'[{]}|`~!@#$%^&*()-_=+\\\"; } }\"
|
2021-09-07 16:00:20 +00:00
|
|
|
|
2019-11-21 17:56:25 +00:00
|
|
|
}
|
2020-04-09 19:59:17 +00:00
|
|
|
|
2021-06-08 14:35:37 +00:00
|
|
|
data \".metadata\" hex\"<BYTECODE REMOVED>\"
|
2019-11-21 17:56:25 +00:00
|
|
|
}
|
2020-04-09 19:59:17 +00:00
|
|
|
|
2019-11-21 17:56:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
"}}},"sources":{"A":{"id":0}}}
|