diff --git a/test/libyul/EVMCodeTransformTest.cpp b/test/libyul/EVMCodeTransformTest.cpp index 043eae331..da51e501f 100644 --- a/test/libyul/EVMCodeTransformTest.cpp +++ b/test/libyul/EVMCodeTransformTest.cpp @@ -20,6 +20,9 @@ #include #include +#include + +#include #include @@ -56,7 +59,13 @@ TestCase::TestResult EVMCodeTransformTest::run(ostream& _stream, string const& _ return TestResult::FatalError; } - m_obtainedResult = evmasm::disassemble(stack.assemble(AssemblyStack::Machine::EVM).bytecode->bytecode, "\n"); + evmasm::Assembly assembly; + EthAssemblyAdapter adapter(assembly); + stack.compileEVM(adapter, m_stackOpt); + + std::ostringstream output; + output << assembly; + m_obtainedResult = output.str(); return checkResult(_stream, _linePrefix, _formatted); } diff --git a/test/libyul/evmCodeTransform/stackReuse/for_1.yul b/test/libyul/evmCodeTransform/stackReuse/for_1.yul index e2f4ba128..f9056e1ae 100644 --- a/test/libyul/evmCodeTransform/stackReuse/for_1.yul +++ b/test/libyul/evmCodeTransform/stackReuse/for_1.yul @@ -2,18 +2,9 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// POP -// JUMPDEST -// PUSH1 0x1 -// ISZERO -// PUSH1 0x11 -// JUMPI -// PUSH1 0x3 -// POP -// JUMPDEST -// PUSH1 0x3 -// JUMP -// JUMPDEST -// PUSH1 0x2 -// POP +// /* "":17:18 */ +// pop(0x00) +// tag_1: +// /* "":38:39 */ +// pop(0x03) +// jump(tag_1) diff --git a/test/libyul/evmCodeTransform/stackReuse/for_2.yul b/test/libyul/evmCodeTransform/stackReuse/for_2.yul index f1f7460d4..0eb7d8840 100644 --- a/test/libyul/evmCodeTransform/stackReuse/for_2.yul +++ b/test/libyul/evmCodeTransform/stackReuse/for_2.yul @@ -2,21 +2,11 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// JUMPDEST -// PUSH1 0x1 -// ISZERO -// PUSH1 0x14 -// JUMPI -// PUSH1 0x8 -// SWAP1 -// POP -// PUSH1 0x3 -// POP -// JUMPDEST -// PUSH1 0x2 -// JUMP -// JUMPDEST -// POP -// PUSH1 0x2 -// POP +// /* "":17:18 */ +// pop(0x00) +// tag_1: +// /* "":34:35 */ +// pop(0x08) +// /* "":45:46 */ +// pop(0x03) +// jump(tag_1) diff --git a/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse.yul b/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse.yul index 13048c020..6c9e03bdc 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse.yul @@ -4,25 +4,22 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x17 -// JUMP -// JUMPDEST -// ADDRESS -// POP -// DUP3 -// DUP2 -// SSTORE -// POP -// CALLVALUE -// POP -// PUSH1 0x0 -// DUP2 -// SWAP1 -// POP -// JUMPDEST -// SWAP3 -// SWAP2 -// POP -// POP -// JUMP -// JUMPDEST +// stop +// /* "":6:86 */ +// tag_1: +// swap2 +// swap1 +// swap2 +// /* "":37:46 */ +// address +// /* "":33:47 */ +// pop +// /* "":48:60 */ +// sstore +// /* "":65:76 */ +// callvalue +// /* "":61:77 */ +// pop +// swap1 +// /* "":6:86 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse_without_retparams.yul b/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse_without_retparams.yul index d1f6b5bdc..e2d5f83c4 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse_without_retparams.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_argument_reuse_without_retparams.yul @@ -7,23 +7,26 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x17 -// JUMP -// JUMPDEST -// DUP1 -// PUSH1 0x80 -// MSTORE -// POP -// PUSH1 0x0 -// CALLDATALOAD -// ISZERO -// PUSH1 0x13 -// JUMPI -// DUP1 -// DUP2 -// SSTORE -// JUMPDEST -// POP -// JUMPDEST -// JUMP -// JUMPDEST +// stop +// /* "":4:86 */ +// tag_1: +// /* "":34:38 */ +// 0x80 +// /* "":27:42 */ +// mstore +// /* "":63:64 */ +// 0x00 +// /* "":50:65 */ +// calldataload +// tag_2 +// jumpi +// tag_3: +// pop +// /* "":4:86 */ +// jump // out +// tag_2: +// dup1 +// /* "":68:80 */ +// sstore +// pc +// jump(tag_3) diff --git a/test/libyul/evmCodeTransform/stackReuse/function_call.yul b/test/libyul/evmCodeTransform/stackReuse/function_call.yul index c14ccff36..e7b8d7b69 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_call.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_call.yul @@ -6,28 +6,30 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x9 -// PUSH1 0x2 -// PUSH1 0x1 -// PUSH1 0xD -// JUMP -// JUMPDEST -// PUSH1 0x15 -// JUMP -// JUMPDEST -// POP -// POP -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST -// PUSH1 0x1F -// PUSH1 0x4 -// PUSH1 0x3 -// PUSH1 0xD -// JUMP -// JUMPDEST -// SWAP1 -// POP -// POP +// tag_1 +// /* "":20:21 */ +// 0x02 +// /* "":17:18 */ +// 0x01 +// /* "":15:22 */ +// tag_2 +// jump // in +// tag_1: +// pop +// tag_3 +// /* "":67:68 */ +// 0x04 +// /* "":64:65 */ +// 0x03 +// /* "":62:69 */ +// tag_2 +// jump // in +// tag_3: +// stop +// /* "":27:52 */ +// tag_2: +// pop +// pop +// 0x00 +// swap1 +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_many_arguments.yul b/test/libyul/evmCodeTransform/stackReuse/function_many_arguments.yul index aa4567a90..772ef6fad 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_many_arguments.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_many_arguments.yul @@ -25,92 +25,85 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x80 -// JUMP -// JUMPDEST -// DUP1 -// PUSH2 0x100 -// MSTORE -// POP -// DUP1 -// PUSH2 0x120 -// MSTORE -// POP -// DUP1 -// PUSH2 0x140 -// MSTORE -// POP -// DUP1 -// PUSH2 0x160 -// MSTORE -// POP -// DUP1 -// PUSH2 0x180 -// MSTORE -// POP -// DUP1 -// PUSH2 0x1A0 -// MSTORE -// POP -// DUP1 -// PUSH2 0x1C0 -// MSTORE -// POP -// DUP1 -// PUSH2 0x1E0 -// MSTORE -// POP -// DUP1 -// PUSH2 0x200 -// MSTORE -// POP -// DUP1 -// PUSH2 0x220 -// MSTORE -// POP -// DUP1 -// PUSH2 0x240 -// MSTORE -// POP -// DUP1 -// PUSH2 0x260 -// MSTORE -// POP -// DUP1 -// PUSH2 0x280 -// MSTORE -// POP -// DUP1 -// PUSH2 0x2A0 -// MSTORE -// POP -// DUP1 -// PUSH2 0x2C0 -// MSTORE -// POP -// DUP1 -// PUSH2 0x2E0 -// MSTORE -// POP -// DUP1 -// PUSH2 0x300 -// MSTORE -// POP -// DUP1 -// PUSH2 0x320 -// MSTORE -// POP -// DUP1 -// PUSH2 0x340 -// MSTORE -// POP -// PUSH1 0x0 -// DUP2 -// SWAP1 -// POP -// JUMPDEST -// SWAP2 -// SWAP1 -// POP -// JUMP -// JUMPDEST +// stop +// /* "":6:660 */ +// tag_1: +// /* "":130:136 */ +// 0x0100 +// /* "":123:141 */ +// mstore +// /* "":157:163 */ +// 0x0120 +// /* "":150:168 */ +// mstore +// /* "":184:190 */ +// 0x0140 +// /* "":177:195 */ +// mstore +// /* "":211:217 */ +// 0x0160 +// /* "":204:222 */ +// mstore +// /* "":238:244 */ +// 0x0180 +// /* "":231:249 */ +// mstore +// /* "":265:271 */ +// 0x01a0 +// /* "":258:276 */ +// mstore +// /* "":292:298 */ +// 0x01c0 +// /* "":285:303 */ +// mstore +// /* "":319:325 */ +// 0x01e0 +// /* "":312:330 */ +// mstore +// /* "":346:352 */ +// 0x0200 +// /* "":339:357 */ +// mstore +// /* "":373:379 */ +// 0x0220 +// /* "":366:385 */ +// mstore +// /* "":401:407 */ +// 0x0240 +// /* "":394:413 */ +// mstore +// /* "":429:435 */ +// 0x0260 +// /* "":422:441 */ +// mstore +// /* "":457:463 */ +// 0x0280 +// /* "":450:469 */ +// mstore +// /* "":485:491 */ +// 0x02a0 +// /* "":478:497 */ +// mstore +// /* "":513:519 */ +// 0x02c0 +// /* "":506:525 */ +// mstore +// /* "":541:547 */ +// 0x02e0 +// /* "":534:553 */ +// mstore +// /* "":569:575 */ +// 0x0300 +// /* "":562:581 */ +// mstore +// /* "":597:603 */ +// 0x0320 +// /* "":590:609 */ +// mstore +// /* "":625:631 */ +// 0x0340 +// /* "":618:637 */ +// mstore +// swap1 +// /* "":6:660 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_params.yul b/test/libyul/evmCodeTransform/stackReuse/function_params.yul index 60139bb76..bb096cd95 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_params.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_params.yul @@ -4,11 +4,9 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x8 -// JUMP -// JUMPDEST -// POP -// POP -// JUMPDEST -// JUMP -// JUMPDEST +// stop +// /* "":6:26 */ +// tag_1: +// pop +// pop +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams.yul b/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams.yul index 3228637dc..59150c0af 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams.yul @@ -8,17 +8,14 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x10 -// JUMP -// JUMPDEST -// POP -// POP -// POP -// POP -// PUSH1 0x0 -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// SWAP2 -// JUMP -// JUMPDEST +// stop +// /* "":218:252 */ +// tag_1: +// pop +// pop +// pop +// pop +// 0x00 +// 0x00 +// swap2 +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams_partly_used.yul b/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams_partly_used.yul index 089892a66..d7cf6b399 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams_partly_used.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_params_and_retparams_partly_used.yul @@ -4,28 +4,25 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x1E -// JUMP -// JUMPDEST -// POP -// PUSH1 0x3 -// SWAP1 -// POP -// POP -// POP -// POP -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x9 -// PUSH1 0x2 -// SWAP2 -// POP -// DUP2 -// DUP2 -// MSTORE -// POP -// JUMPDEST -// SWAP1 -// SWAP2 -// JUMP -// JUMPDEST +// stop +// /* "":6:78 */ +// tag_1: +// pop +// pop +// pop +// pop +// 0x00 +// swap1 +// /* "":44:45 */ +// pop(0x03) +// /* "":55:56 */ +// 0x09 +// swap1 +// /* "":62:63 */ +// 0x02 +// dup1 +// swap3 +// /* "":64:76 */ +// mstore +// /* "":6:78 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam.yul index 4dde5208b..2f7a457d3 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam.yul @@ -4,13 +4,10 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0xC -// JUMP -// JUMPDEST -// PUSH1 0x0 -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// SWAP2 -// JUMP -// JUMPDEST +// stop +// /* "":6:30 */ +// tag_1: +// 0x00 +// 0x00 +// swap2 +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_block.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_block.yul index 3c1d90bd3..d8ccb61cf 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_block.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_block.yul @@ -4,15 +4,18 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0xD -// JUMP -// JUMPDEST -// ADDRESS -// POP -// PUSH1 0x0 -// CALLVALUE -// POP -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST +// stop +// /* "":6:63 */ +// tag_1: +// 0x00 +// swap1 +// /* "":30:39 */ +// address +// /* "":26:40 */ +// pop +// /* "":47:58 */ +// callvalue +// /* "":43:59 */ +// pop +// /* "":6:63 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_declaration.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_declaration.yul index fe99402f4..f05af12aa 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_declaration.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_declaration.yul @@ -4,15 +4,16 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0xD -// JUMP -// JUMPDEST -// ADDRESS -// POP -// PUSH1 0x0 -// CALLVALUE -// POP -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST +// stop +// /* "":6:63 */ +// tag_1: +// 0x00 +// swap1 +// /* "":30:39 */ +// address +// /* "":26:40 */ +// pop +// /* "":50:61 */ +// pop(callvalue) +// /* "":6:63 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_for.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_for.yul index 7dcb39c10..7af4ad841 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_for.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_for.yul @@ -4,24 +4,18 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x19 -// JUMP -// JUMPDEST -// ADDRESS -// POP -// PUSH1 0x0 -// CALLVALUE -// POP -// JUMPDEST -// PUSH1 0x0 -// ISZERO -// PUSH1 0x15 -// JUMPI -// JUMPDEST -// PUSH1 0xA -// JUMP -// JUMPDEST -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST +// stop +// /* "":6:76 */ +// tag_1: +// 0x00 +// swap1 +// /* "":30:39 */ +// address +// /* "":26:40 */ +// pop +// /* "":51:62 */ +// callvalue +// /* "":47:63 */ +// pop +// /* "":6:76 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_if.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_if.yul index bd882240f..79b2bbd33 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_if.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_if.yul @@ -4,20 +4,25 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x14 -// JUMP -// JUMPDEST -// ADDRESS -// POP -// PUSH1 0x0 -// PUSH1 0x1 -// ISZERO -// PUSH1 0x10 -// JUMPI -// CALLVALUE -// POP -// JUMPDEST -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST +// stop +// /* "":6:68 */ +// tag_1: +// 0x00 +// swap1 +// /* "":44:45 */ +// 0x01 +// /* "":30:39 */ +// address +// /* "":26:40 */ +// pop +// tag_2 +// jumpi +// tag_3: +// /* "":6:68 */ +// jump // out +// tag_2: +// /* "":52:63 */ +// callvalue +// /* "":48:64 */ +// pop +// jump(tag_3) diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_leave.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_leave.yul index 2e16c05d5..d9b8355cc 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_leave.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_leave.yul @@ -4,17 +4,14 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x10 -// JUMP -// JUMPDEST -// ADDRESS -// POP -// PUSH1 0x0 -// PUSH1 0xD -// JUMP -// CALLVALUE -// POP -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST +// stop +// /* "":6:65 */ +// tag_1: +// 0x00 +// swap1 +// /* "":30:39 */ +// address +// /* "":26:40 */ +// pop +// /* "":6:65 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_read.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_read.yul index d8440b86e..aef3e0296 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_read.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_read.yul @@ -4,18 +4,23 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x11 -// JUMP -// JUMPDEST -// ADDRESS -// POP -// PUSH1 0x0 -// DUP1 -// PUSH1 0x0 -// SSTORE -// CALLVALUE -// POP -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST +// stop +// /* "":6:72 */ +// tag_1: +// 0x00 +// swap1 +// /* "":30:39 */ +// address +// /* "":26:40 */ +// pop +// dup2 +// /* "":48:49 */ +// 0x00 +// /* "":41:53 */ +// sstore +// /* "":58:69 */ +// callvalue +// /* "":54:70 */ +// pop +// /* "":6:72 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned.yul index c20158eae..1d24d82f7 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned.yul @@ -4,13 +4,14 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0xB -// JUMP -// JUMPDEST -// CALLVALUE -// POP -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST +// stop +// /* "":6:44 */ +// tag_1: +// 0x00 +// swap1 +// /* "":30:41 */ +// callvalue +// /* "":26:42 */ +// pop +// /* "":6:44 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned_multiple.yul b/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned_multiple.yul index d9e80547e..289f8a0ec 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned_multiple.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_retparam_unassigned_multiple.yul @@ -4,17 +4,16 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x11 -// JUMP -// JUMPDEST -// CALLVALUE -// POP -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// SWAP2 -// SWAP3 -// JUMP -// JUMPDEST +// stop +// /* "":6:50 */ +// tag_1: +// 0x00 +// 0x00 +// 0x00 +// swap3 +// /* "":36:47 */ +// callvalue +// /* "":32:48 */ +// pop +// /* "":6:50 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_trivial.yul b/test/libyul/evmCodeTransform/stackReuse/function_trivial.yul index 2c803e85f..59233bdc1 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_trivial.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_trivial.yul @@ -4,9 +4,7 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x6 -// JUMP -// JUMPDEST -// JUMPDEST -// JUMP -// JUMPDEST +// stop +// /* "":4:20 */ +// tag_1: +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/function_with_body_embedded.yul b/test/libyul/evmCodeTransform/stackReuse/function_with_body_embedded.yul index 60f287734..3162d29ab 100644 --- a/test/libyul/evmCodeTransform/stackReuse/function_with_body_embedded.yul +++ b/test/libyul/evmCodeTransform/stackReuse/function_with_body_embedded.yul @@ -9,27 +9,18 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x3 -// PUSH1 0x17 -// JUMP -// JUMPDEST -// PUSH1 0x0 -// DUP2 -// POP -// PUSH1 0x3 -// SWAP2 -// POP -// DUP2 -// SWAP1 -// POP -// JUMPDEST -// SWAP3 -// SWAP2 -// POP -// POP -// JUMP -// JUMPDEST -// PUSH1 0x7 -// SWAP1 -// POP -// POP +// /* "":15:16 */ +// pop(0x03) +// /* "":182:183 */ +// 0x07 +// stop +// /* "":21:172 */ +// tag_1: +// swap1 +// pop +// pop +// /* "":158:159 */ +// 0x03 +// swap1 +// /* "":21:172 */ +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/functions_multi_return.yul b/test/libyul/evmCodeTransform/stackReuse/functions_multi_return.yul index 6189e1614..63d597b56 100644 --- a/test/libyul/evmCodeTransform/stackReuse/functions_multi_return.yul +++ b/test/libyul/evmCodeTransform/stackReuse/functions_multi_return.yul @@ -10,51 +10,53 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x14 -// JUMP -// JUMPDEST -// POP -// POP -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// JUMP -// JUMPDEST -// PUSH1 0x0 -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// SWAP2 -// JUMP -// JUMPDEST -// PUSH1 0x1E -// PUSH1 0x2 -// PUSH1 0x1 -// PUSH1 0x3 -// JUMP -// JUMPDEST -// PUSH1 0x28 -// PUSH1 0x4 -// PUSH1 0x3 -// PUSH1 0x3 -// JUMP -// JUMPDEST -// SWAP1 -// POP -// POP -// PUSH1 0x31 -// PUSH1 0xB -// JUMP -// JUMPDEST -// PUSH1 0x37 -// PUSH1 0xB -// JUMP -// JUMPDEST -// SWAP2 -// POP -// SWAP2 -// POP -// POP -// POP -// PUSH1 0x7 -// POP +// tag_1 +// /* "":79:80 */ +// 0x02 +// /* "":76:77 */ +// 0x01 +// /* "":74:81 */ +// tag_2 +// jump // in +// tag_1: +// pop +// tag_3 +// /* "":96:97 */ +// 0x04 +// /* "":93:94 */ +// 0x03 +// /* "":91:98 */ +// tag_2 +// jump // in +// tag_3: +// pop +// tag_4 +// /* "":115:118 */ +// tag_5 +// jump // in +// tag_4: +// pop +// pop +// tag_6 +// /* "":131:134 */ +// tag_5 +// jump // in +// tag_6: +// pop +// pop +// /* "":153:154 */ +// 0x07 +// stop +// /* "":6:31 */ +// tag_2: +// pop +// pop +// 0x00 +// swap1 +// jump // out +// /* "":36:60 */ +// tag_5: +// 0x00 +// 0x00 +// swap2 +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/if.yul b/test/libyul/evmCodeTransform/stackReuse/if.yul index a407bb54c..6a8ec3f4a 100644 --- a/test/libyul/evmCodeTransform/stackReuse/if.yul +++ b/test/libyul/evmCodeTransform/stackReuse/if.yul @@ -3,15 +3,17 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// MLOAD -// DUP1 -// ISZERO -// PUSH1 0xA -// JUMPI -// DUP1 -// POP -// JUMPDEST -// POP -// PUSH1 0x3 -// POP +// /* "":72:73 */ +// 0x00 +// /* "":66:74 */ +// mload +// dup1 +// tag_1 +// jumpi +// tag_2: +// pop +// /* "":104:105 */ +// 0x03 +// stop +// tag_1: +// jump(tag_2) diff --git a/test/libyul/evmCodeTransform/stackReuse/last_use_in_nested_block.yul b/test/libyul/evmCodeTransform/stackReuse/last_use_in_nested_block.yul index 1fc780d21..3d0248c2d 100644 --- a/test/libyul/evmCodeTransform/stackReuse/last_use_in_nested_block.yul +++ b/test/libyul/evmCodeTransform/stackReuse/last_use_in_nested_block.yul @@ -2,9 +2,10 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// DUP1 -// POP -// POP -// PUSH1 0x1 -// POP +// /* "":11:12 */ +// 0x00 +// /* "":15:21 */ +// pop +// /* "":33:34 */ +// 0x01 +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/multi_reuse_same_variable_name.yul b/test/libyul/evmCodeTransform/stackReuse/multi_reuse_same_variable_name.yul index 88d42510c..a799854fa 100644 --- a/test/libyul/evmCodeTransform/stackReuse/multi_reuse_same_variable_name.yul +++ b/test/libyul/evmCodeTransform/stackReuse/multi_reuse_same_variable_name.yul @@ -2,22 +2,17 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// MLOAD -// PUSH1 0x1 -// PUSH1 0x6 -// SWAP1 -// POP -// DUP1 -// SWAP2 -// POP -// POP -// PUSH1 0x2 -// DUP1 -// SWAP2 -// POP -// PUSH1 0x4 -// SWAP1 -// POP -// POP -// POP +// /* "":17:18 */ +// 0x00 +// /* "":11:19 */ +// mload +// pop +// /* "":31:32 */ +// pop(0x01) +// /* "":38:39 */ +// pop(0x06) +// /* "":60:61 */ +// pop(0x02) +// /* "":74:75 */ +// 0x04 +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot.yul b/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot.yul index ba0ad96e7..66d5cc616 100644 --- a/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot.yul +++ b/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot.yul @@ -2,13 +2,12 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x1 -// PUSH1 0x6 -// SWAP1 -// POP -// POP -// PUSH1 0x2 -// PUSH1 0x4 -// SWAP1 -// POP -// POP +// /* "":11:12 */ +// pop(0x01) +// /* "":18:19 */ +// pop(0x06) +// /* "":29:30 */ +// pop(0x02) +// /* "":36:37 */ +// 0x04 +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot_nested.yul b/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot_nested.yul index b064fcc20..9bae57cd2 100644 --- a/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot_nested.yul +++ b/test/libyul/evmCodeTransform/stackReuse/multi_reuse_single_slot_nested.yul @@ -2,13 +2,12 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x1 -// PUSH1 0x6 -// SWAP1 -// POP -// POP -// PUSH1 0x2 -// PUSH1 0x4 -// SWAP1 -// POP -// POP +// /* "":11:12 */ +// pop(0x01) +// /* "":18:19 */ +// pop(0x06) +// /* "":31:32 */ +// pop(0x02) +// /* "":38:39 */ +// 0x04 +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_not_same_scope.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_not_same_scope.yul index fe50cb997..ab5862896 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_not_same_scope.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_not_same_scope.yul @@ -8,10 +8,9 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x5 -// DUP1 -// DUP1 -// DUP2 -// SSTORE -// POP -// POP +// /* "":15:16 */ +// 0x05 +// dup1 +// /* "":126:138 */ +// sstore +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used.yul index 5e4cfd093..76b2c2990 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used.yul @@ -6,11 +6,9 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x5 -// DUP1 -// SWAP1 -// POP -// DUP1 -// DUP2 -// SSTORE -// POP +// /* "":15:16 */ +// 0x05 +// dup1 +// /* "":74:86 */ +// sstore +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used_expr.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used_expr.yul index 89a82f65c..d6d488b06 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used_expr.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_last_used_expr.yul @@ -6,13 +6,13 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x5 -// PUSH1 0x2 -// DUP2 -// ADD -// SWAP1 -// POP -// DUP1 -// DUP2 -// SSTORE -// POP +// /* "":37:38 */ +// 0x02 +// /* "":15:16 */ +// 0x05 +// /* "":30:39 */ +// add +// dup1 +// /* "":82:94 */ +// sstore +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_not_last_used.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_not_last_used.yul index 7c7cdfd55..f62dadf92 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_not_last_used.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_on_decl_assign_to_not_last_used.yul @@ -6,10 +6,9 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x5 -// DUP1 -// DUP2 -// DUP2 -// SSTORE -// POP -// POP +// /* "":15:16 */ +// 0x05 +// dup1 +// /* "":107:119 */ +// sstore +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_slots.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_slots.yul index 44b916670..1fb940eae 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_slots.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_slots.yul @@ -2,22 +2,23 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x0 -// POP -// PUSH1 0x2 -// SWAP2 -// POP -// PUSH1 0x3 -// DUP4 -// DUP4 -// MSTORE -// DUP2 -// DUP2 -// MSTORE -// POP -// POP -// POP -// POP +// /* "":2:16 */ +// 0x00 +// dup1 +// dup1 +// dup1 +// pop +// swap2 +// swap1 +// pop +// /* "":26:27 */ +// 0x02 +// swap1 +// /* "":37:38 */ +// 0x03 +// swap2 +// /* "":39:51 */ +// mstore +// /* "":52:64 */ +// mstore +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function.yul index f5e855a46..1c7b3aba6 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function.yul @@ -5,36 +5,31 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x12 -// JUMP -// JUMPDEST -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// SWAP2 -// SWAP3 -// SWAP4 -// JUMP -// JUMPDEST -// PUSH1 0x18 -// PUSH1 0x3 -// JUMP -// JUMPDEST -// POP -// PUSH1 0x2 -// SWAP2 -// POP -// PUSH1 0x3 -// DUP4 -// DUP4 -// MSTORE -// DUP2 -// DUP2 -// MSTORE -// POP -// POP -// POP -// POP +// tag_1 +// /* "":58:61 */ +// tag_2 +// jump // in +// tag_1: +// pop +// swap2 +// swap1 +// pop +// /* "":72:73 */ +// 0x02 +// swap1 +// /* "":84:85 */ +// 0x03 +// swap2 +// /* "":86:99 */ +// mstore +// /* "":100:113 */ +// mstore +// stop +// /* "":6:35 */ +// tag_2: +// 0x00 +// 0x00 +// 0x00 +// 0x00 +// swap4 +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function_with_gaps.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function_with_gaps.yul index 36800b204..13913cd7a 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function_with_gaps.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_slots_function_with_gaps.yul @@ -9,42 +9,35 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x5 -// PUSH1 0x6 -// PUSH1 0x7 -// DUP2 -// DUP4 -// MSTORE -// PUSH1 0x1B -// JUMP -// JUMPDEST -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x0 -// PUSH1 0x0 -// JUMPDEST -// SWAP1 -// SWAP2 -// SWAP3 -// SWAP4 -// JUMP -// JUMPDEST -// PUSH1 0x21 -// PUSH1 0xC -// JUMP -// JUMPDEST -// SWAP6 -// POP -// SWAP4 -// POP -// POP -// DUP1 -// DUP3 -// MSTORE -// POP -// POP -// DUP2 -// DUP2 -// MSTORE -// POP -// POP +// /* "":106:107 */ +// 0x05 +// /* "":118:119 */ +// 0x06 +// /* "":130:131 */ +// 0x07 +// swap2 +// /* "":136:150 */ +// mstore +// tag_1 +// /* "":207:210 */ +// tag_2 +// jump // in +// tag_1: +// swap4 +// swap1 +// swap3 +// swap2 +// pop +// /* "":211:224 */ +// mstore +// /* "":225:237 */ +// mstore +// stop +// /* "":155:184 */ +// tag_2: +// 0x00 +// 0x00 +// 0x00 +// 0x00 +// swap4 +// jump // out diff --git a/test/libyul/evmCodeTransform/stackReuse/reuse_too_deep_slot.yul b/test/libyul/evmCodeTransform/stackReuse/reuse_too_deep_slot.yul index badcc0969..ea1eab17c 100644 --- a/test/libyul/evmCodeTransform/stackReuse/reuse_too_deep_slot.yul +++ b/test/libyul/evmCodeTransform/stackReuse/reuse_too_deep_slot.yul @@ -33,78 +33,105 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x7 -// PUSH1 0x42 -// DUP16 -// PUSH1 0x0 -// SSTORE -// PUSH1 0x43 -// DUP2 -// PUSH1 0x1 -// MSTORE -// DUP1 -// PUSH1 0x1 -// MSTORE -// POP -// POP -// DUP15 -// PUSH1 0x1 -// SSTORE -// DUP14 -// PUSH1 0x1 -// SSTORE -// DUP13 -// PUSH1 0x1 -// SSTORE -// DUP12 -// PUSH1 0x1 -// SSTORE -// DUP11 -// PUSH1 0x1 -// SSTORE -// DUP10 -// PUSH1 0x1 -// SSTORE -// DUP9 -// PUSH1 0x1 -// SSTORE -// DUP8 -// PUSH1 0x1 -// SSTORE -// DUP7 -// PUSH1 0x1 -// SSTORE -// DUP6 -// PUSH1 0x1 -// SSTORE -// DUP5 -// PUSH1 0x1 -// SSTORE -// DUP4 -// PUSH1 0x1 -// SSTORE -// DUP3 -// PUSH1 0x1 -// SSTORE -// DUP2 -// PUSH1 0x1 -// SSTORE -// DUP1 -// PUSH1 0x1 -// SSTORE -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP -// POP +// /* "":15:16 */ +// 0x07 +// /* "":94:121 */ +// verbatimbytecode_6042 +// swap15 +// /* "":287:288 */ +// 0x00 +// swap15 +// swap2 +// swap15 +// swap14 +// swap3 +// swap14 +// swap13 +// swap4 +// swap13 +// swap12 +// swap5 +// swap12 +// swap11 +// swap6 +// swap11 +// swap10 +// swap7 +// swap10 +// swap9 +// swap8 +// swap9 +// /* "":280:291 */ +// sstore +// /* "":370:396 */ +// verbatimbytecode_6043 +// swap1 +// /* "":521:522 */ +// 0x01 +// /* "":514:527 */ +// mstore +// /* "":539:540 */ +// 0x01 +// /* "":532:545 */ +// mstore +// /* "":653:654 */ +// 0x01 +// /* "":646:659 */ +// sstore +// /* "":671:672 */ +// 0x01 +// /* "":664:677 */ +// sstore +// /* "":689:690 */ +// 0x01 +// /* "":682:695 */ +// sstore +// /* "":707:708 */ +// 0x01 +// /* "":700:713 */ +// sstore +// /* "":725:726 */ +// 0x01 +// /* "":718:731 */ +// sstore +// /* "":743:744 */ +// 0x01 +// /* "":736:749 */ +// sstore +// /* "":761:762 */ +// 0x01 +// /* "":754:767 */ +// sstore +// /* "":779:780 */ +// 0x01 +// /* "":772:785 */ +// sstore +// /* "":797:798 */ +// 0x01 +// /* "":790:803 */ +// sstore +// /* "":815:816 */ +// 0x01 +// /* "":808:822 */ +// sstore +// /* "":834:835 */ +// 0x01 +// /* "":827:841 */ +// sstore +// /* "":853:854 */ +// 0x01 +// /* "":846:860 */ +// sstore +// /* "":872:873 */ +// 0x01 +// /* "":865:879 */ +// sstore +// /* "":891:892 */ +// 0x01 +// /* "":884:898 */ +// sstore +// /* "":910:911 */ +// 0x01 +// /* "":903:917 */ +// sstore +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/single_var.yul b/test/libyul/evmCodeTransform/stackReuse/single_var.yul index 06957305e..2ec816946 100644 --- a/test/libyul/evmCodeTransform/stackReuse/single_var.yul +++ b/test/libyul/evmCodeTransform/stackReuse/single_var.yul @@ -2,5 +2,6 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// POP +// /* "":2:7 */ +// 0x00 +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/single_var_assigned.yul b/test/libyul/evmCodeTransform/stackReuse/single_var_assigned.yul index 6bc5f504f..40a1cadd2 100644 --- a/test/libyul/evmCodeTransform/stackReuse/single_var_assigned.yul +++ b/test/libyul/evmCodeTransform/stackReuse/single_var_assigned.yul @@ -2,5 +2,6 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x1 -// POP +// /* "":11:12 */ +// 0x01 +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code.yul b/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code.yul index 9fdccea85..a5c7f0881 100644 --- a/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code.yul +++ b/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code.yul @@ -2,8 +2,12 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x1 -// POP -// PUSH1 0x4 -// PUSH1 0x3 -// MSTORE +// /* "":11:12 */ +// pop(0x01) +// /* "":23:24 */ +// 0x04 +// /* "":20:21 */ +// 0x03 +// /* "":13:25 */ +// mstore +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code_and_reused.yul b/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code_and_reused.yul index 2d66c74db..20969d57d 100644 --- a/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code_and_reused.yul +++ b/test/libyul/evmCodeTransform/stackReuse/single_var_assigned_plus_code_and_reused.yul @@ -2,11 +2,16 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x1 -// PUSH1 0x4 -// PUSH1 0x3 -// MSTORE -// DUP1 -// MLOAD -// POP -// POP +// /* "":11:12 */ +// 0x01 +// /* "":23:24 */ +// 0x04 +// /* "":20:21 */ +// 0x03 +// /* "":13:25 */ +// mstore +// /* "":30:38 */ +// mload +// /* "":26:39 */ +// pop +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/smoke.yul b/test/libyul/evmCodeTransform/stackReuse/smoke.yul index 0a212e9ca..135ffcaec 100644 --- a/test/libyul/evmCodeTransform/stackReuse/smoke.yul +++ b/test/libyul/evmCodeTransform/stackReuse/smoke.yul @@ -2,3 +2,4 @@ // ==== // stackOptimization: true // ---- +// stop diff --git a/test/libyul/evmCodeTransform/stackReuse/switch.yul b/test/libyul/evmCodeTransform/stackReuse/switch.yul index 480343dcc..ae23d9f35 100644 --- a/test/libyul/evmCodeTransform/stackReuse/switch.yul +++ b/test/libyul/evmCodeTransform/stackReuse/switch.yul @@ -2,25 +2,23 @@ // ==== // stackOptimization: true // ---- -// PUSH1 0x0 -// DUP1 -// PUSH1 0x0 -// DUP2 -// EQ -// PUSH1 0x11 -// JUMPI -// PUSH1 0x3 -// SWAP2 -// POP -// PUSH1 0x18 -// JUMP -// JUMPDEST -// PUSH1 0x2 -// POP -// PUSH1 0x3 -// POP -// JUMPDEST -// POP -// POP -// PUSH1 0x9 -// POP +// /* "":11:12 */ +// 0x00 +// /* "":27:28 */ +// 0x00 +// eq +// tag_1 +// jumpi +// tag_2: +// /* "":70:71 */ +// pop(0x03) +// tag_3: +// /* "":83:84 */ +// 0x09 +// stop +// tag_1: +// /* "":40:41 */ +// pop(0x02) +// /* "":51:52 */ +// pop(0x03) +// jump(tag_3) diff --git a/test/libyul/evmCodeTransform/stub.yul b/test/libyul/evmCodeTransform/stub.yul new file mode 100644 index 000000000..7dc7e45b9 --- /dev/null +++ b/test/libyul/evmCodeTransform/stub.yul @@ -0,0 +1,75 @@ +{ + fun_c() + function fun_c() + { + switch iszero(calldataload(0)) + case 0 { } + default { + if calldataload(1) + { + leave + } + if calldataload(2) + { + revert(0, 0) + } + } + revert(0, 0) + } +} +// ==== +// stackOptimization: true +// ---- +// tag_1 +// /* "":14:21 */ +// tag_2 +// jump // in +// tag_1: +// stop +// /* "":34:458 */ +// tag_2: +// /* "":108:109 */ +// 0x00 +// /* "":95:110 */ +// calldataload +// /* "":88:111 */ +// iszero +// /* "":133:134 */ +// 0x00 +// eq +// tag_3 +// jumpi +// tag_4: +// /* "":201:202 */ +// 0x01 +// /* "":188:203 */ +// calldataload +// tag_5 +// jumpi +// tag_6: +// pop +// /* "":314:315 */ +// 0x02 +// /* "":301:316 */ +// calldataload +// tag_7 +// jumpi +// tag_8: +// tag_9: +// /* "":442:443 */ +// 0x00 +// dup1 +// /* "":432:444 */ +// revert +// tag_7: +// /* "":373:374 */ +// 0x00 +// dup1 +// /* "":363:375 */ +// revert +// tag_5: +// /* "":34:458 */ +// jump // out +// tag_3: +// pop +// jump(tag_9)