From 6dd31bb36c55ec53099011437158d5ecdb3837a5 Mon Sep 17 00:00:00 2001 From: r0qs Date: Mon, 14 Oct 2024 17:56:14 +0200 Subject: [PATCH] Add Yul CFG export tests --- .../standard_yul_cfg_json_export/in.sol | 19 + .../standard_yul_cfg_json_export/input.json | 13 + .../standard_yul_cfg_json_export/output.json | 3969 +++++++++++++++++ .../strict_asm_yul_cfg_json_export/args | 1 + .../strict_asm_yul_cfg_json_export/input.yul | 36 + .../strict_asm_yul_cfg_json_export/output | 380 ++ test/cmdlineTests/yul_cfg_json_export/args | 1 + .../yul_cfg_json_export/input.sol | 19 + test/cmdlineTests/yul_cfg_json_export/output | 3962 ++++++++++++++++ 9 files changed, 8400 insertions(+) create mode 100644 test/cmdlineTests/standard_yul_cfg_json_export/in.sol create mode 100644 test/cmdlineTests/standard_yul_cfg_json_export/input.json create mode 100644 test/cmdlineTests/standard_yul_cfg_json_export/output.json create mode 100644 test/cmdlineTests/strict_asm_yul_cfg_json_export/args create mode 100644 test/cmdlineTests/strict_asm_yul_cfg_json_export/input.yul create mode 100644 test/cmdlineTests/strict_asm_yul_cfg_json_export/output create mode 100644 test/cmdlineTests/yul_cfg_json_export/args create mode 100644 test/cmdlineTests/yul_cfg_json_export/input.sol create mode 100644 test/cmdlineTests/yul_cfg_json_export/output diff --git a/test/cmdlineTests/standard_yul_cfg_json_export/in.sol b/test/cmdlineTests/standard_yul_cfg_json_export/in.sol new file mode 100644 index 000000000000..85691014f827 --- /dev/null +++ b/test/cmdlineTests/standard_yul_cfg_json_export/in.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.0; + +interface I { + function f() external pure returns (uint); +} + +contract C is I { + function f() public pure override returns (uint) { + return 42; + } +} + +contract D { + function f() public returns (uint) { + C c = new C(); + return c.f(); + } +} diff --git a/test/cmdlineTests/standard_yul_cfg_json_export/input.json b/test/cmdlineTests/standard_yul_cfg_json_export/input.json new file mode 100644 index 000000000000..aee56abf8600 --- /dev/null +++ b/test/cmdlineTests/standard_yul_cfg_json_export/input.json @@ -0,0 +1,13 @@ +{ + "language": "Solidity", + "sources": { + "C": {"urls": ["standard_yul_cfg_json_export/in.sol"]} + }, + "settings": { + "optimizer": { + "enabled": true + }, + "viaIR": true, + "outputSelection": {"*": {"*": ["yulCFGJson"]}} + } +} diff --git a/test/cmdlineTests/standard_yul_cfg_json_export/output.json b/test/cmdlineTests/standard_yul_cfg_json_export/output.json new file mode 100644 index 000000000000..7d6c20ff4d34 --- /dev/null +++ b/test/cmdlineTests/standard_yul_cfg_json_export/output.json @@ -0,0 +1,3969 @@ +{ + "contracts": { + "C": { + "C": { + "yulCFGJson": { + "C_19": { + "blocks": [ + { + "exit": { + "cond": "v2", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "callvalue", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "constructor_C_19", + "out": [] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v3" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v4" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5", + "v3" + ], + "op": "codecopy", + "out": [] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v3" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "functions": { + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "constructor_C_19": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "constructor_I_7", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "constructor_I_7": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + } + } + }, + "subObjects": { + "C_19_deployed": { + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x04", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "v4" + ], + "op": "iszero", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v9", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00" + ], + "op": "calldataload", + "out": [ + "v7" + ] + }, + { + "in": [ + "v7" + ], + "op": "shift_right_224_unsigned", + "out": [ + "v8" + ] + }, + { + "in": [ + "0x26121ff0", + "v8" + ], + "op": "eq", + "out": [ + "v9" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "targets": [ + "Block3" + ], + "type": "Jump" + }, + "id": "Block5", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "external_fun_f_18", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block2" + ], + "type": "Jump" + }, + "id": "Block3", + "instructions": [] + } + ], + "functions": { + "abi_decode_tuple_": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v4", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x00", + "v3" + ], + "op": "slt", + "out": [ + "v4" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "arguments": [ + "value", + "pos" + ], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v1" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack": { + "arguments": [ + "headStart", + "value0" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x20", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v5" + ] + }, + { + "in": [ + "v5", + "v1" + ], + "op": "abi_encode_t_uint256_to_t_uint256_fromStack", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "cleanup_t_rational_42_by_1": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "cleanup_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "convert_t_rational_42_by_1_to_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_rational_42_by_1", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "identity", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "cleanup_t_uint256", + "out": [ + "v4" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "external_fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v0", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "callvalue", + "out": [ + "v0" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "calldatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x04" + ], + "op": "abi_decode_tuple_", + "out": [] + }, + { + "in": [], + "op": "fun_f_18", + "out": [ + "v3" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5" + ], + "op": "sub", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v4" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "zero_value_for_split_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [ + "0x2a" + ], + "op": "convert_t_rational_42_by_1_to_t_uint256", + "out": [ + "v3" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "var__13" + ], + "type": "Function" + }, + "identity": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + }, + "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "shift_right_224_unsigned": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shr", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "zero_value_for_split_t_uint256": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "0x00" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + } + } + }, + "subObjects": {}, + "type": "subObject" + }, + "type": "Object" + } + }, + "D": { + "yulCFGJson": { + "D_38": { + "blocks": [ + { + "exit": { + "cond": "v2", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "callvalue", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "constructor_D_38", + "out": [] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v3" + ] + }, + { + "builtinArgs": [ + "D_38_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v4" + ] + }, + { + "builtinArgs": [ + "D_38_deployed" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5", + "v3" + ], + "op": "codecopy", + "out": [] + }, + { + "builtinArgs": [ + "D_38_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v3" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "functions": { + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "constructor_D_38": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + } + } + }, + "subObjects": { + "D_38_deployed": { + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x04", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "v4" + ], + "op": "iszero", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v9", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00" + ], + "op": "calldataload", + "out": [ + "v7" + ] + }, + { + "in": [ + "v7" + ], + "op": "shift_right_224_unsigned", + "out": [ + "v8" + ] + }, + { + "in": [ + "0x26121ff0", + "v8" + ], + "op": "eq", + "out": [ + "v9" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "targets": [ + "Block3" + ], + "type": "Jump" + }, + "id": "Block5", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "external_fun_f_37", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block2" + ], + "type": "Jump" + }, + "id": "Block3", + "instructions": [] + } + ], + "functions": { + "abi_decode_t_uint256_fromMemory": { + "arguments": [ + "offset", + "end" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "mload", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "validator_revert_t_uint256", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "value" + ], + "type": "Function" + }, + "abi_decode_tuple_": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v4", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x00", + "v3" + ], + "op": "slt", + "out": [ + "v4" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x20", + "v4" + ], + "op": "slt", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [ + "v12" + ], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [ + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v11" + ] + }, + { + "in": [ + "v1", + "v11" + ], + "op": "abi_decode_t_uint256_fromMemory", + "out": [ + "v12" + ] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "value0" + ], + "type": "Function" + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "arguments": [ + "value", + "pos" + ], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v1" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_tuple__to__fromStack": { + "arguments": [ + "headStart" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack": { + "arguments": [ + "headStart", + "value0" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x20", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v5" + ] + }, + { + "in": [ + "v5", + "v1" + ], + "op": "abi_encode_t_uint256_to_t_uint256_fromStack", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "cleanup_t_uint160": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0xffffffffffffffffffffffffffffffffffffffff", + "v0" + ], + "op": "and", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "cleanup_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "convert_t_contract$_C_$19_to_t_address": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "convert_t_uint160_to_t_address", + "out": [ + "v2" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "convert_t_uint160_to_t_address": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "convert_t_uint160_to_t_uint160", + "out": [ + "v2" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "convert_t_uint160_to_t_uint160": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint160", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "identity", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "cleanup_t_uint160", + "out": [ + "v4" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "external_fun_f_37": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v0", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "callvalue", + "out": [ + "v0" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "calldatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x04" + ], + "op": "abi_decode_tuple_", + "out": [] + }, + { + "in": [], + "op": "fun_f_37", + "out": [ + "v3" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5" + ], + "op": "sub", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v4" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "finalize_allocation": { + "arguments": [ + "memPtr", + "size" + ], + "blocks": [ + { + "exit": { + "cond": "v7", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v1" + ], + "op": "round_up_to_mul_of_32", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v0" + ], + "op": "add", + "out": [ + "v3" + ] + }, + { + "in": [ + "v0", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "0xffffffffffffffff", + "v3" + ], + "op": "gt", + "out": [ + "v6" + ] + }, + { + "in": [ + "v4", + "v6" + ], + "op": "or", + "out": [ + "v7" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [ + { + "in": [ + "v3", + "0x40" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "panic_error_0x41", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "fun_f_37": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v8", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "zero_value_for_split_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v2" + ] + }, + { + "builtinArgs": [ + "C_19" + ], + "in": [], + "op": "datasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3", + "v2" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "v2", + "v4" + ], + "op": "lt", + "out": [ + "v5" + ] + }, + { + "in": [ + "0xffffffffffffffff", + "v4" + ], + "op": "gt", + "out": [ + "v7" + ] + }, + { + "in": [ + "v5", + "v7" + ], + "op": "or", + "out": [ + "v8" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "cond": "v19", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block2", + "instructions": [ + { + "builtinArgs": [ + "C_19" + ], + "in": [], + "op": "datasize", + "out": [ + "v9" + ] + }, + { + "builtinArgs": [ + "C_19" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v10" + ] + }, + { + "in": [ + "v9", + "v10", + "v2" + ], + "op": "datacopy", + "out": [] + }, + { + "in": [ + "v4" + ], + "op": "abi_encode_tuple__to__fromStack", + "out": [ + "v16" + ] + }, + { + "in": [ + "v2", + "v16" + ], + "op": "sub", + "out": [ + "v17" + ] + }, + { + "in": [ + "v17", + "v2", + "0x00" + ], + "op": "create", + "out": [ + "v18" + ] + }, + { + "in": [ + "v18" + ], + "op": "iszero", + "out": [ + "v19" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "panic_error_0x41", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v33", + "targets": [ + "Block8", + "Block7" + ], + "type": "ConditionalJump" + }, + "id": "Block5", + "instructions": [ + { + "in": [ + "v18" + ], + "op": "convert_t_contract$_C_$19_to_t_address", + "out": [ + "v22" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v24" + ] + }, + { + "in": [ + "0x26121ff0" + ], + "op": "shift_left_224", + "out": [ + "v25" + ] + }, + { + "in": [ + "v25", + "v24" + ], + "op": "mstore", + "out": [] + }, + { + "in": [ + "0x04", + "v24" + ], + "op": "add", + "out": [ + "v27" + ] + }, + { + "in": [ + "v27" + ], + "op": "abi_encode_tuple__to__fromStack", + "out": [ + "v28" + ] + }, + { + "in": [ + "v24", + "v28" + ], + "op": "sub", + "out": [ + "v30" + ] + }, + { + "in": [], + "op": "gas", + "out": [ + "v31" + ] + }, + { + "in": [ + "0x20", + "v24", + "v30", + "v24", + "v22", + "v31" + ], + "op": "staticcall", + "out": [ + "v32" + ] + }, + { + "in": [ + "v32" + ], + "op": "iszero", + "out": [ + "v33" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "revert_forward_1", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v32", + "targets": [ + "Block11", + "Block10" + ], + "type": "ConditionalJump" + }, + "id": "Block8", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block7", + "instructions": [ + { + "in": [], + "op": "revert_forward_1", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "entries": [ + "Block8", + "Block13" + ], + "exit": { + "returnValues": [ + "v45" + ], + "type": "FunctionReturn" + }, + "id": "Block11", + "instructions": [ + { + "in": [ + "0x00", + "v44" + ], + "op": "PhiFunction", + "out": [ + "v45" + ] + } + ] + }, + { + "exit": { + "cond": "v37", + "targets": [ + "Block13", + "Block12" + ], + "type": "ConditionalJump" + }, + "id": "Block10", + "instructions": [ + { + "in": [], + "op": "returndatasize", + "out": [ + "v36" + ] + }, + { + "in": [ + "v36", + "0x20" + ], + "op": "gt", + "out": [ + "v37" + ] + } + ], + "type": "BuiltinCall" + }, + { + "entries": [ + "Block10", + "Block12" + ], + "exit": { + "targets": [ + "Block11" + ], + "type": "Jump" + }, + "id": "Block13", + "instructions": [ + { + "in": [ + "0x20", + "v38" + ], + "op": "PhiFunction", + "out": [ + "v39" + ] + }, + { + "in": [ + "v39", + "v24" + ], + "op": "finalize_allocation", + "out": [] + }, + { + "in": [ + "v39", + "v24" + ], + "op": "add", + "out": [ + "v43" + ] + }, + { + "in": [ + "v43", + "v24" + ], + "op": "abi_decode_tuple_t_uint256_fromMemory", + "out": [ + "v44" + ] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block13" + ], + "type": "Jump" + }, + "id": "Block12", + "instructions": [ + { + "in": [], + "op": "returndatasize", + "out": [ + "v38" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "var__22" + ], + "type": "Function" + }, + "identity": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + }, + "panic_error_0x41": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x4e487b7100000000000000000000000000000000000000000000000000000000", + "0x00" + ], + "op": "mstore", + "out": [] + }, + { + "in": [ + "0x41", + "0x04" + ], + "op": "mstore", + "out": [] + }, + { + "in": [ + "0x24", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_0cc013b6b3b6beabea4e3a74a6d380f0df81852ca99887912475e1f66b2a2c20": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_forward_1": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v0" + ] + }, + { + "in": [], + "op": "returndatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x00", + "v0" + ], + "op": "returndatacopy", + "out": [] + }, + { + "in": [], + "op": "returndatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3", + "v0" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "round_up_to_mul_of_32": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v5" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x1f" + ], + "op": "not", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x1f", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "and", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "result" + ], + "type": "Function" + }, + "shift_left_224": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shl", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "shift_right_224_unsigned": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shr", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "validator_revert_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "cond": "v3", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "v0" + ], + "op": "eq", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "iszero", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "zero_value_for_split_t_uint256": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "0x00" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + } + } + }, + "subObjects": { + "C_19": { + "blocks": [ + { + "exit": { + "cond": "v2", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "callvalue", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "constructor_C_19", + "out": [] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v3" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v4" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5", + "v3" + ], + "op": "codecopy", + "out": [] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v3" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "functions": { + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "constructor_C_19": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "constructor_I_7", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "constructor_I_7": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + } + } + }, + "subObjects": { + "C_19_deployed": { + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x04", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "v4" + ], + "op": "iszero", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v9", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00" + ], + "op": "calldataload", + "out": [ + "v7" + ] + }, + { + "in": [ + "v7" + ], + "op": "shift_right_224_unsigned", + "out": [ + "v8" + ] + }, + { + "in": [ + "0x26121ff0", + "v8" + ], + "op": "eq", + "out": [ + "v9" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "targets": [ + "Block3" + ], + "type": "Jump" + }, + "id": "Block5", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "external_fun_f_18", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block2" + ], + "type": "Jump" + }, + "id": "Block3", + "instructions": [] + } + ], + "functions": { + "abi_decode_tuple_": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v4", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x00", + "v3" + ], + "op": "slt", + "out": [ + "v4" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "arguments": [ + "value", + "pos" + ], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v1" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack": { + "arguments": [ + "headStart", + "value0" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x20", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v5" + ] + }, + { + "in": [ + "v5", + "v1" + ], + "op": "abi_encode_t_uint256_to_t_uint256_fromStack", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "cleanup_t_rational_42_by_1": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "cleanup_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "convert_t_rational_42_by_1_to_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_rational_42_by_1", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "identity", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "cleanup_t_uint256", + "out": [ + "v4" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "external_fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v0", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "callvalue", + "out": [ + "v0" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "calldatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x04" + ], + "op": "abi_decode_tuple_", + "out": [] + }, + { + "in": [], + "op": "fun_f_18", + "out": [ + "v3" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5" + ], + "op": "sub", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v4" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "zero_value_for_split_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [ + "0x2a" + ], + "op": "convert_t_rational_42_by_1_to_t_uint256", + "out": [ + "v3" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "var__13" + ], + "type": "Function" + }, + "identity": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + }, + "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "shift_right_224_unsigned": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shr", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "zero_value_for_split_t_uint256": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "0x00" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + } + } + }, + "subObjects": {}, + "type": "subObject" + }, + "type": "subObject" + }, + "type": "subObject" + }, + "type": "Object" + } + } + } + }, + "sources": { + "C": { + "id": 0 + } + } +} diff --git a/test/cmdlineTests/strict_asm_yul_cfg_json_export/args b/test/cmdlineTests/strict_asm_yul_cfg_json_export/args new file mode 100644 index 000000000000..1147466b54ef --- /dev/null +++ b/test/cmdlineTests/strict_asm_yul_cfg_json_export/args @@ -0,0 +1 @@ +--strict-assembly --optimize --yul-cfg-json --pretty-json --json-indent 4 diff --git a/test/cmdlineTests/strict_asm_yul_cfg_json_export/input.yul b/test/cmdlineTests/strict_asm_yul_cfg_json_export/input.yul new file mode 100644 index 000000000000..4165f70ba640 --- /dev/null +++ b/test/cmdlineTests/strict_asm_yul_cfg_json_export/input.yul @@ -0,0 +1,36 @@ +/// @use-src 0:"input.sol" +object "C_19" { + code { + { + /// @src 0:124:223 "contract C is I {..." + let _1 := memoryguard(0x80) + mstore(64, _1) + if callvalue() { revert(0, 0) } + let _2 := datasize("C_19_deployed") + codecopy(_1, dataoffset("C_19_deployed"), _2) + return(_1, _2) + } + } + /// @use-src 0:"input.sol" + object "C_19_deployed" { + code { + { + /// @src 0:124:223 "contract C is I {..." + let _1 := memoryguard(0x80) + mstore(64, _1) + if iszero(lt(calldatasize(), 4)) + { + if eq(0x26121ff0, shr(224, calldataload(0))) + { + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + mstore(_1, /** @src 0:212:214 "42" */ 0x2a) + /// @src 0:124:223 "contract C is I {..." + return(_1, 32) + } + } + revert(0, 0) + } + } + } +} diff --git a/test/cmdlineTests/strict_asm_yul_cfg_json_export/output b/test/cmdlineTests/strict_asm_yul_cfg_json_export/output new file mode 100644 index 000000000000..18fa4288c5a2 --- /dev/null +++ b/test/cmdlineTests/strict_asm_yul_cfg_json_export/output @@ -0,0 +1,380 @@ + +======= strict_asm_yul_cfg_json_export/input.yul (EVM) ======= +Yul Control Flow Graph: + +{ + "C_19": { + "blocks": [ + { + "exit": { + "cond": "v2", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "0x80" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "callvalue", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v4" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5", + "v0" + ], + "op": "codecopy", + "out": [] + }, + { + "in": [ + "v4", + "v0" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "functions": {} + }, + "subObjects": { + "C_19_deployed": { + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "0x80" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x04", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "v4" + ], + "op": "iszero", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "cond": "v11", + "targets": [ + "Block4", + "Block3" + ], + "type": "ConditionalJump" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00" + ], + "op": "calldataload", + "out": [ + "v7" + ] + }, + { + "in": [ + "v7", + "0xe0" + ], + "op": "shr", + "out": [ + "v9" + ] + }, + { + "in": [ + "v9", + "0x26121ff0" + ], + "op": "eq", + "out": [ + "v11" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "targets": [ + "Block2" + ], + "type": "Jump" + }, + "id": "Block4", + "instructions": [] + }, + { + "exit": { + "cond": "v12", + "targets": [ + "Block6", + "Block5" + ], + "type": "ConditionalJump" + }, + "id": "Block3", + "instructions": [ + { + "in": [], + "op": "callvalue", + "out": [ + "v12" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "cond": "v17", + "targets": [ + "Block9", + "Block8" + ], + "type": "ConditionalJump" + }, + "id": "Block6", + "instructions": [ + { + "in": [ + "0x03" + ], + "op": "not", + "out": [ + "v14" + ] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v15" + ] + }, + { + "in": [ + "v14", + "v15" + ], + "op": "add", + "out": [ + "v16" + ] + }, + { + "in": [ + "0x00", + "v16" + ], + "op": "slt", + "out": [ + "v17" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block5", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block9", + "instructions": [ + { + "in": [ + "0x2a", + "v0" + ], + "op": "mstore", + "out": [] + }, + { + "in": [ + "0x20", + "v0" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block8", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "functions": {} + }, + "type": "subObject" + }, + "type": "Object" +} diff --git a/test/cmdlineTests/yul_cfg_json_export/args b/test/cmdlineTests/yul_cfg_json_export/args new file mode 100644 index 000000000000..4af41df671fb --- /dev/null +++ b/test/cmdlineTests/yul_cfg_json_export/args @@ -0,0 +1 @@ +--via-ir --optimize --yul-cfg-json --pretty-json --json-indent 4 diff --git a/test/cmdlineTests/yul_cfg_json_export/input.sol b/test/cmdlineTests/yul_cfg_json_export/input.sol new file mode 100644 index 000000000000..85691014f827 --- /dev/null +++ b/test/cmdlineTests/yul_cfg_json_export/input.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.0; + +interface I { + function f() external pure returns (uint); +} + +contract C is I { + function f() public pure override returns (uint) { + return 42; + } +} + +contract D { + function f() public returns (uint) { + C c = new C(); + return c.f(); + } +} diff --git a/test/cmdlineTests/yul_cfg_json_export/output b/test/cmdlineTests/yul_cfg_json_export/output new file mode 100644 index 000000000000..34c14b28fc2d --- /dev/null +++ b/test/cmdlineTests/yul_cfg_json_export/output @@ -0,0 +1,3962 @@ + +======= yul_cfg_json_export/input.sol:C ======= +Yul Control Flow Graph: +{ + "C_19": { + "blocks": [ + { + "exit": { + "cond": "v2", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "callvalue", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "constructor_C_19", + "out": [] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v3" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v4" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5", + "v3" + ], + "op": "codecopy", + "out": [] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v3" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "functions": { + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "constructor_C_19": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "constructor_I_7", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "constructor_I_7": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + } + } + }, + "subObjects": { + "C_19_deployed": { + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x04", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "v4" + ], + "op": "iszero", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v9", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00" + ], + "op": "calldataload", + "out": [ + "v7" + ] + }, + { + "in": [ + "v7" + ], + "op": "shift_right_224_unsigned", + "out": [ + "v8" + ] + }, + { + "in": [ + "0x26121ff0", + "v8" + ], + "op": "eq", + "out": [ + "v9" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "targets": [ + "Block3" + ], + "type": "Jump" + }, + "id": "Block5", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "external_fun_f_18", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block2" + ], + "type": "Jump" + }, + "id": "Block3", + "instructions": [] + } + ], + "functions": { + "abi_decode_tuple_": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v4", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x00", + "v3" + ], + "op": "slt", + "out": [ + "v4" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "arguments": [ + "value", + "pos" + ], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v1" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack": { + "arguments": [ + "headStart", + "value0" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x20", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v5" + ] + }, + { + "in": [ + "v5", + "v1" + ], + "op": "abi_encode_t_uint256_to_t_uint256_fromStack", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "cleanup_t_rational_42_by_1": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "cleanup_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "convert_t_rational_42_by_1_to_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_rational_42_by_1", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "identity", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "cleanup_t_uint256", + "out": [ + "v4" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "external_fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v0", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "callvalue", + "out": [ + "v0" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "calldatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x04" + ], + "op": "abi_decode_tuple_", + "out": [] + }, + { + "in": [], + "op": "fun_f_18", + "out": [ + "v3" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5" + ], + "op": "sub", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v4" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "zero_value_for_split_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [ + "0x2a" + ], + "op": "convert_t_rational_42_by_1_to_t_uint256", + "out": [ + "v3" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "var__13" + ], + "type": "Function" + }, + "identity": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + }, + "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "shift_right_224_unsigned": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shr", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "zero_value_for_split_t_uint256": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "0x00" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + } + } + }, + "subObjects": {}, + "type": "subObject" + }, + "type": "Object" +} + +======= yul_cfg_json_export/input.sol:D ======= +Yul Control Flow Graph: +{ + "D_38": { + "blocks": [ + { + "exit": { + "cond": "v2", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "callvalue", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "constructor_D_38", + "out": [] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v3" + ] + }, + { + "builtinArgs": [ + "D_38_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v4" + ] + }, + { + "builtinArgs": [ + "D_38_deployed" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5", + "v3" + ], + "op": "codecopy", + "out": [] + }, + { + "builtinArgs": [ + "D_38_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v3" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "functions": { + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "constructor_D_38": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + } + } + }, + "subObjects": { + "D_38_deployed": { + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x04", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "v4" + ], + "op": "iszero", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v9", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00" + ], + "op": "calldataload", + "out": [ + "v7" + ] + }, + { + "in": [ + "v7" + ], + "op": "shift_right_224_unsigned", + "out": [ + "v8" + ] + }, + { + "in": [ + "0x26121ff0", + "v8" + ], + "op": "eq", + "out": [ + "v9" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "targets": [ + "Block3" + ], + "type": "Jump" + }, + "id": "Block5", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "external_fun_f_37", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block2" + ], + "type": "Jump" + }, + "id": "Block3", + "instructions": [] + } + ], + "functions": { + "abi_decode_t_uint256_fromMemory": { + "arguments": [ + "offset", + "end" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "mload", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "validator_revert_t_uint256", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "value" + ], + "type": "Function" + }, + "abi_decode_tuple_": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v4", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x00", + "v3" + ], + "op": "slt", + "out": [ + "v4" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x20", + "v4" + ], + "op": "slt", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [ + "v12" + ], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [ + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v11" + ] + }, + { + "in": [ + "v1", + "v11" + ], + "op": "abi_decode_t_uint256_fromMemory", + "out": [ + "v12" + ] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "value0" + ], + "type": "Function" + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "arguments": [ + "value", + "pos" + ], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v1" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_tuple__to__fromStack": { + "arguments": [ + "headStart" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack": { + "arguments": [ + "headStart", + "value0" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x20", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v5" + ] + }, + { + "in": [ + "v5", + "v1" + ], + "op": "abi_encode_t_uint256_to_t_uint256_fromStack", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "cleanup_t_uint160": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0xffffffffffffffffffffffffffffffffffffffff", + "v0" + ], + "op": "and", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "cleanup_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "convert_t_contract$_C_$19_to_t_address": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "convert_t_uint160_to_t_address", + "out": [ + "v2" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "convert_t_uint160_to_t_address": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "convert_t_uint160_to_t_uint160", + "out": [ + "v2" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "convert_t_uint160_to_t_uint160": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint160", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "identity", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "cleanup_t_uint160", + "out": [ + "v4" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "external_fun_f_37": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v0", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "callvalue", + "out": [ + "v0" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "calldatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x04" + ], + "op": "abi_decode_tuple_", + "out": [] + }, + { + "in": [], + "op": "fun_f_37", + "out": [ + "v3" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5" + ], + "op": "sub", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v4" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "finalize_allocation": { + "arguments": [ + "memPtr", + "size" + ], + "blocks": [ + { + "exit": { + "cond": "v7", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v1" + ], + "op": "round_up_to_mul_of_32", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v0" + ], + "op": "add", + "out": [ + "v3" + ] + }, + { + "in": [ + "v0", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "0xffffffffffffffff", + "v3" + ], + "op": "gt", + "out": [ + "v6" + ] + }, + { + "in": [ + "v4", + "v6" + ], + "op": "or", + "out": [ + "v7" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [ + { + "in": [ + "v3", + "0x40" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "panic_error_0x41", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "fun_f_37": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v8", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "zero_value_for_split_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v2" + ] + }, + { + "builtinArgs": [ + "C_19" + ], + "in": [], + "op": "datasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3", + "v2" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "v2", + "v4" + ], + "op": "lt", + "out": [ + "v5" + ] + }, + { + "in": [ + "0xffffffffffffffff", + "v4" + ], + "op": "gt", + "out": [ + "v7" + ] + }, + { + "in": [ + "v5", + "v7" + ], + "op": "or", + "out": [ + "v8" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "cond": "v19", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block2", + "instructions": [ + { + "builtinArgs": [ + "C_19" + ], + "in": [], + "op": "datasize", + "out": [ + "v9" + ] + }, + { + "builtinArgs": [ + "C_19" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v10" + ] + }, + { + "in": [ + "v9", + "v10", + "v2" + ], + "op": "datacopy", + "out": [] + }, + { + "in": [ + "v4" + ], + "op": "abi_encode_tuple__to__fromStack", + "out": [ + "v16" + ] + }, + { + "in": [ + "v2", + "v16" + ], + "op": "sub", + "out": [ + "v17" + ] + }, + { + "in": [ + "v17", + "v2", + "0x00" + ], + "op": "create", + "out": [ + "v18" + ] + }, + { + "in": [ + "v18" + ], + "op": "iszero", + "out": [ + "v19" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "panic_error_0x41", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v33", + "targets": [ + "Block8", + "Block7" + ], + "type": "ConditionalJump" + }, + "id": "Block5", + "instructions": [ + { + "in": [ + "v18" + ], + "op": "convert_t_contract$_C_$19_to_t_address", + "out": [ + "v22" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v24" + ] + }, + { + "in": [ + "0x26121ff0" + ], + "op": "shift_left_224", + "out": [ + "v25" + ] + }, + { + "in": [ + "v25", + "v24" + ], + "op": "mstore", + "out": [] + }, + { + "in": [ + "0x04", + "v24" + ], + "op": "add", + "out": [ + "v27" + ] + }, + { + "in": [ + "v27" + ], + "op": "abi_encode_tuple__to__fromStack", + "out": [ + "v28" + ] + }, + { + "in": [ + "v24", + "v28" + ], + "op": "sub", + "out": [ + "v30" + ] + }, + { + "in": [], + "op": "gas", + "out": [ + "v31" + ] + }, + { + "in": [ + "0x20", + "v24", + "v30", + "v24", + "v22", + "v31" + ], + "op": "staticcall", + "out": [ + "v32" + ] + }, + { + "in": [ + "v32" + ], + "op": "iszero", + "out": [ + "v33" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "revert_forward_1", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v32", + "targets": [ + "Block11", + "Block10" + ], + "type": "ConditionalJump" + }, + "id": "Block8", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block7", + "instructions": [ + { + "in": [], + "op": "revert_forward_1", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "entries": [ + "Block8", + "Block13" + ], + "exit": { + "returnValues": [ + "v45" + ], + "type": "FunctionReturn" + }, + "id": "Block11", + "instructions": [ + { + "in": [ + "0x00", + "v44" + ], + "op": "PhiFunction", + "out": [ + "v45" + ] + } + ] + }, + { + "exit": { + "cond": "v37", + "targets": [ + "Block13", + "Block12" + ], + "type": "ConditionalJump" + }, + "id": "Block10", + "instructions": [ + { + "in": [], + "op": "returndatasize", + "out": [ + "v36" + ] + }, + { + "in": [ + "v36", + "0x20" + ], + "op": "gt", + "out": [ + "v37" + ] + } + ], + "type": "BuiltinCall" + }, + { + "entries": [ + "Block10", + "Block12" + ], + "exit": { + "targets": [ + "Block11" + ], + "type": "Jump" + }, + "id": "Block13", + "instructions": [ + { + "in": [ + "0x20", + "v38" + ], + "op": "PhiFunction", + "out": [ + "v39" + ] + }, + { + "in": [ + "v39", + "v24" + ], + "op": "finalize_allocation", + "out": [] + }, + { + "in": [ + "v39", + "v24" + ], + "op": "add", + "out": [ + "v43" + ] + }, + { + "in": [ + "v43", + "v24" + ], + "op": "abi_decode_tuple_t_uint256_fromMemory", + "out": [ + "v44" + ] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block13" + ], + "type": "Jump" + }, + "id": "Block12", + "instructions": [ + { + "in": [], + "op": "returndatasize", + "out": [ + "v38" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "var__22" + ], + "type": "Function" + }, + "identity": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + }, + "panic_error_0x41": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x4e487b7100000000000000000000000000000000000000000000000000000000", + "0x00" + ], + "op": "mstore", + "out": [] + }, + { + "in": [ + "0x41", + "0x04" + ], + "op": "mstore", + "out": [] + }, + { + "in": [ + "0x24", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_0cc013b6b3b6beabea4e3a74a6d380f0df81852ca99887912475e1f66b2a2c20": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_forward_1": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v0" + ] + }, + { + "in": [], + "op": "returndatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x00", + "v0" + ], + "op": "returndatacopy", + "out": [] + }, + { + "in": [], + "op": "returndatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3", + "v0" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "round_up_to_mul_of_32": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v5" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x1f" + ], + "op": "not", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x1f", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "and", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "result" + ], + "type": "Function" + }, + "shift_left_224": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shl", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "shift_right_224_unsigned": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shr", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "validator_revert_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "cond": "v3", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "v0" + ], + "op": "eq", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "iszero", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "zero_value_for_split_t_uint256": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "0x00" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + } + } + }, + "subObjects": { + "C_19": { + "blocks": [ + { + "exit": { + "cond": "v2", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "callvalue", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "constructor_C_19", + "out": [] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v3" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v4" + ] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "dataoffset", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5", + "v3" + ], + "op": "codecopy", + "out": [] + }, + { + "builtinArgs": [ + "C_19_deployed" + ], + "in": [], + "op": "datasize", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v3" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "functions": { + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "constructor_C_19": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "constructor_I_7", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "constructor_I_7": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + } + } + }, + "subObjects": { + "C_19_deployed": { + "blocks": [ + { + "exit": { + "cond": "v5", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "builtinArgs": [ + "128" + ], + "in": [], + "op": "memoryguard", + "out": [ + "v0" + ] + }, + { + "in": [ + "v0", + "0x40" + ], + "op": "mstore", + "out": [] + }, + { + "in": [], + "op": "calldatasize", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x04", + "v3" + ], + "op": "lt", + "out": [ + "v4" + ] + }, + { + "in": [ + "v4" + ], + "op": "iszero", + "out": [ + "v5" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "cond": "v9", + "targets": [ + "Block5", + "Block4" + ], + "type": "ConditionalJump" + }, + "id": "Block1", + "instructions": [ + { + "in": [ + "0x00" + ], + "op": "calldataload", + "out": [ + "v7" + ] + }, + { + "in": [ + "v7" + ], + "op": "shift_right_224_unsigned", + "out": [ + "v8" + ] + }, + { + "in": [ + "0x26121ff0", + "v8" + ], + "op": "eq", + "out": [ + "v9" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "targets": [ + "Block3" + ], + "type": "Jump" + }, + "id": "Block5", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block4", + "instructions": [ + { + "in": [], + "op": "external_fun_f_18", + "out": [] + } + ], + "type": "FunctionCall" + }, + { + "exit": { + "targets": [ + "Block2" + ], + "type": "Jump" + }, + "id": "Block3", + "instructions": [] + } + ], + "functions": { + "abi_decode_tuple_": { + "arguments": [ + "headStart", + "dataEnd" + ], + "blocks": [ + { + "exit": { + "cond": "v4", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "v1" + ], + "op": "sub", + "out": [ + "v3" + ] + }, + { + "in": [ + "0x00", + "v3" + ], + "op": "slt", + "out": [ + "v4" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block2", + "instructions": [] + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "arguments": [ + "value", + "pos" + ], + "blocks": [ + { + "exit": { + "returnValues": [], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_uint256", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2", + "v1" + ], + "op": "mstore", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack": { + "arguments": [ + "headStart", + "value0" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x20", + "v0" + ], + "op": "add", + "out": [ + "v4" + ] + }, + { + "in": [ + "0x00", + "v0" + ], + "op": "add", + "out": [ + "v5" + ] + }, + { + "in": [ + "v5", + "v1" + ], + "op": "abi_encode_t_uint256_to_t_uint256_fromStack", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "tail" + ], + "type": "Function" + }, + "allocate_unbounded": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v2" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x40" + ], + "op": "mload", + "out": [ + "v2" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "memPtr" + ], + "type": "Function" + }, + "cleanup_t_rational_42_by_1": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "cleanup_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "cleaned" + ], + "type": "Function" + }, + "convert_t_rational_42_by_1_to_t_uint256": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v4" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0" + ], + "op": "cleanup_t_rational_42_by_1", + "out": [ + "v2" + ] + }, + { + "in": [ + "v2" + ], + "op": "identity", + "out": [ + "v3" + ] + }, + { + "in": [ + "v3" + ], + "op": "cleanup_t_uint256", + "out": [ + "v4" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "converted" + ], + "type": "Function" + }, + "external_fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "cond": "v0", + "targets": [ + "Block2", + "Block1" + ], + "type": "ConditionalJump" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "callvalue", + "out": [ + "v0" + ] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block2", + "instructions": [ + { + "in": [], + "op": "calldatasize", + "out": [ + "v1" + ] + }, + { + "in": [ + "v1", + "0x04" + ], + "op": "abi_decode_tuple_", + "out": [] + }, + { + "in": [], + "op": "fun_f_18", + "out": [ + "v3" + ] + }, + { + "in": [], + "op": "allocate_unbounded", + "out": [ + "v4" + ] + }, + { + "in": [ + "v3", + "v4" + ], + "op": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack", + "out": [ + "v5" + ] + }, + { + "in": [ + "v4", + "v5" + ], + "op": "sub", + "out": [ + "v6" + ] + }, + { + "in": [ + "v6", + "v4" + ], + "op": "return", + "out": [] + } + ], + "type": "BuiltinCall" + }, + { + "exit": { + "type": "Terminated" + }, + "id": "Block1", + "instructions": [ + { + "in": [], + "op": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb", + "out": [] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "fun_f_18": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [], + "op": "zero_value_for_split_t_uint256", + "out": [ + "v1" + ] + }, + { + "in": [ + "0x2a" + ], + "op": "convert_t_rational_42_by_1_to_t_uint256", + "out": [ + "v3" + ] + } + ], + "type": "FunctionCall" + } + ], + "entry": "Block0", + "returns": [ + "var__13" + ], + "type": "Function" + }, + "identity": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v0" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + }, + "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "arguments": [], + "blocks": [ + { + "exit": { + "type": "Terminated" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "0x00", + "0x00" + ], + "op": "revert", + "out": [] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [], + "type": "Function" + }, + "shift_right_224_unsigned": { + "arguments": [ + "value" + ], + "blocks": [ + { + "exit": { + "returnValues": [ + "v3" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [ + { + "in": [ + "v0", + "0xe0" + ], + "op": "shr", + "out": [ + "v3" + ] + } + ], + "type": "BuiltinCall" + } + ], + "entry": "Block0", + "returns": [ + "newValue" + ], + "type": "Function" + }, + "zero_value_for_split_t_uint256": { + "arguments": [], + "blocks": [ + { + "exit": { + "returnValues": [ + "0x00" + ], + "type": "FunctionReturn" + }, + "id": "Block0", + "instructions": [] + } + ], + "entry": "Block0", + "returns": [ + "ret" + ], + "type": "Function" + } + } + }, + "subObjects": {}, + "type": "subObject" + }, + "type": "subObject" + }, + "type": "subObject" + }, + "type": "Object" +} + +======= yul_cfg_json_export/input.sol:I =======