From 9450c7a615712010067f494cc57d0ceb48f021f4 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 25 Oct 2024 16:04:21 +0800 Subject: [PATCH 01/20] fix: raise an error when attempting to modify immutable arrays such as `algopy.arc4.Address` BREAKING CHANGE: modifying an `algopy.arc4.Address` will now raise an error --- examples/sizes.txt | 4 +- src/puya/awst/validation/immutable.py | 49 +++++++++++++++++++ src/puya/awst/validation/main.py | 2 + src/puyapy/awst_build/eb/_base.py | 9 +--- src/puyapy/awst_build/eb/arc4/string.py | 15 +++--- test_cases/arc4_types/address.py | 5 +- .../out/Arc4AddressContract.approval.mir | 38 +++++--------- .../out/Arc4AddressContract.approval.teal | 15 +----- .../out/Arc4AddressContract.clear.mir | 2 +- .../out/Arc4AddressContract.clear.teal | 2 +- .../out/Arc4AddressContract.destructured.ir | 5 +- .../arc4_types/out/Arc4AddressContract.ssa.ir | 8 ++- .../out/Arc4AddressContract.ssa.opt_pass_1.ir | 5 +- .../out/Arc4AddressContract.ssa.opt_pass_2.ir | 5 +- .../out/Arc4AddressContract.ssa.opt_pass_3.ir | 5 +- test_cases/arc4_types/out/module.awst | 12 ++--- .../out_O2/Arc4AddressContract.approval.teal | 7 --- .../Arc4AddressContract.destructured.ir | 5 +- .../Arc4AddressContract.approval.teal | 15 ++---- .../Arc4AddressContract.clear.teal | 2 +- .../Arc4AddressContract.destructured.ir | 6 +-- test_cases/arc4_types/puya.log | 15 ++---- tests/test_expected_output/arc4.test | 12 +++++ 23 files changed, 121 insertions(+), 122 deletions(-) create mode 100644 src/puya/awst/validation/immutable.py diff --git a/examples/sizes.txt b/examples/sizes.txt index 2fcbd621de..ed96652bee 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -6,7 +6,7 @@ application/Reference 177 167 - | 92 83 - arc4_dynamic_arrays/DynamicArray 2695 1931 - | 1733 1138 - arc4_numeric_comparisons/UIntNOrdering 1100 908 - | 786 597 - - arc4_types/Arc4Address 85 62 - | 37 18 - + arc4_types/Arc4Address 79 18 - | 34 11 - arc4_types/Arc4Arrays 623 376 - | 368 182 - arc4_types/Arc4BoolEval 751 14 - | 167 8 - arc4_types/Arc4BoolType 381 69 - | 307 46 - @@ -130,4 +130,4 @@ unssa/UnSSA 432 368 - | 241 204 - voting/VotingRoundApp 1593 1483 - | 734 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 69200 53576 53517 | 32843 21764 21720 \ No newline at end of file + Total 69194 53532 53473 | 32840 21757 21713 \ No newline at end of file diff --git a/src/puya/awst/validation/immutable.py b/src/puya/awst/validation/immutable.py new file mode 100644 index 0000000000..7da20ad4ea --- /dev/null +++ b/src/puya/awst/validation/immutable.py @@ -0,0 +1,49 @@ +from puya import log +from puya.awst import nodes as awst_nodes +from puya.awst.awst_traverser import AWSTTraverser + +logger = log.get_logger(__name__) + + +class ImmutableValidator(AWSTTraverser): + @classmethod + def validate(cls, module: awst_nodes.AWST) -> None: + validator = cls() + for module_statement in module: + module_statement.accept(validator) + + def visit_assignment_expression(self, expr: awst_nodes.AssignmentExpression) -> None: + super().visit_assignment_expression(expr) + _validate_lvalue(expr.target) + + def visit_assignment_statement(self, statement: awst_nodes.AssignmentStatement) -> None: + super().visit_assignment_statement(statement) + _validate_lvalue(statement.target) + + def visit_array_pop(self, expr: awst_nodes.ArrayPop) -> None: + super().visit_array_pop(expr) + if expr.base.wtype.immutable: + logger.error( + "cannot modify - object is immutable", + location=expr.source_location, + ) + + def visit_array_extend(self, expr: awst_nodes.ArrayExtend) -> None: + super().visit_array_extend(expr) + if expr.base.wtype.immutable: + logger.error( + "cannot modify - object is immutable", + location=expr.source_location, + ) + + +def _validate_lvalue(lvalue: awst_nodes.Expression) -> None: + if isinstance(lvalue, awst_nodes.FieldExpression | awst_nodes.IndexExpression): + if lvalue.base.wtype.immutable: + logger.error( + "expression is not valid as an assignment target - object is immutable", + location=lvalue.source_location, + ) + elif isinstance(lvalue, awst_nodes.TupleExpression): + for item in lvalue.items: + _validate_lvalue(item) diff --git a/src/puya/awst/validation/main.py b/src/puya/awst/validation/main.py index 98df0bedcb..2307e00541 100644 --- a/src/puya/awst/validation/main.py +++ b/src/puya/awst/validation/main.py @@ -1,6 +1,7 @@ from puya.awst import nodes as awst_nodes from puya.awst.validation.arc4_copy import ARC4CopyValidator from puya.awst.validation.base_invoker import BaseInvokerValidator +from puya.awst.validation.immutable import ImmutableValidator from puya.awst.validation.inner_transactions import ( InnerTransactionsValidator, InnerTransactionUsedInALoopValidator, @@ -20,3 +21,4 @@ def validate_awst(module: awst_nodes.AWST) -> None: BaseInvokerValidator.validate(module) StorageTypesValidator.validate(module) LabelsValidator.validate(module) + ImmutableValidator.validate(module) diff --git a/src/puyapy/awst_build/eb/_base.py b/src/puyapy/awst_build/eb/_base.py index b8fed50ba6..102747432f 100644 --- a/src/puyapy/awst_build/eb/_base.py +++ b/src/puyapy/awst_build/eb/_base.py @@ -7,7 +7,6 @@ BinaryBooleanOperator, CompileTimeConstantExpression, Expression, - FieldExpression, Lvalue, SingleEvaluation, Statement, @@ -220,13 +219,7 @@ def _validate_lvalue(typ: pytypes.PyType, resolved: Expression) -> Lvalue: raise CodeError( "expression is not valid as an assignment target", resolved.source_location ) - if isinstance(resolved, FieldExpression): - if resolved.base.wtype.immutable: - raise CodeError( - "expression is not valid as an assignment target - object is immutable", - resolved.source_location, - ) - elif isinstance(resolved, TupleExpression): + if isinstance(resolved, TupleExpression): assert isinstance(typ, pytypes.TupleLikeType) for item_typ, item in zip(typ.items, resolved.items, strict=True): _validate_lvalue(item_typ, item) diff --git a/src/puyapy/awst_build/eb/arc4/string.py b/src/puyapy/awst_build/eb/arc4/string.py index cc4af3f4b6..53cec51ab0 100644 --- a/src/puyapy/awst_build/eb/arc4/string.py +++ b/src/puyapy/awst_build/eb/arc4/string.py @@ -8,9 +8,8 @@ ARC4Decode, ARC4Encode, ArrayConcat, - ArrayExtend, + AssignmentStatement, Expression, - ExpressionStatement, Statement, StringConstant, ) @@ -104,13 +103,15 @@ def augmented_assignment( else: value = expect.argument_of_type_else_dummy(rhs, self.pytype).resolve() - return ExpressionStatement( - ArrayExtend( - base=self.resolve(), - other=value, + return AssignmentStatement( + target=self.resolve_lvalue(), + value=ArrayConcat( + left=self.resolve(), + right=value, wtype=wtypes.arc4_string_alias, source_location=location, - ) + ), + source_location=location, ) @typing.override diff --git a/test_cases/arc4_types/address.py b/test_cases/arc4_types/address.py index 21e7ed7f3d..5d2091b22e 100644 --- a/test_cases/arc4_types/address.py +++ b/test_cases/arc4_types/address.py @@ -16,8 +16,9 @@ def approval_program(self) -> bool: some_address = arc4.Address(SOME_ADDRESS) assert some_address == SOME_ADDRESS - some_address[0] = arc4.Byte(123) - assert some_address != SOME_ADDRESS + address_copy = some_address + + assert some_address == address_copy return True def clear_state_program(self) -> bool: diff --git a/test_cases/arc4_types/out/Arc4AddressContract.approval.mir b/test_cases/arc4_types/out/Arc4AddressContract.approval.mir index 0f3746d3b6..f933628406 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.approval.mir +++ b/test_cases/arc4_types/out/Arc4AddressContract.approval.mir @@ -1,38 +1,26 @@ -// Op Stack (out) +// Op Stack (out) // test_cases.arc4_types.address.Arc4AddressContract.approval_program() -> uint64: main_block@0: // arc4_types/address.py:8 // address = arc4.Address(Txn.sender) - txn Sender address#0 + txn Sender address#0 // arc4_types/address.py:9 // assert address == Txn.sender - txn Sender address#0,tmp%0#0 - l-load-copy address#0 1 address#0,tmp%0#0,address#0 (copy) - l-load tmp%0#0 1 address#0,address#0 (copy),tmp%0#0 - == address#0,tmp%1#0 - assert address#0 + txn Sender address#0,tmp%0#0 + l-load-copy address#0 1 address#0,tmp%0#0,address#0 (copy) + l-load tmp%0#0 1 address#0,address#0 (copy),tmp%0#0 + == address#0,tmp%1#0 + assert address#0 // arc4_types/address.py:11 // assert address.native == Txn.sender - txn Sender address#0,tmp%3#0 - l-load address#0 1 tmp%3#0,address#0 - l-load tmp%3#0 1 address#0,tmp%3#0 - == tmp%4#0 + txn Sender address#0,tmp%3#0 + l-load address#0 1 tmp%3#0,address#0 + l-load tmp%3#0 1 address#0,tmp%3#0 + == tmp%4#0 assert - // arc4_types/address.py:16 - // some_address = arc4.Address(SOME_ADDRESS) - addr "VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA" Address(VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) - // arc4_types/address.py:19 - // some_address[0] = arc4.Byte(123) - byte 0x7b Address(VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA),0x7b - replace2 0 some_address#1 - // arc4_types/address.py:20 - // assert some_address != SOME_ADDRESS - addr "VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA" some_address#1,Address(VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) - != tmp%10#0 - assert - // arc4_types/address.py:21 + // arc4_types/address.py:22 // return True - int 1 1 + int 1 1 return diff --git a/test_cases/arc4_types/out/Arc4AddressContract.approval.teal b/test_cases/arc4_types/out/Arc4AddressContract.approval.teal index 959e802b42..451ea1b8d4 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4AddressContract.approval.teal @@ -1,7 +1,6 @@ #pragma version 10 test_cases.arc4_types.address.Arc4AddressContract.approval_program: - bytecblock base32(VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJPQ) // arc4_types/address.py:8 // address = arc4.Address(Txn.sender) txn Sender @@ -15,19 +14,7 @@ test_cases.arc4_types.address.Arc4AddressContract.approval_program: txn Sender == assert - // arc4_types/address.py:16 - // some_address = arc4.Address(SOME_ADDRESS) - bytec_0 // addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA - // arc4_types/address.py:19 - // some_address[0] = arc4.Byte(123) - pushbytes 0x7b - replace2 0 - // arc4_types/address.py:20 - // assert some_address != SOME_ADDRESS - bytec_0 // addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA - != - assert - // arc4_types/address.py:21 + // arc4_types/address.py:22 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out/Arc4AddressContract.clear.mir b/test_cases/arc4_types/out/Arc4AddressContract.clear.mir index a617e4767c..00b34a80c0 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.clear.mir +++ b/test_cases/arc4_types/out/Arc4AddressContract.clear.mir @@ -1,7 +1,7 @@ // Op Stack (out) // test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> uint64: main_block@0: - // arc4_types/address.py:24 + // arc4_types/address.py:25 // return True int 1 1 return diff --git a/test_cases/arc4_types/out/Arc4AddressContract.clear.teal b/test_cases/arc4_types/out/Arc4AddressContract.clear.teal index 44682ccdec..bceb68f932 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.clear.teal +++ b/test_cases/arc4_types/out/Arc4AddressContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.address.Arc4AddressContract.clear_state_program: - // arc4_types/address.py:24 + // arc4_types/address.py:25 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out/Arc4AddressContract.destructured.ir b/test_cases/arc4_types/out/Arc4AddressContract.destructured.ir index 69f5037197..449a01096d 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.destructured.ir +++ b/test_cases/arc4_types/out/Arc4AddressContract.destructured.ir @@ -9,12 +9,9 @@ contract test_cases.arc4_types.address.Arc4AddressContract: let tmp%3#0: bytes = (txn Sender) let tmp%4#0: bool = (== address#0 tmp%3#0) (assert tmp%4#0) - let some_address#1: bytes = ((replace2 0) addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0x7b) - let tmp%10#0: bool = (!= some_address#1 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) - (assert tmp%10#0) return 1u program clear-state: subroutine test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> bool: - block@0: // L23 + block@0: // L24 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4AddressContract.ssa.ir b/test_cases/arc4_types/out/Arc4AddressContract.ssa.ir index 6cfafe18dd..8ad95b7e51 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.ssa.ir +++ b/test_cases/arc4_types/out/Arc4AddressContract.ssa.ir @@ -22,14 +22,12 @@ contract test_cases.arc4_types.address.Arc4AddressContract: let some_address#0: bytes = addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA let tmp%9#0: bool = (== some_address#0 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) (assert tmp%9#0) - let assigned_value%0#0: bytes = 0x7b - let updated_target%0#0: bytes = (replace3 some_address#0 0u assigned_value%0#0) - let some_address#1: bytes = updated_target%0#0 - let tmp%10#0: bool = (!= some_address#1 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) + let address_copy#0: bytes = some_address#0 + let tmp%10#0: bool = (== some_address#0 address_copy#0) (assert tmp%10#0) return 1u program clear-state: subroutine test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> bool: - block@0: // L23 + block@0: // L24 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_1.ir b/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_1.ir index de8bb9806e..379a195d88 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_1.ir +++ b/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_1.ir @@ -18,12 +18,11 @@ contract test_cases.arc4_types.address.Arc4AddressContract: (assert tmp%8#0) let tmp%9#0: bool = 1u (assert tmp%9#0) - let some_address#1: bytes = ((replace2 0) addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0x7b) - let tmp%10#0: bool = (!= some_address#1 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) + let tmp%10#0: bool = 1u (assert tmp%10#0) return 1u program clear-state: subroutine test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> bool: - block@0: // L23 + block@0: // L24 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_2.ir b/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_2.ir index 64b03c8f30..3ca51517de 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_2.ir +++ b/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_2.ir @@ -11,12 +11,9 @@ contract test_cases.arc4_types.address.Arc4AddressContract: (assert tmp%4#0) let tmp%6#0: bool = 1u (assert tmp%6#0) // Address length is 32 bytes - let some_address#1: bytes = ((replace2 0) addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0x7b) - let tmp%10#0: bool = (!= some_address#1 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) - (assert tmp%10#0) return 1u program clear-state: subroutine test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> bool: - block@0: // L23 + block@0: // L24 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_3.ir b/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_3.ir index 69f5037197..449a01096d 100644 --- a/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_3.ir +++ b/test_cases/arc4_types/out/Arc4AddressContract.ssa.opt_pass_3.ir @@ -9,12 +9,9 @@ contract test_cases.arc4_types.address.Arc4AddressContract: let tmp%3#0: bytes = (txn Sender) let tmp%4#0: bool = (== address#0 tmp%3#0) (assert tmp%4#0) - let some_address#1: bytes = ((replace2 0) addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0x7b) - let tmp%10#0: bool = (!= some_address#1 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) - (assert tmp%10#0) return 1u program clear-state: subroutine test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> bool: - block@0: // L23 + block@0: // L24 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/module.awst b/test_cases/arc4_types/out/module.awst index d55add56f1..96f7210bb2 100644 --- a/test_cases/arc4_types/out/module.awst +++ b/test_cases/arc4_types/out/module.awst @@ -107,12 +107,12 @@ contract Arc4StringTypesContract world: arc4.dynamic_array = arc4_encode('World!', arc4.dynamic_array) assert(arc4_encode('Hello World!', arc4.dynamic_array) == hello + space + world) thing: arc4.dynamic_array = arc4_encode('hi', arc4.dynamic_array) - thing.extend(thing) + thing: arc4.dynamic_array = thing + thing assert(thing == arc4_encode('hihi', arc4.dynamic_array)) value: arc4.dynamic_array = arc4_encode('a', arc4.dynamic_array) + arc4_encode('b', arc4.dynamic_array) + arc4_encode('cd', arc4.dynamic_array) - value.extend(arc4_encode('e', arc4.dynamic_array)) - value.extend(arc4_encode('f', arc4.dynamic_array)) - value.extend(arc4_encode('g', arc4.dynamic_array)) + value: arc4.dynamic_array = value + arc4_encode('e', arc4.dynamic_array) + value: arc4.dynamic_array = value + arc4_encode('f', arc4.dynamic_array) + value: arc4.dynamic_array = value + arc4_encode('g', arc4.dynamic_array) assert(arc4_encode('abcdefg', arc4.dynamic_array) == value) assert(arc4_decode(arc4_encode('', arc4.dynamic_array), string) == '') assert(arc4_decode(arc4_encode('hello', arc4.dynamic_array), string) == 'hello') @@ -667,8 +667,8 @@ contract Arc4AddressContract assert(reinterpret_cast(zero_address) == reinterpret_cast(global())) some_address: arc4.static_array = Address("VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA") assert(some_address == Address("VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA")) - some_address[0u]: arc4.uint8 = 123_arc4u8 - assert(some_address != Address("VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA")) + address_copy: arc4.static_array = some_address + assert(some_address == address_copy) return true } diff --git a/test_cases/arc4_types/out_O2/Arc4AddressContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4AddressContract.approval.teal index e360de973d..b73ae54d6e 100644 --- a/test_cases/arc4_types/out_O2/Arc4AddressContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4AddressContract.approval.teal @@ -1,7 +1,6 @@ #pragma version 10 test_cases.arc4_types.address.Arc4AddressContract.approval_program: - bytecblock base32(VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJPQ) txn Sender dupn 2 == @@ -9,11 +8,5 @@ test_cases.arc4_types.address.Arc4AddressContract.approval_program: txn Sender == assert - bytec_0 // addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA - pushbytes 0x7b - replace2 0 - bytec_0 // addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA - != - assert pushint 1 // 1 return diff --git a/test_cases/arc4_types/out_O2/Arc4AddressContract.destructured.ir b/test_cases/arc4_types/out_O2/Arc4AddressContract.destructured.ir index 69f5037197..449a01096d 100644 --- a/test_cases/arc4_types/out_O2/Arc4AddressContract.destructured.ir +++ b/test_cases/arc4_types/out_O2/Arc4AddressContract.destructured.ir @@ -9,12 +9,9 @@ contract test_cases.arc4_types.address.Arc4AddressContract: let tmp%3#0: bytes = (txn Sender) let tmp%4#0: bool = (== address#0 tmp%3#0) (assert tmp%4#0) - let some_address#1: bytes = ((replace2 0) addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0x7b) - let tmp%10#0: bool = (!= some_address#1 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) - (assert tmp%10#0) return 1u program clear-state: subroutine test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> bool: - block@0: // L23 + block@0: // L24 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.approval.teal b/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.approval.teal index e8aa79bb57..fbfaa2cc70 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.approval.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.approval.teal @@ -46,17 +46,12 @@ test_cases.arc4_types.address.Arc4AddressContract.approval_program: // arc4_types/address.py:16 // some_address = arc4.Address(SOME_ADDRESS) bytec_0 // addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA - // arc4_types/address.py:19 - // some_address[0] = arc4.Byte(123) - pushint 0 // 0 - pushbytes 0x7b - replace3 - // arc4_types/address.py:20 - // assert some_address != SOME_ADDRESS - bytec_0 // addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA - != - assert + dup // arc4_types/address.py:21 + // assert some_address == address_copy + == + assert + // arc4_types/address.py:22 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.clear.teal b/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.clear.teal index 44682ccdec..bceb68f932 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.clear.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.address.Arc4AddressContract.clear_state_program: - // arc4_types/address.py:24 + // arc4_types/address.py:25 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.destructured.ir b/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.destructured.ir index 3cb5fe1ef4..71d579d225 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.destructured.ir +++ b/test_cases/arc4_types/out_unoptimized/Arc4AddressContract.destructured.ir @@ -21,13 +21,11 @@ contract test_cases.arc4_types.address.Arc4AddressContract: (assert tmp%8#0) let tmp%9#0: bool = (== addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) (assert tmp%9#0) - let updated_target%0#0: bytes = (replace3 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0u 0x7b) - let some_address#1: bytes = updated_target%0#0 - let tmp%10#0: bool = (!= some_address#1 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) + let tmp%10#0: bool = (== addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) (assert tmp%10#0) return 1u program clear-state: subroutine test_cases.arc4_types.address.Arc4AddressContract.clear_state_program() -> bool: - block@0: // L23 + block@0: // L24 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/puya.log b/test_cases/arc4_types/puya.log index 3f8265139b..17157a5a81 100644 --- a/test_cases/arc4_types/puya.log +++ b/test_cases/arc4_types/puya.log @@ -982,8 +982,8 @@ debug: Sealing block@3: // after_if_else_L6 debug: Terminated block@3: // after_if_else_L6 debug: Sealing block@0: // L7 debug: Terminated block@0: // L7 -debug: Sealing block@0: // L23 -debug: Terminated block@0: // L23 +debug: Sealing block@0: // L24 +debug: Terminated block@0: // L24 debug: Sealing block@0: // L6 debug: Terminated block@0: // L6 debug: Sealing block@1: // abi_routing_L6 @@ -18665,19 +18665,17 @@ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Found equivalence set: awst_tmp%0#0, zero_address#0 debug: Replacing {awst_tmp%0#0} with zero_address#0 made 2 modifications -debug: Found equivalence set: updated_target%0#0, some_address#1 -debug: Replacing {updated_target%0#0} with some_address#1 made 1 modifications debug: Optimizer: Intrinsic Simplifier debug: Simplified (== 32u 32u) to 1u debug: Simplified (len zero_address#0) to 32u debug: Simplified (== zero_address#0 tmp%7#0) to 1u debug: Simplified (== addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) to 1u -debug: Simplified (replace3 addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0u 0x7b) to ((replace2 0) addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA 0x7b) +debug: Simplified (== addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA addr VCMJKWOY5P5P7SKMZFFOCEROPJCZOTIJMNIYNUCKH7LRO45JMJP6UYBIJA) to 1u debug: Optimizer: Remove Unused Variables debug: Removing unused variable zero_address#0 debug: Removing unused variable tmp%7#0 debug: Removing unused variable some_address#0 -debug: Removing unused variable assigned_value%0#0 +debug: Removing unused variable address_copy#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -18712,6 +18710,7 @@ debug: Removing unused variable tmp%2#0 debug: Removing unused variable tmp%5#0 debug: Removing unused variable tmp%8#0 debug: Removing unused variable tmp%9#0 +debug: Removing unused variable tmp%10#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -18805,10 +18804,6 @@ debug: Inserted main_block@0.ops[7]: 'l-store-copy tmp%1#0 0' debug: Replaced main_block@0.ops[9]: 'v-load tmp%1#0' with 'l-load tmp%1#0' debug: Inserted main_block@0.ops[16]: 'l-store-copy tmp%4#0 0' debug: Replaced main_block@0.ops[18]: 'v-load tmp%4#0' with 'l-load tmp%4#0' -debug: Inserted main_block@0.ops[23]: 'l-store-copy some_address#1 0' -debug: Replaced main_block@0.ops[25]: 'v-load some_address#1' with 'l-load some_address#1' -debug: Inserted main_block@0.ops[28]: 'l-store-copy tmp%10#0 0' -debug: Replaced main_block@0.ops[30]: 'v-load tmp%10#0' with 'l-load tmp%10#0' debug: Inserted main_block@0.ops[3]: 'l-store-copy tmp%0#0 0' debug: Replaced main_block@0.ops[6]: 'v-load tmp%0#0' with 'l-load tmp%0#0' debug: Inserted main_block@0.ops[13]: 'l-store-copy tmp%3#0 0' diff --git a/tests/test_expected_output/arc4.test b/tests/test_expected_output/arc4.test index 3ef33845b1..6b1855548f 100644 --- a/tests/test_expected_output/arc4.test +++ b/tests/test_expected_output/arc4.test @@ -541,3 +541,15 @@ def constant_bool() -> None: assert MyStruct(x=arc4.UInt512(0)) ## E: expression is always True assert arc4.Tuple((arc4.Bool(False),)) ## E: expression is always True + +## case: test_address_immutable +from algopy import * + +class MyTest(ARC4Contract): + @arc4.abimethod + def test(self) -> None: + some_address = arc4.Address() + + this_is_ok = some_address[0] + assert this_is_ok == 0 + some_address[0] = arc4.Byte(123) ## E: expression is not valid as an assignment target - object is immutable From 0491d0bc9f2be7bf8f2ba5cf54cfc600abe698e6 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Mon, 28 Oct 2024 16:43:10 +0800 Subject: [PATCH 02/20] fix: correctly determine if an `algopy.arc4.Struct` sub-class is immutable or not based on `frozen` class parameter and immutability of fields --- examples/sizes.txt | 4 +- src/puya/awst/wtypes.py | 12 +- src/puyapy/awst_build/pytypes.py | 2 +- .../out/Arc4StructsTypeContract.approval.mir | 52 +- .../out/Arc4StructsTypeContract.approval.teal | 52 +- .../out/Arc4StructsTypeContract.clear.mir | 2 +- .../out/Arc4StructsTypeContract.clear.teal | 2 +- .../Arc4StructsTypeContract.destructured.ir | 18 +- .../out/Arc4StructsTypeContract.ssa.ir | 60 +- .../Arc4StructsTypeContract.ssa.opt_pass_1.ir | 47 +- ...Arc4StructsTypeContract.ssa.opt_pass_10.ir | 86 +++ ...Arc4StructsTypeContract.ssa.opt_pass_11.ir | 85 +++ ...Arc4StructsTypeContract.ssa.opt_pass_12.ir | 84 +++ ...Arc4StructsTypeContract.ssa.opt_pass_13.ir | 82 +++ .../Arc4StructsTypeContract.ssa.opt_pass_2.ir | 33 +- .../Arc4StructsTypeContract.ssa.opt_pass_3.ir | 32 +- .../Arc4StructsTypeContract.ssa.opt_pass_4.ir | 31 +- .../Arc4StructsTypeContract.ssa.opt_pass_5.ir | 29 +- .../Arc4StructsTypeContract.ssa.opt_pass_6.ir | 27 +- .../Arc4StructsTypeContract.ssa.opt_pass_7.ir | 26 +- .../Arc4StructsTypeContract.ssa.opt_pass_8.ir | 89 +++ .../Arc4StructsTypeContract.ssa.opt_pass_9.ir | 87 +++ test_cases/arc4_types/out/module.awst | 7 + test_cases/arc4_types/out/structs.O0.log | 307 +++++---- .../Arc4StructsTypeContract.destructured.ir | 18 +- .../Arc4StructsTypeContract.approval.teal | 153 +++-- .../Arc4StructsTypeContract.clear.teal | 2 +- .../Arc4StructsTypeContract.destructured.ir | 54 +- test_cases/arc4_types/puya.log | 650 ++++++++++++++++-- test_cases/arc4_types/structs.py | 18 + tests/test_expected_output/arc4.test | 36 + 31 files changed, 1807 insertions(+), 380 deletions(-) create mode 100644 test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_10.ir create mode 100644 test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_11.ir create mode 100644 test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_12.ir create mode 100644 test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_13.ir create mode 100644 test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_8.ir create mode 100644 test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_9.ir diff --git a/examples/sizes.txt b/examples/sizes.txt index ed96652bee..5215481cfb 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -18,7 +18,7 @@ arc4_types/Arc4RefTypes 85 46 - | 32 27 - arc4_types/Arc4StringTypes 455 35 - | 245 13 - arc4_types/Arc4StructsFromAnotherModule 67 12 - | 49 6 - - arc4_types/Arc4StructsType 302 239 - | 204 121 - + arc4_types/Arc4StructsType 391 239 - | 259 121 - arc4_types/Arc4TuplesType 795 136 - | 537 58 - arc_28/EventEmitter 186 133 - | 100 64 - asset/Reference 268 261 - | 144 141 - @@ -130,4 +130,4 @@ unssa/UnSSA 432 368 - | 241 204 - voting/VotingRoundApp 1593 1483 - | 734 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 69194 53532 53473 | 32840 21757 21713 \ No newline at end of file + Total 69283 53532 53473 | 32895 21757 21713 \ No newline at end of file diff --git a/src/puya/awst/wtypes.py b/src/puya/awst/wtypes.py index 55934edf93..850dfe305d 100644 --- a/src/puya/awst/wtypes.py +++ b/src/puya/awst/wtypes.py @@ -162,9 +162,16 @@ def from_type(cls, transaction_type: TransactionType | None) -> "WInnerTransacti @attrs.frozen class WStructType(WType): fields: immutabledict[str, WType] = attrs.field(converter=immutabledict) + frozen: bool + immutable: bool = attrs.field(init=False) scalar_type: None = attrs.field(default=None, init=False) source_location: SourceLocation | None = attrs.field(eq=False) + @immutable.default + def _immutable(self) -> bool: + # TODO: determine correct behaviour when implementing native structs + raise NotImplementedError + @fields.validator def _fields_validator(self, _: object, fields: immutabledict[str, WType]) -> None: if not fields: @@ -450,14 +457,15 @@ def _require_arc4_fields(fields: Mapping[str, WType]) -> immutabledict[str, ARC4 @attrs.frozen(kw_only=True) class ARC4Struct(ARC4Type): fields: immutabledict[str, ARC4Type] = attrs.field(converter=_require_arc4_fields) - immutable: bool = attrs.field() + frozen: bool + immutable: bool = attrs.field(init=False) source_location: SourceLocation | None = attrs.field(default=None, eq=False) arc4_name: str = attrs.field(init=False, eq=False) native_type: None = attrs.field(default=None, init=False) @immutable.default def _immutable(self) -> bool: - return all(typ.immutable for typ in self.fields.values()) + return self.frozen and all(typ.immutable for typ in self.fields.values()) @arc4_name.default def _arc4_name(self) -> str: diff --git a/src/puyapy/awst_build/pytypes.py b/src/puyapy/awst_build/pytypes.py index 08f54901fc..2c4cc7f010 100644 --- a/src/puyapy/awst_build/pytypes.py +++ b/src/puyapy/awst_build/pytypes.py @@ -428,7 +428,7 @@ def __init__( else: raise InternalError(f"Unknown struct base type: {base}", source_location) wtype = wtype_cls( - fields=field_wtypes, name=name, immutable=frozen, source_location=source_location + fields=field_wtypes, name=name, frozen=frozen, source_location=source_location ) self.__attrs_init__( bases=[base], diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.mir b/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.mir index e3d06003ae..d0c1895019 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.mir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.mir @@ -1,19 +1,19 @@ // Op Stack (out) // test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> uint64: main_block@0: - // arc4_types/structs.py:27 + // arc4_types/structs.py:36 // coord_1 = Vector(x=Decimal("35.382882839"), y=Decimal("150.382884930")) byte 0x000000083cfbf217000000230384b842 0x000000083cfbf217000000230384b842 - // arc4_types/structs.py:28 + // arc4_types/structs.py:37 // coord_2 = Vector(y=Decimal("150.382884930"), x=Decimal("35.382882839")) byte 0x000000083cfbf217000000230384b842 0x000000083cfbf217000000230384b842,0x000000083cfbf217000000230384b842 - // arc4_types/structs.py:29 + // arc4_types/structs.py:38 // coord_3 = add(coord_1.copy(), coord_2.copy()) callsub add coord_3#0,add%1#0,add%2#0 pop 1 coord_3#0,add%1#0 pop 1 coord_3#0 l-store coord_3#0 0 coord_3#0 - // arc4_types/structs.py:30 + // arc4_types/structs.py:39 // for val in (coord_3.x, coord_3.y): l-load-copy coord_3#0 0 coord_3#0,coord_3#0 (copy) extract 0 8 // on error: Index access is out of bounds coord_3#0,val#0 @@ -26,11 +26,11 @@ main_block@0: // Implicit fall through to main_for_body@1 (𝕗) val#2,loop_counter%0#0 | (𝕏) val#0 | main_for_body@1: (𝕗) val#2,loop_counter%0#0 | (𝕏) val#0 | - // arc4_types/structs.py:31 + // arc4_types/structs.py:40 // log(val.bytes) x-load val#0 (𝕗) val#2,loop_counter%0#0 | val#0 log (𝕗) val#2,loop_counter%0#0 | - // arc4_types/structs.py:30 + // arc4_types/structs.py:39 // for val in (coord_3.x, coord_3.y): f-load loop_counter%0#0 (𝕗) val#2,loop_counter%0#0 | loop_counter%0#0 bnz main_after_for@4 (𝕗) val#2,loop_counter%0#0 | @@ -44,25 +44,25 @@ main_for_header_1@3: b main_for_body@1 (𝕗) val#2,loop_counter%0#0 | (𝕏) val#0 | main_after_for@4: (𝕗) val#2,loop_counter%0#0 | - // arc4_types/structs.py:33 + // arc4_types/structs.py:42 // flags = Flags(a=arc4.Bool(True), b=arc4.Bool(False), c=arc4.Bool(True), d=arc4.Bool(False)) byte 0xa0 (𝕗) val#2,loop_counter%0#0 | 0xa0 - // arc4_types/structs.py:34 + // arc4_types/structs.py:43 // check(flags.copy()) callsub check (𝕗) val#2,loop_counter%0#0 | check%0#0 pop 1 (𝕗) val#2,loop_counter%0#0 | - // arc4_types/structs.py:33 + // arc4_types/structs.py:42 // flags = Flags(a=arc4.Bool(True), b=arc4.Bool(False), c=arc4.Bool(True), d=arc4.Bool(False)) byte 0xa0 (𝕗) val#2,loop_counter%0#0 | 0xa0 - // arc4_types/structs.py:35 + // arc4_types/structs.py:44 // log(flags.bytes) log (𝕗) val#2,loop_counter%0#0 | - // arc4_types/structs.py:38 + // arc4_types/structs.py:47 // nested_decode(VectorFlags(coord_1.copy(), flags.copy())) byte 0x000000083cfbf217000000230384b842a0 (𝕗) val#2,loop_counter%0#0 | 0x000000083cfbf217000000230384b842a0 callsub nested_decode (𝕗) val#2,loop_counter%0#0 | nested_decode%0#0 pop 1 (𝕗) val#2,loop_counter%0#0 | - // arc4_types/structs.py:40 + // arc4_types/structs.py:58 // return True int 1 (𝕗) val#2,loop_counter%0#0 | 1 return (𝕗) val#2,loop_counter%0#0 | @@ -70,13 +70,13 @@ main_after_for@4: // test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> bytes, bytes, bytes: add: (𝕡) v1#0,v2#0 | - // arc4_types/structs.py:46-47 + // arc4_types/structs.py:64-65 // @subroutine // def add(v1: Vector, v2: Vector) -> Vector: proto 2 3 (𝕡) v1#0,v2#0 | add_block@0: (𝕡) v1#0,v2#0 | - // arc4_types/structs.py:49 + // arc4_types/structs.py:67 // x=add_decimal(v1.x, v2.x), p-load v1#0 (𝕡) v1#0,v2#0 | v1#0 (copy) extract 0 8 // on error: Index access is out of bounds (𝕡) v1#0,v2#0 | tmp%0#0 @@ -85,7 +85,7 @@ add_block@0: l-load tmp%0#0 1 (𝕡) v1#0,v2#0 | tmp%1#0,tmp%0#0 l-load tmp%1#0 1 (𝕡) v1#0,v2#0 | tmp%0#0,tmp%1#0 callsub add_decimal (𝕡) v1#0,v2#0 | tmp%2#0 - // arc4_types/structs.py:50 + // arc4_types/structs.py:68 // y=add_decimal(v1.y, v2.y), p-load v1#0 (𝕡) v1#0,v2#0 | tmp%2#0,v1#0 (copy) extract 8 8 // on error: Index access is out of bounds (𝕡) v1#0,v2#0 | tmp%2#0,tmp%3#0 @@ -94,7 +94,7 @@ add_block@0: l-load tmp%3#0 1 (𝕡) v1#0,v2#0 | tmp%2#0,tmp%4#0,tmp%3#0 l-load tmp%4#0 1 (𝕡) v1#0,v2#0 | tmp%2#0,tmp%3#0,tmp%4#0 callsub add_decimal (𝕡) v1#0,v2#0 | tmp%2#0,tmp%5#0 - // arc4_types/structs.py:48-51 + // arc4_types/structs.py:66-69 // return Vector( // x=add_decimal(v1.x, v2.x), // y=add_decimal(v1.y, v2.y), @@ -109,13 +109,13 @@ add_block@0: // test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: add_decimal: (𝕡) x#0,y#0 | - // arc4_types/structs.py:68-69 + // arc4_types/structs.py:86-87 // @subroutine // def add_decimal(x: Decimal, y: Decimal) -> Decimal: proto 2 1 (𝕡) x#0,y#0 | add_decimal_block@0: (𝕡) x#0,y#0 | - // arc4_types/structs.py:70 + // arc4_types/structs.py:88 // return Decimal.from_bytes(op.itob(op.btoi(x.bytes) + op.btoi(y.bytes))) p-load x#0 (𝕡) x#0,y#0 | x#0 (copy) btoi (𝕡) x#0,y#0 | tmp%0#0 @@ -130,13 +130,13 @@ add_decimal_block@0: // test_cases.arc4_types.structs.check(flags: bytes) -> bytes: check: (𝕡) flags#0 | - // arc4_types/structs.py:54-55 + // arc4_types/structs.py:72-73 // @subroutine // def check(flags: Flags) -> None: proto 1 1 (𝕡) flags#0 | check_block@0: (𝕡) flags#0 | - // arc4_types/structs.py:56 + // arc4_types/structs.py:74 // assert flags.a.native p-load flags#0 (𝕡) flags#0 | flags#0 (copy) int 0 (𝕡) flags#0 | flags#0 (copy),0 @@ -148,7 +148,7 @@ check_block@0: int 0 (𝕡) flags#0 | encoded_bool%0#0,0 getbit (𝕡) flags#0 | tmp%0#0 assert (𝕡) flags#0 | - // arc4_types/structs.py:57 + // arc4_types/structs.py:75 // assert not flags.b.native p-load flags#0 (𝕡) flags#0 | flags#0 (copy) int 1 (𝕡) flags#0 | flags#0 (copy),1 @@ -161,7 +161,7 @@ check_block@0: getbit (𝕡) flags#0 | tmp%1#0 ! (𝕡) flags#0 | tmp%2#0 assert (𝕡) flags#0 | - // arc4_types/structs.py:58 + // arc4_types/structs.py:76 // assert flags.c.native p-load flags#0 (𝕡) flags#0 | flags#0 (copy) int 2 (𝕡) flags#0 | flags#0 (copy),2 @@ -173,7 +173,7 @@ check_block@0: int 0 (𝕡) flags#0 | encoded_bool%2#0,0 getbit (𝕡) flags#0 | tmp%3#0 assert (𝕡) flags#0 | - // arc4_types/structs.py:59 + // arc4_types/structs.py:77 // assert not flags.d.native p-load flags#0 (𝕡) flags#0 | flags#0 (copy) int 3 (𝕡) flags#0 | flags#0 (copy),3 @@ -192,13 +192,13 @@ check_block@0: // test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: nested_decode: (𝕡) vector_flags#0 | - // arc4_types/structs.py:62-63 + // arc4_types/structs.py:80-81 // @subroutine // def nested_decode(vector_flags: VectorFlags) -> None: proto 1 1 (𝕡) vector_flags#0 | nested_decode_block@0: (𝕡) vector_flags#0 | - // arc4_types/structs.py:64 + // arc4_types/structs.py:82 // assert vector_flags.vector.x.bytes == op.itob(35382882839) p-load vector_flags#0 (𝕡) vector_flags#0 | vector_flags#0 (copy) extract 0 16 // on error: Index access is out of bounds (𝕡) vector_flags#0 | tmp%0#0 @@ -209,7 +209,7 @@ nested_decode_block@0: l-load tmp%2#0 1 (𝕡) vector_flags#0 | tmp%1#0,tmp%2#0 == (𝕡) vector_flags#0 | tmp%3#0 assert (𝕡) vector_flags#0 | - // arc4_types/structs.py:65 + // arc4_types/structs.py:83 // assert vector_flags.flags.c.native p-load vector_flags#0 (𝕡) vector_flags#0 | vector_flags#0 (copy) extract 16 1 // on error: Index access is out of bounds (𝕡) vector_flags#0 | tmp%4#0 diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal b/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal index 2de17d33f1..9188716637 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal @@ -3,17 +3,17 @@ test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program: intcblock 0 1 2 bytecblock 0x00 0xa0 - // arc4_types/structs.py:27 + // arc4_types/structs.py:36 // coord_1 = Vector(x=Decimal("35.382882839"), y=Decimal("150.382884930")) pushbytes 0x000000083cfbf217000000230384b842 - // arc4_types/structs.py:28 + // arc4_types/structs.py:37 // coord_2 = Vector(y=Decimal("150.382884930"), x=Decimal("35.382882839")) dup - // arc4_types/structs.py:29 + // arc4_types/structs.py:38 // coord_3 = add(coord_1.copy(), coord_2.copy()) callsub add popn 2 - // arc4_types/structs.py:30 + // arc4_types/structs.py:39 // for val in (coord_3.x, coord_3.y): dup extract 0 8 // on error: Index access is out of bounds @@ -24,10 +24,10 @@ test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program: swap main_for_body@1: - // arc4_types/structs.py:31 + // arc4_types/structs.py:40 // log(val.bytes) log - // arc4_types/structs.py:30 + // arc4_types/structs.py:39 // for val in (coord_3.x, coord_3.y): dup bnz main_after_for@4 @@ -37,25 +37,25 @@ main_for_body@1: b main_for_body@1 main_after_for@4: - // arc4_types/structs.py:33 + // arc4_types/structs.py:42 // flags = Flags(a=arc4.Bool(True), b=arc4.Bool(False), c=arc4.Bool(True), d=arc4.Bool(False)) bytec_1 // 0xa0 - // arc4_types/structs.py:34 + // arc4_types/structs.py:43 // check(flags.copy()) callsub check pop - // arc4_types/structs.py:33 + // arc4_types/structs.py:42 // flags = Flags(a=arc4.Bool(True), b=arc4.Bool(False), c=arc4.Bool(True), d=arc4.Bool(False)) bytec_1 // 0xa0 - // arc4_types/structs.py:35 + // arc4_types/structs.py:44 // log(flags.bytes) log - // arc4_types/structs.py:38 + // arc4_types/structs.py:47 // nested_decode(VectorFlags(coord_1.copy(), flags.copy())) pushbytes 0x000000083cfbf217000000230384b842a0 callsub nested_decode pop - // arc4_types/structs.py:40 + // arc4_types/structs.py:58 // return True intc_1 // 1 return @@ -63,25 +63,25 @@ main_after_for@4: // test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> bytes, bytes, bytes: add: - // arc4_types/structs.py:46-47 + // arc4_types/structs.py:64-65 // @subroutine // def add(v1: Vector, v2: Vector) -> Vector: proto 2 3 - // arc4_types/structs.py:49 + // arc4_types/structs.py:67 // x=add_decimal(v1.x, v2.x), frame_dig -2 extract 0 8 // on error: Index access is out of bounds frame_dig -1 extract 0 8 // on error: Index access is out of bounds callsub add_decimal - // arc4_types/structs.py:50 + // arc4_types/structs.py:68 // y=add_decimal(v1.y, v2.y), frame_dig -2 extract 8 8 // on error: Index access is out of bounds frame_dig -1 extract 8 8 // on error: Index access is out of bounds callsub add_decimal - // arc4_types/structs.py:48-51 + // arc4_types/structs.py:66-69 // return Vector( // x=add_decimal(v1.x, v2.x), // y=add_decimal(v1.y, v2.y), @@ -94,11 +94,11 @@ add: // test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: add_decimal: - // arc4_types/structs.py:68-69 + // arc4_types/structs.py:86-87 // @subroutine // def add_decimal(x: Decimal, y: Decimal) -> Decimal: proto 2 1 - // arc4_types/structs.py:70 + // arc4_types/structs.py:88 // return Decimal.from_bytes(op.itob(op.btoi(x.bytes) + op.btoi(y.bytes))) frame_dig -2 btoi @@ -111,11 +111,11 @@ add_decimal: // test_cases.arc4_types.structs.check(flags: bytes) -> bytes: check: - // arc4_types/structs.py:54-55 + // arc4_types/structs.py:72-73 // @subroutine // def check(flags: Flags) -> None: proto 1 1 - // arc4_types/structs.py:56 + // arc4_types/structs.py:74 // assert flags.a.native frame_dig -1 intc_0 // 0 @@ -127,7 +127,7 @@ check: intc_0 // 0 getbit assert - // arc4_types/structs.py:57 + // arc4_types/structs.py:75 // assert not flags.b.native frame_dig -1 intc_1 // 1 @@ -140,7 +140,7 @@ check: getbit ! assert - // arc4_types/structs.py:58 + // arc4_types/structs.py:76 // assert flags.c.native frame_dig -1 intc_2 // 2 @@ -152,7 +152,7 @@ check: intc_0 // 0 getbit assert - // arc4_types/structs.py:59 + // arc4_types/structs.py:77 // assert not flags.d.native frame_dig -1 pushint 3 // 3 @@ -171,11 +171,11 @@ check: // test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: nested_decode: - // arc4_types/structs.py:62-63 + // arc4_types/structs.py:80-81 // @subroutine // def nested_decode(vector_flags: VectorFlags) -> None: proto 1 1 - // arc4_types/structs.py:64 + // arc4_types/structs.py:82 // assert vector_flags.vector.x.bytes == op.itob(35382882839) frame_dig -1 extract 0 16 // on error: Index access is out of bounds @@ -184,7 +184,7 @@ nested_decode: itob == assert - // arc4_types/structs.py:65 + // arc4_types/structs.py:83 // assert vector_flags.flags.c.native frame_dig -1 extract 16 1 // on error: Index access is out of bounds diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.mir b/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.mir index fcb5dc37ea..9047e154f8 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.mir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.mir @@ -1,7 +1,7 @@ // Op Stack (out) // test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> uint64: main_block@0: - // arc4_types/structs.py:43 + // arc4_types/structs.py:61 // return True int 1 1 return diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.teal b/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.teal index 21aa8f0f49..f841c9a5e6 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.teal +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program: - // arc4_types/structs.py:43 + // arc4_types/structs.py:61 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.destructured.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.destructured.ir index c450a665c9..193289164a 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.destructured.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.destructured.ir @@ -1,27 +1,27 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 (log val#0) goto loop_counter%0#0 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#0: uint64 = 1u let val#0: bytes = val#2 goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) (log 0xa0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -32,7 +32,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -40,7 +40,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -62,7 +62,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -77,5 +77,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir index c015ad7214..5e4d1c15a4 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir @@ -1,7 +1,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let current_tail_offset%0#0: uint64 = 16u let encoded_tuple_buffer%0#0: bytes = 0x let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x000000083cfbf217) @@ -23,18 +23,18 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let loop_counter%0#0: uint64 = 0u let val#0: bytes = tmp%0#0 goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto block@2 - block@2: // for_footer_L30 + block@2: // for_footer_L39 goto_nth [block@3][loop_counter%0#1] else goto block@4 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u let val#2: bytes = tmp%1#0 goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let encoded_bool%0#0: bytes = (setbit 0x00 0u 1u) let encoded_bool%1#0: bytes = (setbit 0x00 0u 0u) let encoded_bool%2#0: bytes = (setbit 0x00 0u 1u) @@ -63,10 +63,50 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let encoded_tuple_buffer%13#0: bytes = (concat encoded_tuple_buffer%12#0 copy%4#0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) let encoded_tuple_buffer%13#1: bytes = nested_decode%0#0 + let length%0#0: uint64 = (len 0x) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x) + let current_tail_offset%4#0: uint64 = 2u + let encoded_tuple_buffer%14#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%4#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%15#0: bytes = (concat encoded_tuple_buffer%14#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%5#0: uint64 = (+ current_tail_offset%4#0 data_length%0#0) + let encoded_tuple_buffer%16#0: bytes = (concat encoded_tuple_buffer%15#0 encoded_value%0#0) + let mutable#0: bytes = encoded_tuple_buffer%16#0 + let copy%5#0: bytes = mutable#0 + let copy#0: bytes = copy%5#0 + let item_start_offset%0#0: uint64 = (extract_uint16 copy#0 0u) + let item_end_offset%0#0: uint64 = (len copy#0) + let tmp%3#0: bytes = (substring3 copy#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%3#0) + let data%0#0: bytes = (concat 0x 0x2a) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let assigned_value%0#0: bytes = concat_result%0#0 + let item_offset%0#0: uint64 = (extract_uint16 copy#0 0u) + let data_up_to_item%0#0: bytes = (extract3 copy#0 0u item_offset%0#0) + let updated_data%0#0: bytes = (concat data_up_to_item%0#0 assigned_value%0#0) + let copy#1: bytes = updated_data%0#0 + let tmp%4#0: bool = (!= mutable#0 copy#1) + (assert tmp%4#0) // expected copy is different + let current_tail_offset%6#0: uint64 = 16u + let encoded_tuple_buffer%17#0: bytes = 0x + let encoded_tuple_buffer%18#0: bytes = (concat encoded_tuple_buffer%17#0 0x000000000000000c) + let encoded_tuple_buffer%19#0: bytes = (concat encoded_tuple_buffer%18#0 0x0000000000000022) + let immutable#0: bytes = encoded_tuple_buffer%19#0 + let no_copy#0: bytes = immutable#0 + let tmp%5#0: bool = (== no_copy#0 immutable#0) + (assert tmp%5#0) return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds let tmp%1#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -80,7 +120,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -88,7 +128,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -110,7 +150,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = (extract3 vector_flags#0 0u 16u) // on error: Index access is out of bounds let tmp%1#0: bytes = (extract3 tmp%0#0 0u 8u) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -125,5 +165,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_1.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_1.ir index c6443d7468..6d81a85bee 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_1.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_1.ir @@ -1,7 +1,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let encoded_tuple_buffer%1#0: bytes = 0x000000083cfbf217 let coord_1#0: bytes = (concat encoded_tuple_buffer%1#0 0x000000230384b842) let encoded_tuple_buffer%4#0: bytes = 0x000000083cfbf217 @@ -11,22 +11,21 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto loop_counter%0#1 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let encoded_bool%0#0: bytes = 0x80 let encoded_bool%1#0: bytes = 0x00 let encoded_bool%2#0: bytes = 0x80 let encoded_bool%3#0: bytes = 0x00 - let encoded_tuple_buffer%7#0: bytes = encoded_bool%0#0 let is_true%0#0: uint64 = (getbit encoded_bool%1#0 0u) - let encoded_tuple_buffer%8#0: bytes = (setbit encoded_tuple_buffer%7#0 1u is_true%0#0) + let encoded_tuple_buffer%8#0: bytes = (setbit encoded_bool%0#0 1u is_true%0#0) let is_true%1#0: uint64 = (getbit encoded_bool%2#0 0u) let encoded_tuple_buffer%9#0: bytes = (setbit encoded_tuple_buffer%8#0 2u is_true%1#0) let is_true%2#0: uint64 = (getbit encoded_bool%3#0 0u) @@ -35,13 +34,35 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: (log flags#0) let tmp%2#0: bool = 1u (assert tmp%2#0) - let encoded_tuple_buffer%12#0: bytes = coord_1#0 - let encoded_tuple_buffer%13#0: bytes = (concat encoded_tuple_buffer%12#0 flags#0) + let encoded_tuple_buffer%13#0: bytes = (concat coord_1#0 flags#0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) + let length%0#0: uint64 = 0u + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let offset_as_uint16%0#0: bytes = 0x0002 + let data_length%0#0: uint64 = (len length_uint16%0#0) + let mutable#0: bytes = (concat offset_as_uint16%0#0 length_uint16%0#0) + let item_start_offset%0#0: uint64 = (extract_uint16 mutable#0 0u) + let item_end_offset%0#0: uint64 = (len mutable#0) + let tmp%3#0: bytes = (substring3 mutable#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%3#0) + let data%0#0: bytes = 0x2a + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 mutable#0 0u item_start_offset%0#0) + let copy#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let tmp%4#0: bool = (!= mutable#0 copy#1) + (assert tmp%4#0) // expected copy is different + let encoded_tuple_buffer%18#0: bytes = 0x000000000000000c + let tmp%5#0: bool = 1u + (assert tmp%5#0) return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -53,7 +74,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -61,7 +82,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -83,7 +104,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -98,5 +119,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_10.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_10.ir new file mode 100644 index 0000000000..d5fb5854e1 --- /dev/null +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_10.ir @@ -0,0 +1,86 @@ +contract test_cases.arc4_types.structs.Arc4StructsTypeContract: + program approval: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: + block@0: // L35 + let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) + let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds + let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds + let loop_counter%0#0: uint64 = 0u + goto block@1 + block@1: // for_body_L40 + let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) + let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) + (log val#1) + goto loop_counter%0#1 ? block@4 : block@3 + block@3: // for_header_1_L39 + let loop_counter%0#2: uint64 = 1u + goto block@1 + block@4: // after_for_L39 + let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) + (log 0xa0) + let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) + let concat_result%0#0: bytes = 0x00012a + let copy#1: bytes = (concat 0x0002 concat_result%0#0) + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different + return 1u + + subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : + block@0: // L64 + let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) + let tmp%3#0: bytes = ((extract 8 8) v1#0) // on error: Index access is out of bounds + let tmp%4#0: bytes = ((extract 8 8) v2#0) // on error: Index access is out of bounds + let tmp%5#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%3#0, tmp%4#0) + let encoded_tuple_buffer%2#0: bytes = (concat tmp%2#0 tmp%5#0) + return encoded_tuple_buffer%2#0 v1#0 v2#0 + + subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: + block@0: // L86 + let tmp%0#0: uint64 = (btoi x#0) + let tmp%1#0: uint64 = (btoi y#0) + let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) + let tmp%3#0: bytes = (itob tmp%2#0) + return tmp%3#0 + + subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: + block@0: // L72 + let is_true%0#0: uint64 = (getbit flags#0 0u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%0#0) + let is_true%1#0: uint64 = (getbit flags#0 1u) + let encoded_bool%1#0: bytes = (setbit 0x00 0u is_true%1#0) + let tmp%1#0: bool = (getbit encoded_bool%1#0 0u) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let is_true%2#0: uint64 = (getbit flags#0 2u) + let encoded_bool%2#0: bytes = (setbit 0x00 0u is_true%2#0) + let tmp%3#0: bool = (getbit encoded_bool%2#0 0u) + (assert tmp%3#0) + let is_true%3#0: uint64 = (getbit flags#0 3u) + let encoded_bool%3#0: bytes = (setbit 0x00 0u is_true%3#0) + let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) + let tmp%5#0: bool = (! tmp%4#0) + (assert tmp%5#0) + return flags#0 + + subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: + block@0: // L80 + let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = (itob 35382882839u) + let tmp%3#0: bool = (== tmp%1#0 tmp%2#0) + (assert tmp%3#0) + let tmp%4#0: bytes = ((extract 16 1) vector_flags#0) // on error: Index access is out of bounds + let is_true%0#0: uint64 = (getbit tmp%4#0 2u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%5#0) + return vector_flags#0 + + program clear-state: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: + block@0: // L60 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_11.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_11.ir new file mode 100644 index 0000000000..7abc861728 --- /dev/null +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_11.ir @@ -0,0 +1,85 @@ +contract test_cases.arc4_types.structs.Arc4StructsTypeContract: + program approval: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: + block@0: // L35 + let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) + let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds + let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds + let loop_counter%0#0: uint64 = 0u + goto block@1 + block@1: // for_body_L40 + let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) + let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) + (log val#1) + goto loop_counter%0#1 ? block@4 : block@3 + block@3: // for_header_1_L39 + let loop_counter%0#2: uint64 = 1u + goto block@1 + block@4: // after_for_L39 + let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) + (log 0xa0) + let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) + let copy#1: bytes = 0x000200012a + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different + return 1u + + subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : + block@0: // L64 + let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) + let tmp%3#0: bytes = ((extract 8 8) v1#0) // on error: Index access is out of bounds + let tmp%4#0: bytes = ((extract 8 8) v2#0) // on error: Index access is out of bounds + let tmp%5#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%3#0, tmp%4#0) + let encoded_tuple_buffer%2#0: bytes = (concat tmp%2#0 tmp%5#0) + return encoded_tuple_buffer%2#0 v1#0 v2#0 + + subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: + block@0: // L86 + let tmp%0#0: uint64 = (btoi x#0) + let tmp%1#0: uint64 = (btoi y#0) + let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) + let tmp%3#0: bytes = (itob tmp%2#0) + return tmp%3#0 + + subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: + block@0: // L72 + let is_true%0#0: uint64 = (getbit flags#0 0u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%0#0) + let is_true%1#0: uint64 = (getbit flags#0 1u) + let encoded_bool%1#0: bytes = (setbit 0x00 0u is_true%1#0) + let tmp%1#0: bool = (getbit encoded_bool%1#0 0u) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let is_true%2#0: uint64 = (getbit flags#0 2u) + let encoded_bool%2#0: bytes = (setbit 0x00 0u is_true%2#0) + let tmp%3#0: bool = (getbit encoded_bool%2#0 0u) + (assert tmp%3#0) + let is_true%3#0: uint64 = (getbit flags#0 3u) + let encoded_bool%3#0: bytes = (setbit 0x00 0u is_true%3#0) + let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) + let tmp%5#0: bool = (! tmp%4#0) + (assert tmp%5#0) + return flags#0 + + subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: + block@0: // L80 + let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = (itob 35382882839u) + let tmp%3#0: bool = (== tmp%1#0 tmp%2#0) + (assert tmp%3#0) + let tmp%4#0: bytes = ((extract 16 1) vector_flags#0) // on error: Index access is out of bounds + let is_true%0#0: uint64 = (getbit tmp%4#0 2u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%5#0) + return vector_flags#0 + + program clear-state: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: + block@0: // L60 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_12.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_12.ir new file mode 100644 index 0000000000..b31730dec6 --- /dev/null +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_12.ir @@ -0,0 +1,84 @@ +contract test_cases.arc4_types.structs.Arc4StructsTypeContract: + program approval: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: + block@0: // L35 + let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) + let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds + let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds + let loop_counter%0#0: uint64 = 0u + goto block@1 + block@1: // for_body_L40 + let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) + let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) + (log val#1) + goto loop_counter%0#1 ? block@4 : block@3 + block@3: // for_header_1_L39 + let loop_counter%0#2: uint64 = 1u + goto block@1 + block@4: // after_for_L39 + let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) + (log 0xa0) + let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) + let tmp%4#0: bool = 1u + (assert tmp%4#0) // expected copy is different + return 1u + + subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : + block@0: // L64 + let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) + let tmp%3#0: bytes = ((extract 8 8) v1#0) // on error: Index access is out of bounds + let tmp%4#0: bytes = ((extract 8 8) v2#0) // on error: Index access is out of bounds + let tmp%5#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%3#0, tmp%4#0) + let encoded_tuple_buffer%2#0: bytes = (concat tmp%2#0 tmp%5#0) + return encoded_tuple_buffer%2#0 v1#0 v2#0 + + subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: + block@0: // L86 + let tmp%0#0: uint64 = (btoi x#0) + let tmp%1#0: uint64 = (btoi y#0) + let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) + let tmp%3#0: bytes = (itob tmp%2#0) + return tmp%3#0 + + subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: + block@0: // L72 + let is_true%0#0: uint64 = (getbit flags#0 0u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%0#0) + let is_true%1#0: uint64 = (getbit flags#0 1u) + let encoded_bool%1#0: bytes = (setbit 0x00 0u is_true%1#0) + let tmp%1#0: bool = (getbit encoded_bool%1#0 0u) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let is_true%2#0: uint64 = (getbit flags#0 2u) + let encoded_bool%2#0: bytes = (setbit 0x00 0u is_true%2#0) + let tmp%3#0: bool = (getbit encoded_bool%2#0 0u) + (assert tmp%3#0) + let is_true%3#0: uint64 = (getbit flags#0 3u) + let encoded_bool%3#0: bytes = (setbit 0x00 0u is_true%3#0) + let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) + let tmp%5#0: bool = (! tmp%4#0) + (assert tmp%5#0) + return flags#0 + + subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: + block@0: // L80 + let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = (itob 35382882839u) + let tmp%3#0: bool = (== tmp%1#0 tmp%2#0) + (assert tmp%3#0) + let tmp%4#0: bytes = ((extract 16 1) vector_flags#0) // on error: Index access is out of bounds + let is_true%0#0: uint64 = (getbit tmp%4#0 2u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%5#0) + return vector_flags#0 + + program clear-state: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: + block@0: // L60 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_13.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_13.ir new file mode 100644 index 0000000000..0bad534fc8 --- /dev/null +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_13.ir @@ -0,0 +1,82 @@ +contract test_cases.arc4_types.structs.Arc4StructsTypeContract: + program approval: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: + block@0: // L35 + let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) + let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds + let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds + let loop_counter%0#0: uint64 = 0u + goto block@1 + block@1: // for_body_L40 + let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) + let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) + (log val#1) + goto loop_counter%0#1 ? block@4 : block@3 + block@3: // for_header_1_L39 + let loop_counter%0#2: uint64 = 1u + goto block@1 + block@4: // after_for_L39 + let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) + (log 0xa0) + let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) + return 1u + + subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : + block@0: // L64 + let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) + let tmp%3#0: bytes = ((extract 8 8) v1#0) // on error: Index access is out of bounds + let tmp%4#0: bytes = ((extract 8 8) v2#0) // on error: Index access is out of bounds + let tmp%5#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%3#0, tmp%4#0) + let encoded_tuple_buffer%2#0: bytes = (concat tmp%2#0 tmp%5#0) + return encoded_tuple_buffer%2#0 v1#0 v2#0 + + subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: + block@0: // L86 + let tmp%0#0: uint64 = (btoi x#0) + let tmp%1#0: uint64 = (btoi y#0) + let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) + let tmp%3#0: bytes = (itob tmp%2#0) + return tmp%3#0 + + subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: + block@0: // L72 + let is_true%0#0: uint64 = (getbit flags#0 0u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%0#0) + let is_true%1#0: uint64 = (getbit flags#0 1u) + let encoded_bool%1#0: bytes = (setbit 0x00 0u is_true%1#0) + let tmp%1#0: bool = (getbit encoded_bool%1#0 0u) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let is_true%2#0: uint64 = (getbit flags#0 2u) + let encoded_bool%2#0: bytes = (setbit 0x00 0u is_true%2#0) + let tmp%3#0: bool = (getbit encoded_bool%2#0 0u) + (assert tmp%3#0) + let is_true%3#0: uint64 = (getbit flags#0 3u) + let encoded_bool%3#0: bytes = (setbit 0x00 0u is_true%3#0) + let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) + let tmp%5#0: bool = (! tmp%4#0) + (assert tmp%5#0) + return flags#0 + + subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: + block@0: // L80 + let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = (itob 35382882839u) + let tmp%3#0: bool = (== tmp%1#0 tmp%2#0) + (assert tmp%3#0) + let tmp%4#0: bytes = ((extract 16 1) vector_flags#0) // on error: Index access is out of bounds + let is_true%0#0: uint64 = (getbit tmp%4#0 2u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%5#0) + return vector_flags#0 + + program clear-state: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: + block@0: // L60 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_2.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_2.ir index 6bf190445c..cf6b4e324e 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_2.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_2.ir @@ -1,7 +1,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let coord_1#0: bytes = 0x000000083cfbf217000000230384b842 let coord_2#0: bytes = 0x000000083cfbf217000000230384b842 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(coord_1#0, coord_2#0) @@ -9,15 +9,15 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto loop_counter%0#1 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let is_true%0#0: uint64 = 0u let encoded_tuple_buffer%8#0: bytes = (setbit 0x80 1u is_true%0#0) let is_true%1#0: uint64 = 1u @@ -28,10 +28,25 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: (log flags#0) let encoded_tuple_buffer%13#0: bytes = (concat coord_1#0 flags#0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) + let length_uint16%0#0: bytes = 0x0000 + let mutable#0: bytes = (concat 0x0002 length_uint16%0#0) + let item_start_offset%0#0: uint64 = (extract_uint16 mutable#0 0u) + let item_end_offset%0#0: uint64 = (len mutable#0) + let tmp%3#0: bytes = (substring3 mutable#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%3#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x2a) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 mutable#0 0u item_start_offset%0#0) + let copy#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let tmp%4#0: bool = (!= mutable#0 copy#1) + (assert tmp%4#0) // expected copy is different return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -42,7 +57,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -50,7 +65,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -72,7 +87,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -87,5 +102,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_3.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_3.ir index 750d13abc7..e6f8666d30 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_3.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_3.ir @@ -1,21 +1,21 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto loop_counter%0#1 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let encoded_tuple_buffer%8#0: bytes = 0x80 let encoded_tuple_buffer%9#0: bytes = (setbit encoded_tuple_buffer%8#0 2u 1u) let flags#0: bytes = (setbit encoded_tuple_buffer%9#0 3u 0u) @@ -23,10 +23,24 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: (log flags#0) let encoded_tuple_buffer%13#0: bytes = (concat 0x000000083cfbf217000000230384b842 flags#0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) + let mutable#0: bytes = 0x00020000 + let item_start_offset%0#0: uint64 = (extract_uint16 mutable#0 0u) + let item_end_offset%0#0: uint64 = (len mutable#0) + let tmp%3#0: bytes = (substring3 mutable#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%3#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x2a) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 mutable#0 0u item_start_offset%0#0) + let copy#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let tmp%4#0: bool = (!= mutable#0 copy#1) + (assert tmp%4#0) // expected copy is different return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -37,7 +51,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -45,7 +59,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -67,7 +81,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -82,5 +96,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_4.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_4.ir index 59c94607b8..5eb7611273 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_4.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_4.ir @@ -1,31 +1,44 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto loop_counter%0#1 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let encoded_tuple_buffer%9#0: bytes = 0xa0 let flags#0: bytes = (setbit encoded_tuple_buffer%9#0 3u 0u) let check%0#0: bytes = test_cases.arc4_types.structs.check(flags#0) (log flags#0) let encoded_tuple_buffer%13#0: bytes = (concat 0x000000083cfbf217000000230384b842 flags#0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) + let item_start_offset%0#0: uint64 = 2u + let item_end_offset%0#0: uint64 = 4u + let tmp%3#0: bytes = (substring3 0x00020000 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%3#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x2a) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 0x00020000 0u item_start_offset%0#0) + let copy#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -36,7 +49,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -44,7 +57,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -66,7 +79,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -81,5 +94,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_5.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_5.ir index cf114551f5..2bdd381bca 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_5.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_5.ir @@ -1,30 +1,41 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto loop_counter%0#1 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let flags#0: bytes = 0xa0 let check%0#0: bytes = test_cases.arc4_types.structs.check(flags#0) (log flags#0) let encoded_tuple_buffer%13#0: bytes = (concat 0x000000083cfbf217000000230384b842 flags#0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) + let tmp%3#0: bytes = 0x0000 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%3#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x2a) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = 0x0002 + let copy#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -35,7 +46,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -43,7 +54,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -65,7 +76,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -80,5 +91,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_6.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_6.ir index 8cf2df5bfb..e3ceb28c46 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_6.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_6.ir @@ -1,29 +1,38 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto loop_counter%0#1 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) (log 0xa0) let encoded_tuple_buffer%13#0: bytes = 0x000000083cfbf217000000230384b842a0 let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) + let expr_value_trimmed%0#0: bytes = 0x + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x2a) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let copy#1: bytes = (concat 0x0002 concat_result%0#0) + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -34,7 +43,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -42,7 +51,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -64,7 +73,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -79,5 +88,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_7.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_7.ir index 7b5093aadd..cf005d0738 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_7.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_7.ir @@ -1,28 +1,36 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) (log val#1) goto loop_counter%0#1 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#2: uint64 = 1u goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) (log 0xa0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) + let concatenated%0#0: bytes = 0x2a + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let copy#1: bytes = (concat 0x0002 concat_result%0#0) + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -33,7 +41,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -41,7 +49,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -63,7 +71,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -78,5 +86,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_8.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_8.ir new file mode 100644 index 0000000000..3a33630cde --- /dev/null +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_8.ir @@ -0,0 +1,89 @@ +contract test_cases.arc4_types.structs.Arc4StructsTypeContract: + program approval: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: + block@0: // L35 + let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) + let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds + let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds + let loop_counter%0#0: uint64 = 0u + goto block@1 + block@1: // for_body_L40 + let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) + let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) + (log val#1) + goto loop_counter%0#1 ? block@4 : block@3 + block@3: // for_header_1_L39 + let loop_counter%0#2: uint64 = 1u + goto block@1 + block@4: // after_for_L39 + let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) + (log 0xa0) + let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) + let len_%0#0: uint64 = 1u + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 0x2a) + let copy#1: bytes = (concat 0x0002 concat_result%0#0) + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different + return 1u + + subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : + block@0: // L64 + let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) + let tmp%3#0: bytes = ((extract 8 8) v1#0) // on error: Index access is out of bounds + let tmp%4#0: bytes = ((extract 8 8) v2#0) // on error: Index access is out of bounds + let tmp%5#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%3#0, tmp%4#0) + let encoded_tuple_buffer%2#0: bytes = (concat tmp%2#0 tmp%5#0) + return encoded_tuple_buffer%2#0 v1#0 v2#0 + + subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: + block@0: // L86 + let tmp%0#0: uint64 = (btoi x#0) + let tmp%1#0: uint64 = (btoi y#0) + let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) + let tmp%3#0: bytes = (itob tmp%2#0) + return tmp%3#0 + + subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: + block@0: // L72 + let is_true%0#0: uint64 = (getbit flags#0 0u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%0#0) + let is_true%1#0: uint64 = (getbit flags#0 1u) + let encoded_bool%1#0: bytes = (setbit 0x00 0u is_true%1#0) + let tmp%1#0: bool = (getbit encoded_bool%1#0 0u) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let is_true%2#0: uint64 = (getbit flags#0 2u) + let encoded_bool%2#0: bytes = (setbit 0x00 0u is_true%2#0) + let tmp%3#0: bool = (getbit encoded_bool%2#0 0u) + (assert tmp%3#0) + let is_true%3#0: uint64 = (getbit flags#0 3u) + let encoded_bool%3#0: bytes = (setbit 0x00 0u is_true%3#0) + let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) + let tmp%5#0: bool = (! tmp%4#0) + (assert tmp%5#0) + return flags#0 + + subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: + block@0: // L80 + let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = (itob 35382882839u) + let tmp%3#0: bool = (== tmp%1#0 tmp%2#0) + (assert tmp%3#0) + let tmp%4#0: bytes = ((extract 16 1) vector_flags#0) // on error: Index access is out of bounds + let is_true%0#0: uint64 = (getbit tmp%4#0 2u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%5#0) + return vector_flags#0 + + program clear-state: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: + block@0: // L60 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_9.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_9.ir new file mode 100644 index 0000000000..c1b4e37829 --- /dev/null +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_9.ir @@ -0,0 +1,87 @@ +contract test_cases.arc4_types.structs.Arc4StructsTypeContract: + program approval: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: + block@0: // L35 + let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) + let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds + let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds + let loop_counter%0#0: uint64 = 0u + goto block@1 + block@1: // for_body_L40 + let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) + let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) + (log val#1) + goto loop_counter%0#1 ? block@4 : block@3 + block@3: // for_header_1_L39 + let loop_counter%0#2: uint64 = 1u + goto block@1 + block@4: // after_for_L39 + let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) + (log 0xa0) + let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) + let len_16_bit%0#0: bytes = 0x0001 + let concat_result%0#0: bytes = (concat len_16_bit%0#0 0x2a) + let copy#1: bytes = (concat 0x0002 concat_result%0#0) + let tmp%4#0: bool = (!= 0x00020000 copy#1) + (assert tmp%4#0) // expected copy is different + return 1u + + subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : + block@0: // L64 + let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) + let tmp%3#0: bytes = ((extract 8 8) v1#0) // on error: Index access is out of bounds + let tmp%4#0: bytes = ((extract 8 8) v2#0) // on error: Index access is out of bounds + let tmp%5#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%3#0, tmp%4#0) + let encoded_tuple_buffer%2#0: bytes = (concat tmp%2#0 tmp%5#0) + return encoded_tuple_buffer%2#0 v1#0 v2#0 + + subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: + block@0: // L86 + let tmp%0#0: uint64 = (btoi x#0) + let tmp%1#0: uint64 = (btoi y#0) + let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) + let tmp%3#0: bytes = (itob tmp%2#0) + return tmp%3#0 + + subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: + block@0: // L72 + let is_true%0#0: uint64 = (getbit flags#0 0u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%0#0) + let is_true%1#0: uint64 = (getbit flags#0 1u) + let encoded_bool%1#0: bytes = (setbit 0x00 0u is_true%1#0) + let tmp%1#0: bool = (getbit encoded_bool%1#0 0u) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let is_true%2#0: uint64 = (getbit flags#0 2u) + let encoded_bool%2#0: bytes = (setbit 0x00 0u is_true%2#0) + let tmp%3#0: bool = (getbit encoded_bool%2#0 0u) + (assert tmp%3#0) + let is_true%3#0: uint64 = (getbit flags#0 3u) + let encoded_bool%3#0: bytes = (setbit 0x00 0u is_true%3#0) + let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) + let tmp%5#0: bool = (! tmp%4#0) + (assert tmp%5#0) + return flags#0 + + subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: + block@0: // L80 + let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds + let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds + let tmp%2#0: bytes = (itob 35382882839u) + let tmp%3#0: bool = (== tmp%1#0 tmp%2#0) + (assert tmp%3#0) + let tmp%4#0: bytes = ((extract 16 1) vector_flags#0) // on error: Index access is out of bounds + let is_true%0#0: uint64 = (getbit tmp%4#0 2u) + let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) + let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) + (assert tmp%5#0) + return vector_flags#0 + + program clear-state: + subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: + block@0: // L60 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/module.awst b/test_cases/arc4_types/out/module.awst index 96f7210bb2..61dbaa8a04 100644 --- a/test_cases/arc4_types/out/module.awst +++ b/test_cases/arc4_types/out/module.awst @@ -57,6 +57,13 @@ contract Arc4StructsTypeContract log(reinterpret_cast(flags)) assert(reinterpret_cast(reinterpret_cast(reinterpret_cast(coord_1))) == reinterpret_cast(coord_1)) test_cases.arc4_types.structs.nested_decode(new test_cases.arc4_types.structs.VectorFlags(vector=coord_1.copy(), flags=flags.copy())) + mutable: test_cases.arc4_types.structs.FrozenButMutable = new test_cases.arc4_types.structs.FrozenButMutable(mutable=arc4_encode(hex<"">, arc4.dynamic_array)) + copy: test_cases.arc4_types.structs.FrozenButMutable = mutable.copy() + copy.mutable.extend((42_arc4u8)) + assert(mutable != copy, comment="expected copy is different") + immutable: test_cases.arc4_types.structs.FrozenAndImmutable = new test_cases.arc4_types.structs.FrozenAndImmutable(one=12_arc4u64, two=34_arc4u64) + no_copy: test_cases.arc4_types.structs.FrozenAndImmutable = immutable + assert(no_copy == immutable) return true } diff --git a/test_cases/arc4_types/out/structs.O0.log b/test_cases/arc4_types/out/structs.O0.log index 05d5211496..269ee67913 100644 --- a/test_cases/arc4_types/out/structs.O0.log +++ b/test_cases/arc4_types/out/structs.O0.log @@ -1,61 +1,61 @@ PC Teal Stack 1 intcblock 0 8 1 2 -7 bytecblock 0x00 0x 0x000000083cfbf217 0x000000230384b842 -30 bytec_1 0x +7 bytecblock 0x 0x00 0x000000083cfbf217 0x000000230384b842 +30 bytec_0 0x 31 bytec_2 0x, 0x000000083CFBF217 32 concat 0x000000083CFBF217 33 bytec_3 0x000000083CFBF217, 0x000000230384B842 34 concat 0x000000083CFBF217000000230384B842 35 dup 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 -36 bytec_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x +36 bytec_0 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x 37 bytec_2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x, 0x000000083CFBF217 38 concat 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217 39 bytec_3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000230384B842 40 concat 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 41 callsub add 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 -148 proto 2 3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 -151 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 -153 intc_0 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0 -154 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0, 8 -155 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217 -156 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217000000230384B842 -158 intc_0 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217000000230384B842, 0 -159 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217000000230384B842, 0, 8 -160 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217 -161 callsub add_decimal 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217 -188 proto 2 1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217 -191 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 0x000000083CFBF217 -193 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 35382882839 -194 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 35382882839, 0x000000083CFBF217 -196 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 35382882839, 35382882839 -197 + 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 70765765678 -198 itob 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 0x0000001079F7E42E -199 retsub 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E -164 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000083CFBF217000000230384B842 -166 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000083CFBF217000000230384B842, 8 -167 dup 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000083CFBF217000000230384B842, 8, 8 -168 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842 -169 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000083CFBF217000000230384B842 -171 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000083CFBF217000000230384B842, 8 -172 dup 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000083CFBF217000000230384B842, 8, 8 -173 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842 -174 callsub add_decimal 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842 -188 proto 2 1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842 -191 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 0x000000230384B842 -193 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 150382884930 -194 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 150382884930, 0x000000230384B842 -196 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 150382884930, 150382884930 -197 + 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 300765769860 -198 itob 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 0x0000004607097084 -199 retsub 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x0000004607097084 -177 bytec_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x0000004607097084, 0x -178 uncover 2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000004607097084, 0x, 0x0000001079F7E42E -180 concat 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000004607097084, 0x0000001079F7E42E -181 swap 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x0000004607097084 -182 concat 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084 -183 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x000000083CFBF217000000230384B842 -185 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 -187 retsub 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 +237 proto 2 3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 +240 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 +242 intc_0 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0 +243 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0, 8 +244 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217 +245 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217000000230384B842 +247 intc_0 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217000000230384B842, 0 +248 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217000000230384B842, 0, 8 +249 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217 +250 callsub add_decimal 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217 +277 proto 2 1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217 +280 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 0x000000083CFBF217 +282 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 35382882839 +283 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 35382882839, 0x000000083CFBF217 +285 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 35382882839, 35382882839 +286 + 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 70765765678 +287 itob 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217, 0x000000083CFBF217, 0x0000001079F7E42E +288 retsub 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E +253 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000083CFBF217000000230384B842 +255 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000083CFBF217000000230384B842, 8 +256 dup 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000083CFBF217000000230384B842, 8, 8 +257 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842 +258 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000083CFBF217000000230384B842 +260 intc_1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000083CFBF217000000230384B842, 8 +261 dup 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000083CFBF217000000230384B842, 8, 8 +262 extract3 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842 +263 callsub add_decimal 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842 +277 proto 2 1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842 +280 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 0x000000230384B842 +282 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 150382884930 +283 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 150382884930, 0x000000230384B842 +285 btoi 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 150382884930, 150382884930 +286 + 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 300765769860 +287 itob 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x000000230384B842, 0x000000230384B842, 0x0000004607097084 +288 retsub 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x0000004607097084 +266 bytec_0 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x0000004607097084, 0x +267 uncover 2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000004607097084, 0x, 0x0000001079F7E42E +269 concat 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000004607097084, 0x0000001079F7E42E +270 swap 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E, 0x0000004607097084 +271 concat 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084 +272 frame_dig -2 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x000000083CFBF217000000230384B842 +274 frame_dig -1 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 +276 retsub 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 44 popn 2 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084 46 dup 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x0000001079F7E42E0000004607097084 47 intc_0 0x000000083CFBF217000000230384B842, 0x0000001079F7E42E0000004607097084, 0x0000001079F7E42E0000004607097084, 0 @@ -79,25 +79,25 @@ PC Teal Stack 58 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 1 59 switch main_for_header_1@3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1 63 b main_after_for@4 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1 -74 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00 +74 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00 75 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0 76 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0, 1 77 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80 -78 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00 +78 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00 79 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00, 0 80 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00, 0, 0 81 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00 -82 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00, 0x00 +82 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00, 0x00 83 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00, 0x00, 0 84 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00, 0x00, 0, 1 85 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x00, 0x80 86 cover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x80, 0x00 -88 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x80, 0x00, 0x00 +88 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x80, 0x00, 0x00 89 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x80, 0x00, 0x00, 0 90 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x80, 0x00, 0x00, 0, 0 91 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x80, 0x80, 0x00, 0x00 92 cover 3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0x80, 0x80, 0x00 -94 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0x80, 0x80, 0x00, 0x +94 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0x80, 0x80, 0x00, 0x 95 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0x80, 0x00, 0x, 0x80 97 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0x80, 0x00, 0x80 98 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00, 0x80, 0x80, 0x00 @@ -123,51 +123,51 @@ PC Teal Stack 122 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0 123 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 124 callsub check 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -200 proto 1 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -203 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -205 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0 -206 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -207 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00 -208 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00, 0 -209 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 1 -211 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80 -212 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80, 0 -213 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -214 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -215 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -217 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 -218 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -219 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00 -220 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00, 0 -221 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 0 -223 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00 -224 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0 -225 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -226 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -227 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -228 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -230 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 2 -231 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -232 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00 -233 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00, 0 -234 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 1 -236 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80 -237 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80, 0 -238 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -239 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -240 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -242 pushint 3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 3 -244 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -245 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00 -246 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00, 0 -247 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 0 -249 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00 -250 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0 -251 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -252 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -253 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -254 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -256 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 +289 proto 1 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 +292 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +294 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0 +295 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 +296 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00 +297 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00, 0 +298 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 1 +300 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80 +301 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80, 0 +302 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 +303 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 +304 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +306 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 +307 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 +308 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00 +309 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00, 0 +310 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 0 +312 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00 +313 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0 +314 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 +315 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 +316 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 +317 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +319 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 2 +320 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 +321 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00 +322 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00, 0 +323 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 1 +325 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80 +326 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80, 0 +327 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 +328 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 +329 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +331 pushint 3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 3 +333 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 +334 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00 +335 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00, 0 +336 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 0 +338 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00 +339 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0 +340 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 +341 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 +342 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 +343 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +345 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 127 pop 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0 128 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 129 log 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0 @@ -176,39 +176,94 @@ PC Teal Stack 133 dig 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 135 == 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0x000000083CFBF217000000230384B842, 1 136 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0x000000083CFBF217000000230384B842 -137 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0x000000083CFBF217000000230384B842, 0x +137 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0x000000083CFBF217000000230384B842, 0x 138 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0x, 0x000000083CFBF217000000230384B842 139 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0x000000083CFBF217000000230384B842 140 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842, 0xA0 141 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 142 callsub nested_decode 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -257 proto 1 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -260 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 -262 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0 -263 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0, 16 -265 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842 -266 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0 -267 intc_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0, 8 -268 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217 -269 pushint 35382882839 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 35382882839 -276 itob 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 0x000000083CFBF217 -277 == 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 -278 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -279 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 -281 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16 -283 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16, 1 -284 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0xA0 -285 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0xA0, 2 -286 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 -287 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1, 0x00 -288 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1, 0x00, 0 -289 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x00, 0, 1 -291 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x80 -292 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x80, 0 -293 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 -294 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -295 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 -297 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 +346 proto 1 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 +349 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +351 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0 +352 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0, 16 +354 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842 +355 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0 +356 intc_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0, 8 +357 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217 +358 pushint 35382882839 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 35382882839 +365 itob 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 0x000000083CFBF217 +366 == 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 +367 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 +368 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +370 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16 +372 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16, 1 +373 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0xA0 +374 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0xA0, 2 +375 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 +376 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1, 0x00 +377 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1, 0x00, 0 +378 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x00, 0, 1 +380 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x80 +381 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x80, 0 +382 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 +383 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 +384 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +386 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 145 pop 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1 -146 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 1 -147 return 1 \ No newline at end of file +146 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x +147 len 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0 +148 itob 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000000000000000 +149 extract 6 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000 +152 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000, 0x +153 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000 +154 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000, 2 +155 itob 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000, 0x0000000000000002 +156 extract 6 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000, 0x0002 +159 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000, 0x0002, 0x +160 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000, 0x, 0x0002 +161 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0000, 0x0002 +162 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x0002, 0x0000 +163 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000 +164 dupn 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x00020000 +166 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x00020000, 0 +167 extract_uint16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 2 +168 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 2, 0x00020000 +169 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 2, 0x00020000, 0x00020000 +170 len 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 2, 0x00020000, 4 +171 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 2, 4, 0x00020000 +172 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 2, 4, 0x00020000, 0x00020000 +173 uncover 3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 4, 0x00020000, 0x00020000, 2 +175 uncover 3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x00020000, 2, 4 +177 substring3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x0000 +178 extract 2 0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x +181 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x, 0x +182 pushbytes 0x2a 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x, 0x, "*" +185 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x, "*" +186 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, "*" +187 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, "*", "*" +188 len 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, "*", 1 +189 itob 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, "*", 0x0000000000000001 +190 extract 6 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, "*", 0x0001 +193 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x0001, "*" +194 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x00012A +195 dig 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x00012A, 0x00020000 +197 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x00012A, 0x00020000, 0 +198 extract_uint16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00020000, 0x00012A, 2 +199 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00012A, 2, 0x00020000 +201 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00012A, 2, 0x00020000, 0 +202 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00012A, 0x00020000, 0, 2 +204 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x00012A, 0x0002 +205 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x0002, 0x00012A +206 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x00020000, 0x000200012A +207 != 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 1 +208 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1 +209 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x +210 pushbytes 0x000000000000000c 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x, 0x000000000000000C +220 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000000000000C +221 pushbytes 0x0000000000000022 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000000000000C, 0x0000000000000022 +231 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000000000000C0000000000000022 +232 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000000000000C0000000000000022, 0x000000000000000C0000000000000022 +233 == 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 1 +234 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1 +235 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 1 +236 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.destructured.ir b/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.destructured.ir index c450a665c9..193289164a 100644 --- a/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.destructured.ir +++ b/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.destructured.ir @@ -1,27 +1,27 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let (coord_3#0: bytes, add%1#0: bytes, add%2#0: bytes) = test_cases.arc4_types.structs.add(0x000000083cfbf217000000230384b842, 0x000000083cfbf217000000230384b842) let val#0: bytes = ((extract 0 8) coord_3#0) // on error: Index access is out of bounds let val#2: bytes = ((extract 8 8) coord_3#0) // on error: Index access is out of bounds let loop_counter%0#0: uint64 = 0u goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 (log val#0) goto loop_counter%0#0 ? block@4 : block@3 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#0: uint64 = 1u let val#0: bytes = val#2 goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) (log 0xa0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = ((extract 0 8) v1#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) v2#0) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -32,7 +32,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -40,7 +40,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -62,7 +62,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds let tmp%1#0: bytes = ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -77,5 +77,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal index 70f730ef1c..ab3c71ba12 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal @@ -2,27 +2,27 @@ test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program: intcblock 0 8 1 2 - bytecblock 0x00 0x 0x000000083cfbf217 0x000000230384b842 - // arc4_types/structs.py:27 + bytecblock 0x 0x00 0x000000083cfbf217 0x000000230384b842 + // arc4_types/structs.py:36 // coord_1 = Vector(x=Decimal("35.382882839"), y=Decimal("150.382884930")) - bytec_1 // 0x + bytec_0 // 0x bytec_2 // 0x000000083cfbf217 concat bytec_3 // 0x000000230384b842 concat dup - // arc4_types/structs.py:28 + // arc4_types/structs.py:37 // coord_2 = Vector(y=Decimal("150.382884930"), x=Decimal("35.382882839")) - bytec_1 // 0x + bytec_0 // 0x bytec_2 // 0x000000083cfbf217 concat bytec_3 // 0x000000230384b842 concat - // arc4_types/structs.py:29 + // arc4_types/structs.py:38 // coord_3 = add(coord_1.copy(), coord_2.copy()) callsub add popn 2 - // arc4_types/structs.py:30 + // arc4_types/structs.py:39 // for val in (coord_3.x, coord_3.y): dup intc_0 // 0 @@ -37,10 +37,10 @@ test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program: swap main_for_body@1: - // arc4_types/structs.py:31 + // arc4_types/structs.py:40 // log(val.bytes) log - // arc4_types/structs.py:30 + // arc4_types/structs.py:39 // for val in (coord_3.x, coord_3.y): dup switch main_for_header_1@3 @@ -49,33 +49,33 @@ main_for_body@1: main_for_header_1@3: intc_2 // 1 bury 1 - // arc4_types/structs.py:30 + // arc4_types/structs.py:39 // for val in (coord_3.x, coord_3.y): dig 1 b main_for_body@1 main_after_for@4: - // arc4_types/structs.py:33 + // arc4_types/structs.py:42 // flags = Flags(a=arc4.Bool(True), b=arc4.Bool(False), c=arc4.Bool(True), d=arc4.Bool(False)) - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 intc_2 // 1 setbit - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 dup setbit - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 intc_2 // 1 setbit cover 2 - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 dup setbit cover 3 - bytec_1 // 0x + bytec_0 // 0x uncover 2 concat swap @@ -99,32 +99,101 @@ main_after_for@4: pushint 3 // 3 uncover 2 setbit - // arc4_types/structs.py:34 + // arc4_types/structs.py:43 // check(flags.copy()) dup callsub check pop - // arc4_types/structs.py:35 + // arc4_types/structs.py:44 // log(flags.bytes) dup log - // arc4_types/structs.py:36 + // arc4_types/structs.py:45 // assert Vector.from_bytes(coord_1.bytes).bytes == coord_1.bytes dig 3 dup dig 1 == assert - // arc4_types/structs.py:38 + // arc4_types/structs.py:47 // nested_decode(VectorFlags(coord_1.copy(), flags.copy())) - bytec_1 // 0x + bytec_0 // 0x swap concat swap concat callsub nested_decode pop - // arc4_types/structs.py:40 + // arc4_types/structs.py:49 + // mutable = FrozenButMutable(arc4.DynamicBytes()) + bytec_0 // 0x + len + itob + extract 6 2 + bytec_0 // 0x + concat + intc_3 // 2 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + swap + concat + // arc4_types/structs.py:50 + // copy = mutable.copy() + dupn 2 + // arc4_types/structs.py:51 + // copy.mutable.append(arc4.Byte(42)) + intc_0 // 0 + extract_uint16 + swap + dup + len + swap + dup + uncover 3 + uncover 3 + substring3 + extract 2 0 + bytec_0 // 0x + pushbytes 0x2a + concat + concat + dup + len + itob + extract 6 2 + swap + concat + dig 1 + intc_0 // 0 + extract_uint16 + uncover 2 + intc_0 // 0 + uncover 2 + extract3 + swap + concat + // arc4_types/structs.py:52 + // assert mutable != copy, "expected copy is different" + != + assert // expected copy is different + // arc4_types/structs.py:54 + // immutable = FrozenAndImmutable(arc4.UInt64(12), arc4.UInt64(34)) + bytec_0 // 0x + pushbytes 0x000000000000000c + concat + pushbytes 0x0000000000000022 + concat + // arc4_types/structs.py:55 + // no_copy = immutable + dup + // arc4_types/structs.py:56 + // assert no_copy == immutable + == + assert + // arc4_types/structs.py:58 // return True intc_2 // 1 return @@ -132,11 +201,11 @@ main_after_for@4: // test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> bytes, bytes, bytes: add: - // arc4_types/structs.py:46-47 + // arc4_types/structs.py:64-65 // @subroutine // def add(v1: Vector, v2: Vector) -> Vector: proto 2 3 - // arc4_types/structs.py:49 + // arc4_types/structs.py:67 // x=add_decimal(v1.x, v2.x), frame_dig -2 intc_0 // 0 @@ -147,7 +216,7 @@ add: intc_1 // 8 extract3 // on error: Index access is out of bounds callsub add_decimal - // arc4_types/structs.py:50 + // arc4_types/structs.py:68 // y=add_decimal(v1.y, v2.y), frame_dig -2 intc_1 // 8 @@ -158,12 +227,12 @@ add: dup extract3 // on error: Index access is out of bounds callsub add_decimal - // arc4_types/structs.py:48-51 + // arc4_types/structs.py:66-69 // return Vector( // x=add_decimal(v1.x, v2.x), // y=add_decimal(v1.y, v2.y), // ) - bytec_1 // 0x + bytec_0 // 0x uncover 2 concat swap @@ -175,11 +244,11 @@ add: // test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: add_decimal: - // arc4_types/structs.py:68-69 + // arc4_types/structs.py:86-87 // @subroutine // def add_decimal(x: Decimal, y: Decimal) -> Decimal: proto 2 1 - // arc4_types/structs.py:70 + // arc4_types/structs.py:88 // return Decimal.from_bytes(op.itob(op.btoi(x.bytes) + op.btoi(y.bytes))) frame_dig -2 btoi @@ -192,28 +261,28 @@ add_decimal: // test_cases.arc4_types.structs.check(flags: bytes) -> bytes: check: - // arc4_types/structs.py:54-55 + // arc4_types/structs.py:72-73 // @subroutine // def check(flags: Flags) -> None: proto 1 1 - // arc4_types/structs.py:56 + // arc4_types/structs.py:74 // assert flags.a.native frame_dig -1 intc_0 // 0 getbit - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 uncover 2 setbit intc_0 // 0 getbit assert - // arc4_types/structs.py:57 + // arc4_types/structs.py:75 // assert not flags.b.native frame_dig -1 intc_2 // 1 getbit - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 uncover 2 setbit @@ -221,24 +290,24 @@ check: getbit ! assert - // arc4_types/structs.py:58 + // arc4_types/structs.py:76 // assert flags.c.native frame_dig -1 intc_3 // 2 getbit - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 uncover 2 setbit intc_0 // 0 getbit assert - // arc4_types/structs.py:59 + // arc4_types/structs.py:77 // assert not flags.d.native frame_dig -1 pushint 3 // 3 getbit - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 uncover 2 setbit @@ -252,11 +321,11 @@ check: // test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: nested_decode: - // arc4_types/structs.py:62-63 + // arc4_types/structs.py:80-81 // @subroutine // def nested_decode(vector_flags: VectorFlags) -> None: proto 1 1 - // arc4_types/structs.py:64 + // arc4_types/structs.py:82 // assert vector_flags.vector.x.bytes == op.itob(35382882839) frame_dig -1 intc_0 // 0 @@ -269,7 +338,7 @@ nested_decode: itob == assert - // arc4_types/structs.py:65 + // arc4_types/structs.py:83 // assert vector_flags.flags.c.native frame_dig -1 pushint 16 // 16 @@ -277,7 +346,7 @@ nested_decode: extract3 // on error: Index access is out of bounds intc_3 // 2 getbit - bytec_0 // 0x00 + bytec_1 // 0x00 intc_0 // 0 uncover 2 setbit diff --git a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.clear.teal b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.clear.teal index 21aa8f0f49..f841c9a5e6 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.clear.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program: - // arc4_types/structs.py:43 + // arc4_types/structs.py:61 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir index 44b2022ef3..b870eab381 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir +++ b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir @@ -1,7 +1,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program approval: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program() -> bool: - block@0: // L26 + block@0: // L35 let encoded_tuple_buffer%1#0: bytes = (concat 0x 0x000000083cfbf217) let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x000000230384b842) let coord_1#0: bytes = encoded_tuple_buffer%2#0 @@ -17,16 +17,16 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let loop_counter%0#0: uint64 = 0u let val#0: bytes = tmp%0#0 goto block@1 - block@1: // for_body_L31 + block@1: // for_body_L40 (log val#0) goto block@2 - block@2: // for_footer_L30 + block@2: // for_footer_L39 goto_nth [block@3][loop_counter%0#0] else goto block@4 - block@3: // for_header_1_L30 + block@3: // for_header_1_L39 let loop_counter%0#0: uint64 = 1u let val#0: bytes = tmp%1#0 goto block@1 - block@4: // after_for_L30 + block@4: // after_for_L39 let encoded_bool%0#0: bytes = (setbit 0x00 0u 1u) let encoded_bool%1#0: bytes = (setbit 0x00 0u 0u) let encoded_bool%2#0: bytes = (setbit 0x00 0u 1u) @@ -49,10 +49,44 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let encoded_tuple_buffer%12#0: bytes = (concat 0x copy%3#0) let encoded_tuple_buffer%13#0: bytes = (concat encoded_tuple_buffer%12#0 copy%4#0) let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) + let length%0#0: uint64 = (len 0x) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x) + let as_bytes%1#0: bytes = (itob 2u) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%15#0: bytes = (concat 0x offset_as_uint16%0#0) + let encoded_tuple_buffer%16#0: bytes = (concat encoded_tuple_buffer%15#0 encoded_value%0#0) + let mutable#0: bytes = encoded_tuple_buffer%16#0 + let copy%5#0: bytes = mutable#0 + let copy#0: bytes = copy%5#0 + let item_start_offset%0#0: uint64 = (extract_uint16 copy#0 0u) + let item_end_offset%0#0: uint64 = (len copy#0) + let tmp%3#0: bytes = (substring3 copy#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%3#0) + let data%0#0: bytes = (concat 0x 0x2a) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let assigned_value%0#0: bytes = concat_result%0#0 + let item_offset%0#0: uint64 = (extract_uint16 copy#0 0u) + let data_up_to_item%0#0: bytes = (extract3 copy#0 0u item_offset%0#0) + let updated_data%0#0: bytes = (concat data_up_to_item%0#0 assigned_value%0#0) + let copy#0: bytes = updated_data%0#0 + let tmp%4#0: bool = (!= mutable#0 copy#0) + (assert tmp%4#0) // expected copy is different + let encoded_tuple_buffer%18#0: bytes = (concat 0x 0x000000000000000c) + let encoded_tuple_buffer%19#0: bytes = (concat encoded_tuple_buffer%18#0 0x0000000000000022) + let immutable#0: bytes = encoded_tuple_buffer%19#0 + let no_copy#0: bytes = immutable#0 + let tmp%5#0: bool = (== no_copy#0 immutable#0) + (assert tmp%5#0) return 1u subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : - block@0: // L46 + block@0: // L64 let tmp%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds let tmp%1#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -64,7 +98,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return encoded_tuple_buffer%2#0 v1#0 v2#0 subroutine test_cases.arc4_types.structs.add_decimal(x: bytes, y: bytes) -> bytes: - block@0: // L68 + block@0: // L86 let tmp%0#0: uint64 = (btoi x#0) let tmp%1#0: uint64 = (btoi y#0) let tmp%2#0: uint64 = (+ tmp%0#0 tmp%1#0) @@ -72,7 +106,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return tmp%3#0 subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: - block@0: // L54 + block@0: // L72 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -94,7 +128,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: return flags#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: - block@0: // L62 + block@0: // L80 let tmp%0#0: bytes = (extract3 vector_flags#0 0u 16u) // on error: Index access is out of bounds let tmp%1#0: bytes = (extract3 tmp%0#0 0u 8u) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -109,5 +143,5 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: - block@0: // L42 + block@0: // L60 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/puya.log b/test_cases/arc4_types/puya.log index 17157a5a81..570b904069 100644 --- a/test_cases/arc4_types/puya.log +++ b/test_cases/arc4_types/puya.log @@ -522,48 +522,48 @@ debug: Replaced trivial Phi node: let my_tuple#1: bytes = φ(my_tuple#0 <- block debug: Terminated block@13: // bool_merge_L40 debug: Sealing block@0: // L51 debug: Terminated block@0: // L51 -debug: Sealing block@0: // L25 -debug: Terminated block@0: // L25 -debug: Sealing block@1: // abi_routing_L25 -debug: Terminated block@1: // abi_routing_L25 -debug: Sealing block@2: // bare_routing_L25 -debug: Terminated block@2: // bare_routing_L25 -debug: Sealing block@3: // after_if_else_L25 -debug: Terminated block@3: // after_if_else_L25 -debug: Sealing block@0: // L46 -debug: Terminated block@0: // L46 -debug: Sealing block@0: // L68 -debug: Terminated block@0: // L68 -debug: Sealing block@0: // L54 -debug: Terminated block@0: // L54 -debug: Sealing block@0: // L62 -debug: Terminated block@0: // L62 -debug: Sealing block@0: // L26 -debug: Terminated block@0: // L26 -debug: Looking for 'loop_counter%0' in an unsealed block creating an incomplete Phi: block@1: // for_body_L31 -debug: Created Phi assignment: let loop_counter%0#1: uint64 = undefined while trying to resolve 'loop_counter%0' in block@1: // for_body_L31 -debug: Looking for 'val' in an unsealed block creating an incomplete Phi: block@1: // for_body_L31 -debug: Created Phi assignment: let val#1: bytes = undefined while trying to resolve 'val' in block@1: // for_body_L31 -debug: Terminated block@1: // for_body_L31 -debug: Sealing block@2: // for_footer_L30 -debug: Terminated block@2: // for_footer_L30 -debug: Sealing block@3: // for_header_1_L30 -debug: Terminated block@3: // for_header_1_L30 -debug: Sealing block@1: // for_body_L31 -debug: Added loop_counter%0#0 to Phi node: let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0) in block@0: // L26 -debug: Added loop_counter%0#2 to Phi node: let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) in block@3: // for_header_1_L30 -debug: Added val#0 to Phi node: let val#1: bytes = φ(val#0 <- block@0) in block@0: // L26 -debug: Added val#2 to Phi node: let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) in block@3: // for_header_1_L30 -debug: Sealing block@4: // after_for_L30 -debug: Created Phi assignment: let coord_1#1: bytes = undefined while trying to resolve 'coord_1' in block@1: // for_body_L31 -debug: Added coord_1#0 to Phi node: let coord_1#1: bytes = φ(coord_1#0 <- block@0) in block@0: // L26 -debug: Added coord_1#1 to Phi node: let coord_1#1: bytes = φ(coord_1#0 <- block@0, coord_1#1 <- block@3) in block@3: // for_header_1_L30 +debug: Sealing block@0: // L34 +debug: Terminated block@0: // L34 +debug: Sealing block@1: // abi_routing_L34 +debug: Terminated block@1: // abi_routing_L34 +debug: Sealing block@2: // bare_routing_L34 +debug: Terminated block@2: // bare_routing_L34 +debug: Sealing block@3: // after_if_else_L34 +debug: Terminated block@3: // after_if_else_L34 +debug: Sealing block@0: // L64 +debug: Terminated block@0: // L64 +debug: Sealing block@0: // L86 +debug: Terminated block@0: // L86 +debug: Sealing block@0: // L72 +debug: Terminated block@0: // L72 +debug: Sealing block@0: // L80 +debug: Terminated block@0: // L80 +debug: Sealing block@0: // L35 +debug: Terminated block@0: // L35 +debug: Looking for 'loop_counter%0' in an unsealed block creating an incomplete Phi: block@1: // for_body_L40 +debug: Created Phi assignment: let loop_counter%0#1: uint64 = undefined while trying to resolve 'loop_counter%0' in block@1: // for_body_L40 +debug: Looking for 'val' in an unsealed block creating an incomplete Phi: block@1: // for_body_L40 +debug: Created Phi assignment: let val#1: bytes = undefined while trying to resolve 'val' in block@1: // for_body_L40 +debug: Terminated block@1: // for_body_L40 +debug: Sealing block@2: // for_footer_L39 +debug: Terminated block@2: // for_footer_L39 +debug: Sealing block@3: // for_header_1_L39 +debug: Terminated block@3: // for_header_1_L39 +debug: Sealing block@1: // for_body_L40 +debug: Added loop_counter%0#0 to Phi node: let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0) in block@0: // L35 +debug: Added loop_counter%0#2 to Phi node: let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) in block@3: // for_header_1_L39 +debug: Added val#0 to Phi node: let val#1: bytes = φ(val#0 <- block@0) in block@0: // L35 +debug: Added val#2 to Phi node: let val#1: bytes = φ(val#0 <- block@0, val#2 <- block@3) in block@3: // for_header_1_L39 +debug: Sealing block@4: // after_for_L39 +debug: Created Phi assignment: let coord_1#1: bytes = undefined while trying to resolve 'coord_1' in block@1: // for_body_L40 +debug: Added coord_1#0 to Phi node: let coord_1#1: bytes = φ(coord_1#0 <- block@0) in block@0: // L35 +debug: Added coord_1#1 to Phi node: let coord_1#1: bytes = φ(coord_1#0 <- block@0, coord_1#1 <- block@3) in block@3: // for_header_1_L39 debug: Replacing trivial Phi node: let coord_1#1: bytes = φ(coord_1#0 <- block@0, coord_1#1 <- block@3) (coord_1#1) with coord_1#0 debug: Deleting Phi assignment: let coord_1#1: bytes = φ(coord_1#0 <- block@0, coord_1#1 <- block@3) debug: Replaced trivial Phi node: let coord_1#1: bytes = φ(coord_1#0 <- block@0, coord_1#1 <- block@3) (coord_1#1) with coord_1#0 in current definition for 3 blocks -debug: Terminated block@4: // after_for_L30 -debug: Sealing block@0: // L42 -debug: Terminated block@0: // L42 +debug: Terminated block@4: // after_for_L39 +debug: Sealing block@0: // L60 +debug: Terminated block@0: // L60 debug: Sealing block@0: // L6 debug: Terminated block@0: // L6 debug: Sealing block@1: // abi_routing_L6 @@ -2572,6 +2572,14 @@ debug: Found equivalence set: encoded_tuple_buffer%10#0, flags#0, copy%2#0, copy debug: Replacing {encoded_tuple_buffer%10#0, copy%2#0, copy%4#0} with flags#0 made 3 modifications debug: Found equivalence set: check%0#0, copy%2#1 debug: Found equivalence set: nested_decode%0#0, encoded_tuple_buffer%13#1 +debug: Found equivalence set: encoded_tuple_buffer%16#0, mutable#0, copy%5#0, copy#0 +debug: Replacing {encoded_tuple_buffer%16#0, copy%5#0, copy#0} with mutable#0 made 6 modifications +debug: Found equivalence set: concat_result%0#0, assigned_value%0#0 +debug: Replacing {assigned_value%0#0} with concat_result%0#0 made 1 modifications +debug: Found equivalence set: updated_data%0#0, copy#1 +debug: Replacing {updated_data%0#0} with copy#1 made 1 modifications +debug: Found equivalence set: encoded_tuple_buffer%19#0, immutable#0, no_copy#0 +debug: Replacing {encoded_tuple_buffer%19#0, no_copy#0} with immutable#0 made 2 modifications debug: Optimizer: Intrinsic Simplifier debug: Simplified (concat 0x 0x000000083cfbf217) to 0x000000083cfbf217 debug: Simplified (concat 0x 0x000000083cfbf217) to 0x000000083cfbf217 @@ -2584,6 +2592,13 @@ debug: Simplified (setbit 0x00 0u 0u) to 0x00 debug: Simplified (concat 0x encoded_bool%0#0) to encoded_bool%0#0 debug: Simplified (== coord_1#0 coord_1#0) to 1u debug: Simplified (concat 0x coord_1#0) to coord_1#0 +debug: Simplified (len 0x) to 0u +debug: Simplified (concat length_uint16%0#0 0x) to length_uint16%0#0 +debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x0002 +debug: Simplified (concat 0x offset_as_uint16%0#0) to offset_as_uint16%0#0 +debug: Simplified (concat 0x 0x2a) to 0x2a +debug: Simplified (concat 0x 0x000000000000000c) to 0x000000000000000c +debug: Simplified (== immutable#0 immutable#0) to 1u debug: Optimizer: Remove Unused Variables debug: Removing unused variable current_tail_offset%0#0 debug: Removing unused variable encoded_tuple_buffer%0#0 @@ -2595,18 +2610,36 @@ debug: Not removing unused assignment since source is not marked as pure: let ch debug: Removing unused variable current_tail_offset%3#0 debug: Removing unused variable encoded_tuple_buffer%11#0 debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) +debug: Removing unused variable current_tail_offset%4#0 +debug: Removing unused variable encoded_tuple_buffer%14#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable current_tail_offset%5#0 +debug: Removing unused variable current_tail_offset%6#0 +debug: Removing unused variable encoded_tuple_buffer%17#0 +debug: Removing unused variable immutable#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: simplifying a goto nth with two targets into a conditional branch -debug: simplified terminator of block@2: // for_footer_L30 from goto_nth [block@3][loop_counter%0#1] else goto block@4 to goto loop_counter%0#1 ? block@4 : block@3 +debug: simplified terminator of block@2: // for_footer_L39 from goto_nth [block@3][loop_counter%0#1] else goto block@4 to goto loop_counter%0#1 ? block@4 : block@3 debug: Optimizer: Remove Linear Jump -debug: Replaced predecessor block@2: // for_footer_L30 with block@1: // for_body_L31 in block@3: // for_header_1_L30 -debug: Replaced predecessor block@2: // for_footer_L30 with block@1: // for_body_L31 in block@4: // after_for_L30 -debug: Merged linear block@2: // for_footer_L30 into block@1: // for_body_L31 +debug: Replaced predecessor block@2: // for_footer_L39 with block@1: // for_body_L40 in block@3: // for_header_1_L39 +debug: Replaced predecessor block@2: // for_footer_L39 with block@1: // for_body_L40 in block@4: // after_for_L39 +debug: Merged linear block@2: // for_footer_L39 into block@1: // for_body_L40 debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Replacing redundant declaration let item_offset%0#0: uint64 = (extract_uint16 mutable#0 0u) with copy of existing registers (Register(source_location=arc4_types/structs.py:51:8-20, ir_type=uint64, name='item_start_offset%0', version=0),) +debug: Found equivalence set: encoded_bool%0#0, encoded_tuple_buffer%7#0 +debug: Replacing {encoded_tuple_buffer%7#0} with encoded_bool%0#0 made 1 modifications +debug: Found equivalence set: coord_1#0, encoded_tuple_buffer%12#0 +debug: Replacing {encoded_tuple_buffer%12#0} with coord_1#0 made 1 modifications +debug: Found equivalence set: length_uint16%0#0, encoded_value%0#0 +debug: Replacing {encoded_value%0#0} with length_uint16%0#0 made 2 modifications +debug: Found equivalence set: offset_as_uint16%0#0, encoded_tuple_buffer%15#0 +debug: Replacing {encoded_tuple_buffer%15#0} with offset_as_uint16%0#0 made 1 modifications +debug: Found equivalence set: item_start_offset%0#0, item_offset%0#0 +debug: Replacing {item_offset%0#0} with item_start_offset%0#0 made 1 modifications debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.structs.add debug: Splitting parallel copies prior to optimization @@ -2693,14 +2726,13 @@ debug: Begin optimization pass 2/100 debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation -debug: Found equivalence set: coord_1#0, encoded_tuple_buffer%12#0 -debug: Replacing {encoded_tuple_buffer%12#0} with coord_1#0 made 1 modifications debug: Optimizer: Intrinsic Simplifier debug: Simplified (concat 0x000000083cfbf217 0x000000230384b842) to 0x000000083cfbf217000000230384b842 debug: Simplified (concat 0x000000083cfbf217 0x000000230384b842) to 0x000000083cfbf217000000230384b842 debug: Simplified (getbit 0x00 0u) to 0u debug: Simplified (getbit 0x80 0u) to 1u debug: Simplified (getbit 0x00 0u) to 0u +debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0000 debug: Optimizer: Remove Unused Variables debug: Removing unused variable encoded_tuple_buffer%1#0 debug: Removing unused variable encoded_tuple_buffer%4#0 @@ -2708,10 +2740,16 @@ debug: Removing unused variable encoded_bool%0#0 debug: Removing unused variable encoded_bool%1#0 debug: Removing unused variable encoded_bool%2#0 debug: Removing unused variable encoded_bool%3#0 -debug: Removing unused variable encoded_tuple_buffer%7#0 debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(flags#0) debug: Removing unused variable tmp%2#0 debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) +debug: Removing unused variable length%0#0 +debug: Removing unused variable as_bytes%0#0 +debug: Removing unused variable offset_as_uint16%0#0 +debug: Removing unused variable data_length%0#0 +debug: Removing unused variable data%0#0 +debug: Removing unused variable encoded_tuple_buffer%18#0 +debug: Removing unused variable tmp%5#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -2794,6 +2832,7 @@ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Simplified (setbit 0x80 1u 0u) to 0x80 +debug: Simplified (concat 0x0002 0x0000) to 0x00020000 debug: Optimizer: Remove Unused Variables debug: Removing unused variable coord_1#0 debug: Removing unused variable coord_2#0 @@ -2802,6 +2841,7 @@ debug: Removing unused variable is_true%1#0 debug: Removing unused variable is_true%2#0 debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(flags#0) debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) +debug: Removing unused variable length_uint16%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -2882,10 +2922,13 @@ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Simplified (setbit 0x80 2u 1u) to 0xa0 +debug: Simplified (extract_uint16 0x00020000 0u) to 2u +debug: Simplified (len 0x00020000) to 4u debug: Optimizer: Remove Unused Variables debug: Removing unused variable encoded_tuple_buffer%8#0 debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(flags#0) debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) +debug: Removing unused variable mutable#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -2966,10 +3009,14 @@ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Simplified (setbit 0xa0 3u 0u) to 0xa0 +debug: Simplified (substring3 0x00020000 2u 4u) to 0x0000 +debug: Simplified (extract3 0x00020000 0u 2u) to 0x0002 debug: Optimizer: Remove Unused Variables debug: Removing unused variable encoded_tuple_buffer%9#0 debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(flags#0) debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) +debug: Removing unused variable item_start_offset%0#0 +debug: Removing unused variable item_end_offset%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -3050,10 +3097,13 @@ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Simplified (concat 0x000000083cfbf217000000230384b842 0xa0) to 0x000000083cfbf217000000230384b842a0 +debug: Simplified ((extract 2 0) 0x0000) to 0x debug: Optimizer: Remove Unused Variables debug: Removing unused variable flags#0 debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(encoded_tuple_buffer%13#0) +debug: Removing unused variable tmp%3#0 +debug: Removing unused variable data_up_to_item%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -3133,10 +3183,12 @@ debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContra debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x 0x2a) to 0x2a debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) debug: Removing unused variable encoded_tuple_buffer%13#0 debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Removing unused variable expr_value_trimmed%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -3216,9 +3268,11 @@ debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContra debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier +debug: Simplified (len 0x2a) to 1u debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Removing unused variable concatenated%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -3292,7 +3346,509 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: No optimizations performed in pass 8, ending loop +debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_8.ir +debug: Begin optimization pass 9/100 +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%2#0) to 0x0001 +debug: Optimizer: Remove Unused Variables +debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) +debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Removing unused variable len_%0#0 +debug: Removing unused variable as_bytes%2#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add_decimal +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.check +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.nested_decode +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_9.ir +debug: Begin optimization pass 10/100 +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0001 0x2a) to 0x00012a +debug: Optimizer: Remove Unused Variables +debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) +debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Removing unused variable len_16_bit%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add_decimal +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.check +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.nested_decode +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_10.ir +debug: Begin optimization pass 11/100 +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0002 0x00012a) to 0x000200012a +debug: Optimizer: Remove Unused Variables +debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) +debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Removing unused variable concat_result%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add_decimal +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.check +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.nested_decode +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_11.ir +debug: Begin optimization pass 12/100 +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (!= 0x00020000 0x000200012a) to 1u +debug: Optimizer: Remove Unused Variables +debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) +debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Removing unused variable copy#1 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add_decimal +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.check +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.nested_decode +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_12.ir +debug: Begin optimization pass 13/100 +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) +debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Removing unused variable tmp%4#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add_decimal +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.check +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.nested_decode +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.opt_pass_13.ir +debug: Begin optimization pass 14/100 +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Not removing unused assignment since source is not marked as pure: let check%0#0: bytes = test_cases.arc4_types.structs.check(0xa0) +debug: Not removing unused assignment since source is not marked as pure: let nested_decode%0#0: bytes = test_cases.arc4_types.structs.nested_decode(0x000000083cfbf217000000230384b842a0) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.add_decimal +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.check +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.nested_decode +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: No optimizations performed in pass 14, ending loop debug: Removing Phis from test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program debug: Removing Phis from test_cases.arc4_types.structs.add debug: Removing Phis from test_cases.arc4_types.structs.add_decimal diff --git a/test_cases/arc4_types/structs.py b/test_cases/arc4_types/structs.py index 1e001e3de2..8302351fbf 100644 --- a/test_cases/arc4_types/structs.py +++ b/test_cases/arc4_types/structs.py @@ -22,6 +22,15 @@ class VectorFlags(arc4.Struct): flags: Flags +class FrozenButMutable(arc4.Struct, frozen=True): + mutable: arc4.DynamicBytes + + +class FrozenAndImmutable(arc4.Struct, frozen=True): + one: arc4.UInt64 + two: arc4.UInt64 + + class Arc4StructsTypeContract(Contract): def approval_program(self) -> bool: coord_1 = Vector(x=Decimal("35.382882839"), y=Decimal("150.382884930")) @@ -37,6 +46,15 @@ def approval_program(self) -> bool: nested_decode(VectorFlags(coord_1.copy(), flags.copy())) + mutable = FrozenButMutable(arc4.DynamicBytes()) + copy = mutable.copy() + copy.mutable.append(arc4.Byte(42)) + assert mutable != copy, "expected copy is different" + + immutable = FrozenAndImmutable(arc4.UInt64(12), arc4.UInt64(34)) + no_copy = immutable + assert no_copy == immutable + return True def clear_state_program(self) -> bool: diff --git a/tests/test_expected_output/arc4.test b/tests/test_expected_output/arc4.test index 6b1855548f..cce1cac803 100644 --- a/tests/test_expected_output/arc4.test +++ b/tests/test_expected_output/arc4.test @@ -212,6 +212,11 @@ class Arc4CopyContract(arc4.ARC4Contract): ## case: copy_arc4_struct from algopy import GlobalState, LocalState, Txn, arc4, subroutine, uenumerate +class FrozenMutable(arc4.Struct, frozen=True): + mutable: arc4.DynamicBytes + +class FrozenImmutable(arc4.Struct, frozen=True): + number: arc4.UInt64 class InnerStruct(arc4.Struct): number: arc4.UInt64 @@ -240,6 +245,18 @@ def method_outer(outer: OuterStruct) -> None: def method_tup(tup: tuple[InnerStruct, bool]) -> None: pass +@subroutine +def method_mutable_struct(mut: FrozenMutable) -> None: + pass + +@subroutine +def method_immutable_struct(mut: FrozenImmutable) -> None: + pass + +@subroutine +def method_immutable(tup: tuple[InnerStruct, bool]) -> None: + pass + @subroutine def new_inner() -> InnerStruct: return InnerStruct(number=arc4.UInt64(1)) @@ -257,6 +274,9 @@ class Arc4StructCopyTests(arc4.ARC4Contract): self.global_inner = InnerStruct(number=arc4.UInt64(1)) self.global_outer = OuterStruct(number=arc4.UInt64(2), inner=InnerStruct(number=arc4.UInt64(3))) self.global_proxy = GlobalState(OuterStruct(number=arc4.UInt64(1), inner=InnerStruct(number=arc4.UInt64(2)))) + self.global_mutable = FrozenMutable(arc4.DynamicBytes()) + self.global_immutable = FrozenImmutable(arc4.UInt64(42)) + self.global_mutable_proxy = GlobalState(FrozenMutable(arc4.DynamicBytes())) self.local = LocalState(OuterStruct) @arc4.abimethod @@ -264,10 +284,14 @@ class Arc4StructCopyTests(arc4.ARC4Contract): # **INIT** var_inner = InnerStruct(number=arc4.UInt64(4)) var_outer = OuterStruct(number=arc4.UInt64(5), inner=InnerStruct(number=arc4.UInt64(6))) + var_mutable_struct = FrozenMutable(arc4.DynamicBytes()) + var_immutable_struct = FrozenImmutable(arc4.UInt64(12)) number = arc4.UInt64(42) bad_outer_from_locals = OuterStruct(number, var_inner) ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being passed to a struct constructor ok_outer_from_locals = OuterStruct(number, var_inner.copy()) + ok_immutable = var_immutable_struct + ok_mutable = var_mutable_struct.copy() # **FUNCTION LOCALS** bad_inner = var_inner ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable @@ -284,6 +308,14 @@ class Arc4StructCopyTests(arc4.ARC4Contract): method_num(var_outer.number) method_num(var_outer.inner.number) + method_mutable_struct(var_mutable_struct) + method_mutable_struct(var_mutable_struct.copy()) + method_immutable_struct(var_immutable_struct) + method_mutable_struct(self.global_mutable) ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being passed to a subroutine from state + method_mutable_struct(self.global_mutable_proxy.value) ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being passed to a subroutine from state + method_mutable_struct(self.global_mutable_proxy.value.copy()) + method_immutable_struct(self.global_immutable) + method_inner(var_outer.inner) ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being passed to a subroutine method_inner(var_outer.inner.copy()) @@ -315,6 +347,10 @@ class Arc4StructCopyTests(arc4.ARC4Contract): bol = self.global_proxy.maybe()[1] bad_outer = self.global_proxy.get(new_outer()) ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable var_outer = self.global_proxy.get(new_outer()).copy() + bad_mutable = self.global_mutable ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable + bad_mutable = self.global_mutable.copy() + bad_mutable = self.global_mutable_proxy.value ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable + bad_mutable = self.global_mutable_proxy.value.copy() method_outer(self.local[Txn.sender]) ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being passed to a subroutine from state method_outer(self.local[Txn.sender].copy()) From dac51be3c5cc3487ac303e9160fd9d8bd7b17788 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Wed, 30 Oct 2024 15:33:43 +0800 Subject: [PATCH 03/20] fix: passing a mutable value more than once to a subroutine will now raise an error as allowing it would break semantic compatability BREAKING CHANGE: passing a mutable value more than once to a subroutine causes an error --- src/puya/ir/builder/callsub.py | 8 ++++++++ tests/test_expected_output/arc4.test | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/puya/ir/builder/callsub.py b/src/puya/ir/builder/callsub.py index d0c65c3bbd..96f838a900 100644 --- a/src/puya/ir/builder/callsub.py +++ b/src/puya/ir/builder/callsub.py @@ -2,6 +2,7 @@ import attrs +from puya import log from puya.awst import ( nodes as awst_nodes, wtypes, @@ -13,6 +14,8 @@ from puya.ir.models import InvokeSubroutine, Register, Subroutine, Value, ValueProvider, ValueTuple from puya.parse import SourceLocation +logger = log.get_logger(__name__) + def visit_subroutine_call_expression( context: IRFunctionBuildContext, expr: awst_nodes.SubroutineCallExpression @@ -46,6 +49,11 @@ def _call_subroutine( arg_val = arg_lookup.get(index=idx, param_name=param.name) resolved_args.append(arg_val) if param.implicit_return: + if arg_val in implicit_args: + logger.error( + "mutable values cannot be passed more than once to a subroutine", + location=arg_val.source_location, + ) implicit_args.append(arg_val) if not arg_lookup.is_empty: raise CodeError("function call arguments do not match signature", call_location) from None diff --git a/tests/test_expected_output/arc4.test b/tests/test_expected_output/arc4.test index cce1cac803..0303692039 100644 --- a/tests/test_expected_output/arc4.test +++ b/tests/test_expected_output/arc4.test @@ -589,3 +589,21 @@ class MyTest(ARC4Contract): this_is_ok = some_address[0] assert this_is_ok == 0 some_address[0] = arc4.Byte(123) ## E: expression is not valid as an assignment target - object is immutable + +## case: test_mutable_params_passed_only_once +from algopy import * + +class MyTest(ARC4Contract): + @arc4.abimethod + def test(self) -> None: + my_array = arc4.DynamicBytes() + self.double_use_not_allowed(my_array, my_array) ## E: mutable values cannot be passed more than once to a subroutine + # if we allowed this, the following would fail + assert my_array[0] == 42 + assert my_array[1] == 43 + + + @subroutine + def double_use_not_allowed(self, arr1: arc4.DynamicBytes, arr2: arc4.DynamicBytes) -> None: + arr1.append(arc4.Byte(42)) + arr2.append(arc4.Byte(43)) From 27e26597fd4c577cd69e7af2d9795860c06e36f2 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Wed, 30 Oct 2024 17:44:32 +0800 Subject: [PATCH 04/20] fix: use read location for variable source locations, rather than where the variable was last defined --- .../ConstantProductAMM.approval.teal | 8 +- .../out_unoptimized/Auction.approval.teal | 8 +- .../VotingRoundApp.approval.teal | 4 +- src/puya/ir/builder/main.py | 1 + .../HelloFactory.approval.teal | 63 +----- .../CreateAndTransferContract.approval.teal | 5 +- .../out_unoptimized/Greeter.approval.teal | 4 +- .../out_unoptimized/MyContract.approval.teal | 4 +- .../out_unoptimized/itxn_loop.approval.teal | 16 +- .../out_unoptimized/Greeter.approval.teal | 198 ++++-------------- .../out_unoptimized/Caller.approval.teal | 16 +- 11 files changed, 74 insertions(+), 253 deletions(-) diff --git a/examples/amm/out_unoptimized/ConstantProductAMM.approval.teal b/examples/amm/out_unoptimized/ConstantProductAMM.approval.teal index 354b2c25e9..514bb3a8b5 100644 --- a/examples/amm/out_unoptimized/ConstantProductAMM.approval.teal +++ b/examples/amm/out_unoptimized/ConstantProductAMM.approval.teal @@ -588,10 +588,14 @@ do_asset_transfer: // asset_receiver=receiver, // ).submit() itxn_begin - // amm/contract.py:357 - // def do_asset_transfer(*, receiver: Account, asset: Asset, amount: UInt64) -> None: + // amm/contract.py:359 + // xfer_asset=asset, frame_dig -2 + // amm/contract.py:360 + // asset_amount=amount, frame_dig -1 + // amm/contract.py:361 + // asset_receiver=receiver, frame_dig -3 itxn_field AssetReceiver itxn_field AssetAmount diff --git a/examples/auction/out_unoptimized/Auction.approval.teal b/examples/auction/out_unoptimized/Auction.approval.teal index 54fb19cbf3..69e38d504b 100644 --- a/examples/auction/out_unoptimized/Auction.approval.teal +++ b/examples/auction/out_unoptimized/Auction.approval.teal @@ -270,8 +270,8 @@ opt_into_asset: // auction/contract.py:36 // asset_receiver=Global.current_application_address, global CurrentApplicationAddress - // auction/contract.py:26 - // def opt_into_asset(self, asset: Asset) -> None: + // auction/contract.py:37 + // xfer_asset=asset, frame_dig -1 itxn_field XferAsset itxn_field AssetReceiver @@ -525,8 +525,8 @@ claim_asset: // asset_amount=self.asa_amount, // ).submit() itxn_begin - // auction/contract.py:98 - // def claim_asset(self, asset: Asset) -> None: + // auction/contract.py:102 + // xfer_asset=asset, frame_dig -1 // auction/contract.py:103 // asset_close_to=self.previous_bidder, diff --git a/examples/voting/out_unoptimized/VotingRoundApp.approval.teal b/examples/voting/out_unoptimized/VotingRoundApp.approval.teal index 5914b2483a..3afa713aca 100644 --- a/examples/voting/out_unoptimized/VotingRoundApp.approval.teal +++ b/examples/voting/out_unoptimized/VotingRoundApp.approval.teal @@ -808,8 +808,8 @@ close_after_for@14: bytec 13 // "nft_image_url" app_global_get_ex assert // check self.nft_image_url exists - // voting/voting.py:144 - // note += "]}}" + // voting/voting.py:153 + // note=note, uncover 2 itxn_field Note itxn_field ConfigAssetURL diff --git a/src/puya/ir/builder/main.py b/src/puya/ir/builder/main.py index 0beca9cb35..f458714df3 100644 --- a/src/puya/ir/builder/main.py +++ b/src/puya/ir/builder/main.py @@ -470,6 +470,7 @@ def visit_var_expression(self, expr: awst_nodes.VarExpression) -> TExpression: variable = self.context.ssa.read_variable( expr.name, ir_type, self.context.block_builder.active_block ) + variable = attrs.evolve(variable, source_location=expr.source_location) return variable def visit_intrinsic_call(self, call: awst_nodes.IntrinsicCall) -> TExpression: diff --git a/test_cases/compile/out_unoptimized/HelloFactory.approval.teal b/test_cases/compile/out_unoptimized/HelloFactory.approval.teal index 59761bba14..8aefcf6e52 100644 --- a/test_cases/compile/out_unoptimized/HelloFactory.approval.teal +++ b/test_cases/compile/out_unoptimized/HelloFactory.approval.teal @@ -370,8 +370,8 @@ test_compile_contract: extract 6 2 bytec_3 // "world" concat - // compile/factory.py:35 - // hello_app = ( + // compile/factory.py:49 + // app_id=hello_app, swap itxn_field ApplicationID // compile/factory.py:48 @@ -550,8 +550,8 @@ test_compile_contract_tmpl: extract 6 2 bytec_3 // "world" concat - // compile/factory.py:67 - // hello_app = ( + // compile/factory.py:84 + // app_id=hello_app, swap itxn_field ApplicationID // compile/factory.py:83 @@ -715,8 +715,8 @@ test_compile_contract_prfx: extract 6 2 bytec_3 // "world" concat - // compile/factory.py:103 - // hello_app = ( + // compile/factory.py:117 + // app_id=hello_app, swap itxn_field ApplicationID // compile/factory.py:116 @@ -992,14 +992,8 @@ test_arc4_create: extract 6 2 bytec_3 // "world" concat - // compile/factory.py:163-164 - // # create app - // hello_app = arc4.arc4_create(Hello.create, "hello").created_app swap itxn_field ApplicationID - // compile/factory.py:166-167 - // # call the new app - // result, _txn = arc4.abi_call(Hello.greet, "world", app_id=hello_app) bytec 5 // method "greet(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1101,13 +1095,8 @@ test_arc4_create_tmpl: extract 6 2 bytec_3 // "world" concat - // compile/factory.py:182 - // hello_app = arc4.arc4_create( swap itxn_field ApplicationID - // compile/factory.py:187-188 - // # call the new app - // result, _txn = arc4.abi_call(HelloTmpl.greet, "world", app_id=hello_app) bytec 5 // method "greet(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1211,13 +1200,8 @@ test_arc4_create_prfx: extract 6 2 bytec_3 // "world" concat - // compile/factory.py:205 - // hello_app = arc4.arc4_create( swap itxn_field ApplicationID - // compile/factory.py:210-211 - // # call the new app - // result, _txn = arc4.abi_call(HelloPrfx.greet, "world", app_id=hello_app) bytec 5 // method "greet(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1448,12 +1432,8 @@ test_arc4_create_modified_compiled: extract 6 2 bytec 6 // "there" concat - // compile/factory.py:246 - // app = arc4.arc4_create( swap itxn_field ApplicationID - // compile/factory.py:257 - // result, _txn = arc4.abi_call(Hello.greet, "there", app_id=app) bytec 5 // method "greet(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1589,14 +1569,8 @@ test_arc4_update: extract 6 2 bytec 6 // "there" concat - // compile/factory.py:266-267 - // # create app - // app = arc4.arc4_create( swap itxn_field ApplicationID - // compile/factory.py:280-281 - // # call the new app - // result, _txn = arc4.abi_call(HelloTmpl.greet, "there", app_id=app) bytec 5 // method "greet(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1623,13 +1597,7 @@ test_arc4_update: // # update the app // arc4.arc4_update(Hello, app_id=app) itxn_begin - // compile/factory.py:266-267 - // # create app - // app = arc4.arc4_create( frame_dig 0 - // compile/factory.py:284-285 - // # update the app - // arc4.arc4_update(Hello, app_id=app) bytec_2 // base64(CoEBQw==) itxn_field ClearStateProgramPages bytec_0 // 0x @@ -1656,14 +1624,8 @@ test_arc4_update: extract 6 2 bytec 6 // "there" concat - // compile/factory.py:266-267 - // # create app - // app = arc4.arc4_create( frame_dig 0 itxn_field ApplicationID - // compile/factory.py:287-288 - // # call the updated app - // result, _txn = arc4.abi_call(Hello.greet, "there", app_id=app) bytec 5 // method "greet(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1694,9 +1656,8 @@ test_arc4_update: // # on_complete is inferred from Hello.delete ARC4 definition // ) itxn_begin - // compile/factory.py:266-267 - // # create app - // app = arc4.arc4_create( + // compile/factory.py:294 + // app_id=app, frame_dig 0 // compile/factory.py:291-296 // # delete the app @@ -1805,12 +1766,8 @@ test_other_constants: extract 6 2 bytec 21 // "Johnny" concat - // compile/factory.py:300 - // app = arc4.arc4_create( swap itxn_field ApplicationID - // compile/factory.py:315 - // result, _txn = arc4.abi_call(HelloOtherConstants.greet, "Johnny", app_id=app) pushbytes 0x5b0c2375 // method "greet(string)byte[]" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1940,12 +1897,8 @@ test_abi_call_create_params: extract 6 2 bytec 6 // "there" concat - // compile/factory.py:327 - // app = arc4.abi_call( swap itxn_field ApplicationID - // compile/factory.py:339 - // result, _txn = arc4.abi_call(Hello.greet, "there", app_id=app) bytec 5 // method "greet(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs diff --git a/test_cases/inner_transactions/out_unoptimized/CreateAndTransferContract.approval.teal b/test_cases/inner_transactions/out_unoptimized/CreateAndTransferContract.approval.teal index b37a5e2e86..9ed5e50069 100644 --- a/test_cases/inner_transactions/out_unoptimized/CreateAndTransferContract.approval.teal +++ b/test_cases/inner_transactions/out_unoptimized/CreateAndTransferContract.approval.teal @@ -154,9 +154,8 @@ create_and_transfer: // inner_transactions/asset_transfer.py:30 // asset_receiver=Global.current_application_address, global CurrentApplicationAddress - // inner_transactions/asset_transfer.py:13-14 - // # create - // new_asset = ( + // inner_transactions/asset_transfer.py:32 + // xfer_asset=new_asset, swap itxn_field XferAsset // inner_transactions/asset_transfer.py:31 diff --git a/test_cases/inner_transactions/out_unoptimized/Greeter.approval.teal b/test_cases/inner_transactions/out_unoptimized/Greeter.approval.teal index 19787f2422..5cb8a11458 100644 --- a/test_cases/inner_transactions/out_unoptimized/Greeter.approval.teal +++ b/test_cases/inner_transactions/out_unoptimized/Greeter.approval.teal @@ -202,11 +202,9 @@ log_greetings: bytec_0 // "hello_app" app_global_get_ex assert // check self.hello_app exists - // inner_transactions/c2c.py:24 - // def log_greetings(self, name: arc4.String) -> None: - frame_dig -1 // inner_transactions/c2c.py:27 // app_args=(arc4.arc4_signature("hello(string)string"), name), + frame_dig -1 pushbytes 0x02bece11 // method "hello(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs diff --git a/test_cases/inner_transactions/out_unoptimized/MyContract.approval.teal b/test_cases/inner_transactions/out_unoptimized/MyContract.approval.teal index 73cbaa5315..40c7afedae 100644 --- a/test_cases/inner_transactions/out_unoptimized/MyContract.approval.teal +++ b/test_cases/inner_transactions/out_unoptimized/MyContract.approval.teal @@ -1148,8 +1148,8 @@ test4: // + Bytes(b"\x48") # pop // ) dupn 3 - // inner_transactions/contract.py:230 - // approval_2 = ( + // inner_transactions/contract.py:239 + // approval_program=(approval_1, approval_2, approval_2, approval_2), cover 2 cover 2 // inner_transactions/contract.py:245 diff --git a/test_cases/inner_transactions/out_unoptimized/itxn_loop.approval.teal b/test_cases/inner_transactions/out_unoptimized/itxn_loop.approval.teal index 716a4d969a..52b6a3e37e 100644 --- a/test_cases/inner_transactions/out_unoptimized/itxn_loop.approval.teal +++ b/test_cases/inner_transactions/out_unoptimized/itxn_loop.approval.teal @@ -60,12 +60,10 @@ main_for_header@1: b main_switch_case_default@6 main_switch_case_0@3: - // inner_transactions/itxn_loop.py:28 - // i_note = op.extract(note, 0, i) - dig 3 - bury 3 // inner_transactions/itxn_loop.py:31 // app_params.set(note=i_note, app_args=(Bytes(b"1"),)) + dig 3 + bury 3 bytec_0 // 0x31 bury 7 intc_0 // 1 @@ -73,12 +71,10 @@ main_switch_case_0@3: b main_switch_case_next@7 main_switch_case_1@4: - // inner_transactions/itxn_loop.py:28 - // i_note = op.extract(note, 0, i) - dig 3 - bury 3 // inner_transactions/itxn_loop.py:33 // app_params.set(note=i_note, app_args=(Bytes(b"2"), Bytes(b"1"))) + dig 3 + bury 3 bytec_1 // 0x32 bury 7 bytec_0 // 0x31 @@ -88,8 +84,8 @@ main_switch_case_1@4: b main_switch_case_next@7 main_switch_case_2@5: - // inner_transactions/itxn_loop.py:28 - // i_note = op.extract(note, 0, i) + // inner_transactions/itxn_loop.py:36 + // note=i_note, dig 3 bury 3 // inner_transactions/itxn_loop.py:37 diff --git a/test_cases/typed_abi_call/out_unoptimized/Greeter.approval.teal b/test_cases/typed_abi_call/out_unoptimized/Greeter.approval.teal index 3ea6fde19c..9eebb94ece 100644 --- a/test_cases/typed_abi_call/out_unoptimized/Greeter.approval.teal +++ b/test_cases/typed_abi_call/out_unoptimized/Greeter.approval.teal @@ -460,8 +460,8 @@ test_is_a_b: frame_dig -2 concat swap - // typed_abi_call/typed_c2c.py:19 - // def test_is_a_b(self, a: Bytes, b: Bytes, app: Application) -> None: + // typed_abi_call/typed_c2c.py:24 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:20-25 @@ -498,12 +498,8 @@ test_method_selector_kinds: extract 6 2 bytec 33 // "test1" concat - // typed_abi_call/typed_c2c.py:28 - // def test_method_selector_kinds(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:29 - // result, _txn = arc4.abi_call(Logger.echo, arc4.String("test1"), app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -539,12 +535,8 @@ test_method_selector_kinds: extract 6 2 bytec 35 // "test2" concat - // typed_abi_call/typed_c2c.py:28 - // def test_method_selector_kinds(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:31 - // result, _txn = arc4.abi_call(LoggerClient.echo, "test2", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -580,12 +572,8 @@ test_method_selector_kinds: extract 6 2 bytec 37 // "test3" concat - // typed_abi_call/typed_c2c.py:28 - // def test_method_selector_kinds(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:33 - // result, _txn = arc4.abi_call[arc4.String]("echo", "test3", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -621,12 +609,8 @@ test_method_selector_kinds: extract 6 2 bytec 39 // "test4" concat - // typed_abi_call/typed_c2c.py:28 - // def test_method_selector_kinds(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:35 - // result, _txn = arc4.abi_call[arc4.String]("echo(string)", "test4", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -662,12 +646,8 @@ test_method_selector_kinds: extract 6 2 bytec 41 // "test5" concat - // typed_abi_call/typed_c2c.py:28 - // def test_method_selector_kinds(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:37 - // result, _txn = arc4.abi_call[arc4.String]("echo(string)string", "test5", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -712,12 +692,8 @@ test_method_overload: extract 6 2 bytec 43 // "typed + ignore" concat - // typed_abi_call/typed_c2c.py:41 - // def test_method_overload(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:42 - // arc4.abi_call[arc4.String]("echo(string)string", "typed + ignore", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -758,12 +734,8 @@ test_method_overload: extract 6 2 bytec 45 // "untyped + ignore" concat - // typed_abi_call/typed_c2c.py:41 - // def test_method_overload(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:45 - // arc4.abi_call("echo(string)string", "untyped + ignore", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -799,12 +771,8 @@ test_method_overload: extract 6 2 bytec 47 // "tuple" concat - // typed_abi_call/typed_c2c.py:41 - // def test_method_overload(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:48 - // result = arc4.abi_call[arc4.String]("echo(string)string", "tuple", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -859,12 +827,8 @@ test_method_overload: extract 6 2 bytec 48 // "untyped" concat - // typed_abi_call/typed_c2c.py:41 - // def test_method_overload(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:52 - // txn_result = arc4.abi_call("echo(string)string", "untyped", app_id=app) bytec 5 // method "echo(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -909,12 +873,8 @@ test_arg_conversion: extract 6 2 bytec 19 // "converted1" concat - // typed_abi_call/typed_c2c.py:56 - // def test_arg_conversion(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:57 - // txn = arc4.abi_call(Logger.log_string, "converted1", app_id=app) bytec 12 // method "log(string)void" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -932,12 +892,8 @@ test_arg_conversion: // typed_abi_call/typed_c2c.py:60 // txn = arc4.abi_call(Logger.log_uint64, 2, app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:56 - // def test_arg_conversion(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:60 - // txn = arc4.abi_call(Logger.log_uint64, 2, app_id=app) pushbytes 0x3c1058d9 // method "log(uint64)void" itxn_field ApplicationArgs bytec 14 // 0x0000000000000002 @@ -957,12 +913,8 @@ test_arg_conversion: // typed_abi_call/typed_c2c.py:63 // txn = arc4.abi_call(Logger.log_uint512, 3, app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:56 - // def test_arg_conversion(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:63 - // txn = arc4.abi_call(Logger.log_uint512, 3, app_id=app) pushbytes 0x6af45930 // method "log(uint512)void" itxn_field ApplicationArgs pushbytes 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003 @@ -991,12 +943,8 @@ test_arg_conversion: extract 6 2 bytec 20 // 0x34 concat - // typed_abi_call/typed_c2c.py:56 - // def test_arg_conversion(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:66 - // txn = arc4.abi_call(Logger.log_bytes, b"4", app_id=app) pushbytes 0xb500e111 // method "log(byte[])void" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1018,12 +966,8 @@ test_arg_conversion: intc_0 // 0 intc_3 // 1 setbit - // typed_abi_call/typed_c2c.py:56 - // def test_arg_conversion(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:69 - // txn = arc4.abi_call(Logger.log_bool, True, app_id=app) pushbytes 0x6eed7ec3 // method "log(bool)void" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1149,8 +1093,8 @@ test_15plus_args: // arc4.Tuple((arc4.UInt8(0xDE), arc4.UInt8(0xAD), arc4.UInt8(0xBE), arc4.UInt8(0xEF))), // 20, concat - // typed_abi_call/typed_c2c.py:73 - // def test_15plus_args(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:96 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:74-97 @@ -1299,12 +1243,8 @@ test_void: extract 6 2 bytec 22 // "World1" concat - // typed_abi_call/typed_c2c.py:101 - // def test_void(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:102 - // txn = arc4.abi_call(LOG_METHOD_NAME + "(string)void", "World1", app_id=app) bytec 12 // method "log(string)void" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1328,12 +1268,8 @@ test_void: extract 6 2 bytec 23 // "World2" concat - // typed_abi_call/typed_c2c.py:101 - // def test_void(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:105 - // txn = arc4.abi_call(LOG_METHOD_NAME + "(string)", "World2", app_id=app) bytec 12 // method "log(string)void" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1357,12 +1293,8 @@ test_void: extract 6 2 bytec 24 // "World3" concat - // typed_abi_call/typed_c2c.py:101 - // def test_void(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:108 - // txn = arc4.abi_call(LOG_METHOD_NAME, arc4.String("World3"), app_id=app) bytec 12 // method "log(string)void" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1386,12 +1318,8 @@ test_void: extract 6 2 bytec 25 // "World4" concat - // typed_abi_call/typed_c2c.py:101 - // def test_void(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:111 - // txn = arc4.abi_call(Logger.log_string, "World4", app_id=app) bytec 12 // method "log(string)void" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1427,10 +1355,14 @@ test_ref_types: // typed_abi_call/typed_c2c.py:119 // Global.current_application_address, global CurrentApplicationAddress - // typed_abi_call/typed_c2c.py:115 - // def test_ref_types(self, app: Application, asset: Asset) -> None: + // typed_abi_call/typed_c2c.py:120 + // app, frame_dig -2 + // typed_abi_call/typed_c2c.py:118 + // asset, frame_dig -1 + // typed_abi_call/typed_c2c.py:121 + // app_id=app, frame_dig -2 itxn_field ApplicationID itxn_field Assets @@ -1512,12 +1444,8 @@ test_native_string: extract 6 2 bytec 8 // "s" concat - // typed_abi_call/typed_c2c.py:129 - // def test_native_string(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:130 - // result1, _txn = arc4.abi_call(Logger.echo_native_string, "s", app_id=app) bytec 26 // method "echo_native_string(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1551,12 +1479,8 @@ test_native_string: extract 6 2 bytec 8 // "s" concat - // typed_abi_call/typed_c2c.py:129 - // def test_native_string(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:133 - // result2, _txn = arc4.abi_call(Logger.echo_native_string, String("s"), app_id=app) bytec 26 // method "echo_native_string(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1588,12 +1512,8 @@ test_native_string: extract 6 2 bytec 8 // "s" concat - // typed_abi_call/typed_c2c.py:129 - // def test_native_string(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:136 - // result3, _txn = arc4.abi_call(Logger.echo_native_string, arc4.String("s"), app_id=app) bytec 26 // method "echo_native_string(string)string" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1635,12 +1555,8 @@ test_native_bytes: extract 6 2 bytec 9 // 0x62 concat - // typed_abi_call/typed_c2c.py:140 - // def test_native_bytes(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:141 - // result1, _txn = arc4.abi_call(Logger.echo_native_bytes, b"b", app_id=app) bytec 27 // method "echo_native_bytes(byte[])byte[]" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1674,12 +1590,8 @@ test_native_bytes: extract 6 2 bytec 9 // 0x62 concat - // typed_abi_call/typed_c2c.py:140 - // def test_native_bytes(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:144 - // result2, _txn = arc4.abi_call(Logger.echo_native_bytes, Bytes(b"b"), app_id=app) bytec 27 // method "echo_native_bytes(byte[])byte[]" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1715,8 +1627,6 @@ test_native_bytes: extract 6 2 bytec 9 // 0x62 concat - // typed_abi_call/typed_c2c.py:140 - // def test_native_bytes(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:147-149 @@ -1758,12 +1668,8 @@ test_native_uint64: // typed_abi_call/typed_c2c.py:154 // result1, _txn = arc4.abi_call(Logger.echo_native_uint64, 1, app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:153 - // def test_native_uint64(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:154 - // result1, _txn = arc4.abi_call(Logger.echo_native_uint64, 1, app_id=app) bytec 28 // method "echo_native_uint64(uint64)uint64" itxn_field ApplicationArgs bytec 4 // 0x0000000000000001 @@ -1794,12 +1700,8 @@ test_native_uint64: itxn_begin intc_3 // 1 itob - // typed_abi_call/typed_c2c.py:153 - // def test_native_uint64(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:157 - // result2, _txn = arc4.abi_call(Logger.echo_native_uint64, UInt64(1), app_id=app) bytec 28 // method "echo_native_uint64(uint64)uint64" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1825,12 +1727,8 @@ test_native_uint64: // typed_abi_call/typed_c2c.py:160 // result3, _txn = arc4.abi_call(Logger.echo_native_uint64, arc4.UInt64(1), app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:153 - // def test_native_uint64(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:160 - // result3, _txn = arc4.abi_call(Logger.echo_native_uint64, arc4.UInt64(1), app_id=app) bytec 28 // method "echo_native_uint64(uint64)uint64" itxn_field ApplicationArgs bytec 4 // 0x0000000000000001 @@ -1867,12 +1765,8 @@ test_native_biguint: // typed_abi_call/typed_c2c.py:165 // result1, _txn = arc4.abi_call(Logger.echo_native_biguint, 2, app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:164 - // def test_native_biguint(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:165 - // result1, _txn = arc4.abi_call(Logger.echo_native_biguint, 2, app_id=app) bytec 29 // method "echo_native_biguint(uint512)uint512" itxn_field ApplicationArgs bytec 6 // 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002 @@ -1909,12 +1803,8 @@ test_native_biguint: bzero bytec 10 // 0x02 b| - // typed_abi_call/typed_c2c.py:164 - // def test_native_biguint(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:168 - // result2, _txn = arc4.abi_call(Logger.echo_native_biguint, BigUInt(2), app_id=app) bytec 29 // method "echo_native_biguint(uint512)uint512" itxn_field ApplicationArgs itxn_field ApplicationArgs @@ -1939,12 +1829,8 @@ test_native_biguint: // typed_abi_call/typed_c2c.py:171 // result3, _txn = arc4.abi_call(Logger.echo_native_biguint, arc4.UInt512(2), app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:164 - // def test_native_biguint(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:171 - // result3, _txn = arc4.abi_call(Logger.echo_native_biguint, arc4.UInt512(2), app_id=app) bytec 29 // method "echo_native_biguint(uint512)uint512" itxn_field ApplicationArgs bytec 6 // 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002 @@ -2007,8 +1893,8 @@ test_native_tuple: bytec_3 // 0x6231 concat swap - // typed_abi_call/typed_c2c.py:175 - // def test_native_tuple(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:185 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:176-186 @@ -2179,8 +2065,8 @@ test_native_tuple: // typed_abi_call/typed_c2c.py:201 // BigUInt(2), cover 3 - // typed_abi_call/typed_c2c.py:175 - // def test_native_tuple(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:202 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:193-203 @@ -2249,8 +2135,8 @@ test_native_tuple: bytec_3 // 0x6231 concat swap - // typed_abi_call/typed_c2c.py:175 - // def test_native_tuple(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:215 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:206-216 @@ -2335,8 +2221,8 @@ test_native_tuple: bytec_3 // 0x6231 concat swap - // typed_abi_call/typed_c2c.py:175 - // def test_native_tuple(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:226 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:219-227 @@ -2516,8 +2402,8 @@ test_native_tuple_method_ref: bytec_3 // 0x6231 concat swap - // typed_abi_call/typed_c2c.py:234 - // def test_native_tuple_method_ref(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:242 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:235-243 @@ -2694,8 +2580,8 @@ test_native_tuple_method_ref: // typed_abi_call/typed_c2c.py:256 // BigUInt(2), cover 3 - // typed_abi_call/typed_c2c.py:234 - // def test_native_tuple_method_ref(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:257 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:250-258 @@ -2812,8 +2698,8 @@ test_native_tuple_method_ref: bytec_3 // 0x6231 concat swap - // typed_abi_call/typed_c2c.py:234 - // def test_native_tuple_method_ref(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:268 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:261-269 @@ -2946,8 +2832,8 @@ test_native_tuple_method_ref: bytec_3 // 0x6231 concat swap - // typed_abi_call/typed_c2c.py:234 - // def test_native_tuple_method_ref(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:279 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:272-280 @@ -3137,8 +3023,8 @@ test_nested_tuples: concat swap concat - // typed_abi_call/typed_c2c.py:284 - // def test_nested_tuples(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:289 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:285-290 @@ -3354,8 +3240,8 @@ test_nested_tuples: concat swap concat - // typed_abi_call/typed_c2c.py:284 - // def test_nested_tuples(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:302 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:298-303 @@ -3580,8 +3466,8 @@ test_nested_tuples: concat swap concat - // typed_abi_call/typed_c2c.py:284 - // def test_nested_tuples(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:320 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:311-321 @@ -3735,12 +3621,8 @@ test_no_args: // typed_abi_call/typed_c2c.py:331 // result, _txn = arc4.abi_call(Logger.no_args, app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:330 - // def test_no_args(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:331 - // result, _txn = arc4.abi_call(Logger.no_args, app_id=app) bytec 32 // method "no_args()uint64" itxn_field ApplicationArgs intc_1 // appl @@ -3765,12 +3647,8 @@ test_no_args: // typed_abi_call/typed_c2c.py:333 // arc4_result, _txn = arc4.abi_call[arc4.UInt64]("no_args()uint64", app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:330 - // def test_no_args(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:333 - // arc4_result, _txn = arc4.abi_call[arc4.UInt64]("no_args()uint64", app_id=app) bytec 32 // method "no_args()uint64" itxn_field ApplicationArgs intc_1 // appl @@ -3794,12 +3672,8 @@ test_no_args: // typed_abi_call/typed_c2c.py:336 // arc4.abi_call(Logger.no_args, app_id=app) itxn_begin - // typed_abi_call/typed_c2c.py:330 - // def test_no_args(self, app: Application) -> None: frame_dig -1 itxn_field ApplicationID - // typed_abi_call/typed_c2c.py:336 - // arc4.abi_call(Logger.no_args, app_id=app) bytec 32 // method "no_args()uint64" itxn_field ApplicationArgs intc_1 // appl @@ -3883,8 +3757,8 @@ test_named_tuples: swap concat swap - // typed_abi_call/typed_c2c.py:340 - // def test_named_tuples(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:345 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:341-346 @@ -3965,8 +3839,8 @@ test_named_tuples: swap concat swap - // typed_abi_call/typed_c2c.py:340 - // def test_named_tuples(self, app: Application) -> None: + // typed_abi_call/typed_c2c.py:352 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call/typed_c2c.py:348-353 diff --git a/test_cases/typed_abi_call_txn/out_unoptimized/Caller.approval.teal b/test_cases/typed_abi_call_txn/out_unoptimized/Caller.approval.teal index 60ff4c5cf0..49c9db598a 100644 --- a/test_cases/typed_abi_call_txn/out_unoptimized/Caller.approval.teal +++ b/test_cases/typed_abi_call_txn/out_unoptimized/Caller.approval.teal @@ -230,8 +230,8 @@ test_call_with_txn: frame_dig -2 concat swap - // typed_abi_call_txn/caller.py:16 - // def test_call_with_txn(self, a: Bytes, b: Bytes, app: Application) -> None: + // typed_abi_call_txn/caller.py:27 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call_txn/caller.py:22-28 @@ -327,8 +327,8 @@ test_call_with_acfg: frame_dig -2 concat swap - // typed_abi_call_txn/caller.py:32 - // def test_call_with_acfg(self, a: Bytes, b: Bytes, app: Application) -> None: + // typed_abi_call_txn/caller.py:43 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call_txn/caller.py:38-44 @@ -415,8 +415,8 @@ test_call_with_infer: frame_dig -2 concat swap - // typed_abi_call_txn/caller.py:47 - // def test_call_with_infer(self, a: Bytes, b: Bytes, app: Application) -> None: + // typed_abi_call_txn/caller.py:58 + // app_id=app, frame_dig -1 itxn_field ApplicationID // typed_abi_call_txn/caller.py:53-59 @@ -493,11 +493,7 @@ test_call_with_acfg_no_return: frame_dig -2 concat swap - // typed_abi_call_txn/caller.py:62 - // def test_call_with_acfg_no_return(self, a: Bytes, b: Bytes, app: Application) -> None: frame_dig -1 - // typed_abi_call_txn/caller.py:69 - // TxnContract.call_with_acfg_no_return, a, acfg, b, app_id=app, note=b"1" pushbytes 0x31 itxn_field Note itxn_field ApplicationID From 253168a63b92a39a4a2b596d7760175875b39a1d Mon Sep 17 00:00:00 2001 From: Adam Chidlow Date: Tue, 29 Oct 2024 11:53:38 +0800 Subject: [PATCH 05/20] feat: allow variable rebinding of mutable parameter values --- examples/merkle/out/MerkleTree.ssa.ir | 2 + examples/merkle/puya.log | 2 + examples/sizes.txt | 11 +- .../struct_in_box/out/ExampleContract.ssa.ir | 4 +- .../ExampleContract.approval.teal | 4 +- .../ExampleContract.destructured.ir | 3 +- examples/struct_in_box/puya.log | 3 + examples/voting/out/VotingRoundApp.ssa.ir | 4 +- .../VotingRoundApp.approval.teal | 19 +- .../VotingRoundApp.destructured.ir | 3 +- examples/voting/puya.log | 11 +- src/puya/awst/validation/arc4_copy.py | 27 +- src/puya/ir/builder/_utils.py | 56 +- src/puya/ir/builder/arc4.py | 95 +- src/puya/ir/builder/assignment.py | 132 +- src/puya/ir/builder/main.py | 48 +- test_cases/arc4_types/mutable_params.py | 69 +- test_cases/arc4_types/mutable_params2.py | 25 + .../Arc4MutableParamsContract.approval.mir | 690 ++-- .../Arc4MutableParamsContract.approval.teal | 419 ++- .../out/Arc4MutableParamsContract.clear.mir | 2 +- .../out/Arc4MutableParamsContract.clear.teal | 2 +- .../Arc4MutableParamsContract.destructured.ir | 157 +- .../out/Arc4MutableParamsContract.ssa.ir | 364 ++- ...rc4MutableParamsContract.ssa.opt_pass_1.ir | 188 +- ...c4MutableParamsContract.ssa.opt_pass_10.ir | 159 +- ...c4MutableParamsContract.ssa.opt_pass_11.ir | 159 +- ...c4MutableParamsContract.ssa.opt_pass_12.ir | 159 +- ...c4MutableParamsContract.ssa.opt_pass_13.ir | 159 +- ...rc4MutableParamsContract.ssa.opt_pass_2.ir | 162 +- ...rc4MutableParamsContract.ssa.opt_pass_3.ir | 161 +- ...rc4MutableParamsContract.ssa.opt_pass_4.ir | 159 +- ...rc4MutableParamsContract.ssa.opt_pass_5.ir | 159 +- ...rc4MutableParamsContract.ssa.opt_pass_6.ir | 159 +- ...rc4MutableParamsContract.ssa.opt_pass_7.ir | 159 +- ...rc4MutableParamsContract.ssa.opt_pass_8.ir | 159 +- ...rc4MutableParamsContract.ssa.opt_pass_9.ir | 159 +- .../out/Arc4StructsTypeContract.ssa.ir | 12 +- .../out/MutableParams2.approval.teal | 158 + .../arc4_types/out/MutableParams2.arc32.json | 50 + .../arc4_types/out/MutableParams2.clear.teal | 5 + .../out/MutableParams2.destructured.ir | 87 + .../arc4_types/out/MutableParams2.ssa.ir | 172 + .../out/MutableParams2.ssa.opt_pass_1.ir | 120 + .../out/MutableParams2.ssa.opt_pass_2.ir | 103 + .../out/MutableParams2.ssa.opt_pass_3.ir | 96 + .../out/MutableParams2.ssa.opt_pass_4.ir | 91 + .../out/MutableParams2.ssa.opt_pass_5.ir | 88 + .../out/MutableParams2.ssa.opt_pass_6.ir | 86 + .../arc4_types/out/client_MutableParams2.py | 13 + test_cases/arc4_types/out/module.awst | 87 +- .../arc4_types/out/mutable_params.O0.log | 1641 +++++++--- .../arc4_types/out/mutable_params.O1.log | 894 ++++-- .../arc4_types/out/mutable_params.O2.log | 894 ++++-- test_cases/arc4_types/out/structs.O0.log | 140 +- .../Arc4MutableParamsContract.approval.teal | 296 +- .../Arc4MutableParamsContract.destructured.ir | 157 +- .../out_O2/MutableParams2.approval.teal | 122 + .../out_O2/MutableParams2.clear.teal | 5 + .../out_O2/MutableParams2.destructured.ir | 87 + .../Arc4MutableParamsContract.approval.teal | 632 +++- .../Arc4MutableParamsContract.clear.teal | 2 +- .../Arc4MutableParamsContract.destructured.ir | 321 +- .../Arc4StructsTypeContract.approval.teal | 8 +- .../Arc4StructsTypeContract.destructured.ir | 6 +- .../MutableParams2.approval.teal | 278 ++ .../out_unoptimized/MutableParams2.clear.teal | 5 + .../MutableParams2.destructured.ir | 162 + test_cases/arc4_types/puya.log | 2823 +++++++++++++++-- tests/test_arc32.py | 15 + .../test_expected_output/expected_errors.test | 18 +- 71 files changed, 11750 insertions(+), 2177 deletions(-) create mode 100644 test_cases/arc4_types/mutable_params2.py create mode 100644 test_cases/arc4_types/out/MutableParams2.approval.teal create mode 100644 test_cases/arc4_types/out/MutableParams2.arc32.json create mode 100644 test_cases/arc4_types/out/MutableParams2.clear.teal create mode 100644 test_cases/arc4_types/out/MutableParams2.destructured.ir create mode 100644 test_cases/arc4_types/out/MutableParams2.ssa.ir create mode 100644 test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_1.ir create mode 100644 test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_2.ir create mode 100644 test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_3.ir create mode 100644 test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_4.ir create mode 100644 test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_5.ir create mode 100644 test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_6.ir create mode 100644 test_cases/arc4_types/out/client_MutableParams2.py create mode 100644 test_cases/arc4_types/out_O2/MutableParams2.approval.teal create mode 100644 test_cases/arc4_types/out_O2/MutableParams2.clear.teal create mode 100644 test_cases/arc4_types/out_O2/MutableParams2.destructured.ir create mode 100644 test_cases/arc4_types/out_unoptimized/MutableParams2.approval.teal create mode 100644 test_cases/arc4_types/out_unoptimized/MutableParams2.clear.teal create mode 100644 test_cases/arc4_types/out_unoptimized/MutableParams2.destructured.ir diff --git a/examples/merkle/out/MerkleTree.ssa.ir b/examples/merkle/out/MerkleTree.ssa.ir index ad737607cd..fbbad61d1e 100644 --- a/examples/merkle/out/MerkleTree.ssa.ir +++ b/examples/merkle/out/MerkleTree.ssa.ir @@ -62,6 +62,8 @@ contract examples.merkle.contract.MerkleTree: subroutine examples.merkle.contract.compute_root_hash(proof: bytes, leaf: bytes) -> : block@0: // L19 + let proof%is_original#0: bool = 1u + let proof%out#0: bytes = proof#0 let computed#0: bytes = leaf#0 let tmp%0#0: uint64 = (extract_uint16 proof#0 0u) (assert 1u) // Step cannot be zero diff --git a/examples/merkle/puya.log b/examples/merkle/puya.log index 9bfcfc3b75..b2436746ce 100644 --- a/examples/merkle/puya.log +++ b/examples/merkle/puya.log @@ -492,10 +492,12 @@ debug: Optimizing subroutine examples.merkle.contract.compute_root_hash debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation +debug: Found equivalence set: proof#0, proof%out#0 debug: Found equivalence set: leaf#0, computed#0 debug: Replacing {computed#0} with leaf#0 made 1 modifications debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables +debug: Removing unused variable proof%is_original#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops diff --git a/examples/sizes.txt b/examples/sizes.txt index 5215481cfb..26acec72c1 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -12,14 +12,15 @@ arc4_types/Arc4BoolType 381 69 - | 307 46 - arc4_types/Arc4DynamicBytes 377 185 - | 213 100 - arc4_types/Arc4DynamicStringArray 283 124 - | 172 53 - - arc4_types/Arc4MutableParams 471 286 - | 292 141 - + arc4_types/Arc4MutableParams 1110 644 - | 699 343 - arc4_types/Arc4Mutation 2958 1426 - | 1977 593 - arc4_types/Arc4NumericTypes 749 186 - | 243 26 - arc4_types/Arc4RefTypes 85 46 - | 32 27 - arc4_types/Arc4StringTypes 455 35 - | 245 13 - arc4_types/Arc4StructsFromAnotherModule 67 12 - | 49 6 - - arc4_types/Arc4StructsType 391 239 - | 259 121 - + arc4_types/Arc4StructsType 389 239 - | 259 121 - arc4_types/Arc4TuplesType 795 136 - | 537 58 - + arc4_types/MutableParams2 334 202 - | 193 97 - arc_28/EventEmitter 186 133 - | 100 64 - asset/Reference 268 261 - | 144 141 - auction/Auction 592 522 - | 328 281 - @@ -108,7 +109,7 @@ state_totals 65 32 - | 32 16 - stress_tests/BruteForceRotationSearch 228 163 - | 152 106 - string_ops 156 154 - | 58 55 - - struct_in_box/Example 243 206 - | 127 99 - + struct_in_box/Example 242 206 - | 127 99 - stubs/BigUInt 192 121 - | 126 73 - stubs/Bytes 944 279 - | 606 153 - stubs/String 701 167 - | 416 54 - @@ -128,6 +129,6 @@ unassigned_expression/Unassigned 158 119 - | 81 57 - undefined_phi_args/Baddie 319 282 - | 174 157 - unssa/UnSSA 432 368 - | 241 204 - - voting/VotingRoundApp 1593 1483 - | 734 649 - + voting/VotingRoundApp 1590 1483 - | 733 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 69283 53532 53473 | 32895 21757 21713 \ No newline at end of file + Total 70250 54092 54033 | 33494 22056 22012 \ No newline at end of file diff --git a/examples/struct_in_box/out/ExampleContract.ssa.ir b/examples/struct_in_box/out/ExampleContract.ssa.ir index e777434415..9f54dac2b5 100644 --- a/examples/struct_in_box/out/ExampleContract.ssa.ir +++ b/examples/struct_in_box/out/ExampleContract.ssa.ir @@ -87,10 +87,12 @@ contract examples.struct_in_box.contract.ExampleContract: subroutine examples.struct_in_box.contract.ExampleContract.write_to_box(user: bytes) -> bytes: block@0: // L18 + let user%is_original#0: bool = 1u + let user%out#0: bytes = user#0 let box_key#0: bytes = (extract3 user#0 2u 8u) // on error: Index access is out of bounds (box_del box_key#0) (box_put box_key#0 user#0) - return user#0 + return user%out#0 subroutine examples.struct_in_box.contract.ExampleContract.attach_asset_to_user(user_id: bytes, asset: uint64) -> void: block@0: // L36 diff --git a/examples/struct_in_box/out_unoptimized/ExampleContract.approval.teal b/examples/struct_in_box/out_unoptimized/ExampleContract.approval.teal index bbe4f57b2a..8d6cf0a54f 100644 --- a/examples/struct_in_box/out_unoptimized/ExampleContract.approval.teal +++ b/examples/struct_in_box/out_unoptimized/ExampleContract.approval.teal @@ -165,9 +165,10 @@ write_to_box: // @subroutine // def write_to_box(self, user: UserStruct) -> None: proto 1 1 + frame_dig -1 // struct_in_box/contract.py:20 // box_key = user.id.bytes - frame_dig -1 + dup intc_2 // 2 intc_3 // 8 extract3 // on error: Index access is out of bounds @@ -181,7 +182,6 @@ write_to_box: // op.Box.put(box_key, user.bytes) frame_dig -1 box_put - frame_dig -1 retsub diff --git a/examples/struct_in_box/out_unoptimized/ExampleContract.destructured.ir b/examples/struct_in_box/out_unoptimized/ExampleContract.destructured.ir index 78206721e1..c688ca022e 100644 --- a/examples/struct_in_box/out_unoptimized/ExampleContract.destructured.ir +++ b/examples/struct_in_box/out_unoptimized/ExampleContract.destructured.ir @@ -85,10 +85,11 @@ contract examples.struct_in_box.contract.ExampleContract: subroutine examples.struct_in_box.contract.ExampleContract.write_to_box(user: bytes) -> bytes: block@0: // L18 + let user%out#0: bytes = user#0 let box_key#0: bytes = (extract3 user#0 2u 8u) // on error: Index access is out of bounds (box_del box_key#0) (box_put box_key#0 user#0) - return user#0 + return user%out#0 subroutine examples.struct_in_box.contract.ExampleContract.attach_asset_to_user(user_id: bytes, asset: uint64) -> void: block@0: // L36 diff --git a/examples/struct_in_box/puya.log b/examples/struct_in_box/puya.log index e12cbcd06f..d0943c6207 100644 --- a/examples/struct_in_box/puya.log +++ b/examples/struct_in_box/puya.log @@ -490,9 +490,12 @@ debug: Optimizing subroutine examples.struct_in_box.contract.ExampleContract.wri debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation +debug: Found equivalence set: user#0, user%out#0 +debug: Replacing {user%out#0} with user#0 made 1 modifications debug: Optimizer: Intrinsic Simplifier debug: Simplified (extract3 user#0 2u 8u) // on error: Index access is out of bounds to ((extract 2 8) user#0) // on error: Index access is out of bounds debug: Optimizer: Remove Unused Variables +debug: Removing unused variable user%is_original#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops diff --git a/examples/voting/out/VotingRoundApp.ssa.ir b/examples/voting/out/VotingRoundApp.ssa.ir index aaad8ea61f..bfef64a81a 100644 --- a/examples/voting/out/VotingRoundApp.ssa.ir +++ b/examples/voting/out/VotingRoundApp.ssa.ir @@ -132,6 +132,8 @@ contract examples.voting.voting.VotingRoundApp: subroutine examples.voting.voting.VotingRoundApp.store_option_counts(option_counts: bytes) -> bytes: block@0: // L217 + let option_counts%is_original#0: bool = 1u + let option_counts%out#0: bytes = option_counts#0 let tmp%0#0: uint64 = (extract_uint16 option_counts#0 0u) let tmp%1#0: bool = (!= tmp%0#0 0u) (assert tmp%1#0) // option_counts should be non-empty @@ -164,7 +166,7 @@ contract examples.voting.voting.VotingRoundApp: let copy%0#0: bytes = option_counts#0 (app_global_put "option_counts" copy%0#0) (app_global_put "total_options" total_options#1) - return option_counts#0 + return option_counts%out#0 subroutine examples.voting.voting.VotingRoundApp.bootstrap(fund_min_bal_req: uint64) -> void: block@0: // L82 diff --git a/examples/voting/out_unoptimized/VotingRoundApp.approval.teal b/examples/voting/out_unoptimized/VotingRoundApp.approval.teal index 3afa713aca..af54f8d3ad 100644 --- a/examples/voting/out_unoptimized/VotingRoundApp.approval.teal +++ b/examples/voting/out_unoptimized/VotingRoundApp.approval.teal @@ -281,9 +281,10 @@ store_option_counts: // @subroutine // def store_option_counts(self, option_counts: VoteIndexArray) -> None: proto 1 1 + frame_dig -1 // voting/voting.py:219 // assert option_counts.length, "option_counts should be non-empty" - frame_dig -1 + dup intc_0 // 0 extract_uint16 intc_0 // 0 @@ -310,13 +311,13 @@ store_option_counts: store_option_counts_for_header@1: // voting/voting.py:223 // for item in option_counts: + frame_dig 3 frame_dig 2 - frame_dig 1 < bz store_option_counts_after_for@4 frame_dig -1 extract 2 0 - frame_dig 2 + frame_dig 3 intc_1 // 1 * intc_1 // 1 @@ -324,19 +325,19 @@ store_option_counts_for_header@1: // voting/voting.py:224 // total_options += item.native btoi - frame_dig 0 + frame_dig 1 + - frame_bury 0 - frame_dig 2 + frame_bury 1 + frame_dig 3 intc_1 // 1 + - frame_bury 2 + frame_bury 3 b store_option_counts_for_header@1 store_option_counts_after_for@4: // voting/voting.py:225 // assert total_options <= 128, "Can't have more than 128 vote options" - frame_dig 0 + frame_dig 1 dup pushint 128 // 128 <= @@ -352,8 +353,6 @@ store_option_counts_after_for@4: bytec 14 // "total_options" swap app_global_put - frame_dig -1 - frame_bury 0 retsub diff --git a/examples/voting/out_unoptimized/VotingRoundApp.destructured.ir b/examples/voting/out_unoptimized/VotingRoundApp.destructured.ir index c698211bb2..3a67bea71c 100644 --- a/examples/voting/out_unoptimized/VotingRoundApp.destructured.ir +++ b/examples/voting/out_unoptimized/VotingRoundApp.destructured.ir @@ -131,6 +131,7 @@ contract examples.voting.voting.VotingRoundApp: subroutine examples.voting.voting.VotingRoundApp.store_option_counts(option_counts: bytes) -> bytes: block@0: // L217 + let option_counts%out#0: bytes = option_counts#0 let tmp%0#0: uint64 = (extract_uint16 option_counts#0 0u) let tmp%1#0: bool = (!= tmp%0#0 0u) (assert tmp%1#0) // option_counts should be non-empty @@ -160,7 +161,7 @@ contract examples.voting.voting.VotingRoundApp: let copy%0#0: bytes = option_counts#0 (app_global_put "option_counts" copy%0#0) (app_global_put "total_options" total_options#0) - return option_counts#0 + return option_counts%out#0 subroutine examples.voting.voting.VotingRoundApp.bootstrap(fund_min_bal_req: uint64) -> void: block@0: // L82 diff --git a/examples/voting/puya.log b/examples/voting/puya.log index 7066b3467d..59e69d29f2 100644 --- a/examples/voting/puya.log +++ b/examples/voting/puya.log @@ -399,6 +399,12 @@ debug: Added option_counts#1 to Phi node: let option_counts#1: bytes = φ(option debug: Replacing trivial Phi node: let option_counts#1: bytes = φ(option_counts#0 <- block@0, option_counts#1 <- block@3) (option_counts#1) with option_counts#0 debug: Deleting Phi assignment: let option_counts#1: bytes = φ(option_counts#0 <- block@0, option_counts#1 <- block@3) debug: Replaced trivial Phi node: let option_counts#1: bytes = φ(option_counts#0 <- block@0, option_counts#1 <- block@3) (option_counts#1) with option_counts#0 in current definition for 3 blocks +debug: Created Phi assignment: let option_counts%out#1: bytes = undefined while trying to resolve 'option_counts%out' in block@1: // for_header_L223 +debug: Added option_counts%out#0 to Phi node: let option_counts%out#1: bytes = φ(option_counts%out#0 <- block@0) in block@0: // L217 +debug: Added option_counts%out#1 to Phi node: let option_counts%out#1: bytes = φ(option_counts%out#0 <- block@0, option_counts%out#1 <- block@3) in block@3: // for_footer_L223 +debug: Replacing trivial Phi node: let option_counts%out#1: bytes = φ(option_counts%out#0 <- block@0, option_counts%out#1 <- block@3) (option_counts%out#1) with option_counts%out#0 +debug: Deleting Phi assignment: let option_counts%out#1: bytes = φ(option_counts%out#0 <- block@0, option_counts%out#1 <- block@3) +debug: Replaced trivial Phi node: let option_counts%out#1: bytes = φ(option_counts%out#0 <- block@0, option_counts%out#1 <- block@3) (option_counts%out#1) with option_counts%out#0 in current definition for 3 blocks debug: Terminated block@4: // after_for_L223 debug: Sealing block@0: // L82 debug: Terminated block@0: // L82 @@ -644,12 +650,13 @@ debug: Optimizing subroutine examples.voting.voting.VotingRoundApp.store_option_ debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation +debug: Found equivalence set: option_counts#0, option_counts%out#0, copy%0#0 +debug: Replacing {option_counts%out#0, copy%0#0} with option_counts#0 made 2 modifications debug: Found equivalence set: array_length%0#0, reverse_index_internal%0#0 -debug: Found equivalence set: option_counts#0, copy%0#0 -debug: Replacing {copy%0#0} with option_counts#0 made 1 modifications debug: Optimizer: Intrinsic Simplifier debug: Simplified (* item_index_internal%0#1 1u) to item_index_internal%0#1 debug: Optimizer: Remove Unused Variables +debug: Removing unused variable option_counts%is_original#0 debug: Removing unused variable tmp%1#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References diff --git a/src/puya/awst/validation/arc4_copy.py b/src/puya/awst/validation/arc4_copy.py index 731c49172c..cc25a49771 100644 --- a/src/puya/awst/validation/arc4_copy.py +++ b/src/puya/awst/validation/arc4_copy.py @@ -53,18 +53,18 @@ def visit_assignment_expression(self, expr: awst_nodes.AssignmentExpression) -> expr.value.accept(self) def visit_subroutine_call_expression(self, expr: awst_nodes.SubroutineCallExpression) -> None: - super().visit_subroutine_call_expression(expr) - for arg in expr.args: - match arg.value: - case awst_nodes.VarExpression(): - # Var expressions don't need copy as we implicitly return the latest value and - # update the var - continue - case awst_nodes.AppStateExpression() | awst_nodes.AppAccountStateExpression(): - message = "being passed to a subroutine from state" - case _: - message = "being passed to a subroutine" - _check_for_arc4_copy(arg.value, message) + for arg_ in expr.args: + for arg in _expand_tuple_items(arg_.value): + match arg: + case awst_nodes.VarExpression(): + # Var expressions don't need copy as we implicitly return the latest value + # and update the var + continue + case awst_nodes.AppStateExpression() | awst_nodes.AppAccountStateExpression(): + message = "being passed to a subroutine from state" + case _: + message = "being passed to a subroutine" + _check_for_arc4_copy(arg, message) def visit_new_array(self, expr: awst_nodes.NewArray) -> None: super().visit_new_array(expr) @@ -131,7 +131,8 @@ def _check_for_arc4_copy(expr: awst_nodes.Expression, context_desc: str) -> None def _expand_tuple_items(expr: awst_nodes.Expression) -> Iterator[awst_nodes.Expression]: match expr: case awst_nodes.TupleExpression(items=items): - yield from items + for item in items: + yield from _expand_tuple_items(item) case _: yield expr diff --git a/src/puya/ir/builder/_utils.py b/src/puya/ir/builder/_utils.py index 413522fb39..07a15e9f1d 100644 --- a/src/puya/ir/builder/_utils.py +++ b/src/puya/ir/builder/_utils.py @@ -3,10 +3,13 @@ import attrs -from puya.awst import nodes as awst_nodes +from puya.awst import ( + nodes as awst_nodes, + wtypes, +) from puya.errors import InternalError from puya.ir.avm_ops import AVMOp -from puya.ir.context import IRFunctionBuildContext +from puya.ir.context import TMP_VAR_INDICATOR, IRFunctionBuildContext from puya.ir.models import ( Assignment, BytesConstant, @@ -76,6 +79,55 @@ def assign_targets( context.block_builder.add( Assignment(targets=targets, source=source, source_location=assignment_location) ) + # also update any implicitly returned variables + implicit_params = {p.name for p in context.subroutine.parameters if p.implicit_return} + for target in targets: + if target.name in implicit_params: + _update_implicit_out_var(context, target.name, target.ir_type) + + +def _update_implicit_out_var(context: IRFunctionBuildContext, var: str, ir_type: IRType) -> None: + # emit conditional assignment equivalent to + # if var%is_original: + # var%out = var + loc = SourceLocation(file=None, line=1) + wtype = wtypes.bytes_wtype if ir_type == IRType.bytes else wtypes.uint64_wtype + node = awst_nodes.IfElse( + condition=awst_nodes.VarExpression( + name=get_implicit_return_is_original(var), + wtype=wtypes.bool_wtype, + source_location=loc, + ), + if_branch=awst_nodes.Block( + body=[ + awst_nodes.AssignmentStatement( + target=awst_nodes.VarExpression( + name=get_implicit_return_out(var), + wtype=wtype, + source_location=loc, + ), + value=awst_nodes.VarExpression( + name=var, + wtype=wtype, + source_location=loc, + ), + source_location=loc, + ) + ], + source_location=loc, + ), + else_branch=None, + source_location=loc, + ) + node.accept(context.visitor) + + +def get_implicit_return_is_original(var_name: str) -> str: + return f"{var_name}{TMP_VAR_INDICATOR}is_original" + + +def get_implicit_return_out(var_name: str) -> str: + return f"{var_name}{TMP_VAR_INDICATOR}out" def mktemp( diff --git a/src/puya/ir/builder/arc4.py b/src/puya/ir/builder/arc4.py index 500a7dbb82..2c2aa2decc 100644 --- a/src/puya/ir/builder/arc4.py +++ b/src/puya/ir/builder/arc4.py @@ -2,6 +2,7 @@ import attrs +from puya import log from puya.arc4_util import ( determine_arc4_tuple_head_size, get_arc4_fixed_bit_size, @@ -17,7 +18,6 @@ from puya.ir.avm_ops import AVMOp from puya.ir.builder._utils import ( assert_value, - assign, assign_intrinsic_op, assign_targets, assign_temp, @@ -36,10 +36,11 @@ ValueTuple, ) from puya.ir.types_ import AVMBytesEncoding, IRType, get_wtype_arity -from puya.ir.utils import format_tuple_index from puya.parse import SourceLocation, sequential_source_locations_merge from puya.utils import bits_to_bytes +logger = log.get_logger(__name__) + @attrs.frozen(kw_only=True) class ArrayIterator: @@ -356,7 +357,7 @@ def handle_arc4_assign( value: ValueProvider, source_location: SourceLocation, *, - is_mutation: bool = False, + is_nested_update: bool, ) -> Value: result: Value match target: @@ -366,68 +367,71 @@ def handle_arc4_assign( ) as base_expr, index=index_value, ): + item = _arc4_replace_array_item( + context, + base_expr=base_expr, + index_value_expr=index_value, + wtype=array_wtype, + value=value, + source_location=source_location, + ) return handle_arc4_assign( context, target=base_expr, - value=_arc4_replace_array_item( - context, - base_expr=base_expr, - index_value_expr=index_value, - wtype=array_wtype, - value=value, - source_location=source_location, - ), + value=item, source_location=source_location, - is_mutation=True, + is_nested_update=True, ) case awst_nodes.FieldExpression( base=awst_nodes.Expression(wtype=wtypes.ARC4Struct() as struct_wtype) as base_expr, name=field_name, ): + item = _arc4_replace_struct_item( + context, + base_expr=base_expr, + field_name=field_name, + wtype=struct_wtype, + value=value, + source_location=source_location, + ) return handle_arc4_assign( context, target=base_expr, - value=_arc4_replace_struct_item( - context, - base_expr=base_expr, - field_name=field_name, - wtype=struct_wtype, - value=value, - source_location=source_location, - ), + value=item, source_location=source_location, - is_mutation=True, + is_nested_update=True, ) case awst_nodes.TupleItemExpression( base=awst_nodes.Expression(wtype=wtypes.ARC4Tuple() as tuple_wtype) as base_expr, index=index_value, ): + item = _arc4_replace_tuple_item( + context, + base_expr=base_expr, + index_int=index_value, + wtype=tuple_wtype, + value=value, + source_location=source_location, + ) return handle_arc4_assign( context, target=base_expr, - value=_arc4_replace_tuple_item( - context, - base_expr=base_expr, - index_int=index_value, - wtype=tuple_wtype, - value=value, - source_location=source_location, - ), + value=item, source_location=source_location, - is_mutation=True, + is_nested_update=True, ) # this function is sometimes invoked outside an assignment expr/stmt, which # is how a non l-value expression can be possible # TODO: refactor this so that this special case is handled where it originates case awst_nodes.TupleItemExpression( wtype=item_wtype, - ) as ti_expr if not item_wtype.immutable: - result = assign( - context=context, - name=_get_tuple_var_name(ti_expr), - source=value, - register_location=ti_expr.source_location, + ) if not item_wtype.immutable: + (result,) = handle_assignment( + context, + target, + value=value, assignment_location=source_location, + is_nested_update=True, ) return result case _: @@ -436,20 +440,11 @@ def handle_arc4_assign( target, value=value, assignment_location=source_location, - is_mutation=is_mutation, + is_nested_update=is_nested_update, ) return result -def _get_tuple_var_name(expr: awst_nodes.TupleItemExpression) -> str: - if isinstance(expr.base.wtype, wtypes.WTuple): - if isinstance(expr.base, awst_nodes.TupleItemExpression): - return format_tuple_index(expr.base.wtype, _get_tuple_var_name(expr.base), expr.index) - if isinstance(expr.base, awst_nodes.VarExpression): - return format_tuple_index(expr.base.wtype, expr.base.name, expr.index) - raise CodeError("invalid assignment target", expr.base.source_location) - - def concat_values( context: IRFunctionBuildContext, left_expr: awst_nodes.Expression, @@ -592,7 +587,13 @@ def pop_arc4_array( assignment_location=source_location, ) - handle_arc4_assign(context, target=expr.base, value=data, source_location=source_location) + handle_arc4_assign( + context, + target=expr.base, + value=data, + is_nested_update=True, + source_location=source_location, + ) return popped diff --git a/src/puya/ir/builder/assignment.py b/src/puya/ir/builder/assignment.py index 7052edbceb..82d4e1b7a4 100644 --- a/src/puya/ir/builder/assignment.py +++ b/src/puya/ir/builder/assignment.py @@ -11,15 +11,22 @@ from puya.ir.avm_ops import AVMOp from puya.ir.builder import arc4 from puya.ir.builder._tuple_util import build_tuple_registers -from puya.ir.builder._utils import assign_targets, assign_temp +from puya.ir.builder._utils import ( + assign, + assign_targets, + assign_temp, + get_implicit_return_is_original, +) from puya.ir.context import IRFunctionBuildContext from puya.ir.models import ( Intrinsic, + UInt64Constant, Value, ValueProvider, ValueTuple, ) -from puya.ir.types_ import get_wtype_arity +from puya.ir.types_ import IRType, get_wtype_arity +from puya.ir.utils import format_tuple_index from puya.parse import SourceLocation logger = log.get_logger(__name__) @@ -33,7 +40,11 @@ def handle_assignment_expr( ) -> Sequence[Value]: expr_values = context.visitor.visit_expr(value) return handle_assignment( - context, target=target, value=expr_values, assignment_location=assignment_location + context, + target=target, + value=expr_values, + is_nested_update=False, + assignment_location=assignment_location, ) @@ -41,50 +52,41 @@ def handle_assignment( context: IRFunctionBuildContext, target: awst_nodes.Expression, value: ValueProvider, - assignment_location: SourceLocation | None, - *, - is_mutation: bool = False, -) -> Sequence[Value]: - # separating out the target LValue check allows the _handle_assignment to statically assert - # all LValue types are covered - if not isinstance(target, awst_nodes.Lvalue): - raise CodeError("expression is not valid as an assignment target", target.source_location) - return _handle_assignment( - context, - target, - value, - assignment_location or target.source_location, - is_mutation=is_mutation, - ) - - -def _handle_assignment( - context: IRFunctionBuildContext, - target: awst_nodes.Lvalue, - value: ValueProvider, assignment_location: SourceLocation, *, - is_mutation: bool, + is_nested_update: bool, ) -> Sequence[Value]: match target: - case awst_nodes.VarExpression(name=var_name, source_location=var_loc, wtype=var_type): - is_implicit_return = var_name in ( - p.name for p in context.subroutine.parameters if p.implicit_return + # special case: a nested update can cause a tuple item to be re-assigned + # TODO: refactor this so that this special case is handled where it originates + case awst_nodes.TupleItemExpression( + wtype=var_type, source_location=var_loc + ) as ti_expr if ( + # including assumptions in condition, so assignment will error if they are not true + not var_type.immutable # mutable arc4 type + and is_nested_update # is a reassignment due to a nested update + and var_type.scalar_type is not None # only updating a scalar value + ): + base_name = _get_tuple_var_name(ti_expr) + return _handle_maybe_implicit_return_assignment( + context, + base_name=base_name, + wtype=var_type, + value=value, + var_loc=var_loc, + assignment_loc=assignment_location, + is_nested_update=is_nested_update, ) - if is_implicit_return and not is_mutation: - raise CodeError( - f"cannot reassign mutable parameter {var_name!r}" - " which is being passed by reference", - assignment_location, - ) - registers = build_tuple_registers(context, var_name, var_type, var_loc) - assign_targets( + case awst_nodes.VarExpression(name=base_name, source_location=var_loc, wtype=var_type): + return _handle_maybe_implicit_return_assignment( context, - source=value, - targets=registers, - assignment_location=assignment_location, + base_name=base_name, + wtype=var_type, + value=value, + var_loc=var_loc, + assignment_loc=assignment_location, + is_nested_update=is_nested_update, ) - return registers case awst_nodes.TupleExpression() as tup_expr: source = context.visitor.materialise_value_provider( value, description="tuple_assignment" @@ -105,6 +107,7 @@ def _handle_assignment( context, target=item, value=nested_value, + is_nested_update=False, assignment_location=assignment_location, ) ) @@ -192,6 +195,7 @@ def _handle_assignment( context, target=ix_expr, value=value, + is_nested_update=is_nested_update, source_location=assignment_location, ), ) @@ -210,6 +214,7 @@ def _handle_assignment( context, target=field_expr, value=value, + is_nested_update=is_nested_update, source_location=assignment_location, ), ) @@ -220,4 +225,49 @@ def _handle_assignment( assignment_location, ) case _: - typing.assert_never(target) + raise CodeError( + "expression is not valid as an assignment target", target.source_location + ) + + +def _handle_maybe_implicit_return_assignment( + context: IRFunctionBuildContext, + *, + base_name: str, + wtype: wtypes.WType, + value: ValueProvider, + var_loc: SourceLocation, + assignment_loc: SourceLocation, + is_nested_update: bool, +) -> Sequence[Value]: + registers = build_tuple_registers(context, base_name, wtype, var_loc) + for register in registers: + is_implicit_return = register.name in ( + p.name for p in context.subroutine.parameters if p.implicit_return + ) + # if an implicitly returned value is explicitly reassigned, then set a register which will + # prevent the original from being updated any further + if is_implicit_return and not is_nested_update: + assign( + context, + UInt64Constant(value=0, ir_type=IRType.bool, source_location=None), + name=get_implicit_return_is_original(register.name), + assignment_location=None, + ) + + assign_targets( + context, + source=value, + targets=registers, + assignment_location=assignment_loc, + ) + return registers + + +def _get_tuple_var_name(expr: awst_nodes.TupleItemExpression) -> str: + if isinstance(expr.base.wtype, wtypes.WTuple): + if isinstance(expr.base, awst_nodes.TupleItemExpression): + return format_tuple_index(expr.base.wtype, _get_tuple_var_name(expr.base), expr.index) + if isinstance(expr.base, awst_nodes.VarExpression): + return format_tuple_index(expr.base.wtype, expr.base.name, expr.index) + raise CodeError("invalid assignment target", expr.base.source_location) diff --git a/src/puya/ir/builder/main.py b/src/puya/ir/builder/main.py index f458714df3..030251e0ec 100644 --- a/src/puya/ir/builder/main.py +++ b/src/puya/ir/builder/main.py @@ -1,6 +1,8 @@ import typing from collections.abc import Iterator, Sequence +import attrs + import puya.awst.visitors import puya.ir.builder.storage from puya import algo_constants, log, utils @@ -23,9 +25,14 @@ assign_targets, assign_temp, extract_const_int, + get_implicit_return_is_original, + get_implicit_return_out, mktemp, ) -from puya.ir.builder.assignment import handle_assignment, handle_assignment_expr +from puya.ir.builder.assignment import ( + handle_assignment, + handle_assignment_expr, +) from puya.ir.builder.bytes import ( visit_bytes_intersection_slice_expression, visit_bytes_slice_expression, @@ -94,8 +101,22 @@ def build_body( builder = cls(ctx, function, subroutine) func_ctx = builder.context with func_ctx.log_exceptions(): - function.body.accept(builder) block_builder = func_ctx.block_builder + for p in subroutine.parameters: + if p.implicit_return: + assign( + func_ctx, + UInt64Constant(value=1, ir_type=IRType.bool, source_location=None), + name=get_implicit_return_is_original(p.name), + assignment_location=None, + ) + assign( + func_ctx, + p, + name=get_implicit_return_out(p.name), + assignment_location=None, + ) + function.body.accept(builder) final_block = block_builder.active_block if not final_block.terminated: if function.return_type != wtypes.void_wtype: @@ -110,7 +131,9 @@ def build_body( block_builder.terminate( SubroutineReturn( result=[ - block_builder.ssa.read_variable(p.name, p.ir_type, final_block) + block_builder.ssa.read_variable( + get_implicit_return_out(p.name), p.ir_type, final_block + ) for p in subroutine.parameters if p.implicit_return ], @@ -262,6 +285,7 @@ def visit_biguint_postfix_unary_operation( self.context, target=expr.target, value=new_value, + is_nested_update=False, assignment_location=expr.source_location, ) return target_value @@ -285,6 +309,7 @@ def visit_uint64_postfix_unary_operation( self.context, target=expr.target, value=new_value, + is_nested_update=False, assignment_location=expr.source_location, ) return target_value @@ -1006,6 +1031,7 @@ def visit_uint64_augmented_assignment( self.context, target=statement.target, value=expr, + is_nested_update=False, assignment_location=statement.source_location, ) @@ -1020,6 +1046,7 @@ def visit_biguint_augmented_assignment( self.context, target=statement.target, value=expr, + is_nested_update=False, assignment_location=statement.source_location, ) @@ -1034,6 +1061,7 @@ def visit_bytes_augmented_assignment( self.context, target=statement.target, value=expr, + is_nested_update=False, assignment_location=statement.source_location, ) @@ -1074,15 +1102,17 @@ def visit_array_concat(self, expr: awst_nodes.ArrayConcat) -> TExpression: ) def visit_array_extend(self, expr: awst_nodes.ArrayExtend) -> TExpression: + concat_result = arc4.concat_values( + self.context, + left_expr=expr.base, + right_expr=expr.other, + source_location=expr.source_location, + ) return arc4.handle_arc4_assign( self.context, target=expr.base, - value=arc4.concat_values( - self.context, - left_expr=expr.base, - right_expr=expr.other, - source_location=expr.source_location, - ), + value=concat_result, + is_nested_update=True, source_location=expr.source_location, ) diff --git a/test_cases/arc4_types/mutable_params.py b/test_cases/arc4_types/mutable_params.py index c151e6043c..4b14c475d7 100644 --- a/test_cases/arc4_types/mutable_params.py +++ b/test_cases/arc4_types/mutable_params.py @@ -1,6 +1,6 @@ import typing -from algopy import Contract, subroutine +from algopy import Contract, UInt64, subroutine from algopy.arc4 import ( Bool, StaticArray, @@ -79,8 +79,37 @@ def mutating_copies(self) -> None: self.other_routine_2(my_array_copy_2) assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" - # tuples of mutable types only work with a .copy() - self.other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) + my_array_copy_3 = my_array_copy.copy() + + originals = (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()) + self.mutate_tuple_items_and_reassign( + (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + start=UInt64(0), + reassign=True, + ) + assert originals == (my_array, my_array_copy_2, my_array_copy_3) + + self.mutate_tuple_items_and_reassign( + (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + ) + + assert my_array[0] == 100 + assert my_array_copy_2[0] == 101 + assert my_array_copy_3[0] == 102 + assert my_array[1] == 103 + assert my_array_copy_2[1] == 104 + assert my_array_copy_3[1] == 105 + + self.mutate_tuple_items_and_reassign( + (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + ) + + assert my_array[0] == 200 + assert my_array_copy_2[0] == 201 + assert my_array_copy_3[0] == 202 + assert my_array[1] == 206 + assert my_array_copy_2[1] == 207 + assert my_array_copy_3[1] == 208 # Nested array items should still require a copy nested = StructWithArray(test_array=my_array.copy()) @@ -99,14 +128,32 @@ def other_routine_2(self, array: TestArray) -> TestArray: return copy @subroutine - def other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: - # this modifies the local copy - for array in arrays: - array[0] = UInt8(99) - - arrays[0][0] = UInt8(99) - arrays[1][0] = UInt8(99) - arrays[2][0] = UInt8(99) + def mutate_tuple_items_and_reassign( + self, arrays: tuple[TestArray, TestArray, TestArray], *, start: UInt64, reassign: bool + ) -> None: + arrays[0][0] = UInt8(start) + arrays[1][0] = UInt8(start + 1) + arrays[2][0] = UInt8(start + 2) + + assert arrays[0][0] == start + assert arrays[1][0] == start + 1 + assert arrays[2][0] == start + 2 + + arrays[0][1] = UInt8(start + 3) + arrays[1][1] = UInt8(start + 4) + arrays[2][1] = UInt8(start + 5) + + # overwrite params + if reassign: + arrays = (arrays[0].copy(), arrays[1].copy(), arrays[2].copy()) + + arrays[0][1] = UInt8(start + 6) + arrays[1][1] = UInt8(start + 7) + arrays[2][1] = UInt8(start + 8) + + assert arrays[0][1] == start + 6 + assert arrays[1][1] == start + 7 + assert arrays[2][1] == start + 8 def clear_state_program(self) -> bool: return True diff --git a/test_cases/arc4_types/mutable_params2.py b/test_cases/arc4_types/mutable_params2.py new file mode 100644 index 0000000000..fb71610159 --- /dev/null +++ b/test_cases/arc4_types/mutable_params2.py @@ -0,0 +1,25 @@ +from algopy import arc4, subroutine + + +class MutableParams2(arc4.ARC4Contract): + @arc4.abimethod() + def test_array_rebinding(self) -> None: + a = arc4.DynamicBytes(0) + self.maybe_modify_array(a, assign_local=True) + assert a == arc4.DynamicBytes(0, 1) + + a = arc4.DynamicBytes(1) + self.maybe_modify_array(a, assign_local=False) + assert a == arc4.DynamicBytes(1, 42, 4) + + @subroutine + def maybe_modify_array(self, a: arc4.DynamicBytes, *, assign_local: bool) -> None: # v0 + if assign_local: + a.append(arc4.Byte(1)) # v1: modify out + a = arc4.DynamicBytes(1, 2, 3) # v2: BOUNDARY + a.append(arc4.Byte(4)) # v3: local only + a = arc4.DynamicBytes(1, 2, 4) # v4: local only + else: + a.append(arc4.Byte(42)) # v5: modify out + + a.append(arc4.Byte(4)) # v6: modify out IF not b ELSE local only diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir index 10744a66cc..82d8a70f31 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir @@ -1,4 +1,4 @@ -// Op Stack (out) +// Op Stack (out) // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program() -> uint64: main_block@0: // arc4_types/mutable_params.py:29 @@ -6,7 +6,7 @@ main_block@0: callsub mutating_copies // arc4_types/mutable_params.py:31 // return True - int 1 1 + int 1 1 return @@ -20,21 +20,21 @@ mutating_copies: mutating_copies_block@0: // arc4_types/mutable_params.py:35 // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) - byte 0x01020304 0x01020304 + byte 0x01020304 0x01020304 // arc4_types/mutable_params.py:46 // my_array[2] = UInt8(5) - byte 0x05 0x01020304,0x05 - replace2 2 my_array#1 + byte 0x05 0x01020304,0x05 + replace2 2 my_array#1 // arc4_types/mutable_params.py:49 // assert my_array[2] == UInt8(5), "my_array should be mutated" - l-load-copy my_array#1 0 my_array#1,my_array#1 (copy) - extract 2 1 // on error: Index access is out of bounds my_array#1,reinterpret_biguint%2#0 - byte 0x05 my_array#1,reinterpret_biguint%2#0,0x05 - b== my_array#1,tmp%1#0 - assert // my_array should be mutated my_array#1 + l-load-copy my_array#1 0 my_array#1,my_array#1 (copy) + extract 2 1 // on error: Index access is out of bounds my_array#1,reinterpret_biguint%2#0 + byte 0x05 my_array#1,reinterpret_biguint%2#0,0x05 + b== my_array#1,tmp%1#0 + assert // my_array should be mutated my_array#1 // arc4_types/mutable_params.py:52 // t, f = self.other_routine(my_array, my_struct) - l-load my_array#1 0 my_array#1 + l-load my_array#1 0 my_array#1 // arc4_types/mutable_params.py:36-41 // my_struct = TestStruct( // b_val=Bool(True), @@ -42,48 +42,48 @@ mutating_copies_block@0: // s_val_1=String("Happy"), // s_val_2=String("Days"), // ) - byte 0x80320006000d00054861707079000444617973 my_array#1,0x80320006000d00054861707079000444617973 + byte 0x80320006000d00054861707079000444617973 my_array#1,0x80320006000d00054861707079000444617973 // arc4_types/mutable_params.py:52 // t, f = self.other_routine(my_array, my_struct) - callsub other_routine t#0,f#0,my_array#1,my_struct#1 + callsub other_routine t#0,f#0,my_array#1,my_struct#1 // arc4_types/mutable_params.py:53 // assert t - l-load t#0 3 f#0,my_array#1,my_struct#1,t#0 - assert f#0,my_array#1,my_struct#1 + l-load t#0 3 f#0,my_array#1,my_struct#1,t#0 + assert f#0,my_array#1,my_struct#1 // arc4_types/mutable_params.py:54 // assert not f - l-load f#0 2 my_array#1,my_struct#1,f#0 - ! my_array#1,my_struct#1,tmp%2#0 - assert my_array#1,my_struct#1 + l-load f#0 2 my_array#1,my_struct#1,f#0 + ! my_array#1,my_struct#1,tmp%2#0 + assert my_array#1,my_struct#1 // arc4_types/mutable_params.py:56 // assert my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" - l-load-copy my_array#1 1 my_array#1,my_struct#1,my_array#1 (copy) - extract 1 1 // on error: Index access is out of bounds my_array#1,my_struct#1,reinterpret_biguint%4#0 - byte 0x05 my_array#1,my_struct#1,reinterpret_biguint%4#0,0x05 - b== my_array#1,my_struct#1,tmp%3#0 - assert // my_array has been mutated by the subroutine my_array#1,my_struct#1 + l-load-copy my_array#1 1 my_array#1,my_struct#1,my_array#1 (copy) + extract 1 1 // on error: Index access is out of bounds my_array#1,my_struct#1,reinterpret_biguint%4#0 + byte 0x05 my_array#1,my_struct#1,reinterpret_biguint%4#0,0x05 + b== my_array#1,my_struct#1,tmp%3#0 + assert // my_array has been mutated by the subroutine my_array#1,my_struct#1 // arc4_types/mutable_params.py:58 // assert my_struct.s_val_1 == String( - l-load-copy my_struct#1 0 my_array#1,my_struct#1,my_struct#1 (copy) - int 2 my_array#1,my_struct#1,my_struct#1 (copy),2 - extract_uint16 my_array#1,my_struct#1,item_start_offset%0#0 - l-load-copy my_struct#1 1 my_array#1,my_struct#1,item_start_offset%0#0,my_struct#1 (copy) - int 4 my_array#1,my_struct#1,item_start_offset%0#0,my_struct#1 (copy),4 - extract_uint16 my_array#1,my_struct#1,item_start_offset%0#0,item_end_offset%0#0 - l-load my_struct#1 2 my_array#1,item_start_offset%0#0,item_end_offset%0#0,my_struct#1 - l-load item_start_offset%0#0 2 my_array#1,item_end_offset%0#0,my_struct#1,item_start_offset%0#0 - l-load item_end_offset%0#0 2 my_array#1,my_struct#1,item_start_offset%0#0,item_end_offset%0#0 - substring3 my_array#1,tmp%4#0 + l-load-copy my_struct#1 0 my_array#1,my_struct#1,my_struct#1 (copy) + int 2 my_array#1,my_struct#1,my_struct#1 (copy),2 + extract_uint16 my_array#1,my_struct#1,item_start_offset%0#0 + l-load-copy my_struct#1 1 my_array#1,my_struct#1,item_start_offset%0#0,my_struct#1 (copy) + int 4 my_array#1,my_struct#1,item_start_offset%0#0,my_struct#1 (copy),4 + extract_uint16 my_array#1,my_struct#1,item_start_offset%0#0,item_end_offset%0#0 + l-load my_struct#1 2 my_array#1,item_start_offset%0#0,item_end_offset%0#0,my_struct#1 + l-load item_start_offset%0#0 2 my_array#1,item_end_offset%0#0,my_struct#1,item_start_offset%0#0 + l-load item_end_offset%0#0 2 my_array#1,my_struct#1,item_start_offset%0#0,item_end_offset%0#0 + substring3 my_array#1,tmp%4#0 // arc4_types/mutable_params.py:58-60 // assert my_struct.s_val_1 == String( // "AARRGH!" // ), "my_struct has been mutated by the subroutine" - byte 0x000741415252474821 my_array#1,tmp%4#0,0x000741415252474821 - == my_array#1,tmp%5#0 - assert // my_struct has been mutated by the subroutine my_array#1 + byte 0x000741415252474821 my_array#1,tmp%4#0,0x000741415252474821 + == my_array#1,tmp%5#0 + assert // my_struct has been mutated by the subroutine my_array#1 // arc4_types/mutable_params.py:35 // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) - byte 0x01020304 my_array#1,0x01020304 + byte 0x01020304 my_array#1,0x01020304 // arc4_types/mutable_params.py:36-41 // my_struct = TestStruct( // b_val=Bool(True), @@ -91,194 +91,514 @@ mutating_copies_block@0: // s_val_1=String("Happy"), // s_val_2=String("Days"), // ) - byte 0x80320006000d00054861707079000444617973 my_array#1,0x01020304,0x80320006000d00054861707079000444617973 + byte 0x80320006000d00054861707079000444617973 my_array#1,0x01020304,0x80320006000d00054861707079000444617973 // arc4_types/mutable_params.py:63 // self.other_routine(my_array_copy.copy(), my_struct_copy.copy()) - callsub other_routine my_array#1,other_routine%4#0,other_routine%5#0,other_routine%6#0,other_routine%7#0 - pop 1 my_array#1,other_routine%4#0,other_routine%5#0,other_routine%6#0 - pop 1 my_array#1,other_routine%4#0,other_routine%5#0 - pop 1 my_array#1,other_routine%4#0 - pop 1 my_array#1 + callsub other_routine my_array#1,other_routine%4#0,other_routine%5#0,other_routine%6#0,other_routine%7#0 + pop 1 my_array#1,other_routine%4#0,other_routine%5#0,other_routine%6#0 + pop 1 my_array#1,other_routine%4#0,other_routine%5#0 + pop 1 my_array#1,other_routine%4#0 + pop 1 my_array#1 // arc4_types/mutable_params.py:35 // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) - byte 0x01020304 my_array#1,0x01020304 + byte 0x01020304 my_array#1,0x01020304 // arc4_types/mutable_params.py:75 // my_array_copy_2 = self.other_routine_2(my_array_copy_2) - callsub other_routine_2 my_array#1,my_array_copy_2#2,my_array_copy_2#1 - pop 1 my_array#1,my_array_copy_2#2 - l-store my_array_copy_2#2 0 my_array#1,my_array_copy_2#2 + callsub other_routine_2 my_array#1,my_array_copy_2#2,my_array_copy_2#1 + pop 1 my_array#1,my_array_copy_2#2 + l-store my_array_copy_2#2 0 my_array#1,my_array_copy_2#2 // arc4_types/mutable_params.py:77 // assert my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" - l-load-copy my_array_copy_2#2 0 my_array#1,my_array_copy_2#2,my_array_copy_2#2 (copy) - extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0 - byte 0x01 my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0,0x01 - b== my_array#1,my_array_copy_2#2,tmp%9#0 - assert // my_array_copy_2 should have original value my_array#1,my_array_copy_2#2 + l-load-copy my_array_copy_2#2 0 my_array#1,my_array_copy_2#2,my_array_copy_2#2 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0 + byte 0x01 my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0,0x01 + b== my_array#1,my_array_copy_2#2,tmp%9#0 + assert // my_array_copy_2 should have original value my_array#1,my_array_copy_2#2 // arc4_types/mutable_params.py:79 // self.other_routine_2(my_array_copy_2) - l-load my_array_copy_2#2 0 my_array#1,my_array_copy_2#2 - callsub other_routine_2 my_array#1,other_routine_2%2#0,my_array_copy_2#2 - l-store my_array_copy_2#2 1 my_array#1,my_array_copy_2#2,other_routine_2%2#0 - pop 1 my_array#1,my_array_copy_2#2 + l-load my_array_copy_2#2 0 my_array#1,my_array_copy_2#2 + callsub other_routine_2 my_array#1,other_routine_2%2#0,my_array_copy_2#2 + l-store my_array_copy_2#2 1 my_array#1,my_array_copy_2#2,other_routine_2%2#0 + pop 1 my_array#1,my_array_copy_2#2 // arc4_types/mutable_params.py:80 // assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" - l-load-copy my_array_copy_2#2 0 my_array#1,my_array_copy_2#2,my_array_copy_2#2 (copy) - extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,reinterpret_biguint%10#0 - byte 0x0a my_array#1,my_array_copy_2#2,reinterpret_biguint%10#0,0x0a - b== my_array#1,my_array_copy_2#2,tmp%10#0 - assert // my_array_copy_2 should have mutated value my_array#1,my_array_copy_2#2 - // arc4_types/mutable_params.py:83 - // self.other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) - l-load-copy my_array#1 1 my_array#1,my_array_copy_2#2,my_array#1 (copy) - l-load-copy my_array_copy_2#2 1 my_array#1,my_array_copy_2#2,my_array#1 (copy),my_array_copy_2#2 (copy) - l-load my_array_copy_2#2 2 my_array#1,my_array#1 (copy),my_array_copy_2#2 (copy),my_array_copy_2#2 - callsub other_routine_3 my_array#1,other_routine_3%0#0,other_routine_3%1#0,other_routine_3%2#0 - pop 1 my_array#1,other_routine_3%0#0,other_routine_3%1#0 - pop 1 my_array#1,other_routine_3%0#0 - pop 1 my_array#1 + l-load-copy my_array_copy_2#2 0 my_array#1,my_array_copy_2#2,my_array_copy_2#2 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,reinterpret_biguint%10#0 + byte 0x0a my_array#1,my_array_copy_2#2,reinterpret_biguint%10#0,0x0a + b== my_array#1,my_array_copy_2#2,tmp%10#0 + assert // my_array_copy_2 should have mutated value my_array#1,my_array_copy_2#2 + // arc4_types/mutable_params.py:85-89 + // self.mutate_tuple_items_and_reassign( + // (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + // start=UInt64(0), + // reassign=True, + // ) + l-load-copy my_array#1 1 my_array#1,my_array_copy_2#2,my_array#1 (copy) + l-load-copy my_array_copy_2#2 1 my_array#1,my_array_copy_2#2,my_array#1 (copy),my_array_copy_2#2 (copy) + // arc4_types/mutable_params.py:35 + // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) + byte 0x01020304 my_array#1,my_array_copy_2#2,my_array#1 (copy),my_array_copy_2#2 (copy),0x01020304 // arc4_types/mutable_params.py:87 + // start=UInt64(0), + int 0 my_array#1,my_array_copy_2#2,my_array#1 (copy),my_array_copy_2#2 (copy),0x01020304,0 + // arc4_types/mutable_params.py:88 + // reassign=True, + int 1 my_array#1,my_array_copy_2#2,my_array#1 (copy),my_array_copy_2#2 (copy),0x01020304,0,1 + // arc4_types/mutable_params.py:85-89 + // self.mutate_tuple_items_and_reassign( + // (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + // start=UInt64(0), + // reassign=True, + // ) + callsub mutate_tuple_items_and_reassign my_array#1,my_array_copy_2#2,mutate_tuple_items_and_reassign%0#0,mutate_tuple_items_and_reassign%1#0,mutate_tuple_items_and_reassign%2#0 + pop 1 my_array#1,my_array_copy_2#2,mutate_tuple_items_and_reassign%0#0,mutate_tuple_items_and_reassign%1#0 + pop 1 my_array#1,my_array_copy_2#2,mutate_tuple_items_and_reassign%0#0 + pop 1 my_array#1,my_array_copy_2#2 + // arc4_types/mutable_params.py:92-94 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + // ) + l-load my_array#1 1 my_array_copy_2#2,my_array#1 + l-load my_array_copy_2#2 1 my_array#1,my_array_copy_2#2 + // arc4_types/mutable_params.py:35 + // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) + byte 0x01020304 my_array#1,my_array_copy_2#2,0x01020304 + // arc4_types/mutable_params.py:93 + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + int 100 my_array#1,my_array_copy_2#2,0x01020304,100 + int 1 my_array#1,my_array_copy_2#2,0x01020304,100,1 + // arc4_types/mutable_params.py:92-94 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + // ) + callsub mutate_tuple_items_and_reassign my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:96 + // assert my_array[0] == 100 + l-load-copy my_array#1 2 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array#1 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%12#0 + byte 0x64 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%12#0,0x64 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%16#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:97 + // assert my_array_copy_2[0] == 101 + l-load-copy my_array_copy_2#2 1 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array_copy_2#2 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%14#0 + byte 0x65 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%14#0,0x65 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%17#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:98 + // assert my_array_copy_3[0] == 102 + l-load-copy my_array_copy_3#1 0 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array_copy_3#1 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%16#0 + byte 0x66 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%16#0,0x66 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%18#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:99 + // assert my_array[1] == 103 + l-load-copy my_array#1 2 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array#1 (copy) + extract 1 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%18#0 + byte 0x67 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%18#0,0x67 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%19#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:100 + // assert my_array_copy_2[1] == 104 + l-load-copy my_array_copy_2#2 1 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array_copy_2#2 (copy) + extract 1 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%20#0 + byte 0x68 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%20#0,0x68 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%20#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:101 + // assert my_array_copy_3[1] == 105 + l-load-copy my_array_copy_3#1 0 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array_copy_3#1 (copy) + extract 1 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%22#0 + byte 0x69 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%22#0,0x69 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%21#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:103-105 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + // ) + l-load my_array#1 2 my_array_copy_2#2,my_array_copy_3#1,my_array#1 + l-load my_array_copy_2#2 2 my_array_copy_3#1,my_array#1,my_array_copy_2#2 + l-load my_array_copy_3#1 2 my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:104 + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + int 200 my_array#1,my_array_copy_2#2,my_array_copy_3#1,200 + int 0 my_array#1,my_array_copy_2#2,my_array_copy_3#1,200,0 + // arc4_types/mutable_params.py:103-105 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + // ) + callsub mutate_tuple_items_and_reassign my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:107 + // assert my_array[0] == 200 + l-load-copy my_array#1 2 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array#1 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%24#0 + byte 0xc8 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%24#0,0xc8 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%22#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:108 + // assert my_array_copy_2[0] == 201 + l-load-copy my_array_copy_2#2 1 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array_copy_2#2 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%26#0 + byte 0xc9 my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%26#0,0xc9 + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%23#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:109 + // assert my_array_copy_3[0] == 202 + l-load-copy my_array_copy_3#1 0 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array_copy_3#1 (copy) + extract 0 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%28#0 + byte 0xca my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%28#0,0xca + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%24#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:110 + // assert my_array[1] == 206 + l-load-copy my_array#1 2 my_array#1,my_array_copy_2#2,my_array_copy_3#1,my_array#1 (copy) + extract 1 1 // on error: Index access is out of bounds my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%30#0 + byte 0xce my_array#1,my_array_copy_2#2,my_array_copy_3#1,reinterpret_biguint%30#0,0xce + b== my_array#1,my_array_copy_2#2,my_array_copy_3#1,tmp%25#0 + assert my_array#1,my_array_copy_2#2,my_array_copy_3#1 + // arc4_types/mutable_params.py:111 + // assert my_array_copy_2[1] == 207 + l-load my_array_copy_2#2 1 my_array#1,my_array_copy_3#1,my_array_copy_2#2 + extract 1 1 // on error: Index access is out of bounds my_array#1,my_array_copy_3#1,reinterpret_biguint%32#0 + byte 0xcf my_array#1,my_array_copy_3#1,reinterpret_biguint%32#0,0xcf + b== my_array#1,my_array_copy_3#1,tmp%26#0 + assert my_array#1,my_array_copy_3#1 + // arc4_types/mutable_params.py:112 + // assert my_array_copy_3[1] == 208 + l-load my_array_copy_3#1 0 my_array#1,my_array_copy_3#1 + extract 1 1 // on error: Index access is out of bounds my_array#1,reinterpret_biguint%34#0 + byte 0xd0 my_array#1,reinterpret_biguint%34#0,0xd0 + b== my_array#1,tmp%27#0 + assert my_array#1 + // arc4_types/mutable_params.py:116 // self.other_routine_2(nested.test_array.copy()) - l-load my_array#1 0 my_array#1 - extract 0 4 // on error: Index access is out of bounds tmp%11#0 - callsub other_routine_2 other_routine_2%4#0,other_routine_2%5#0 - pop 1 other_routine_2%4#0 + l-load my_array#1 0 my_array#1 + extract 0 4 // on error: Index access is out of bounds tmp%28#0 + callsub other_routine_2 other_routine_2%4#0,other_routine_2%5#0 + pop 1 other_routine_2%4#0 pop 1 retsub // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> uint64, uint64, bytes, bytes: -other_routine: (𝕡) array#0,struct#0 | - // arc4_types/mutable_params.py:89-90 +other_routine: (𝕡) array#0,struct#0 | + // arc4_types/mutable_params.py:118-119 // @subroutine // def other_routine(self, array: TestArray, struct: TestStruct) -> tuple[bool, bool]: - proto 2 4 (𝕡) array#0,struct#0 | + proto 2 4 (𝕡) array#0,struct#0 | -other_routine_block@0: (𝕡) array#0,struct#0 | - // arc4_types/mutable_params.py:91 +other_routine_block@0: (𝕡) array#0,struct#0 | + // arc4_types/mutable_params.py:120 // array[1] = UInt8(5) - p-load array#0 (𝕡) array#0,struct#0 | array#0 (copy) - byte 0x05 (𝕡) array#0,struct#0 | array#0 (copy),0x05 - replace2 1 (𝕡) array#0,struct#0 | array#0 - p-store array#0 (𝕡) array#0,struct#0 | - // arc4_types/mutable_params.py:92 + p-load array#0 (𝕡) array#0,struct#0 | array#0 (copy) + byte 0x05 (𝕡) array#0,struct#0 | array#0 (copy),0x05 + replace2 1 (𝕡) array#0,struct#0 | array#0 + p-store array#0 (𝕡) array#0,struct#0 | + // arc4_types/mutable_params.py:121 // struct.s_val_1 = String("AARRGH!") - p-load struct#0 (𝕡) array#0,struct#0 | struct#0 (copy) - int 2 (𝕡) array#0,struct#0 | struct#0 (copy),2 - extract_uint16 (𝕡) array#0,struct#0 | item_offset%0#0 - p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 (copy) - int 0 (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 (copy),0 - l-load-copy item_offset%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 (copy),0,item_offset%0#0 (copy) - extract3 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0 - p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0 (copy) - int 4 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0 (copy),4 - extract_uint16 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0 - p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0 (copy) - len (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0 - p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0 (copy) - l-load-copy next_item_offset%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0 (copy),next_item_offset%0#0 (copy) - l-load total_data_length%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0 (copy),next_item_offset%0#0 (copy),total_data_length%0#0 - substring3 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,data_beyond_item%0#0 - l-load data_up_to_item%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0 - byte 0x000741415252474821 (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0,0x000741415252474821 - concat (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,updated_data%0#0 - l-load data_beyond_item%0#0 1 (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%0#0,data_beyond_item%0#0 - concat (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%1#0 - l-load next_item_offset%0#0 1 (𝕡) array#0,struct#0 | item_offset%0#0,updated_data%1#0,next_item_offset%0#0 - l-load item_offset%0#0 2 (𝕡) array#0,struct#0 | updated_data%1#0,next_item_offset%0#0,item_offset%0#0 - - (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0 - l-load-copy updated_data%1#0 1 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,updated_data%1#0 (copy) - int 4 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,updated_data%1#0 (copy),4 - extract_uint16 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,tail_offset%0#0 - int 9 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,tail_offset%0#0,9 - + (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,tail_offset%1#0 - l-load item_length%0#0 1 (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%1#0,item_length%0#0 - - (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%2#0 - itob (𝕡) array#0,struct#0 | updated_data%1#0,as_bytes%1#0 - extract 6 2 (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 - l-load updated_data%1#0 1 (𝕡) array#0,struct#0 | tail_offset_bytes%0#0,updated_data%1#0 - l-load tail_offset_bytes%0#0 1 (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 - replace2 4 (𝕡) array#0,struct#0 | struct#0 - p-store struct#0 (𝕡) array#0,struct#0 | - // arc4_types/mutable_params.py:93 + p-load struct#0 (𝕡) array#0,struct#0 | struct#0 (copy) + int 2 (𝕡) array#0,struct#0 | struct#0 (copy),2 + extract_uint16 (𝕡) array#0,struct#0 | item_offset%0#0 + p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 (copy) + int 0 (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 (copy),0 + l-load-copy item_offset%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 (copy),0,item_offset%0#0 (copy) + extract3 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0 + p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0 (copy) + int 4 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0 (copy),4 + extract_uint16 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0 + p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0 (copy) + len (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0 + p-load struct#0 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0 (copy) + l-load-copy next_item_offset%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0 (copy),next_item_offset%0#0 (copy) + l-load total_data_length%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0 (copy),next_item_offset%0#0 (copy),total_data_length%0#0 + substring3 (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,data_beyond_item%0#0 + l-load data_up_to_item%0#0 2 (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0 + byte 0x000741415252474821 (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0,0x000741415252474821 + concat (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,updated_data%0#0 + l-load data_beyond_item%0#0 1 (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%0#0,data_beyond_item%0#0 + concat (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%1#0 + l-load next_item_offset%0#0 1 (𝕡) array#0,struct#0 | item_offset%0#0,updated_data%1#0,next_item_offset%0#0 + l-load item_offset%0#0 2 (𝕡) array#0,struct#0 | updated_data%1#0,next_item_offset%0#0,item_offset%0#0 + - (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0 + l-load-copy updated_data%1#0 1 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,updated_data%1#0 (copy) + int 4 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,updated_data%1#0 (copy),4 + extract_uint16 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,tail_offset%0#0 + int 9 (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,tail_offset%0#0,9 + + (𝕡) array#0,struct#0 | updated_data%1#0,item_length%0#0,tail_offset%1#0 + l-load item_length%0#0 1 (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%1#0,item_length%0#0 + - (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%2#0 + itob (𝕡) array#0,struct#0 | updated_data%1#0,as_bytes%1#0 + extract 6 2 (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 + l-load updated_data%1#0 1 (𝕡) array#0,struct#0 | tail_offset_bytes%0#0,updated_data%1#0 + l-load tail_offset_bytes%0#0 1 (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 + replace2 4 (𝕡) array#0,struct#0 | struct#0 + p-store struct#0 (𝕡) array#0,struct#0 | + // arc4_types/mutable_params.py:122 // return True, False - int 1 (𝕡) array#0,struct#0 | 1 - int 0 (𝕡) array#0,struct#0 | 1,0 - p-load array#0 (𝕡) array#0,struct#0 | 1,0,array#0 (copy) - p-load struct#0 (𝕡) array#0,struct#0 | 1,0,array#0 (copy),struct#0 (copy) - retsub 1,0,array#0 (copy),struct#0 (copy) + int 1 (𝕡) array#0,struct#0 | 1 + int 0 (𝕡) array#0,struct#0 | 1,0 + p-load array#0 (𝕡) array#0,struct#0 | 1,0,array#0 (copy) + p-load struct#0 (𝕡) array#0,struct#0 | 1,0,array#0 (copy),struct#0 (copy) + retsub 1,0,array#0 (copy),struct#0 (copy) // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> bytes, bytes: -other_routine_2: (𝕡) array#0 | - // arc4_types/mutable_params.py:95-96 +other_routine_2: (𝕡) array#0 | + // arc4_types/mutable_params.py:124-125 // @subroutine // def other_routine_2(self, array: TestArray) -> TestArray: - proto 1 2 (𝕡) array#0 | + proto 1 2 (𝕡) array#0 | -other_routine_2_block@0: (𝕡) array#0 | - // arc4_types/mutable_params.py:98 +other_routine_2_block@0: (𝕡) array#0 | + // arc4_types/mutable_params.py:127 // array[0] = UInt8(10) - p-load array#0 (𝕡) array#0 | array#0 (copy) - byte 0x0a (𝕡) array#0 | array#0 (copy),0x0a - replace2 0 (𝕡) array#0 | array#1 - // arc4_types/mutable_params.py:99 + p-load array#0 (𝕡) array#0 | array#0 (copy) + byte 0x0a (𝕡) array#0 | array#0 (copy),0x0a + replace2 0 (𝕡) array#0 | array#1 + // arc4_types/mutable_params.py:128 // return copy - p-load array#0 (𝕡) array#0 | array#1,array#0 (copy) - l-load array#1 1 (𝕡) array#0 | array#0 (copy),array#1 - retsub array#0 (copy),array#1 + p-load array#0 (𝕡) array#0 | array#1,array#0 (copy) + l-load array#1 1 (𝕡) array#0 | array#0 (copy),array#1 + retsub array#0 (copy),array#1 -// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: -other_routine_3: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - // arc4_types/mutable_params.py:101-102 +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: uint64) -> bytes, bytes, bytes: +mutate_tuple_items_and_reassign: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | + // arc4_types/mutable_params.py:130-133 // @subroutine - // def other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: - proto 3 3 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | + // def mutate_tuple_items_and_reassign( + // self, arrays: tuple[TestArray, TestArray, TestArray], *, start: UInt64, reassign: bool + // ) -> None: + proto 5 3 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | + allocate 6 to stack (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0 | -other_routine_3_block@0: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - int 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | loop_counter%0#0 - x-store loop_counter%0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕏) loop_counter%0#0 | - // Implicit fall through to other_routine_3_for_body@1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕏) loop_counter%0#0 | +mutate_tuple_items_and_reassign_block@0: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0 | + int 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0 | arrays.0%is_original#0 + f-store arrays.0%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0 | + int 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0 | arrays.1%is_original#0 + f-store arrays.1%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0 | + int 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0 | arrays.2%is_original#0 + f-store arrays.2%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | + // arc4_types/mutable_params.py:134 + // arrays[0][0] = UInt8(start) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | start#0 (copy) + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0 + l-load-copy val_as_bytes%0#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%0#0 (copy) + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,assigned_value%0#0 + p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,assigned_value%0#0,arrays.0#0 (copy) + l-load assigned_value%0#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,arrays.0#0 (copy),assigned_value%0#0 + replace2 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,arrays.0#0 + p-store arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0 + // arc4_types/mutable_params.py:135 + // arrays[1][0] = UInt8(start + 1) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,start#0 (copy) + int 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,start#0 (copy),1 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,to_encode%0#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0 + l-load-copy val_as_bytes%1#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%1#0 (copy) + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,assigned_value%1#0 + p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,assigned_value%1#0,arrays.1#0 (copy) + l-load assigned_value%1#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,arrays.1#0 (copy),assigned_value%1#0 + replace2 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,arrays.1#0 + p-store arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0 + // arc4_types/mutable_params.py:136 + // arrays[2][0] = UInt8(start + 2) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,start#0 (copy) + int 2 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,start#0 (copy),2 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,to_encode%1#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0 + l-load-copy val_as_bytes%2#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0,val_as_bytes%2#0 (copy) + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0,assigned_value%2#0 + p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0,assigned_value%2#0,arrays.2#0 (copy) + l-load assigned_value%2#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0,arrays.2#0 (copy),assigned_value%2#0 + replace2 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0,arrays.2#0 + p-store arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0 + // arc4_types/mutable_params.py:138 + // assert arrays[0][0] == start + p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0,arrays.0#0 (copy) + extract 0 1 // on error: Index access is out of bounds (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%0#0,val_as_bytes%1#0,val_as_bytes%2#0,reinterpret_biguint%0#0 + l-load val_as_bytes%0#0 3 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%1#0,val_as_bytes%2#0,reinterpret_biguint%0#0,val_as_bytes%0#0 + b== (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%1#0,val_as_bytes%2#0,tmp%1#0 + assert (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%1#0,val_as_bytes%2#0 + // arc4_types/mutable_params.py:139 + // assert arrays[1][0] == start + 1 + p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%1#0,val_as_bytes%2#0,arrays.1#0 (copy) + extract 0 1 // on error: Index access is out of bounds (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%1#0,val_as_bytes%2#0,reinterpret_biguint%1#0 + l-load val_as_bytes%1#0 2 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%2#0,reinterpret_biguint%1#0,val_as_bytes%1#0 + b== (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%2#0,tmp%4#0 + assert (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%2#0 + // arc4_types/mutable_params.py:140 + // assert arrays[2][0] == start + 2 + p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%2#0,arrays.2#0 (copy) + extract 0 1 // on error: Index access is out of bounds (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%2#0,reinterpret_biguint%2#0 + l-load val_as_bytes%2#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | reinterpret_biguint%2#0,val_as_bytes%2#0 + b== (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | tmp%7#0 + assert (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | + // arc4_types/mutable_params.py:142 + // arrays[0][1] = UInt8(start + 3) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | start#0 (copy) + int 3 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | start#0 (copy),3 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | to_encode%2#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%3#0 + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | assigned_value%3#0 + p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | assigned_value%3#0,arrays.0#0 (copy) + l-load assigned_value%3#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | arrays.0#0 (copy),assigned_value%3#0 + replace2 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | arrays.0#0 + p-store arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | + // arc4_types/mutable_params.py:143 + // arrays[1][1] = UInt8(start + 4) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | start#0 (copy) + int 4 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | start#0 (copy),4 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | to_encode%3#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%4#0 + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | assigned_value%4#0 + p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | assigned_value%4#0,arrays.1#0 (copy) + l-load assigned_value%4#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | arrays.1#0 (copy),assigned_value%4#0 + replace2 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | arrays.1#0 + p-store arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | + // arc4_types/mutable_params.py:144 + // arrays[2][1] = UInt8(start + 5) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | start#0 (copy) + int 5 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | start#0 (copy),5 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | to_encode%4#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | val_as_bytes%5#0 + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | assigned_value%5#0 + p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | assigned_value%5#0,arrays.2#0 (copy) + l-load assigned_value%5#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | arrays.2#0 (copy),assigned_value%5#0 + replace2 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | arrays.2#0 + p-store arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | + p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0 | arrays.2#12 + f-store arrays.2#12 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12 | + p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12 | arrays.1#11 + f-store arrays.1#11 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11 | + p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11 | arrays.0#10 + f-store arrays.0#10 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // arc4_types/mutable_params.py:147 + // if reassign: + p-load reassign#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | reassign#0 (copy) + bz mutate_tuple_items_and_reassign_after_if_else@20 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_if_body@13 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | -other_routine_3_for_body@1: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕏) loop_counter%0#0 | - // arc4_types/mutable_params.py:104 - // for array in arrays: - x-load loop_counter%0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | loop_counter%0#0 - switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - b other_routine_3_after_for@5 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | +mutate_tuple_items_and_reassign_if_body@13: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + int 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0%is_original#0 + f-store arrays.0%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + int 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1%is_original#0 + f-store arrays.1%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + int 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2%is_original#0 + f-store arrays.2%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2#12 + f-store arrays.2#12 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1#11 + f-store arrays.1#11 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0#10 + f-store arrays.0#10 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_after_if_else@20 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | -other_routine_3_for_header_1@3: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - int 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | loop_counter%0#0 - x-store loop_counter%0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕏) loop_counter%0#0 | - b other_routine_3_for_body@1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕏) loop_counter%0#0 | +mutate_tuple_items_and_reassign_after_if_else@20: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // arc4_types/mutable_params.py:150 + // arrays[0][1] = UInt8(start + 6) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | start#0 (copy) + int 6 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | start#0 (copy),6 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | to_encode%5#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%6#0 + l-store-copy val_as_bytes%6#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%6#0,val_as_bytes%6#0 + f-store val_as_bytes%6#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%6#0 + l-load val_as_bytes%6#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%6#0 + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | assigned_value%6#0 + f-load arrays.0#10 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | assigned_value%6#0,arrays.0#10 + l-load assigned_value%6#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0#10,assigned_value%6#0 + replace2 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0#10 + f-store arrays.0#10 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0%out#7 + f-store arrays.0%out#7 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + f-load arrays.0%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0%is_original#0 + bz mutate_tuple_items_and_reassign_after_if_else@22 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_if_body@21 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | -other_routine_3_for_header_2@4: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - int 2 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | loop_counter%0#0 - x-store loop_counter%0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕏) loop_counter%0#0 | - b other_routine_3_for_body@1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕏) loop_counter%0#0 | +mutate_tuple_items_and_reassign_if_body@21: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + f-load arrays.0#10 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0%out#7 + f-store arrays.0%out#7 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_after_if_else@22 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | -other_routine_3_after_for@5: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - // arc4_types/mutable_params.py:107 - // arrays[0][0] = UInt8(99) - p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.0#0 (copy) - byte 0x63 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.0#0 (copy),0x63 - replace2 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.0#0 - p-store arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - // arc4_types/mutable_params.py:108 - // arrays[1][0] = UInt8(99) - p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.1#0 (copy) - byte 0x63 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.1#0 (copy),0x63 - replace2 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.1#0 - p-store arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - // arc4_types/mutable_params.py:109 - // arrays[2][0] = UInt8(99) - p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.2#0 (copy) - byte 0x63 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.2#0 (copy),0x63 - replace2 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.2#0 - p-store arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | - p-load arrays.0#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.0#0 (copy) - p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.0#0 (copy),arrays.1#0 (copy) - p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | arrays.0#0 (copy),arrays.1#0 (copy),arrays.2#0 (copy) - retsub arrays.0#0 (copy),arrays.1#0 (copy),arrays.2#0 (copy) +mutate_tuple_items_and_reassign_after_if_else@22: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // arc4_types/mutable_params.py:151 + // arrays[1][1] = UInt8(start + 7) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | start#0 (copy) + int 7 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | start#0 (copy),7 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | to_encode%6#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%7#0 + l-store-copy val_as_bytes%7#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%7#0,val_as_bytes%7#0 + f-store val_as_bytes%7#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%7#0 + l-load val_as_bytes%7#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%7#0 + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | assigned_value%7#0 + f-load arrays.1#11 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | assigned_value%7#0,arrays.1#11 + l-load assigned_value%7#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1#11,assigned_value%7#0 + replace2 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1#11 + f-store arrays.1#11 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + p-load arrays.1#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1%out#6 + f-store arrays.1%out#6 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + f-load arrays.1%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1%is_original#0 + bz mutate_tuple_items_and_reassign_after_if_else@24 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_if_body@23 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + +mutate_tuple_items_and_reassign_if_body@23: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + f-load arrays.1#11 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1%out#6 + f-store arrays.1%out#6 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_after_if_else@24 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + +mutate_tuple_items_and_reassign_after_if_else@24: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // arc4_types/mutable_params.py:152 + // arrays[2][1] = UInt8(start + 8) + p-load start#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | start#0 (copy) + int 8 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | start#0 (copy),8 + + (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | to_encode%7#0 + itob (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%8#0 + l-store-copy val_as_bytes%8#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%8#0,val_as_bytes%8#0 + f-store val_as_bytes%8#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%8#0 + l-load val_as_bytes%8#0 0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | val_as_bytes%8#0 + extract 7 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | assigned_value%8#0 + f-load arrays.2#12 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | assigned_value%8#0,arrays.2#12 + l-load assigned_value%8#0 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2#12,assigned_value%8#0 + replace2 1 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2#12 + f-store arrays.2#12 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + p-load arrays.2#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2%out#5 + f-store arrays.2%out#5 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + f-load arrays.2%is_original#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2%is_original#0 + bz mutate_tuple_items_and_reassign_after_if_else@26 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_if_body@25 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + +mutate_tuple_items_and_reassign_if_body@25: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + f-load arrays.2#12 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2%out#5 + f-store arrays.2%out#5 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // Implicit fall through to mutate_tuple_items_and_reassign_after_if_else@26 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + +mutate_tuple_items_and_reassign_after_if_else@26: (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // arc4_types/mutable_params.py:154 + // assert arrays[0][1] == start + 6 + f-load arrays.0#10 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0#10 + extract 1 1 // on error: Index access is out of bounds (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | reinterpret_biguint%3#0 + f-load val_as_bytes%6#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | reinterpret_biguint%3#0,val_as_bytes%6#0 + b== (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | tmp%10#0 + assert (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // arc4_types/mutable_params.py:155 + // assert arrays[1][1] == start + 7 + f-load arrays.1#11 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.1#11 + extract 1 1 // on error: Index access is out of bounds (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | reinterpret_biguint%4#0 + f-load val_as_bytes%7#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | reinterpret_biguint%4#0,val_as_bytes%7#0 + b== (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | tmp%13#0 + assert (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + // arc4_types/mutable_params.py:156 + // assert arrays[2][1] == start + 8 + f-load arrays.2#12 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.2#12 + extract 1 1 // on error: Index access is out of bounds (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | reinterpret_biguint%5#0 + f-load val_as_bytes%8#0 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | reinterpret_biguint%5#0,val_as_bytes%8#0 + b== (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | tmp%16#0 + assert (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | + f-load arrays.0%out#7 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0%out#7 + f-load arrays.1%out#6 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0%out#7,arrays.1%out#6 + f-load arrays.2%out#5 (𝕡) arrays.0#0,arrays.1#0,arrays.2#0,start#0,reassign#0 | (𝕗) arrays.0%out#7,arrays.1%out#6,arrays.2%out#5,val_as_bytes%6#0,val_as_bytes%7#0,val_as_bytes%8#0,arrays.0%is_original#0,arrays.1%is_original#0,arrays.2%is_original#0,arrays.2#12,arrays.1#11,arrays.0#10 | arrays.0%out#7,arrays.1%out#6,arrays.2%out#5 + retsub arrays.0%out#7,arrays.1%out#6,arrays.2%out#5 diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal index f88998052e..b124712312 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal @@ -1,14 +1,14 @@ #pragma version 10 test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program: - intcblock 1 2 4 0 - bytecblock 0x05 0x01020304 0x63 0x80320006000d00054861707079000444617973 0x000741415252474821 + intcblock 0 1 4 2 + bytecblock 0x01020304 0x05 0x80320006000d00054861707079000444617973 0x000741415252474821 // arc4_types/mutable_params.py:29 // self.mutating_copies() callsub mutating_copies // arc4_types/mutable_params.py:31 // return True - intc_0 // 1 + intc_1 // 1 return @@ -20,16 +20,16 @@ mutating_copies: proto 0 0 // arc4_types/mutable_params.py:35 // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) - bytec_1 // 0x01020304 + bytec_0 // 0x01020304 // arc4_types/mutable_params.py:46 // my_array[2] = UInt8(5) - bytec_0 // 0x05 + bytec_1 // 0x05 replace2 2 // arc4_types/mutable_params.py:49 // assert my_array[2] == UInt8(5), "my_array should be mutated" dup extract 2 1 // on error: Index access is out of bounds - bytec_0 // 0x05 + bytec_1 // 0x05 b== assert // my_array should be mutated // arc4_types/mutable_params.py:36-41 @@ -39,7 +39,7 @@ mutating_copies: // s_val_1=String("Happy"), // s_val_2=String("Days"), // ) - bytec_3 // 0x80320006000d00054861707079000444617973 + bytec_2 // 0x80320006000d00054861707079000444617973 // arc4_types/mutable_params.py:51-52 // # Pass to subroutine without a copy // t, f = self.other_routine(my_array, my_struct) @@ -57,13 +57,13 @@ mutating_copies: // assert my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" dig 1 extract 1 1 // on error: Index access is out of bounds - bytec_0 // 0x05 + bytec_1 // 0x05 b== assert // my_array has been mutated by the subroutine // arc4_types/mutable_params.py:58 // assert my_struct.s_val_1 == String( dup - intc_1 // 2 + intc_3 // 2 extract_uint16 dig 1 intc_2 // 4 @@ -73,12 +73,12 @@ mutating_copies: // assert my_struct.s_val_1 == String( // "AARRGH!" // ), "my_struct has been mutated by the subroutine" - bytec 4 // 0x000741415252474821 + bytec_3 // 0x000741415252474821 == assert // my_struct has been mutated by the subroutine // arc4_types/mutable_params.py:35 // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) - bytec_1 // 0x01020304 + bytec_0 // 0x01020304 // arc4_types/mutable_params.py:36-41 // my_struct = TestStruct( // b_val=Bool(True), @@ -86,7 +86,7 @@ mutating_copies: // s_val_1=String("Happy"), // s_val_2=String("Days"), // ) - bytec_3 // 0x80320006000d00054861707079000444617973 + bytec_2 // 0x80320006000d00054861707079000444617973 // arc4_types/mutable_params.py:62-63 // # Pass to subroutine with copy // self.other_routine(my_array_copy.copy(), my_struct_copy.copy()) @@ -94,7 +94,7 @@ mutating_copies: popn 4 // arc4_types/mutable_params.py:35 // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) - bytec_1 // 0x01020304 + bytec_0 // 0x01020304 // arc4_types/mutable_params.py:75 // my_array_copy_2 = self.other_routine_2(my_array_copy_2) callsub other_routine_2 @@ -117,14 +117,135 @@ mutating_copies: pushbytes 0x0a b== assert // my_array_copy_2 should have mutated value - // arc4_types/mutable_params.py:82-83 - // # tuples of mutable types only work with a .copy() - // self.other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) + // arc4_types/mutable_params.py:85-89 + // self.mutate_tuple_items_and_reassign( + // (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + // start=UInt64(0), + // reassign=True, + // ) dup2 - uncover 2 - callsub other_routine_3 - popn 3 + // arc4_types/mutable_params.py:35 + // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) + bytec_0 // 0x01020304 // arc4_types/mutable_params.py:87 + // start=UInt64(0), + intc_0 // 0 + // arc4_types/mutable_params.py:88 + // reassign=True, + intc_1 // 1 + // arc4_types/mutable_params.py:85-89 + // self.mutate_tuple_items_and_reassign( + // (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + // start=UInt64(0), + // reassign=True, + // ) + callsub mutate_tuple_items_and_reassign + popn 3 + // arc4_types/mutable_params.py:35 + // my_array = StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) + bytec_0 // 0x01020304 + // arc4_types/mutable_params.py:93 + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + pushint 100 // 100 + intc_1 // 1 + // arc4_types/mutable_params.py:92-94 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + // ) + callsub mutate_tuple_items_and_reassign + // arc4_types/mutable_params.py:96 + // assert my_array[0] == 100 + dig 2 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0x64 + b== + assert + // arc4_types/mutable_params.py:97 + // assert my_array_copy_2[0] == 101 + dig 1 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0x65 + b== + assert + // arc4_types/mutable_params.py:98 + // assert my_array_copy_3[0] == 102 + dup + extract 0 1 // on error: Index access is out of bounds + pushbytes 0x66 + b== + assert + // arc4_types/mutable_params.py:99 + // assert my_array[1] == 103 + dig 2 + extract 1 1 // on error: Index access is out of bounds + pushbytes 0x67 + b== + assert + // arc4_types/mutable_params.py:100 + // assert my_array_copy_2[1] == 104 + dig 1 + extract 1 1 // on error: Index access is out of bounds + pushbytes 0x68 + b== + assert + // arc4_types/mutable_params.py:101 + // assert my_array_copy_3[1] == 105 + dup + extract 1 1 // on error: Index access is out of bounds + pushbytes 0x69 + b== + assert + // arc4_types/mutable_params.py:104 + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + pushint 200 // 200 + intc_0 // 0 + // arc4_types/mutable_params.py:103-105 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + // ) + callsub mutate_tuple_items_and_reassign + // arc4_types/mutable_params.py:107 + // assert my_array[0] == 200 + dig 2 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0xc8 + b== + assert + // arc4_types/mutable_params.py:108 + // assert my_array_copy_2[0] == 201 + dig 1 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0xc9 + b== + assert + // arc4_types/mutable_params.py:109 + // assert my_array_copy_3[0] == 202 + dup + extract 0 1 // on error: Index access is out of bounds + pushbytes 0xca + b== + assert + // arc4_types/mutable_params.py:110 + // assert my_array[1] == 206 + dig 2 + extract 1 1 // on error: Index access is out of bounds + pushbytes 0xce + b== + assert + // arc4_types/mutable_params.py:111 + // assert my_array_copy_2[1] == 207 + swap + extract 1 1 // on error: Index access is out of bounds + pushbytes 0xcf + b== + assert + // arc4_types/mutable_params.py:112 + // assert my_array_copy_3[1] == 208 + extract 1 1 // on error: Index access is out of bounds + pushbytes 0xd0 + b== + assert + // arc4_types/mutable_params.py:116 // self.other_routine_2(nested.test_array.copy()) extract 0 4 // on error: Index access is out of bounds callsub other_routine_2 @@ -134,23 +255,23 @@ mutating_copies: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> uint64, uint64, bytes, bytes: other_routine: - // arc4_types/mutable_params.py:89-90 + // arc4_types/mutable_params.py:118-119 // @subroutine // def other_routine(self, array: TestArray, struct: TestStruct) -> tuple[bool, bool]: proto 2 4 - // arc4_types/mutable_params.py:91 + // arc4_types/mutable_params.py:120 // array[1] = UInt8(5) frame_dig -2 - bytec_0 // 0x05 + bytec_1 // 0x05 replace2 1 frame_bury -2 - // arc4_types/mutable_params.py:92 + // arc4_types/mutable_params.py:121 // struct.s_val_1 = String("AARRGH!") frame_dig -1 - intc_1 // 2 + intc_3 // 2 extract_uint16 frame_dig -1 - intc_3 // 0 + intc_0 // 0 dig 2 extract3 frame_dig -1 @@ -163,7 +284,7 @@ other_routine: uncover 2 substring3 uncover 2 - bytec 4 // 0x000741415252474821 + bytec_3 // 0x000741415252474821 concat swap concat @@ -181,10 +302,10 @@ other_routine: extract 6 2 replace2 4 frame_bury -1 - // arc4_types/mutable_params.py:93 + // arc4_types/mutable_params.py:122 // return True, False - intc_0 // 1 - intc_3 // 0 + intc_1 // 1 + intc_0 // 0 frame_dig -2 frame_dig -1 retsub @@ -192,65 +313,225 @@ other_routine: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> bytes, bytes: other_routine_2: - // arc4_types/mutable_params.py:95-96 + // arc4_types/mutable_params.py:124-125 // @subroutine // def other_routine_2(self, array: TestArray) -> TestArray: proto 1 2 - // arc4_types/mutable_params.py:98 + // arc4_types/mutable_params.py:127 // array[0] = UInt8(10) frame_dig -1 pushbytes 0x0a replace2 0 - // arc4_types/mutable_params.py:99 + // arc4_types/mutable_params.py:128 // return copy frame_dig -1 swap retsub -// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: -other_routine_3: - // arc4_types/mutable_params.py:101-102 +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: uint64) -> bytes, bytes, bytes: +mutate_tuple_items_and_reassign: + // arc4_types/mutable_params.py:130-133 // @subroutine - // def other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: - proto 3 3 - intc_3 // 0 - -other_routine_3_for_body@1: - // arc4_types/mutable_params.py:103-104 - // # this modifies the local copy - // for array in arrays: - switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 - b other_routine_3_after_for@5 - -other_routine_3_for_header_1@3: - intc_0 // 1 - b other_routine_3_for_body@1 - -other_routine_3_for_header_2@4: - intc_1 // 2 - b other_routine_3_for_body@1 - -other_routine_3_after_for@5: - // arc4_types/mutable_params.py:107 - // arrays[0][0] = UInt8(99) - frame_dig -3 - bytec_2 // 0x63 + // def mutate_tuple_items_and_reassign( + // self, arrays: tuple[TestArray, TestArray, TestArray], *, start: UInt64, reassign: bool + // ) -> None: + proto 5 3 + intc_0 // 0 + dupn 5 + intc_1 // 1 + dupn 2 + // arc4_types/mutable_params.py:134 + // arrays[0][0] = UInt8(start) + frame_dig -2 + itob + dup + extract 7 1 + frame_dig -5 + swap replace2 0 - frame_bury -3 - // arc4_types/mutable_params.py:108 - // arrays[1][0] = UInt8(99) + frame_bury -5 + // arc4_types/mutable_params.py:135 + // arrays[1][0] = UInt8(start + 1) frame_dig -2 - bytec_2 // 0x63 + intc_1 // 1 + + + itob + dup + extract 7 1 + frame_dig -4 + swap replace2 0 - frame_bury -2 - // arc4_types/mutable_params.py:109 - // arrays[2][0] = UInt8(99) - frame_dig -1 - bytec_2 // 0x63 + frame_bury -4 + // arc4_types/mutable_params.py:136 + // arrays[2][0] = UInt8(start + 2) + frame_dig -2 + intc_3 // 2 + + + itob + dup + extract 7 1 + frame_dig -3 + swap replace2 0 - frame_bury -1 + frame_bury -3 + // arc4_types/mutable_params.py:138 + // assert arrays[0][0] == start + frame_dig -5 + extract 0 1 // on error: Index access is out of bounds + uncover 3 + b== + assert + // arc4_types/mutable_params.py:139 + // assert arrays[1][0] == start + 1 + frame_dig -4 + extract 0 1 // on error: Index access is out of bounds + uncover 2 + b== + assert + // arc4_types/mutable_params.py:140 + // assert arrays[2][0] == start + 2 frame_dig -3 + extract 0 1 // on error: Index access is out of bounds + b== + assert + // arc4_types/mutable_params.py:142 + // arrays[0][1] = UInt8(start + 3) frame_dig -2 + pushint 3 // 3 + + + itob + extract 7 1 + frame_dig -5 + swap + replace2 1 + frame_bury -5 + // arc4_types/mutable_params.py:143 + // arrays[1][1] = UInt8(start + 4) + frame_dig -2 + intc_2 // 4 + + + itob + extract 7 1 + frame_dig -4 + swap + replace2 1 + frame_bury -4 + // arc4_types/mutable_params.py:144 + // arrays[2][1] = UInt8(start + 5) + frame_dig -2 + pushint 5 // 5 + + + itob + extract 7 1 + frame_dig -3 + swap + replace2 1 + dup + frame_bury -3 + frame_dig -4 + frame_dig -5 + // arc4_types/mutable_params.py:146-147 + // # overwrite params + // if reassign: frame_dig -1 + bz mutate_tuple_items_and_reassign_after_if_else@20 + intc_0 // 0 + frame_bury 6 + intc_0 // 0 + frame_bury 7 + intc_0 // 0 + frame_bury 8 + frame_dig -3 + frame_bury 9 + frame_dig -4 + frame_bury 10 + frame_dig -5 + frame_bury 11 + +mutate_tuple_items_and_reassign_after_if_else@20: + // arc4_types/mutable_params.py:150 + // arrays[0][1] = UInt8(start + 6) + frame_dig -2 + pushint 6 // 6 + + + itob + dup + frame_bury 3 + extract 7 1 + frame_dig 11 + swap + replace2 1 + frame_bury 11 + frame_dig -5 + frame_bury 0 + frame_dig 6 + bz mutate_tuple_items_and_reassign_after_if_else@22 + frame_dig 11 + frame_bury 0 + +mutate_tuple_items_and_reassign_after_if_else@22: + // arc4_types/mutable_params.py:151 + // arrays[1][1] = UInt8(start + 7) + frame_dig -2 + pushint 7 // 7 + + + itob + dup + frame_bury 4 + extract 7 1 + frame_dig 10 + swap + replace2 1 + frame_bury 10 + frame_dig -4 + frame_bury 1 + frame_dig 7 + bz mutate_tuple_items_and_reassign_after_if_else@24 + frame_dig 10 + frame_bury 1 + +mutate_tuple_items_and_reassign_after_if_else@24: + // arc4_types/mutable_params.py:152 + // arrays[2][1] = UInt8(start + 8) + frame_dig -2 + pushint 8 // 8 + + + itob + dup + frame_bury 5 + extract 7 1 + frame_dig 9 + swap + replace2 1 + frame_bury 9 + frame_dig -3 + frame_bury 2 + frame_dig 8 + bz mutate_tuple_items_and_reassign_after_if_else@26 + frame_dig 9 + frame_bury 2 + +mutate_tuple_items_and_reassign_after_if_else@26: + // arc4_types/mutable_params.py:154 + // assert arrays[0][1] == start + 6 + frame_dig 11 + extract 1 1 // on error: Index access is out of bounds + frame_dig 3 + b== + assert + // arc4_types/mutable_params.py:155 + // assert arrays[1][1] == start + 7 + frame_dig 10 + extract 1 1 // on error: Index access is out of bounds + frame_dig 4 + b== + assert + // arc4_types/mutable_params.py:156 + // assert arrays[2][1] == start + 8 + frame_dig 9 + extract 1 1 // on error: Index access is out of bounds + frame_dig 5 + b== + assert retsub diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir index a8326530f6..23eb0a2edd 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir @@ -1,7 +1,7 @@ // Op Stack (out) // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> uint64: main_block@0: - // arc4_types/mutable_params.py:112 + // arc4_types/mutable_params.py:159 // return True int 1 1 return diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal index 533fc84667..825e67715f 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program: - // arc4_types/mutable_params.py:112 + // arc4_types/mutable_params.py:159 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir index b5846911c8..4e6b90e337 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir @@ -32,13 +32,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#1, my_array_copy_2#2, my_array_copy_2#2) - let tmp%11#0: bytes = ((extract 0 4) my_array#1) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#1, my_array_copy_2#2, 0x01020304, 0u, 1u) + let (my_array#1: bytes, my_array_copy_2#2: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#1, my_array_copy_2#2, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#1) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#1) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#1: bytes, my_array_copy_2#2: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#1, my_array_copy_2#2, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#1) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#1) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#1) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#0: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -57,29 +95,102 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#0 struct#0 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - goto_nth [block@3, block@4][loop_counter%0#0] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#0: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#0: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#0: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#0: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#0: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#0 arrays.1#0 arrays.2#0 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#0: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#0: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#0: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#0) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#0) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#0: bytes = ((replace2 1) arrays.0#0 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#0: bytes = ((replace2 1) arrays.1#0 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#0: bytes = ((replace2 1) arrays.2#0 assigned_value%5#0) + let arrays.2#12: bytes = arrays.2#0 + let arrays.1#11: bytes = arrays.1#0 + let arrays.0#10: bytes = arrays.0#0 + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#0: bool = 0u + let arrays.1%is_original#0: bool = 0u + let arrays.2%is_original#0: bool = 0u + let arrays.2#12: bytes = arrays.2#0 + let arrays.1#11: bytes = arrays.1#0 + let arrays.0#10: bytes = arrays.0#0 + goto block@20 + block@20: // after_if_else_L147 + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#10: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + let arrays.0%out#7: bytes = arrays.0#0 + goto arrays.0%is_original#0 ? block@21 : block@22 + block@21: // if_body_L1 + let arrays.0%out#7: bytes = arrays.0#10 + goto block@22 + block@22: // after_if_else_L1 + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#11: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + let arrays.1%out#6: bytes = arrays.1#0 + goto arrays.1%is_original#0 ? block@23 : block@24 + block@23: // if_body_L1 + let arrays.1%out#6: bytes = arrays.1#11 + goto block@24 + block@24: // after_if_else_L1 + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#12: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + let arrays.2%out#5: bytes = arrays.2#0 + goto arrays.2%is_original#0 ? block@25 : block@26 + block@25: // if_body_L1 + let arrays.2%out#5: bytes = arrays.2#12 + goto block@26 + block@26: // after_if_else_L1 + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#10) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#11) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#12) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir index 1ca762d43c..6ac750409b 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir @@ -120,29 +120,130 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%11#0: biguint = 0x0a let tmp%10#0: bool = (b== reinterpret_biguint%10#0 reinterpret_biguint%11#0) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let copy%5#0: bytes = my_array#2 - let copy%6#0: bytes = my_array_copy_2#3 + let copy%5#0: bytes = my_array_copy#0 + let my_array_copy_3#0: bytes = copy%5#0 + let copy%6#0: bytes = my_array#2 let copy%7#0: bytes = my_array_copy_2#3 - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(copy%5#0, copy%6#0, copy%7#0) - let copy%7#1: bytes = other_routine_3%2#0 - let copy%6#1: bytes = other_routine_3%1#0 - let copy%5#1: bytes = other_routine_3%0#0 - let copy%8#0: bytes = my_array#2 + let copy%8#0: bytes = my_array_copy_3#0 + let (originals.0#0: bytes, originals.1#0: bytes, originals.2#0: bytes) = (copy%6#0, copy%7#0, copy%8#0) + let copy%9#0: bytes = my_array#2 + let copy%10#0: bytes = my_array_copy_2#3 + let copy%11#0: bytes = my_array_copy_3#0 + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(copy%9#0, copy%10#0, copy%11#0, 0u, 1u) + let copy%11#1: bytes = mutate_tuple_items_and_reassign%2#0 + let copy%10#1: bytes = mutate_tuple_items_and_reassign%1#0 + let copy%9#1: bytes = mutate_tuple_items_and_reassign%0#0 + let tmp%11#0: bool = (== originals.0#0 my_array#2) + let tmp%12#0: bool = (== originals.1#0 my_array_copy_2#3) + let tmp%13#0: bool = (&& tmp%11#0 tmp%12#0) + let tmp%14#0: bool = (== originals.2#0 my_array_copy_3#0) + let tmp%15#0: bool = (&& tmp%13#0 tmp%14#0) + (assert tmp%15#0) + let (mutate_tuple_items_and_reassign%3#0: bytes, mutate_tuple_items_and_reassign%4#0: bytes, mutate_tuple_items_and_reassign%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array_copy_3#0, 100u, 1u) + let my_array_copy_3#1: bytes = mutate_tuple_items_and_reassign%5#0 + let my_array_copy_2#4: bytes = mutate_tuple_items_and_reassign%4#0 + let my_array#3: bytes = mutate_tuple_items_and_reassign%3#0 + let array_head_and_tail%6#0: bytes = my_array#3 + let item_offset%6#0: uint64 = (* 0u 1u) + let reinterpret_biguint%12#0: biguint = (extract3 array_head_and_tail%6#0 item_offset%6#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%13#0: biguint = 0x64 + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 reinterpret_biguint%13#0) + (assert tmp%16#0) + let array_head_and_tail%7#0: bytes = my_array_copy_2#4 + let item_offset%7#0: uint64 = (* 0u 1u) + let reinterpret_biguint%14#0: biguint = (extract3 array_head_and_tail%7#0 item_offset%7#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%15#0: biguint = 0x65 + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 reinterpret_biguint%15#0) + (assert tmp%17#0) + let array_head_and_tail%8#0: bytes = my_array_copy_3#1 + let item_offset%8#0: uint64 = (* 0u 1u) + let reinterpret_biguint%16#0: biguint = (extract3 array_head_and_tail%8#0 item_offset%8#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%17#0: biguint = 0x66 + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 reinterpret_biguint%17#0) + (assert tmp%18#0) + let array_head_and_tail%9#0: bytes = my_array#3 + let item_offset%9#0: uint64 = (* 1u 1u) + let reinterpret_biguint%18#0: biguint = (extract3 array_head_and_tail%9#0 item_offset%9#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%19#0: biguint = 0x67 + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 reinterpret_biguint%19#0) + (assert tmp%19#0) + let array_head_and_tail%10#0: bytes = my_array_copy_2#4 + let item_offset%10#0: uint64 = (* 1u 1u) + let reinterpret_biguint%20#0: biguint = (extract3 array_head_and_tail%10#0 item_offset%10#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%21#0: biguint = 0x68 + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 reinterpret_biguint%21#0) + (assert tmp%20#0) + let array_head_and_tail%11#0: bytes = my_array_copy_3#1 + let item_offset%11#0: uint64 = (* 1u 1u) + let reinterpret_biguint%22#0: biguint = (extract3 array_head_and_tail%11#0 item_offset%11#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%23#0: biguint = 0x69 + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 reinterpret_biguint%23#0) + (assert tmp%21#0) + let (mutate_tuple_items_and_reassign%6#0: bytes, mutate_tuple_items_and_reassign%7#0: bytes, mutate_tuple_items_and_reassign%8#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let my_array_copy_3#2: bytes = mutate_tuple_items_and_reassign%8#0 + let my_array_copy_2#5: bytes = mutate_tuple_items_and_reassign%7#0 + let my_array#4: bytes = mutate_tuple_items_and_reassign%6#0 + let array_head_and_tail%12#0: bytes = my_array#4 + let item_offset%12#0: uint64 = (* 0u 1u) + let reinterpret_biguint%24#0: biguint = (extract3 array_head_and_tail%12#0 item_offset%12#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%25#0: biguint = 0xc8 + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 reinterpret_biguint%25#0) + (assert tmp%22#0) + let array_head_and_tail%13#0: bytes = my_array_copy_2#5 + let item_offset%13#0: uint64 = (* 0u 1u) + let reinterpret_biguint%26#0: biguint = (extract3 array_head_and_tail%13#0 item_offset%13#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%27#0: biguint = 0xc9 + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 reinterpret_biguint%27#0) + (assert tmp%23#0) + let array_head_and_tail%14#0: bytes = my_array_copy_3#2 + let item_offset%14#0: uint64 = (* 0u 1u) + let reinterpret_biguint%28#0: biguint = (extract3 array_head_and_tail%14#0 item_offset%14#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%29#0: biguint = 0xca + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 reinterpret_biguint%29#0) + (assert tmp%24#0) + let array_head_and_tail%15#0: bytes = my_array#4 + let item_offset%15#0: uint64 = (* 1u 1u) + let reinterpret_biguint%30#0: biguint = (extract3 array_head_and_tail%15#0 item_offset%15#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%31#0: biguint = 0xce + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 reinterpret_biguint%31#0) + (assert tmp%25#0) + let array_head_and_tail%16#0: bytes = my_array_copy_2#5 + let item_offset%16#0: uint64 = (* 1u 1u) + let reinterpret_biguint%32#0: biguint = (extract3 array_head_and_tail%16#0 item_offset%16#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%33#0: biguint = 0xcf + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 reinterpret_biguint%33#0) + (assert tmp%26#0) + let array_head_and_tail%17#0: bytes = my_array_copy_3#2 + let item_offset%17#0: uint64 = (* 1u 1u) + let reinterpret_biguint%34#0: biguint = (extract3 array_head_and_tail%17#0 item_offset%17#0 1u) // on error: Index access is out of bounds + let reinterpret_biguint%35#0: biguint = 0xd0 + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 reinterpret_biguint%35#0) + (assert tmp%27#0) + let copy%12#0: bytes = my_array#4 let current_tail_offset%3#0: uint64 = 4u let encoded_tuple_buffer%7#0: bytes = 0x - let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 copy%8#0) + let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 copy%12#0) let nested#0: bytes = encoded_tuple_buffer%8#0 - let tmp%11#0: bytes = (extract3 nested#0 0u 4u) // on error: Index access is out of bounds - let copy%9#0: bytes = tmp%11#0 - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%9#0) - let copy%9#1: bytes = other_routine_2%5#0 + let tmp%28#0: bytes = (extract3 nested#0 0u 4u) // on error: Index access is out of bounds + let copy%13#0: bytes = tmp%28#0 + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%13#0) + let copy%13#1: bytes = other_routine_2%5#0 return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 + let array%is_original#0: bool = 1u + let array%out#0: bytes = array#0 + let struct%is_original#0: bool = 1u + let struct%out#0: bytes = struct#0 let assigned_value%0#0: bytes = 0x05 let updated_target%0#0: bytes = (replace3 array#0 1u assigned_value%0#0) let array#1: bytes = updated_target%0#0 + goto array%is_original#0 ? block@1 : block@2 + block@1: // if_body_L1 + let array%out#1: bytes = array#1 + goto block@2 + block@2: // after_if_else_L1 let length%0#0: uint64 = (len "AARRGH!") let as_bytes%0#0: bytes = (itob length%0#0) let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) @@ -163,53 +264,218 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) let updated_data%2#0: bytes = (replace3 updated_data%1#0 4u tail_offset_bytes%0#0) - let struct#1: bytes = updated_data%2#0 - return 1u 0u array#1 struct#1 + let struct#2: bytes = updated_data%2#0 + goto struct%is_original#0 ? block@3 : block@4 + block@3: // if_body_L1 + let struct%out#1: bytes = struct#2 + goto block@4 + block@4: // after_if_else_L1 + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 + let array%is_original#0: bool = 1u + let array%out#0: bytes = array#0 let copy%0#0: bytes = array#0 let copy#0: bytes = copy%0#0 let assigned_value%0#0: bytes = 0x0a let updated_target%0#0: bytes = (replace3 array#0 0u assigned_value%0#0) let array#1: bytes = updated_target%0#0 + goto array%is_original#0 ? block@1 : block@2 + block@1: // if_body_L1 + let array%out#1: bytes = array#1 + goto block@2 + block@2: // after_if_else_L1 return copy#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - let array#0: bytes = arrays.0#0 - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - let array#1: bytes = φ(array#0 <- block@0, array#3 <- block@3, array#4 <- block@4) - let assigned_value%0#0: bytes = 0x63 - let updated_target%0#0: bytes = (replace3 array#1 0u assigned_value%0#0) - let array#2: bytes = updated_target%0#0 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.0%out#0: bytes = arrays.0#0 + let arrays.1%is_original#0: bool = 1u + let arrays.1%out#0: bytes = arrays.1#0 + let arrays.2%is_original#0: bool = 1u + let arrays.2%out#0: bytes = arrays.2#0 + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let updated_target%0#0: bytes = (replace3 arrays.0#0 0u assigned_value%0#0) + let arrays.0#1: bytes = updated_target%0#0 + goto arrays.0%is_original#0 ? block@1 : block@2 + block@1: // if_body_L1 + let arrays.0%out#1: bytes = arrays.0#1 goto block@2 - block@2: // for_footer_L104 - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - let array#3: bytes = arrays.1#0 - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - let array#4: bytes = arrays.2#0 - goto block@1 - block@5: // after_for_L104 - let assigned_value%1#0: bytes = 0x63 - let updated_target%1#0: bytes = (replace3 arrays.0#0 0u assigned_value%1#0) - let arrays.0#2: bytes = updated_target%1#0 - let assigned_value%2#0: bytes = 0x63 - let updated_target%2#0: bytes = (replace3 arrays.1#0 0u assigned_value%2#0) - let arrays.1#2: bytes = updated_target%2#0 - let assigned_value%3#0: bytes = 0x63 - let updated_target%3#0: bytes = (replace3 arrays.2#0 0u assigned_value%3#0) - let arrays.2#2: bytes = updated_target%3#0 - return arrays.0#2 arrays.1#2 arrays.2#2 + block@2: // after_if_else_L1 + let arrays.0%out#14: bytes = φ(arrays.0%out#0 <- block@0, arrays.0%out#1 <- block@1) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let updated_target%1#0: bytes = (replace3 arrays.1#0 0u assigned_value%1#0) + let arrays.1#2: bytes = updated_target%1#0 + goto arrays.1%is_original#0 ? block@3 : block@4 + block@3: // if_body_L1 + let arrays.1%out#1: bytes = arrays.1#2 + goto block@4 + block@4: // after_if_else_L1 + let arrays.1%out#13: bytes = φ(arrays.1%out#0 <- block@2, arrays.1%out#1 <- block@3) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let updated_target%2#0: bytes = (replace3 arrays.2#0 0u assigned_value%2#0) + let arrays.2#3: bytes = updated_target%2#0 + goto arrays.2%is_original#0 ? block@5 : block@6 + block@5: // if_body_L1 + let arrays.2%out#1: bytes = arrays.2#3 + goto block@6 + block@6: // after_if_else_L1 + let arrays.2%out#12: bytes = φ(arrays.2%out#0 <- block@4, arrays.2%out#1 <- block@5) + let array_head_and_tail%0#0: bytes = arrays.0#1 + let item_offset%0#0: uint64 = (* 0u 1u) + let reinterpret_biguint%0#0: biguint = (extract3 array_head_and_tail%0#0 item_offset%0#0 1u) // on error: Index access is out of bounds + let tmp%0#0: biguint = (itob start#0) + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 tmp%0#0) + (assert tmp%1#0) + let array_head_and_tail%1#0: bytes = arrays.1#2 + let item_offset%1#0: uint64 = (* 0u 1u) + let reinterpret_biguint%1#0: biguint = (extract3 array_head_and_tail%1#0 item_offset%1#0 1u) // on error: Index access is out of bounds + let tmp%2#0: uint64 = (+ start#0 1u) + let tmp%3#0: biguint = (itob tmp%2#0) + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 tmp%3#0) + (assert tmp%4#0) + let array_head_and_tail%2#0: bytes = arrays.2#3 + let item_offset%2#0: uint64 = (* 0u 1u) + let reinterpret_biguint%2#0: biguint = (extract3 array_head_and_tail%2#0 item_offset%2#0 1u) // on error: Index access is out of bounds + let tmp%5#0: uint64 = (+ start#0 2u) + let tmp%6#0: biguint = (itob tmp%5#0) + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 tmp%6#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let updated_target%3#0: bytes = (replace3 arrays.0#1 1u assigned_value%3#0) + let arrays.0#5: bytes = updated_target%3#0 + goto arrays.0%is_original#0 ? block@7 : block@8 + block@7: // if_body_L1 + let arrays.0%out#2: bytes = arrays.0#5 + goto block@8 + block@8: // after_if_else_L1 + let arrays.0%out#11: bytes = φ(arrays.0%out#14 <- block@6, arrays.0%out#2 <- block@7) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let updated_target%4#0: bytes = (replace3 arrays.1#2 1u assigned_value%4#0) + let arrays.1#6: bytes = updated_target%4#0 + goto arrays.1%is_original#0 ? block@9 : block@10 + block@9: // if_body_L1 + let arrays.1%out#2: bytes = arrays.1#6 + goto block@10 + block@10: // after_if_else_L1 + let arrays.1%out#10: bytes = φ(arrays.1%out#13 <- block@8, arrays.1%out#2 <- block@9) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let updated_target%5#0: bytes = (replace3 arrays.2#3 1u assigned_value%5#0) + let arrays.2#7: bytes = updated_target%5#0 + goto arrays.2%is_original#0 ? block@11 : block@12 + block@11: // if_body_L1 + let arrays.2%out#2: bytes = arrays.2#7 + goto block@12 + block@12: // after_if_else_L1 + let arrays.2%out#9: bytes = φ(arrays.2%out#12 <- block@10, arrays.2%out#2 <- block@11) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let copy%0#0: bytes = arrays.0#5 + let copy%1#0: bytes = arrays.1#6 + let copy%2#0: bytes = arrays.2#7 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + let (arrays.0#9: bytes, arrays.1#9: bytes, arrays.2#9: bytes) = (copy%0#0, copy%1#0, copy%2#0) + goto arrays.0%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + let arrays.0%out#3: bytes = arrays.0#9 + goto block@15 + block@15: // after_if_else_L1 + let arrays.0%out#17: bytes = φ(arrays.0%out#11 <- block@13, arrays.0%out#3 <- block@14) + goto arrays.1%is_original#5 ? block@16 : block@17 + block@16: // if_body_L1 + let arrays.1%out#3: bytes = arrays.1#9 + goto block@17 + block@17: // after_if_else_L1 + let arrays.1%out#16: bytes = φ(arrays.1%out#10 <- block@15, arrays.1%out#3 <- block@16) + goto arrays.2%is_original#6 ? block@18 : block@19 + block@18: // if_body_L1 + let arrays.2%out#3: bytes = arrays.2#9 + goto block@19 + block@19: // after_if_else_L1 + let arrays.2%out#15: bytes = φ(arrays.2%out#9 <- block@17, arrays.2%out#3 <- block@18) + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@12, arrays.0#9 <- block@19) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@12, arrays.1#9 <- block@19) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@12, arrays.2#9 <- block@19) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@12, arrays.0%is_original#4 <- block@19) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@12, arrays.1%is_original#5 <- block@19) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@12, arrays.2%is_original#6 <- block@19) + let arrays.0%out#8: bytes = φ(arrays.0%out#11 <- block@12, arrays.0%out#17 <- block@19) + let arrays.1%out#8: bytes = φ(arrays.1%out#10 <- block@12, arrays.1%out#16 <- block@19) + let arrays.2%out#8: bytes = φ(arrays.2%out#9 <- block@12, arrays.2%out#15 <- block@19) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let updated_target%6#0: bytes = (replace3 arrays.0#10 1u assigned_value%6#0) + let arrays.0#14: bytes = updated_target%6#0 + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + let arrays.0%out#4: bytes = arrays.0#14 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0%out#8 <- block@20, arrays.0%out#4 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let updated_target%7#0: bytes = (replace3 arrays.1#11 1u assigned_value%7#0) + let arrays.1#15: bytes = updated_target%7#0 + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + let arrays.1%out#4: bytes = arrays.1#15 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1%out#8 <- block@22, arrays.1%out#4 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let updated_target%8#0: bytes = (replace3 arrays.2#12 1u assigned_value%8#0) + let arrays.2#16: bytes = updated_target%8#0 + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + let arrays.2%out#4: bytes = arrays.2#16 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2%out#8 <- block@24, arrays.2%out#4 <- block@25) + let array_head_and_tail%3#0: bytes = arrays.0#14 + let item_offset%3#0: uint64 = (* 1u 1u) + let reinterpret_biguint%3#0: biguint = (extract3 array_head_and_tail%3#0 item_offset%3#0 1u) // on error: Index access is out of bounds + let tmp%8#0: uint64 = (+ start#0 6u) + let tmp%9#0: biguint = (itob tmp%8#0) + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 tmp%9#0) + (assert tmp%10#0) + let array_head_and_tail%4#0: bytes = arrays.1#15 + let item_offset%4#0: uint64 = (* 1u 1u) + let reinterpret_biguint%4#0: biguint = (extract3 array_head_and_tail%4#0 item_offset%4#0 1u) // on error: Index access is out of bounds + let tmp%11#0: uint64 = (+ start#0 7u) + let tmp%12#0: biguint = (itob tmp%11#0) + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 tmp%12#0) + (assert tmp%13#0) + let array_head_and_tail%5#0: bytes = arrays.2#16 + let item_offset%5#0: uint64 = (* 1u 1u) + let reinterpret_biguint%5#0: biguint = (extract3 array_head_and_tail%5#0 item_offset%5#0 1u) // on error: Index access is out of bounds + let tmp%14#0: uint64 = (+ start#0 8u) + let tmp%15#0: biguint = (itob tmp%14#0) + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 tmp%15#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir index 143052bb94..ae61f2251b 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir @@ -83,14 +83,70 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = (extract3 my_array_copy_2#3 item_offset%5#0 1u) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let nested#0: bytes = my_array#2 - let tmp%11#0: bytes = ((extract 0 4) nested#0) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) + let tmp%11#0: bool = 1u + let tmp%12#0: bool = 1u + let tmp%13#0: bool = (&& tmp%11#0 tmp%12#0) + let tmp%14#0: bool = 1u + let tmp%15#0: bool = (&& tmp%13#0 tmp%14#0) + (assert tmp%15#0) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 100u, 1u) + let item_offset%6#0: uint64 = 0u + let reinterpret_biguint%12#0: biguint = (extract3 my_array#3 item_offset%6#0 1u) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let item_offset%7#0: uint64 = 0u + let reinterpret_biguint%14#0: biguint = (extract3 my_array_copy_2#4 item_offset%7#0 1u) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let item_offset%8#0: uint64 = 0u + let reinterpret_biguint%16#0: biguint = (extract3 my_array_copy_3#1 item_offset%8#0 1u) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let item_offset%9#0: uint64 = 1u + let reinterpret_biguint%18#0: biguint = (extract3 my_array#3 item_offset%9#0 1u) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let item_offset%10#0: uint64 = 1u + let reinterpret_biguint%20#0: biguint = (extract3 my_array_copy_2#4 item_offset%10#0 1u) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let item_offset%11#0: uint64 = 1u + let reinterpret_biguint%22#0: biguint = (extract3 my_array_copy_3#1 item_offset%11#0 1u) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let item_offset%12#0: uint64 = 0u + let reinterpret_biguint%24#0: biguint = (extract3 my_array#4 item_offset%12#0 1u) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let item_offset%13#0: uint64 = 0u + let reinterpret_biguint%26#0: biguint = (extract3 my_array_copy_2#5 item_offset%13#0 1u) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let item_offset%14#0: uint64 = 0u + let reinterpret_biguint%28#0: biguint = (extract3 my_array_copy_3#2 item_offset%14#0 1u) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let item_offset%15#0: uint64 = 1u + let reinterpret_biguint%30#0: biguint = (extract3 my_array#4 item_offset%15#0 1u) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let item_offset%16#0: uint64 = 1u + let reinterpret_biguint%32#0: biguint = (extract3 my_array_copy_2#5 item_offset%16#0 1u) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let item_offset%17#0: uint64 = 1u + let reinterpret_biguint%34#0: biguint = (extract3 my_array_copy_3#2 item_offset%17#0 1u) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let nested#0: bytes = my_array#4 + let tmp%28#0: bytes = ((extract 0 4) nested#0) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let length%0#0: uint64 = 7u let as_bytes%0#0: bytes = (itob length%0#0) @@ -110,35 +166,111 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - let array#1: bytes = φ(arrays.0#0 <- block@0, arrays.1#0 <- block@3, arrays.2#0 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let item_offset%0#0: uint64 = 0u + let reinterpret_biguint%0#0: biguint = (extract3 arrays.0#1 item_offset%0#0 1u) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let item_offset%1#0: uint64 = 0u + let reinterpret_biguint%1#0: biguint = (extract3 arrays.1#2 item_offset%1#0 1u) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let item_offset%2#0: uint64 = 0u + let reinterpret_biguint%2#0: biguint = (extract3 arrays.2#3 item_offset%2#0 1u) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@19 + block@19: // after_if_else_L1 + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@19) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@19) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@19) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@19) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@19) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@19) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let item_offset%3#0: uint64 = 1u + let reinterpret_biguint%3#0: biguint = (extract3 arrays.0#14 item_offset%3#0 1u) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let item_offset%4#0: uint64 = 1u + let reinterpret_biguint%4#0: biguint = (extract3 arrays.1#15 item_offset%4#0 1u) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let item_offset%5#0: uint64 = 1u + let reinterpret_biguint%5#0: biguint = (extract3 arrays.2#16 item_offset%5#0 1u) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir index 4625bf244c..dc07dd1dab 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir @@ -37,13 +37,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -58,34 +96,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir index 3aa2148f64..ac8233aa77 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir @@ -35,13 +35,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -56,34 +94,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir index bf47b04131..50d3adc132 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir @@ -34,13 +34,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -55,34 +93,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir index 5995dbdaef..38c348aba1 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir @@ -32,13 +32,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -53,34 +91,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir index 0ba003d144..44807d49ee 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir @@ -63,13 +63,54 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) + let tmp%13#0: bool = 1u + let tmp%15#0: bool = (&& tmp%13#0 1u) + (assert tmp%15#0) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let length_uint16%0#0: bytes = 0x0007 let encoded_value%0#0: bytes = (concat length_uint16%0#0 "AARRGH!") @@ -87,34 +128,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir index 7d5fae38fa..043ea26b94 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir @@ -57,13 +57,53 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) + let tmp%15#0: bool = 1u + (assert tmp%15#0) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let encoded_value%0#0: bytes = 0x000741415252474821 let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) @@ -80,34 +120,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir index ede6c017a9..105d5079c6 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir @@ -51,13 +51,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -73,34 +111,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir index 30ac0217f5..479e0e46d8 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir @@ -49,13 +49,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -70,34 +108,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir index 8ed8f1e900..bc09ee27db 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir @@ -45,13 +45,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -66,34 +104,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir index 17b67eede1..dbb69c392b 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir @@ -40,13 +40,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -61,34 +99,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir index 2b574bf998..604d94c79f 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir @@ -39,13 +39,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -60,34 +98,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir index f7cc580693..35c944e865 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir @@ -38,13 +38,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) - let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) + let (my_array#3: bytes, my_array_copy_2#4: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#3) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#3) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#4: bytes, my_array_copy_2#5: bytes, my_array_copy_3#2: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#3, my_array_copy_2#4, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#4) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#4) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#4) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -59,34 +97,103 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset%2#0: uint64 = (- tail_offset%1#0 item_length%0#0) let as_bytes%1#0: bytes = (itob tail_offset%2#0) let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) - let struct#1: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) - return 1u 0u array#1 struct#1 + let struct#2: bytes = ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) + return 1u 0u array#1 struct#2 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) - goto_nth [block@3, block@4][loop_counter%0#1] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#2: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#3: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#2 arrays.1#2 arrays.2#2 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#1: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#3: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#5: bytes = ((replace2 1) arrays.0#1 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#6: bytes = ((replace2 1) arrays.1#2 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#7: bytes = ((replace2 1) arrays.2#3 assigned_value%5#0) + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#4: bool = 0u + let arrays.1%is_original#5: bool = 0u + let arrays.2%is_original#6: bool = 0u + goto block@20 + block@20: // after_if_else_L147 + let arrays.0#10: bytes = φ(arrays.0#5 <- block@0, arrays.0#5 <- block@13) + let arrays.1#11: bytes = φ(arrays.1#6 <- block@0, arrays.1#6 <- block@13) + let arrays.2#12: bytes = φ(arrays.2#7 <- block@0, arrays.2#7 <- block@13) + let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#4 <- block@13) + let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#5 <- block@13) + let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#6 <- block@13) + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#14: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + goto arrays.0%is_original#5 ? block@21 : block@22 + block@21: // if_body_L1 + goto block@22 + block@22: // after_if_else_L1 + let arrays.0%out#7: bytes = φ(arrays.0#5 <- block@20, arrays.0#14 <- block@21) + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#15: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + goto arrays.1%is_original#8 ? block@23 : block@24 + block@23: // if_body_L1 + goto block@24 + block@24: // after_if_else_L1 + let arrays.1%out#6: bytes = φ(arrays.1#6 <- block@22, arrays.1#15 <- block@23) + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#16: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + goto arrays.2%is_original#11 ? block@25 : block@26 + block@25: // if_body_L1 + goto block@26 + block@26: // after_if_else_L1 + let arrays.2%out#5: bytes = φ(arrays.2#7 <- block@24, arrays.2#16 <- block@25) + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir index 5e4d1c15a4..f5454d640c 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.ssa.ir @@ -107,6 +107,10 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: subroutine test_cases.arc4_types.structs.add(v1: bytes, v2: bytes) -> : block@0: // L64 + let v1%is_original#0: bool = 1u + let v1%out#0: bytes = v1#0 + let v2%is_original#0: bool = 1u + let v2%out#0: bytes = v2#0 let tmp%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds let tmp%1#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds let tmp%2#0: bytes = test_cases.arc4_types.structs.add_decimal(tmp%0#0, tmp%1#0) @@ -129,6 +133,8 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: block@0: // L72 + let flags%is_original#0: bool = 1u + let flags%out#0: bytes = flags#0 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -147,10 +153,12 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) let tmp%5#0: bool = (! tmp%4#0) (assert tmp%5#0) - return flags#0 + return flags%out#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: block@0: // L80 + let vector_flags%is_original#0: bool = 1u + let vector_flags%out#0: bytes = vector_flags#0 let tmp%0#0: bytes = (extract3 vector_flags#0 0u 16u) // on error: Index access is out of bounds let tmp%1#0: bytes = (extract3 tmp%0#0 0u 8u) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -161,7 +169,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) (assert tmp%5#0) - return vector_flags#0 + return vector_flags%out#0 program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: diff --git a/test_cases/arc4_types/out/MutableParams2.approval.teal b/test_cases/arc4_types/out/MutableParams2.approval.teal new file mode 100644 index 0000000000..4be905d621 --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.approval.teal @@ -0,0 +1,158 @@ +#pragma version 10 + +test_cases.arc4_types.mutable_params2.MutableParams2.approval_program: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // arc4_types/mutable_params2.py:4 + // class MutableParams2(arc4.ARC4Contract): + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@5 + pushbytes 0x6ac4a557 // method "test_array_rebinding()void" + txna ApplicationArgs 0 + match __puya_arc4_router___test_array_rebinding_route@2 + intc_0 // 0 + retsub + +__puya_arc4_router___test_array_rebinding_route@2: + // arc4_types/mutable_params2.py:5 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub test_array_rebinding + intc_1 // 1 + retsub + +__puya_arc4_router___bare_routing@5: + // arc4_types/mutable_params2.py:4 + // class MutableParams2(arc4.ARC4Contract): + txn OnCompletion + bnz __puya_arc4_router___after_if_else@9 + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@9: + // arc4_types/mutable_params2.py:4 + // class MutableParams2(arc4.ARC4Contract): + intc_0 // 0 + retsub + + +// test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: +test_array_rebinding: + // arc4_types/mutable_params2.py:5-6 + // @arc4.abimethod() + // def test_array_rebinding(self) -> None: + proto 0 0 + // arc4_types/mutable_params2.py:7 + // a = arc4.DynamicBytes(0) + pushbytes 0x000100 + // arc4_types/mutable_params2.py:8 + // self.maybe_modify_array(a, assign_local=True) + intc_1 // 1 + callsub maybe_modify_array + // arc4_types/mutable_params2.py:9 + // assert a == arc4.DynamicBytes(0, 1) + pushbytes 0x00020001 + == + assert + // arc4_types/mutable_params2.py:11 + // a = arc4.DynamicBytes(1) + pushbytes 0x000101 + // arc4_types/mutable_params2.py:12 + // self.maybe_modify_array(a, assign_local=False) + intc_0 // 0 + callsub maybe_modify_array + // arc4_types/mutable_params2.py:13 + // assert a == arc4.DynamicBytes(1, 42, 4) + pushbytes 0x0003012a04 + == + assert + retsub + + +// test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: uint64) -> bytes: +maybe_modify_array: + // arc4_types/mutable_params2.py:15-16 + // @subroutine + // def maybe_modify_array(self, a: arc4.DynamicBytes, *, assign_local: bool) -> None: # v0 + proto 2 1 + intc_0 // 0 + intc_1 // 1 + // arc4_types/mutable_params2.py:17 + // if assign_local: + frame_dig -1 + bz maybe_modify_array_else_body@10 + // arc4_types/mutable_params2.py:18 + // a.append(arc4.Byte(1)) # v1: modify out + frame_dig -2 + extract 2 0 + pushbytes 0x01 + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + // arc4_types/mutable_params2.py:21 + // a = arc4.DynamicBytes(1, 2, 4) # v4: local only + pushbytes 0x0003010204 + intc_0 // 0 + frame_bury 1 + frame_dig -2 + frame_bury 0 + frame_bury -2 + b maybe_modify_array_after_if_else@13 + +maybe_modify_array_else_body@10: + // arc4_types/mutable_params2.py:23 + // a.append(arc4.Byte(42)) # v5: modify out + frame_dig -2 + extract 2 0 + pushbytes 0x2a + concat + dup + len + itob + extract 6 2 + swap + concat + dupn 2 + frame_bury -2 + frame_bury 0 + frame_bury -2 + +maybe_modify_array_after_if_else@13: + // arc4_types/mutable_params2.py:25 + // a.append(arc4.Byte(4)) # v6: modify out IF not b ELSE local only + frame_dig -2 + extract 2 0 + pushbytes 0x04 + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + frame_dig 1 + bz maybe_modify_array_after_if_else@15 + frame_dig -2 + frame_bury 0 + +maybe_modify_array_after_if_else@15: + retsub diff --git a/test_cases/arc4_types/out/MutableParams2.arc32.json b/test_cases/arc4_types/out/MutableParams2.arc32.json new file mode 100644 index 0000000000..1514d314eb --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.arc32.json @@ -0,0 +1,50 @@ +{ + "hints": { + "test_array_rebinding()void": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyYzRfdHlwZXMubXV0YWJsZV9wYXJhbXMyLk11dGFibGVQYXJhbXMyLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmFyYzRfdHlwZXMubXV0YWJsZV9wYXJhbXMyLk11dGFibGVQYXJhbXMyLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjQKICAgIC8vIGNsYXNzIE11dGFibGVQYXJhbXMyKGFyYzQuQVJDNENvbnRyYWN0KToKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A1CiAgICBwdXNoYnl0ZXMgMHg2YWM0YTU1NyAvLyBtZXRob2QgInRlc3RfYXJyYXlfcmViaW5kaW5nKCl2b2lkIgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAogICAgbWF0Y2ggX19wdXlhX2FyYzRfcm91dGVyX19fdGVzdF9hcnJheV9yZWJpbmRpbmdfcm91dGVAMgogICAgaW50Y18wIC8vIDAKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fdGVzdF9hcnJheV9yZWJpbmRpbmdfcm91dGVAMjoKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjUKICAgIC8vIEBhcmM0LmFiaW1ldGhvZCgpCiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gaXMgbm90IGNyZWF0aW5nCiAgICBjYWxsc3ViIHRlc3RfYXJyYXlfcmViaW5kaW5nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANToKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjQKICAgIC8vIGNsYXNzIE11dGFibGVQYXJhbXMyKGFyYzQuQVJDNENvbnRyYWN0KToKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDkKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gaXMgY3JlYXRpbmcKICAgIGludGNfMSAvLyAxCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VAOToKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjQKICAgIC8vIGNsYXNzIE11dGFibGVQYXJhbXMyKGFyYzQuQVJDNENvbnRyYWN0KToKICAgIGludGNfMCAvLyAwCiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLmFyYzRfdHlwZXMubXV0YWJsZV9wYXJhbXMyLk11dGFibGVQYXJhbXMyLnRlc3RfYXJyYXlfcmViaW5kaW5nKCkgLT4gdm9pZDoKdGVzdF9hcnJheV9yZWJpbmRpbmc6CiAgICAvLyBhcmM0X3R5cGVzL211dGFibGVfcGFyYW1zMi5weTo1LTYKICAgIC8vIEBhcmM0LmFiaW1ldGhvZCgpCiAgICAvLyBkZWYgdGVzdF9hcnJheV9yZWJpbmRpbmcoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYXJjNF90eXBlcy9tdXRhYmxlX3BhcmFtczIucHk6NwogICAgLy8gYSA9IGFyYzQuRHluYW1pY0J5dGVzKDApCiAgICBwdXNoYnl0ZXMgMHgwMDAxMDAKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjgKICAgIC8vIHNlbGYubWF5YmVfbW9kaWZ5X2FycmF5KGEsIGFzc2lnbl9sb2NhbD1UcnVlKQogICAgaW50Y18xIC8vIDEKICAgIGNhbGxzdWIgbWF5YmVfbW9kaWZ5X2FycmF5CiAgICAvLyBhcmM0X3R5cGVzL211dGFibGVfcGFyYW1zMi5weTo5CiAgICAvLyBhc3NlcnQgYSA9PSBhcmM0LkR5bmFtaWNCeXRlcygwLCAxKQogICAgcHVzaGJ5dGVzIDB4MDAwMjAwMDEKICAgID09CiAgICBhc3NlcnQKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjExCiAgICAvLyBhID0gYXJjNC5EeW5hbWljQnl0ZXMoMSkKICAgIHB1c2hieXRlcyAweDAwMDEwMQogICAgLy8gYXJjNF90eXBlcy9tdXRhYmxlX3BhcmFtczIucHk6MTIKICAgIC8vIHNlbGYubWF5YmVfbW9kaWZ5X2FycmF5KGEsIGFzc2lnbl9sb2NhbD1GYWxzZSkKICAgIGludGNfMCAvLyAwCiAgICBjYWxsc3ViIG1heWJlX21vZGlmeV9hcnJheQogICAgLy8gYXJjNF90eXBlcy9tdXRhYmxlX3BhcmFtczIucHk6MTMKICAgIC8vIGFzc2VydCBhID09IGFyYzQuRHluYW1pY0J5dGVzKDEsIDQyLCA0KQogICAgcHVzaGJ5dGVzIDB4MDAwMzAxMmEwNAogICAgPT0KICAgIGFzc2VydAogICAgcmV0c3ViCgoKLy8gdGVzdF9jYXNlcy5hcmM0X3R5cGVzLm11dGFibGVfcGFyYW1zMi5NdXRhYmxlUGFyYW1zMi5tYXliZV9tb2RpZnlfYXJyYXkoYTogYnl0ZXMsIGFzc2lnbl9sb2NhbDogdWludDY0KSAtPiBieXRlczoKbWF5YmVfbW9kaWZ5X2FycmF5OgogICAgLy8gYXJjNF90eXBlcy9tdXRhYmxlX3BhcmFtczIucHk6MTUtMTYKICAgIC8vIEBzdWJyb3V0aW5lCiAgICAvLyBkZWYgbWF5YmVfbW9kaWZ5X2FycmF5KHNlbGYsIGE6IGFyYzQuRHluYW1pY0J5dGVzLCAqLCBhc3NpZ25fbG9jYWw6IGJvb2wpIC0+IE5vbmU6ICAjIHYwCiAgICBwcm90byAyIDEKICAgIGludGNfMCAvLyAwCiAgICBpbnRjXzEgLy8gMQogICAgLy8gYXJjNF90eXBlcy9tdXRhYmxlX3BhcmFtczIucHk6MTcKICAgIC8vIGlmIGFzc2lnbl9sb2NhbDoKICAgIGZyYW1lX2RpZyAtMQogICAgYnogbWF5YmVfbW9kaWZ5X2FycmF5X2Vsc2VfYm9keUAxMAogICAgLy8gYXJjNF90eXBlcy9tdXRhYmxlX3BhcmFtczIucHk6MTgKICAgIC8vIGEuYXBwZW5kKGFyYzQuQnl0ZSgxKSkgICMgdjE6IG1vZGlmeSBvdXQKICAgIGZyYW1lX2RpZyAtMgogICAgZXh0cmFjdCAyIDAKICAgIHB1c2hieXRlcyAweDAxCiAgICBjb25jYXQKICAgIGR1cAogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgc3dhcAogICAgY29uY2F0CiAgICBmcmFtZV9idXJ5IC0yCiAgICAvLyBhcmM0X3R5cGVzL211dGFibGVfcGFyYW1zMi5weToyMQogICAgLy8gYSA9IGFyYzQuRHluYW1pY0J5dGVzKDEsIDIsIDQpICAjIHY0OiBsb2NhbCBvbmx5CiAgICBwdXNoYnl0ZXMgMHgwMDAzMDEwMjA0CiAgICBpbnRjXzAgLy8gMAogICAgZnJhbWVfYnVyeSAxCiAgICBmcmFtZV9kaWcgLTIKICAgIGZyYW1lX2J1cnkgMAogICAgZnJhbWVfYnVyeSAtMgogICAgYiBtYXliZV9tb2RpZnlfYXJyYXlfYWZ0ZXJfaWZfZWxzZUAxMwoKbWF5YmVfbW9kaWZ5X2FycmF5X2Vsc2VfYm9keUAxMDoKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjIzCiAgICAvLyBhLmFwcGVuZChhcmM0LkJ5dGUoNDIpKSAgIyB2NTogbW9kaWZ5IG91dAogICAgZnJhbWVfZGlnIC0yCiAgICBleHRyYWN0IDIgMAogICAgcHVzaGJ5dGVzIDB4MmEKICAgIGNvbmNhdAogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGR1cG4gMgogICAgZnJhbWVfYnVyeSAtMgogICAgZnJhbWVfYnVyeSAwCiAgICBmcmFtZV9idXJ5IC0yCgptYXliZV9tb2RpZnlfYXJyYXlfYWZ0ZXJfaWZfZWxzZUAxMzoKICAgIC8vIGFyYzRfdHlwZXMvbXV0YWJsZV9wYXJhbXMyLnB5OjI1CiAgICAvLyBhLmFwcGVuZChhcmM0LkJ5dGUoNCkpICAjIHY2OiBtb2RpZnkgb3V0IElGIG5vdCBiIEVMU0UgbG9jYWwgb25seQogICAgZnJhbWVfZGlnIC0yCiAgICBleHRyYWN0IDIgMAogICAgcHVzaGJ5dGVzIDB4MDQKICAgIGNvbmNhdAogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGZyYW1lX2J1cnkgLTIKICAgIGZyYW1lX2RpZyAxCiAgICBieiBtYXliZV9tb2RpZnlfYXJyYXlfYWZ0ZXJfaWZfZWxzZUAxNQogICAgZnJhbWVfZGlnIC0yCiAgICBmcmFtZV9idXJ5IDAKCm1heWJlX21vZGlmeV9hcnJheV9hZnRlcl9pZl9lbHNlQDE1OgogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyYzRfdHlwZXMubXV0YWJsZV9wYXJhbXMyLk11dGFibGVQYXJhbXMyLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "MutableParams2", + "methods": [ + { + "name": "test_array_rebinding", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.clear.teal b/test_cases/arc4_types/out/MutableParams2.clear.teal new file mode 100644 index 0000000000..e138fea62e --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +test_cases.arc4_types.mutable_params2.MutableParams2.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/arc4_types/out/MutableParams2.destructured.ir b/test_cases/arc4_types/out/MutableParams2.destructured.ir new file mode 100644 index 0000000000..e39aa56ece --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.destructured.ir @@ -0,0 +1,87 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000100, 1u) + let tmp%0#0: bool = (== a#1 0x00020001) + (assert tmp%0#0) + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000101, 0u) + let tmp%1#0: bool = (== a#1 0x0003012a04) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x01) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let a#5: bytes = 0x0003010204 + let a%is_original#0: bool = 0u + let a%out#7: bytes = a#0 + let a#0: bytes = a#5 + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 0x2a) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#0: bytes = (concat len_16_bit%2#0 concatenated%2#0) + let a%out#7: bytes = a#0 + let a#0: bytes = a%out#7 + goto block@13 + block@13: // after_if_else_L17 + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#0) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 0x04) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#0: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#0 ? block@14 : block@15 + block@14: // if_body_L1 + let a%out#7: bytes = a#0 + goto block@15 + block@15: // after_if_else_L1 + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.ssa.ir b/test_cases/arc4_types/out/MutableParams2.ssa.ir new file mode 100644 index 0000000000..e9b1880586 --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.ssa.ir @@ -0,0 +1,172 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => block@3} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@3: // switch_case_default_L4 + goto block@4 + block@4: // switch_case_next_L4 + goto block@9 + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + switch tmp%7#0 {0u => block@6, * => block@7} + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (== tmp%8#0 0u) + (assert tmp%9#0) // is creating + test_cases.arc4_types.mutable_params2.MutableParams2.__algopy_default_create() + return 1u + block@7: // switch_case_default_L4 + goto block@8 + block@8: // switch_case_next_L4 + goto block@9 + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let result%0#0: bytes = (concat 0x 0x00) + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let a#0: bytes = array_data%0#0 + let maybe_modify_array%0#0: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#0, 1u) + let a#1: bytes = maybe_modify_array%0#0 + let result%1#0: bytes = (concat 0x 0x00) + let result%2#0: bytes = (concat result%1#0 0x01) + let array_data%1#0: bytes = (concat 0x0002 result%2#0) + let tmp%0#0: bool = (== a#1 array_data%1#0) + (assert tmp%0#0) + let result%3#0: bytes = (concat 0x 0x01) + let array_data%2#0: bytes = (concat 0x0001 result%3#0) + let a#2: bytes = array_data%2#0 + let maybe_modify_array%1#0: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#2, 0u) + let a#3: bytes = maybe_modify_array%1#0 + let result%4#0: bytes = (concat 0x 0x01) + let result%5#0: bytes = (concat result%4#0 0x2a) + let result%6#0: bytes = (concat result%5#0 0x04) + let array_data%3#0: bytes = (concat 0x0003 result%6#0) + let tmp%1#0: bool = (== a#3 array_data%3#0) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + let a%out#0: bytes = a#0 + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let data%0#0: bytes = (concat 0x 0x01) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let a#1: bytes = concat_result%0#0 + goto a%is_original#0 ? block@2 : block@3 + block@2: // if_body_L1 + let a%out#1: bytes = a#1 + goto block@3 + block@3: // after_if_else_L1 + let a%out#12: bytes = φ(a%out#0 <- block@1, a%out#1 <- block@2) + let result%0#0: bytes = (concat 0x 0x01) + let result%1#0: bytes = (concat result%0#0 0x02) + let result%2#0: bytes = (concat result%1#0 0x03) + let array_data%0#0: bytes = (concat 0x0003 result%2#0) + let a%is_original#1: bool = 0u + let a#2: bytes = array_data%0#0 + goto a%is_original#1 ? block@4 : block@5 + block@4: // if_body_L1 + let a%out#2: bytes = a#2 + goto block@5 + block@5: // after_if_else_L1 + let a%out#11: bytes = φ(a%out#12 <- block@3, a%out#2 <- block@4) + let expr_value_trimmed%1#0: bytes = ((extract 2 0) a#2) + let data%1#0: bytes = (concat 0x 0x04) + let concatenated%1#0: bytes = (concat expr_value_trimmed%1#0 data%1#0) + let len_%1#0: uint64 = (len concatenated%1#0) + let as_bytes%1#0: bytes = (itob len_%1#0) + let len_16_bit%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let concat_result%1#0: bytes = (concat len_16_bit%1#0 concatenated%1#0) + let a#4: bytes = concat_result%1#0 + goto a%is_original#1 ? block@6 : block@7 + block@6: // if_body_L1 + let a%out#3: bytes = a#4 + goto block@7 + block@7: // after_if_else_L1 + let a%out#10: bytes = φ(a%out#11 <- block@5, a%out#3 <- block@6) + let result%3#0: bytes = (concat 0x 0x01) + let result%4#0: bytes = (concat result%3#0 0x02) + let result%5#0: bytes = (concat result%4#0 0x04) + let array_data%1#0: bytes = (concat 0x0003 result%5#0) + let a%is_original#3: bool = 0u + let a#5: bytes = array_data%1#0 + goto a%is_original#3 ? block@8 : block@9 + block@8: // if_body_L1 + let a%out#4: bytes = a#5 + goto block@9 + block@9: // after_if_else_L1 + let a%out#9: bytes = φ(a%out#10 <- block@7, a%out#4 <- block@8) + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let data%2#0: bytes = (concat 0x 0x2a) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 data%2#0) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%2#0: bytes = (concat len_16_bit%2#0 concatenated%2#0) + let a#6: bytes = concat_result%2#0 + goto a%is_original#0 ? block@11 : block@12 + block@11: // if_body_L1 + let a%out#5: bytes = a#6 + goto block@12 + block@12: // after_if_else_L1 + let a%out#13: bytes = φ(a%out#0 <- block@10, a%out#5 <- block@11) + goto block@13 + block@13: // after_if_else_L17 + let a#7: bytes = φ(a#5 <- block@9, a#6 <- block@12) + let a%is_original#4: bool = φ(a%is_original#3 <- block@9, a%is_original#0 <- block@12) + let a%out#8: bytes = φ(a%out#9 <- block@9, a%out#13 <- block@12) + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#7) + let data%3#0: bytes = (concat 0x 0x04) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 data%3#0) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let concat_result%3#0: bytes = (concat len_16_bit%3#0 concatenated%3#0) + let a#10: bytes = concat_result%3#0 + goto a%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + let a%out#6: bytes = a#10 + goto block@15 + block@15: // after_if_else_L1 + let a%out#7: bytes = φ(a%out#8 <- block@13, a%out#6 <- block@14) + return a%out#7 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__algopy_default_create() -> void: + block@0: // L1 + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_1.ir b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_1.ir new file mode 100644 index 0000000000..962e5bb1a6 --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_1.ir @@ -0,0 +1,120 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let result%0#0: bytes = 0x00 + let a#0: bytes = (concat 0x0001 result%0#0) + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#0, 1u) + let result%1#0: bytes = 0x00 + let result%2#0: bytes = (concat result%1#0 0x01) + let array_data%1#0: bytes = (concat 0x0002 result%2#0) + let tmp%0#0: bool = (== a#1 array_data%1#0) + (assert tmp%0#0) + let result%3#0: bytes = 0x01 + let a#2: bytes = (concat 0x0001 result%3#0) + let a#3: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#2, 0u) + let result%4#0: bytes = 0x01 + let result%5#0: bytes = (concat result%4#0 0x2a) + let result%6#0: bytes = (concat result%5#0 0x04) + let array_data%3#0: bytes = (concat 0x0003 result%6#0) + let tmp%1#0: bool = (== a#3 array_data%3#0) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let data%0#0: bytes = 0x01 + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#1: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let result%0#0: bytes = 0x01 + let result%1#0: bytes = (concat result%0#0 0x02) + let result%2#0: bytes = (concat result%1#0 0x03) + let a#2: bytes = (concat 0x0003 result%2#0) + goto block@5 + block@5: // after_if_else_L1 + let expr_value_trimmed%1#0: bytes = ((extract 2 0) a#2) + let data%1#0: bytes = 0x04 + let concatenated%1#0: bytes = (concat expr_value_trimmed%1#0 data%1#0) + let len_%1#0: uint64 = (len concatenated%1#0) + let as_bytes%1#0: bytes = (itob len_%1#0) + let len_16_bit%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let a#4: bytes = (concat len_16_bit%1#0 concatenated%1#0) + goto block@7 + block@7: // after_if_else_L1 + let result%3#0: bytes = 0x01 + let result%4#0: bytes = (concat result%3#0 0x02) + let result%5#0: bytes = (concat result%4#0 0x04) + let a#5: bytes = (concat 0x0003 result%5#0) + let a%is_original#3: bool = 0u + goto block@9 + block@9: // after_if_else_L1 + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let data%2#0: bytes = 0x2a + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 data%2#0) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#6: bytes = (concat len_16_bit%2#0 concatenated%2#0) + goto block@13 + block@13: // after_if_else_L17 + let a#7: bytes = φ(a#5 <- block@9, a#6 <- block@10) + let a%is_original#4: bool = φ(a%is_original#3 <- block@9, a%is_original#0 <- block@10) + let a%out#8: bytes = φ(a#1 <- block@9, a#6 <- block@10) + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#7) + let data%3#0: bytes = 0x04 + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 data%3#0) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#10: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + goto block@15 + block@15: // after_if_else_L1 + let a%out#7: bytes = φ(a%out#8 <- block@13, a#10 <- block@14) + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_2.ir b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_2.ir new file mode 100644 index 0000000000..60427fa195 --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_2.ir @@ -0,0 +1,103 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let a#0: bytes = 0x000100 + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#0, 1u) + let result%2#0: bytes = 0x0001 + let array_data%1#0: bytes = (concat 0x0002 result%2#0) + let tmp%0#0: bool = (== a#1 array_data%1#0) + (assert tmp%0#0) + let a#2: bytes = 0x000101 + let a#3: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#2, 0u) + let result%5#0: bytes = 0x012a + let result%6#0: bytes = (concat result%5#0 0x04) + let array_data%3#0: bytes = (concat 0x0003 result%6#0) + let tmp%1#0: bool = (== a#3 array_data%3#0) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x01) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#1: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let result%1#0: bytes = 0x0102 + let result%2#0: bytes = (concat result%1#0 0x03) + let a#2: bytes = (concat 0x0003 result%2#0) + let expr_value_trimmed%1#0: bytes = ((extract 2 0) a#2) + let concatenated%1#0: bytes = (concat expr_value_trimmed%1#0 0x04) + let len_%1#0: uint64 = (len concatenated%1#0) + let as_bytes%1#0: bytes = (itob len_%1#0) + let len_16_bit%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let result%4#0: bytes = 0x0102 + let result%5#0: bytes = (concat result%4#0 0x04) + let a#5: bytes = (concat 0x0003 result%5#0) + let a%is_original#3: bool = 0u + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 0x2a) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#6: bytes = (concat len_16_bit%2#0 concatenated%2#0) + goto block@13 + block@13: // after_if_else_L17 + let a#7: bytes = φ(a#5 <- block@1, a#6 <- block@10) + let a%is_original#4: bool = φ(a%is_original#3 <- block@1, a%is_original#0 <- block@10) + let a%out#8: bytes = φ(a#1 <- block@1, a#6 <- block@10) + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#7) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 0x04) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#10: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + goto block@15 + block@15: // after_if_else_L1 + let a%out#7: bytes = φ(a%out#8 <- block@13, a#10 <- block@14) + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_3.ir b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_3.ir new file mode 100644 index 0000000000..9827062f58 --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_3.ir @@ -0,0 +1,96 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000100, 1u) + let array_data%1#0: bytes = 0x00020001 + let tmp%0#0: bool = (== a#1 array_data%1#0) + (assert tmp%0#0) + let a#3: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000101, 0u) + let result%6#0: bytes = 0x012a04 + let array_data%3#0: bytes = (concat 0x0003 result%6#0) + let tmp%1#0: bool = (== a#3 array_data%3#0) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x01) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#1: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let result%2#0: bytes = 0x010203 + let a#2: bytes = (concat 0x0003 result%2#0) + let expr_value_trimmed%1#0: bytes = ((extract 2 0) a#2) + let concatenated%1#0: bytes = (concat expr_value_trimmed%1#0 0x04) + let len_%1#0: uint64 = (len concatenated%1#0) + let as_bytes%1#0: bytes = (itob len_%1#0) + let result%5#0: bytes = 0x010204 + let a#5: bytes = (concat 0x0003 result%5#0) + let a%is_original#3: bool = 0u + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 0x2a) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#6: bytes = (concat len_16_bit%2#0 concatenated%2#0) + goto block@13 + block@13: // after_if_else_L17 + let a#7: bytes = φ(a#5 <- block@1, a#6 <- block@10) + let a%is_original#4: bool = φ(a%is_original#3 <- block@1, a%is_original#0 <- block@10) + let a%out#8: bytes = φ(a#1 <- block@1, a#6 <- block@10) + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#7) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 0x04) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#10: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + goto block@15 + block@15: // after_if_else_L1 + let a%out#7: bytes = φ(a%out#8 <- block@13, a#10 <- block@14) + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_4.ir b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_4.ir new file mode 100644 index 0000000000..8567cf917e --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_4.ir @@ -0,0 +1,91 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000100, 1u) + let tmp%0#0: bool = (== a#1 0x00020001) + (assert tmp%0#0) + let a#3: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000101, 0u) + let array_data%3#0: bytes = 0x0003012a04 + let tmp%1#0: bool = (== a#3 array_data%3#0) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x01) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#1: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let a#2: bytes = 0x0003010203 + let expr_value_trimmed%1#0: bytes = ((extract 2 0) a#2) + let concatenated%1#0: bytes = (concat expr_value_trimmed%1#0 0x04) + let len_%1#0: uint64 = (len concatenated%1#0) + let a#5: bytes = 0x0003010204 + let a%is_original#3: bool = 0u + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 0x2a) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#6: bytes = (concat len_16_bit%2#0 concatenated%2#0) + goto block@13 + block@13: // after_if_else_L17 + let a#7: bytes = φ(a#5 <- block@1, a#6 <- block@10) + let a%is_original#4: bool = φ(a%is_original#3 <- block@1, a%is_original#0 <- block@10) + let a%out#8: bytes = φ(a#1 <- block@1, a#6 <- block@10) + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#7) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 0x04) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#10: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + goto block@15 + block@15: // after_if_else_L1 + let a%out#7: bytes = φ(a%out#8 <- block@13, a#10 <- block@14) + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_5.ir b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_5.ir new file mode 100644 index 0000000000..7a6e5a4609 --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_5.ir @@ -0,0 +1,88 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000100, 1u) + let tmp%0#0: bool = (== a#1 0x00020001) + (assert tmp%0#0) + let a#3: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000101, 0u) + let tmp%1#0: bool = (== a#3 0x0003012a04) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x01) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#1: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let expr_value_trimmed%1#0: bytes = 0x010203 + let concatenated%1#0: bytes = (concat expr_value_trimmed%1#0 0x04) + let a#5: bytes = 0x0003010204 + let a%is_original#3: bool = 0u + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 0x2a) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#6: bytes = (concat len_16_bit%2#0 concatenated%2#0) + goto block@13 + block@13: // after_if_else_L17 + let a#7: bytes = φ(a#5 <- block@1, a#6 <- block@10) + let a%is_original#4: bool = φ(a%is_original#3 <- block@1, a%is_original#0 <- block@10) + let a%out#8: bytes = φ(a#1 <- block@1, a#6 <- block@10) + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#7) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 0x04) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#10: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + goto block@15 + block@15: // after_if_else_L1 + let a%out#7: bytes = φ(a%out#8 <- block@13, a#10 <- block@14) + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_6.ir b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_6.ir new file mode 100644 index 0000000000..5116c57fed --- /dev/null +++ b/test_cases/arc4_types/out/MutableParams2.ssa.opt_pass_6.ir @@ -0,0 +1,86 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000100, 1u) + let tmp%0#0: bool = (== a#1 0x00020001) + (assert tmp%0#0) + let a#3: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000101, 0u) + let tmp%1#0: bool = (== a#3 0x0003012a04) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x01) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#1: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let a#5: bytes = 0x0003010204 + let a%is_original#3: bool = 0u + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 0x2a) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#6: bytes = (concat len_16_bit%2#0 concatenated%2#0) + goto block@13 + block@13: // after_if_else_L17 + let a#7: bytes = φ(a#5 <- block@1, a#6 <- block@10) + let a%is_original#4: bool = φ(a%is_original#3 <- block@1, a%is_original#0 <- block@10) + let a%out#8: bytes = φ(a#1 <- block@1, a#6 <- block@10) + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#7) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 0x04) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#10: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#4 ? block@14 : block@15 + block@14: // if_body_L1 + goto block@15 + block@15: // after_if_else_L1 + let a%out#7: bytes = φ(a%out#8 <- block@13, a#10 <- block@14) + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/client_MutableParams2.py b/test_cases/arc4_types/out/client_MutableParams2.py new file mode 100644 index 0000000000..c141762528 --- /dev/null +++ b/test_cases/arc4_types/out/client_MutableParams2.py @@ -0,0 +1,13 @@ +# This file is auto-generated, do not modify +# flake8: noqa +# fmt: off +import typing + +import algopy + + +class MutableParams2(algopy.arc4.ARC4Client, typing.Protocol): + @algopy.arc4.abimethod + def test_array_rebinding( + self, + ) -> None: ... diff --git a/test_cases/arc4_types/out/module.awst b/test_cases/arc4_types/out/module.awst index 61dbaa8a04..595ae56932 100644 --- a/test_cases/arc4_types/out/module.awst +++ b/test_cases/arc4_types/out/module.awst @@ -366,6 +366,50 @@ contract Arc4MutationContract } } +contract MutableParams2 +{ + method_resolution_order: ( + algopy.arc4.ARC4Contract, + ) + + subroutine algopy.arc4.ARC4Contract.approval_program(): bool + { + return arc4_router() + } + + subroutine algopy.arc4.ARC4Contract.clear_state_program(): bool + { + return true + } + + abimethod test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding(): void + { + a: arc4.dynamic_array = new arc4.dynamic_array(0_arc4u8) + this::maybe_modify_array(a, assign_local=true) + assert(a == new arc4.dynamic_array(0_arc4u8, 1_arc4u8)) + a: arc4.dynamic_array = new arc4.dynamic_array(1_arc4u8) + this::maybe_modify_array(a, assign_local=false) + assert(a == new arc4.dynamic_array(1_arc4u8, 42_arc4u8, 4_arc4u8)) + } + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: arc4.dynamic_array, assign_local: bool): void + { + if (assign_local) { + a.extend((1_arc4u8)) + a: arc4.dynamic_array = new arc4.dynamic_array(1_arc4u8, 2_arc4u8, 3_arc4u8) + a.extend((4_arc4u8)) + a: arc4.dynamic_array = new arc4.dynamic_array(1_arc4u8, 2_arc4u8, 4_arc4u8) + } else { + a.extend((42_arc4u8)) + } + a.extend((4_arc4u8)) + } + + baremethod test_cases.arc4_types.mutable_params2.MutableParams2.__algopy_default_create(): void + { + } +} + contract Arc4MutableParamsContract { method_resolution_order: ( @@ -404,7 +448,24 @@ contract Arc4MutableParamsContract assert(reinterpret_cast(my_array_copy_2[0u]) == reinterpret_cast(1_arc4u8), comment="my_array_copy_2 should have original value") this::other_routine_2(my_array_copy_2) assert(reinterpret_cast(my_array_copy_2[0u]) == reinterpret_cast(10_arc4u8), comment="my_array_copy_2 should have mutated value") - this::other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) + my_array_copy_3: arc4.static_array = my_array_copy.copy() + originals: tuple,arc4.static_array,arc4.static_array> = (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()) + this::mutate_tuple_items_and_reassign((my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), start=0u, reassign=true) + assert(&&(&&(originals[0] == my_array, originals[1] == my_array_copy_2), originals[2] == my_array_copy_3)) + this::mutate_tuple_items_and_reassign((my_array, my_array_copy_2, my_array_copy_3), start=100u, reassign=true) + assert(reinterpret_cast(my_array[0u]) == reinterpret_cast(100_arc4u8)) + assert(reinterpret_cast(my_array_copy_2[0u]) == reinterpret_cast(101_arc4u8)) + assert(reinterpret_cast(my_array_copy_3[0u]) == reinterpret_cast(102_arc4u8)) + assert(reinterpret_cast(my_array[1u]) == reinterpret_cast(103_arc4u8)) + assert(reinterpret_cast(my_array_copy_2[1u]) == reinterpret_cast(104_arc4u8)) + assert(reinterpret_cast(my_array_copy_3[1u]) == reinterpret_cast(105_arc4u8)) + this::mutate_tuple_items_and_reassign((my_array, my_array_copy_2, my_array_copy_3), start=200u, reassign=false) + assert(reinterpret_cast(my_array[0u]) == reinterpret_cast(200_arc4u8)) + assert(reinterpret_cast(my_array_copy_2[0u]) == reinterpret_cast(201_arc4u8)) + assert(reinterpret_cast(my_array_copy_3[0u]) == reinterpret_cast(202_arc4u8)) + assert(reinterpret_cast(my_array[1u]) == reinterpret_cast(206_arc4u8)) + assert(reinterpret_cast(my_array_copy_2[1u]) == reinterpret_cast(207_arc4u8)) + assert(reinterpret_cast(my_array_copy_3[1u]) == reinterpret_cast(208_arc4u8)) nested: test_cases.arc4_types.mutable_params.StructWithArray = new test_cases.arc4_types.mutable_params.StructWithArray(test_array=my_array.copy()) this::other_routine_2(nested.test_array.copy()) } @@ -423,14 +484,26 @@ contract Arc4MutableParamsContract return copy } - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays: tuple,arc4.static_array,arc4.static_array>): void + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays: tuple,arc4.static_array,arc4.static_array>, start: uint64, reassign: bool): void { - for array in arrays { - array[0u]: arc4.uint8 = 99_arc4u8 + arrays[0][0u]: arc4.uint8 = arc4_encode(start, arc4.uint8) + arrays[1][0u]: arc4.uint8 = arc4_encode(start + 1u, arc4.uint8) + arrays[2][0u]: arc4.uint8 = arc4_encode(start + 2u, arc4.uint8) + assert(reinterpret_cast(arrays[0][0u]) == itob(start)) + assert(reinterpret_cast(arrays[1][0u]) == itob(start + 1u)) + assert(reinterpret_cast(arrays[2][0u]) == itob(start + 2u)) + arrays[0][1u]: arc4.uint8 = arc4_encode(start + 3u, arc4.uint8) + arrays[1][1u]: arc4.uint8 = arc4_encode(start + 4u, arc4.uint8) + arrays[2][1u]: arc4.uint8 = arc4_encode(start + 5u, arc4.uint8) + if (reassign) { + arrays: tuple,arc4.static_array,arc4.static_array> = (arrays[0].copy(), arrays[1].copy(), arrays[2].copy()) } - arrays[0][0u]: arc4.uint8 = 99_arc4u8 - arrays[1][0u]: arc4.uint8 = 99_arc4u8 - arrays[2][0u]: arc4.uint8 = 99_arc4u8 + arrays[0][1u]: arc4.uint8 = arc4_encode(start + 6u, arc4.uint8) + arrays[1][1u]: arc4.uint8 = arc4_encode(start + 7u, arc4.uint8) + arrays[2][1u]: arc4.uint8 = arc4_encode(start + 8u, arc4.uint8) + assert(reinterpret_cast(arrays[0][1u]) == itob(start + 6u)) + assert(reinterpret_cast(arrays[1][1u]) == itob(start + 7u)) + assert(reinterpret_cast(arrays[2][1u]) == itob(start + 8u)) } } diff --git a/test_cases/arc4_types/out/mutable_params.O0.log b/test_cases/arc4_types/out/mutable_params.O0.log index 854beb51bc..82c1cb6f9d 100644 --- a/test_cases/arc4_types/out/mutable_params.O0.log +++ b/test_cases/arc4_types/out/mutable_params.O0.log @@ -1,370 +1,1271 @@ -PC Teal Stack -1 intcblock 1 0 2 4 -7 bytecblock 0x "Happy" 0x05 "AARRGH!" 0x63 "Days" -33 callsub mutating_copies -38 proto 0 0 -41 bytec_0 0x -42 pushbytes 0x01 0x, 0x01 -45 concat 0x01 -46 pushbytes 0x02 0x01, 0x02 -49 concat 0x0102 -50 pushbytes 0x03 0x0102, 0x03 -53 concat 0x010203 -54 pushbytes 0x04 0x010203, 0x04 -57 concat 0x01020304 -58 bytec_0 0x01020304, 0x -59 swap 0x, 0x01020304 -60 concat 0x01020304 -61 pushbytes 0x00 0x01020304, 0x00 -64 intc_1 0x01020304, 0x00, 0 -65 intc_0 0x01020304, 0x00, 0, 1 -66 setbit 0x01020304, 0x80 -67 bytec_1 0x01020304, 0x80, "Happy" -68 len 0x01020304, 0x80, 5 -69 itob 0x01020304, 0x80, 0x0000000000000005 -70 extract 6 2 0x01020304, 0x80, 0x0005 -73 bytec_1 0x01020304, 0x80, 0x0005, "Happy" -74 concat 0x01020304, 0x80, 0x00054861707079 -75 swap 0x01020304, 0x00054861707079, 0x80 -76 bytec 5 0x01020304, 0x00054861707079, 0x80, "Days" -78 len 0x01020304, 0x00054861707079, 0x80, 4 -79 itob 0x01020304, 0x00054861707079, 0x80, 0x0000000000000004 -80 extract 6 2 0x01020304, 0x00054861707079, 0x80, 0x0004 -83 bytec 5 0x01020304, 0x00054861707079, 0x80, 0x0004, "Days" -85 concat 0x01020304, 0x00054861707079, 0x80, 0x000444617973 -86 cover 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80 -88 bytec_0 0x01020304, 0x000444617973, 0x00054861707079, 0x80, 0x -89 swap 0x01020304, 0x000444617973, 0x00054861707079, 0x, 0x80 -90 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80 -91 pushbytes 0x32 0x01020304, 0x000444617973, 0x00054861707079, 0x80, "2" -94 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x8032 -95 pushint 6 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 6 -97 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0000000000000006 -98 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0006 -101 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006 -102 dig 1 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x00054861707079 -104 len 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7 -105 pushint 6 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7, 6 -107 + 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 13 -108 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000000000000000D -109 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000D -112 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006000D -113 swap 0x01020304, 0x000444617973, 0x80320006000D, 0x00054861707079 -114 concat 0x01020304, 0x000444617973, 0x80320006000D00054861707079 -115 swap 0x01020304, 0x80320006000D00054861707079, 0x000444617973 -116 concat 0x01020304, 0x80320006000D00054861707079000444617973 -117 dig 1 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -119 cover 2 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 -121 dup 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -122 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 -124 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -125 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2 -126 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 0x05 -127 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020504 -128 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -129 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304 -131 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 -132 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 -133 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 -134 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 -135 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03 -136 pushbytes 0x03 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03, 0x03 -139 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 -140 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -141 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -143 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 -144 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 -145 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 -146 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 -147 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05 -148 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05, 0x05 -149 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 -150 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -151 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -309 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -312 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -314 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1 -315 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1, 0x05 -316 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 -317 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 -319 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, "AARRGH!" -320 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7 -321 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0000000000000007 -322 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007 -325 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" -326 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821 -327 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 -329 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 -330 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 -331 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 -333 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 -334 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 -336 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D -337 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -339 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -340 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 -341 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -343 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 -344 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -346 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -348 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -350 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 -351 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D -353 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -355 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -356 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -357 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 -358 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 -359 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 -361 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 -362 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 -364 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 -365 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 -366 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 -368 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 -369 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 -370 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -371 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -373 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -374 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -375 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -378 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 -379 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 -380 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F -382 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -383 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973 -385 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -386 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -387 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -389 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -391 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -154 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -156 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -158 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -160 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0, 1, 0x01050504, 0x80320006000F000741415252474821000444617973 -162 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0, 1, 0x01050504 -164 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 -166 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0 -167 ! 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -168 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 -169 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 -170 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 -171 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 -172 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 -173 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 -174 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 -175 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 -176 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -177 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 -178 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 -180 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 -181 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 6 -182 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504 -183 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 -185 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 -186 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 -187 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 15, 0x80320006000F000741415252474821000444617973 -189 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 15, 0x80320006000F000741415252474821000444617973, 6 -191 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 -193 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821 -194 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, "AARRGH!" -195 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 7 -196 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0000000000000007 -197 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007 -200 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007, "AARRGH!" -201 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x000741415252474821 -202 == 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 -203 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 -204 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 -206 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -208 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -309 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -312 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -314 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1 -315 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0x05 -316 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 -317 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 -319 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, "AARRGH!" -320 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7 -321 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0000000000000007 -322 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007 -325 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" -326 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821 -327 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 -329 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 -330 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 -331 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 -333 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 -334 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 -336 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D -337 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -339 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -340 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 -341 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -343 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 -344 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -346 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -348 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -350 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 -351 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D -353 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -355 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -356 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -357 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 -358 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 -359 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 -361 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 -362 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 -364 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 -365 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 -366 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 -368 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 -369 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 -370 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -371 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -373 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -374 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -375 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -378 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 -379 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 -380 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F -382 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -383 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 -385 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 -386 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 -387 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 -389 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -391 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -211 popn 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 -213 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 -215 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 -216 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 -217 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 -218 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 -219 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02 -220 pushbytes 0x02 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02, 0x02 -223 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 -224 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 -225 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 -227 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 2 -228 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 6 -229 swap 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504 -230 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973 -232 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973, 4 -233 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 13 -234 uncover 4 0x01020304, 6, 0x01050504, 13, 0x80320006000D00054861707079000444617973 -236 uncover 3 0x01020304, 0x01050504, 13, 0x80320006000D00054861707079000444617973, 6 -238 uncover 2 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13 -240 substring3 0x01020304, 0x01050504, 0x00054861707079 -241 bytec_1 0x01020304, 0x01050504, 0x00054861707079, "Happy" -242 len 0x01020304, 0x01050504, 0x00054861707079, 5 -243 itob 0x01020304, 0x01050504, 0x00054861707079, 0x0000000000000005 -244 extract 6 2 0x01020304, 0x01050504, 0x00054861707079, 0x0005 -247 bytec_1 0x01020304, 0x01050504, 0x00054861707079, 0x0005, "Happy" -248 concat 0x01020304, 0x01050504, 0x00054861707079, 0x00054861707079 -249 == 0x01020304, 0x01050504, 1 -250 assert 0x01020304, 0x01050504 -251 swap 0x01050504, 0x01020304 -252 callsub other_routine_2 0x01050504, 0x01020304 -392 proto 1 2 0x01050504, 0x01020304 -395 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -397 dup 0x01050504, 0x01020304, 0x01020304, 0x01020304 -398 intc_1 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 -399 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A -402 replace3 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -403 dup 0x01050504, 0x01020304, 0x01020304, 0x0A020304, 0x0A020304 -404 frame_bury -1 0x01050504, 0x0A020304, 0x01020304, 0x0A020304 -406 retsub 0x01050504, 0x01020304, 0x0A020304 -255 pop 0x01050504, 0x01020304 -256 dup 0x01050504, 0x01020304, 0x01020304 -257 intc_1 0x01050504, 0x01020304, 0x01020304, 0 -258 intc_0 0x01050504, 0x01020304, 0x01020304, 0, 1 -259 * 0x01050504, 0x01020304, 0x01020304, 0 -260 intc_0 0x01050504, 0x01020304, 0x01020304, 0, 1 -261 extract3 0x01050504, 0x01020304, 0x01 -262 pushbytes 0x01 0x01050504, 0x01020304, 0x01, 0x01 -265 b== 0x01050504, 0x01020304, 1 -266 assert 0x01050504, 0x01020304 -267 callsub other_routine_2 0x01050504, 0x01020304 -392 proto 1 2 0x01050504, 0x01020304 -395 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -397 dup 0x01050504, 0x01020304, 0x01020304, 0x01020304 -398 intc_1 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 -399 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A -402 replace3 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -403 dup 0x01050504, 0x01020304, 0x01020304, 0x0A020304, 0x0A020304 -404 frame_bury -1 0x01050504, 0x0A020304, 0x01020304, 0x0A020304 -406 retsub 0x01050504, 0x01020304, 0x0A020304 -270 bury 1 0x01050504, 0x0A020304 -272 dup 0x01050504, 0x0A020304, 0x0A020304 -273 intc_1 0x01050504, 0x0A020304, 0x0A020304, 0 -274 intc_0 0x01050504, 0x0A020304, 0x0A020304, 0, 1 -275 * 0x01050504, 0x0A020304, 0x0A020304, 0 -276 intc_0 0x01050504, 0x0A020304, 0x0A020304, 0, 1 -277 extract3 0x01050504, 0x0A020304, 0x0A -278 pushbytes 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A -281 b== 0x01050504, 0x0A020304, 1 -282 assert 0x01050504, 0x0A020304 -283 dup2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 -284 swap 0x01050504, 0x0A020304, 0x0A020304, 0x01050504 -285 uncover 2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 -287 swap 0x01050504, 0x0A020304, 0x0A020304, 0x01050504 -288 uncover 2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 -290 uncover 2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -292 callsub other_routine_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -407 proto 3 3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -410 intc_1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0 -411 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 0 -413 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0 -422 intc_0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 1 -423 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 -425 b other_routine_3_for_body@1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 -411 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1 -413 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 -428 intc_2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 2 -429 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -431 b other_routine_3_for_body@1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -411 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2 -413 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -419 b other_routine_3_after_for@5 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -434 frame_dig -3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 0x01050504 -436 intc_1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 0x01050504, 0 -437 bytec 4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 0x01050504, 0, "c" -439 replace3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 0x63050504 -440 frame_bury -3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2 -442 frame_dig -2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 0x0A020304 -444 intc_1 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 0x0A020304, 0 -445 bytec 4 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 0x0A020304, 0, "c" -447 replace3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 0x63020304 -448 frame_bury -2 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2 -450 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 0x0A020304 -452 intc_1 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 0x0A020304, 0 -453 bytec 4 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 0x0A020304, 0, "c" -455 replace3 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 0x63020304 -456 frame_bury -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2 -458 frame_dig -3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2, 0x63050504 -460 frame_dig -2 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2, 0x63050504, 0x63020304 -462 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2, 0x63050504, 0x63020304, 0x63020304 -464 uncover 3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304, 0x63020304, 2 -466 retsub 0x01050504, 0x63050504, 0x63020304, 0x63020304 -295 popn 3 0x01050504 -297 bytec_0 0x01050504, 0x -298 swap 0x, 0x01050504 -299 concat 0x01050504 -300 intc_1 0x01050504, 0 -301 intc_3 0x01050504, 0, 4 -302 extract3 0x01050504 -303 callsub other_routine_2 0x01050504 -392 proto 1 2 0x01050504 -395 frame_dig -1 0x01050504, 0x01050504 -397 dup 0x01050504, 0x01050504, 0x01050504 -398 intc_1 0x01050504, 0x01050504, 0x01050504, 0 -399 pushbytes 0x0a 0x01050504, 0x01050504, 0x01050504, 0, 0x0A -402 replace3 0x01050504, 0x01050504, 0x0A050504 -403 dup 0x01050504, 0x01050504, 0x0A050504, 0x0A050504 -404 frame_bury -1 0x0A050504, 0x01050504, 0x0A050504 -406 retsub 0x01050504, 0x0A050504 -306 popn 2 -308 retsub -36 intc_0 1 -37 return 1 \ No newline at end of file +PC Teal Stack +1 intcblock 1 0 2 4 +7 bytecblock 0x "Happy" 0x05 "AARRGH!" "Days" +31 callsub mutating_copies +36 proto 0 0 +39 bytec_0 0x +40 pushbytes 0x01 0x, 0x01 +43 concat 0x01 +44 pushbytes 0x02 0x01, 0x02 +47 concat 0x0102 +48 pushbytes 0x03 0x0102, 0x03 +51 concat 0x010203 +52 pushbytes 0x04 0x010203, 0x04 +55 concat 0x01020304 +56 bytec_0 0x01020304, 0x +57 swap 0x, 0x01020304 +58 concat 0x01020304 +59 pushbytes 0x00 0x01020304, 0x00 +62 intc_1 0x01020304, 0x00, 0 +63 intc_0 0x01020304, 0x00, 0, 1 +64 setbit 0x01020304, 0x80 +65 bytec_1 0x01020304, 0x80, "Happy" +66 len 0x01020304, 0x80, 5 +67 itob 0x01020304, 0x80, 0x0000000000000005 +68 extract 6 2 0x01020304, 0x80, 0x0005 +71 bytec_1 0x01020304, 0x80, 0x0005, "Happy" +72 concat 0x01020304, 0x80, 0x00054861707079 +73 swap 0x01020304, 0x00054861707079, 0x80 +74 bytec 4 0x01020304, 0x00054861707079, 0x80, "Days" +76 len 0x01020304, 0x00054861707079, 0x80, 4 +77 itob 0x01020304, 0x00054861707079, 0x80, 0x0000000000000004 +78 extract 6 2 0x01020304, 0x00054861707079, 0x80, 0x0004 +81 bytec 4 0x01020304, 0x00054861707079, 0x80, 0x0004, "Days" +83 concat 0x01020304, 0x00054861707079, 0x80, 0x000444617973 +84 cover 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80 +86 bytec_0 0x01020304, 0x000444617973, 0x00054861707079, 0x80, 0x +87 swap 0x01020304, 0x000444617973, 0x00054861707079, 0x, 0x80 +88 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80 +89 pushbytes 0x32 0x01020304, 0x000444617973, 0x00054861707079, 0x80, "2" +92 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x8032 +93 pushint 6 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 6 +95 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0000000000000006 +96 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0006 +99 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006 +100 dig 1 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x00054861707079 +102 len 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7 +103 pushint 6 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7, 6 +105 + 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 13 +106 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000000000000000D +107 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000D +110 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006000D +111 swap 0x01020304, 0x000444617973, 0x80320006000D, 0x00054861707079 +112 concat 0x01020304, 0x000444617973, 0x80320006000D00054861707079 +113 swap 0x01020304, 0x80320006000D00054861707079, 0x000444617973 +114 concat 0x01020304, 0x80320006000D00054861707079000444617973 +115 dig 1 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +117 cover 2 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 +119 dup 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +120 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 +122 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +123 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2 +124 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 0x05 +125 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020504 +126 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +127 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304 +129 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 +130 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 +131 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 +132 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 +133 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03 +134 pushbytes 0x03 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03, 0x03 +137 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 +138 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +139 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +141 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 +142 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 +143 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 +144 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 +145 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05 +146 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05, 0x05 +147 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 +148 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +149 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +531 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +534 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +536 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1 +537 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1, 0x05 +538 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 +539 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 +541 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 1 +542 bz other_routine_after_if_else@2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 +545 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, "AARRGH!" +546 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7 +547 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0000000000000007 +548 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007 +551 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" +552 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821 +553 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 +555 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 +556 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 +557 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 +559 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 +560 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 +562 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D +563 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +565 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +566 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 +567 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +569 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 +570 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +572 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +574 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +576 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 +577 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D +579 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +581 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +582 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +583 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 +584 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 +585 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 +587 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 +588 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 +590 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 +591 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 +592 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 +594 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 +595 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 +596 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +597 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +599 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +600 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +601 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +604 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 +605 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 +606 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F +608 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +609 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973 +611 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +612 bz other_routine_after_if_else@4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973 +615 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +616 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +617 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +619 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +621 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +152 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +154 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +156 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +158 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0, 1, 0x01050504, 0x80320006000F000741415252474821000444617973 +160 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0, 1, 0x01050504 +162 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 +164 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0 +165 ! 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +166 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 +167 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 +168 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 +169 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 +170 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 +171 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 +172 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 +173 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 +174 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +175 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 +176 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 +178 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 +179 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 6 +180 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504 +181 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 +183 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 +184 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 +185 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 15, 0x80320006000F000741415252474821000444617973 +187 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 15, 0x80320006000F000741415252474821000444617973, 6 +189 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 +191 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821 +192 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, "AARRGH!" +193 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 7 +194 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0000000000000007 +195 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007 +198 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007, "AARRGH!" +199 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x000741415252474821 +200 == 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 +201 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 +202 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 +204 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +206 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +531 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +534 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +536 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1 +537 bytec_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0x05 +538 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 +539 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 +541 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 1 +542 bz other_routine_after_if_else@2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 +545 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, "AARRGH!" +546 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7 +547 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0000000000000007 +548 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007 +551 bytec_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" +552 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821 +553 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 +555 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 +556 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 +557 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 +559 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 +560 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 +562 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D +563 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +565 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +566 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 +567 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +569 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 +570 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +572 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +574 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +576 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 +577 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D +579 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +581 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +582 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +583 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 +584 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 +585 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 +587 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 +588 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 +590 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 +591 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 +592 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 +594 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 +595 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 +596 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +597 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +599 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +600 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +601 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +604 swap 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 +605 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 +606 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F +608 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +609 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 +611 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 +612 bz other_routine_after_if_else@4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 +615 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 +616 intc_1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 +617 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 +619 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +621 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +209 popn 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 +211 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 +213 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 +214 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 +215 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 +216 intc_0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 +217 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02 +218 pushbytes 0x02 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02, 0x02 +221 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 +222 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 +223 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 +225 intc_2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 2 +226 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 6 +227 swap 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504 +228 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973 +230 intc_3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973, 4 +231 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 13 +232 uncover 4 0x01020304, 6, 0x01050504, 13, 0x80320006000D00054861707079000444617973 +234 uncover 3 0x01020304, 0x01050504, 13, 0x80320006000D00054861707079000444617973, 6 +236 uncover 2 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13 +238 substring3 0x01020304, 0x01050504, 0x00054861707079 +239 bytec_1 0x01020304, 0x01050504, 0x00054861707079, "Happy" +240 len 0x01020304, 0x01050504, 0x00054861707079, 5 +241 itob 0x01020304, 0x01050504, 0x00054861707079, 0x0000000000000005 +242 extract 6 2 0x01020304, 0x01050504, 0x00054861707079, 0x0005 +245 bytec_1 0x01020304, 0x01050504, 0x00054861707079, 0x0005, "Happy" +246 concat 0x01020304, 0x01050504, 0x00054861707079, 0x00054861707079 +247 == 0x01020304, 0x01050504, 1 +248 assert 0x01020304, 0x01050504 +249 dig 1 0x01020304, 0x01050504, 0x01020304 +251 callsub other_routine_2 0x01020304, 0x01050504, 0x01020304 +622 proto 1 2 0x01020304, 0x01050504, 0x01020304 +625 frame_dig -1 0x01020304, 0x01050504, 0x01020304, 0x01020304 +627 dup 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x01020304 +628 intc_1 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 +629 pushbytes 0x0a 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A +632 replace3 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +633 frame_bury -1 0x01020304, 0x01050504, 0x0A020304, 0x01020304 +635 intc_0 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 1 +636 bz other_routine_2_after_if_else@2 0x01020304, 0x01050504, 0x0A020304, 0x01020304 +639 frame_dig 0 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0x01020304 +641 frame_dig -1 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0x01020304, 0x0A020304 +643 uncover 2 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0x0A020304, 0x01020304 +645 retsub 0x01020304, 0x01050504, 0x01020304, 0x0A020304 +254 pop 0x01020304, 0x01050504, 0x01020304 +255 dup 0x01020304, 0x01050504, 0x01020304, 0x01020304 +256 intc_1 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0 +257 intc_0 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0, 1 +258 * 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0 +259 intc_0 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0, 1 +260 extract3 0x01020304, 0x01050504, 0x01020304, 0x01 +261 pushbytes 0x01 0x01020304, 0x01050504, 0x01020304, 0x01, 0x01 +264 b== 0x01020304, 0x01050504, 0x01020304, 1 +265 assert 0x01020304, 0x01050504, 0x01020304 +266 callsub other_routine_2 0x01020304, 0x01050504, 0x01020304 +622 proto 1 2 0x01020304, 0x01050504, 0x01020304 +625 frame_dig -1 0x01020304, 0x01050504, 0x01020304, 0x01020304 +627 dup 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x01020304 +628 intc_1 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 +629 pushbytes 0x0a 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A +632 replace3 0x01020304, 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +633 frame_bury -1 0x01020304, 0x01050504, 0x0A020304, 0x01020304 +635 intc_0 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 1 +636 bz other_routine_2_after_if_else@2 0x01020304, 0x01050504, 0x0A020304, 0x01020304 +639 frame_dig 0 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0x01020304 +641 frame_dig -1 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0x01020304, 0x0A020304 +643 uncover 2 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0x0A020304, 0x01020304 +645 retsub 0x01020304, 0x01050504, 0x01020304, 0x0A020304 +269 bury 1 0x01020304, 0x01050504, 0x0A020304 +271 dup 0x01020304, 0x01050504, 0x0A020304, 0x0A020304 +272 intc_1 0x01020304, 0x01050504, 0x0A020304, 0x0A020304, 0 +273 intc_0 0x01020304, 0x01050504, 0x0A020304, 0x0A020304, 0, 1 +274 * 0x01020304, 0x01050504, 0x0A020304, 0x0A020304, 0 +275 intc_0 0x01020304, 0x01050504, 0x0A020304, 0x0A020304, 0, 1 +276 extract3 0x01020304, 0x01050504, 0x0A020304, 0x0A +277 pushbytes 0x0a 0x01020304, 0x01050504, 0x0A020304, 0x0A, 0x0A +280 b== 0x01020304, 0x01050504, 0x0A020304, 1 +281 assert 0x01020304, 0x01050504, 0x0A020304 +282 uncover 2 0x01050504, 0x0A020304, 0x01020304 +284 dig 2 0x01050504, 0x0A020304, 0x01020304, 0x01050504 +286 swap 0x01050504, 0x0A020304, 0x01050504, 0x01020304 +287 dig 2 0x01050504, 0x0A020304, 0x01050504, 0x01020304, 0x0A020304 +289 cover 2 0x01050504, 0x0A020304, 0x0A020304, 0x01050504, 0x01020304 +291 dup 0x01050504, 0x0A020304, 0x0A020304, 0x01050504, 0x01020304, 0x01020304 +292 cover 2 0x01050504, 0x0A020304, 0x0A020304, 0x01020304, 0x01050504, 0x01020304 +294 swap 0x01050504, 0x0A020304, 0x0A020304, 0x01020304, 0x01020304, 0x01050504 +295 cover 5 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x01020304, 0x01020304 +297 uncover 2 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01020304, 0x0A020304 +299 cover 5 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01020304 +301 swap 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01020304 +302 cover 5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304 +304 dig 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504 +306 dig 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304 +308 dig 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304 +310 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x0A020304, 0x01020304, 0x01050504 +312 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01020304, 0x01050504, 0x0A020304 +314 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304 +316 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0 +317 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +318 callsub mutate_tuple_items_and_reassign 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +646 proto 5 3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +649 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0 +650 dupn 5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0 +652 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1 +653 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504 +655 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1 +656 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304 +658 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1 +659 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304 +661 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0 +663 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x0000000000000000 +664 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x00 +667 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x00, 0x01050504 +669 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x00, 0x01050504, 0 +670 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x01050504, 0, 0x00 +672 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x00050504 +673 frame_bury -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304 +675 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 1 +676 bz mutate_tuple_items_and_reassign_after_if_else@2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304 +679 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x00050504 +681 frame_bury 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304 +683 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0 +685 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0, 1 +686 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 1 +687 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0x0000000000000001 +688 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0x01 +691 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0x01, 0x0A020304 +693 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0x01, 0x0A020304, 0 +694 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0x0A020304, 0, 0x01 +696 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0x01020304 +697 frame_bury -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304 +699 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 1 +700 bz mutate_tuple_items_and_reassign_after_if_else@4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304 +703 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x0A020304, 1, 0x01020304, 0x01020304 +705 frame_bury 9 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304 +707 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0 +709 intc_2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0, 2 +710 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 2 +711 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0x0000000000000002 +712 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0x02 +715 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0x02, 0x01020304 +717 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0x02, 0x01020304, 0 +718 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0x01020304, 0, 0x02 +720 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0x02020304 +721 frame_bury -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304 +723 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 1 +724 bz mutate_tuple_items_and_reassign_after_if_else@6 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304 +727 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x01020304, 0x02020304 +729 frame_bury 11 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304 +731 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00050504 +733 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00050504, 0 +734 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00050504, 0, 1 +735 * 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00050504, 0 +736 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00050504, 0, 1 +737 extract3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00 +738 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00, 0 +740 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00, 0x0000000000000000 +741 b== 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 1 +742 assert 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304 +743 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01020304 +745 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01020304, 0 +746 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01020304, 0, 1 +747 * 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01020304, 0 +748 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01020304, 0, 1 +749 extract3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01 +750 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01, 0 +752 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01, 0, 1 +753 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01, 1 +754 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x01, 0x0000000000000001 +755 b== 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 1 +756 assert 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304 +757 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02020304 +759 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02020304, 0 +760 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02020304, 0, 1 +761 * 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02020304, 0 +762 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02020304, 0, 1 +763 extract3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02 +764 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02, 0 +766 intc_2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02, 0, 2 +767 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02, 2 +768 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x02, 0x0000000000000002 +769 b== 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 1 +770 assert 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304 +771 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0 +773 pushint 3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0, 3 +775 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 3 +776 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x0000000000000003 +777 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x03 +780 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x03, 0x00050504 +782 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x03, 0x00050504, 1 +783 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00050504, 1, 0x03 +785 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00030504 +786 frame_bury -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304 +788 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 1 +789 bz mutate_tuple_items_and_reassign_after_if_else@8 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304 +792 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00050504, 1, 0x01020304, 1, 0x02020304, 0x00030504 +794 frame_bury 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304 +796 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0 +798 intc_3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0, 4 +799 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 4 +800 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0x0000000000000004 +801 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0x04 +804 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0x04, 0x01020304 +806 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0x04, 0x01020304, 1 +807 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0x01020304, 1, 0x04 +809 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0x01040304 +810 frame_bury -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304 +812 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 1 +813 bz mutate_tuple_items_and_reassign_after_if_else@10 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304 +816 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01020304, 1, 0x02020304, 0x01040304 +818 frame_bury 9 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304 +820 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0 +822 pushint 5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0, 5 +824 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 5 +825 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0x0000000000000005 +826 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0x05 +829 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0x05, 0x02020304 +831 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0x05, 0x02020304, 1 +832 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0x02020304, 1, 0x05 +834 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0x02050304 +835 frame_bury -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304 +837 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 1 +838 bz mutate_tuple_items_and_reassign_after_if_else@12 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304 +841 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02020304, 0x02050304 +843 frame_bury 11 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +845 frame_dig 11 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x02050304 +847 frame_bury 5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +849 frame_dig 9 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x01040304 +851 frame_bury 3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x01040304, 0, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +853 frame_dig 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x01040304, 0, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x00030504 +855 frame_bury 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +857 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x02050304 +859 frame_bury 4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0x00030504, 0, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +861 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0x00030504, 0, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x01040304 +863 frame_bury 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +865 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x00030504 +867 frame_bury 0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +869 frame_dig -1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 1 +871 bz mutate_tuple_items_and_reassign_after_if_else@20 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304 +874 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x00030504 +876 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x00030504, 0x01040304 +878 swap 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x01040304, 0x00030504 +879 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x01040304, 0x00030504, 0x02050304 +881 cover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x02050304, 0x01040304, 0x00030504 +883 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 1, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x02050304, 0x01040304, 0x00030504, 0 +884 frame_bury 6 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x02050304, 0x01040304, 0x00030504 +886 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 1, 0x01040304, 1, 0x02050304, 0x02050304, 0x01040304, 0x00030504, 0 +887 frame_bury 8 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 1, 0x02050304, 0x02050304, 0x01040304, 0x00030504 +889 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 1, 0x02050304, 0x02050304, 0x01040304, 0x00030504, 0 +890 frame_bury 10 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304, 0x01040304, 0x00030504 +892 frame_bury -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304, 0x01040304 +894 frame_bury -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304 +896 frame_bury -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +898 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +899 bz mutate_tuple_items_and_reassign_after_if_else@15 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +906 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +907 bz mutate_tuple_items_and_reassign_after_if_else@17 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +914 intc_1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +915 bz mutate_tuple_items_and_reassign_after_if_else@19 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +922 frame_dig 11 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304 +924 frame_bury 5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +926 frame_dig 9 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01040304 +928 frame_bury 3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +930 frame_dig 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504 +932 frame_bury 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +934 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304 +936 frame_bury 4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +938 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01040304 +940 frame_bury 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +942 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504 +944 frame_bury 0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +946 frame_dig 5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304 +948 frame_bury 11 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +950 frame_dig 3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01040304 +952 frame_bury 9 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +954 frame_dig 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504 +956 frame_bury 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +958 frame_dig 4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304 +960 frame_bury -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +962 frame_dig 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01040304 +964 frame_bury -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +966 frame_dig 0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504 +968 frame_bury -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +970 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +972 pushint 6 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0, 6 +974 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 6 +975 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x0000000000000006 +976 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06 +979 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06, 0x00030504 +981 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06, 0x00030504, 1 +982 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504, 1, 0x06 +984 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00060504 +985 frame_bury -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +987 frame_dig 6 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +989 bz mutate_tuple_items_and_reassign_after_if_else@22 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +996 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +998 pushint 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0, 7 +1000 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 7 +1001 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x0000000000000007 +1002 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07 +1005 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07, 0x01040304 +1007 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07, 0x01040304, 1 +1008 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01040304, 1, 0x07 +1010 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01070304 +1011 frame_bury -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1013 frame_dig 8 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +1015 bz mutate_tuple_items_and_reassign_after_if_else@24 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1022 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +1024 pushint 8 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0, 8 +1026 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 8 +1027 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x0000000000000008 +1028 extract 7 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08 +1031 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08, 0x02050304 +1033 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08, 0x02050304, 1 +1034 uncover 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02050304, 1, 0x08 +1036 replace3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02050304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02080304 +1037 frame_bury -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1039 frame_dig 10 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0 +1041 bz mutate_tuple_items_and_reassign_after_if_else@26 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1048 frame_dig -5 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00060504 +1050 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00060504, 1 +1051 dup 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00060504, 1, 1 +1052 * 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00060504, 1 +1053 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00060504, 1, 1 +1054 extract3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06 +1055 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06, 0 +1057 pushint 6 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06, 0, 6 +1059 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06, 6 +1060 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x06, 0x0000000000000006 +1061 b== 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 1 +1062 assert 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1063 frame_dig -4 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01070304 +1065 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01070304, 1 +1066 dup 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01070304, 1, 1 +1067 * 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01070304, 1 +1068 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x01070304, 1, 1 +1069 extract3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07 +1070 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07, 0 +1072 pushint 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07, 0, 7 +1074 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07, 7 +1075 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x07, 0x0000000000000007 +1076 b== 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 1 +1077 assert 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1078 frame_dig -3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02080304 +1080 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02080304, 1 +1081 dup 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02080304, 1, 1 +1082 * 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02080304, 1 +1083 intc_0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x02080304, 1, 1 +1084 extract3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08 +1085 frame_dig -2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08, 0 +1087 pushint 8 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08, 0, 8 +1089 + 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08, 8 +1090 itob 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x08, 0x0000000000000008 +1091 b== 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 1 +1092 assert 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1093 frame_dig 7 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504 +1095 frame_dig 9 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504, 0x01040304 +1097 frame_dig 11 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x01040304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504, 0x01040304, 0x02050304 +1099 frame_bury 2 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x00030504, 0x02050304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504, 0x01040304 +1101 frame_bury 1 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304, 0x00030504 +1103 frame_bury 0 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00060504, 0x01070304, 0x02080304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x01040304, 0x02050304, 0x02050304, 0, 0x00030504, 0, 0x01040304, 0, 0x02050304 +1105 retsub 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304, 0x00030504, 0x01040304, 0x02050304 +321 popn 3 0x01020304, 0x0A020304, 0x01050504, 0x01050504, 0x0A020304, 0x01020304 +323 uncover 3 0x01020304, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0x01050504 +325 dig 3 0x01020304, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0x01050504, 0x01050504 +327 == 0x01020304, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 1 +328 uncover 4 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 1, 0x0A020304 +330 dig 3 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 1, 0x0A020304, 0x0A020304 +332 == 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 1, 1 +333 && 0x01020304, 0x01050504, 0x0A020304, 0x01020304, 1 +334 uncover 4 0x01050504, 0x0A020304, 0x01020304, 1, 0x01020304 +336 dig 2 0x01050504, 0x0A020304, 0x01020304, 1, 0x01020304, 0x01020304 +338 == 0x01050504, 0x0A020304, 0x01020304, 1, 1 +339 && 0x01050504, 0x0A020304, 0x01020304, 1 +340 assert 0x01050504, 0x0A020304, 0x01020304 +341 uncover 2 0x0A020304, 0x01020304, 0x01050504 +343 uncover 2 0x01020304, 0x01050504, 0x0A020304 +345 uncover 2 0x01050504, 0x0A020304, 0x01020304 +347 pushint 100 0x01050504, 0x0A020304, 0x01020304, 100 +349 intc_0 0x01050504, 0x0A020304, 0x01020304, 100, 1 +350 callsub mutate_tuple_items_and_reassign 0x01050504, 0x0A020304, 0x01020304, 100, 1 +646 proto 5 3 0x01050504, 0x0A020304, 0x01020304, 100, 1 +649 intc_1 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0 +650 dupn 5 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0 +652 intc_0 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1 +653 frame_dig -5 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504 +655 intc_0 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1 +656 frame_dig -4 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304 +658 intc_0 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1 +659 frame_dig -3 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304 +661 frame_dig -2 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 100 +663 itob 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x0000000000000064 +664 extract 7 1 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, "d" +667 frame_dig -5 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, "d", 0x01050504 +669 intc_1 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, "d", 0x01050504, 0 +670 uncover 2 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x01050504, 0, "d" +672 replace3 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x64050504 +673 frame_bury -5 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304 +675 intc_0 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 1 +676 bz mutate_tuple_items_and_reassign_after_if_else@2 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304 +679 frame_dig -5 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x01050504, 1, 0x0A020304, 1, 0x01020304, 0x64050504 +681 frame_bury 7 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304 +683 frame_dig -2 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 100 +685 intc_0 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 100, 1 +686 + 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 101 +687 itob 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 0x0000000000000065 +688 extract 7 1 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, "e" +691 frame_dig -4 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, "e", 0x0A020304 +693 intc_1 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, "e", 0x0A020304, 0 +694 uncover 2 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 0x0A020304, 0, "e" +696 replace3 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 0x65020304 +697 frame_bury -4 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304 +699 intc_0 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 1 +700 bz mutate_tuple_items_and_reassign_after_if_else@4 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304 +703 frame_dig -4 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x0A020304, 1, 0x01020304, 0x65020304 +705 frame_bury 9 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304 +707 frame_dig -2 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 100 +709 intc_2 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 100, 2 +710 + 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 102 +711 itob 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 0x0000000000000066 +712 extract 7 1 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, "f" +715 frame_dig -3 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, "f", 0x01020304 +717 intc_1 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, "f", 0x01020304, 0 +718 uncover 2 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 0x01020304, 0, "f" +720 replace3 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 0x66020304 +721 frame_bury -3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304 +723 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 1 +724 bz mutate_tuple_items_and_reassign_after_if_else@6 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304 +727 frame_dig -3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x01020304, 0x66020304 +729 frame_bury 11 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304 +731 frame_dig -5 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64050504 +733 intc_1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64050504, 0 +734 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64050504, 0, 1 +735 * 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64050504, 0 +736 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64050504, 0, 1 +737 extract3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "d" +738 frame_dig -2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "d", 100 +740 itob 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "d", 0x0000000000000064 +741 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 1 +742 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304 +743 frame_dig -4 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x65020304 +745 intc_1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x65020304, 0 +746 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x65020304, 0, 1 +747 * 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x65020304, 0 +748 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x65020304, 0, 1 +749 extract3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "e" +750 frame_dig -2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "e", 100 +752 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "e", 100, 1 +753 + 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "e", 101 +754 itob 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "e", 0x0000000000000065 +755 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 1 +756 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304 +757 frame_dig -3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x66020304 +759 intc_1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x66020304, 0 +760 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x66020304, 0, 1 +761 * 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x66020304, 0 +762 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x66020304, 0, 1 +763 extract3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "f" +764 frame_dig -2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "f", 100 +766 intc_2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "f", 100, 2 +767 + 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "f", 102 +768 itob 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "f", 0x0000000000000066 +769 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 1 +770 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304 +771 frame_dig -2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 100 +773 pushint 3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 100, 3 +775 + 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 103 +776 itob 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x0000000000000067 +777 extract 7 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "g" +780 frame_dig -5 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "g", 0x64050504 +782 intc_0 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, "g", 0x64050504, 1 +783 uncover 2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64050504, 1, "g" +785 replace3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64670504 +786 frame_bury -5 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304 +788 intc_0 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 1 +789 bz mutate_tuple_items_and_reassign_after_if_else@8 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304 +792 frame_dig -5 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64050504, 1, 0x65020304, 1, 0x66020304, 0x64670504 +794 frame_bury 7 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304 +796 frame_dig -2 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 100 +798 intc_3 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 100, 4 +799 + 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 104 +800 itob 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 0x0000000000000068 +801 extract 7 1 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, "h" +804 frame_dig -4 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, "h", 0x65020304 +806 intc_0 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, "h", 0x65020304, 1 +807 uncover 2 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 0x65020304, 1, "h" +809 replace3 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 0x65680304 +810 frame_bury -4 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304 +812 intc_0 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 1 +813 bz mutate_tuple_items_and_reassign_after_if_else@10 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304 +816 frame_dig -4 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65020304, 1, 0x66020304, 0x65680304 +818 frame_bury 9 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304 +820 frame_dig -2 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 100 +822 pushint 5 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 100, 5 +824 + 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 105 +825 itob 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 0x0000000000000069 +826 extract 7 1 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, "i" +829 frame_dig -3 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, "i", 0x66020304 +831 intc_0 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, "i", 0x66020304, 1 +832 uncover 2 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 0x66020304, 1, "i" +834 replace3 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 0x66690304 +835 frame_bury -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304 +837 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 1 +838 bz mutate_tuple_items_and_reassign_after_if_else@12 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304 +841 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66020304, 0x66690304 +843 frame_bury 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +845 frame_dig 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x66690304 +847 frame_bury 5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +849 frame_dig 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x65680304 +851 frame_bury 3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x65680304, 0, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +853 frame_dig 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x65680304, 0, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x64670504 +855 frame_bury 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +857 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x66690304 +859 frame_bury 4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0x64670504, 0, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +861 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0x64670504, 0, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x65680304 +863 frame_bury 2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +865 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x64670504 +867 frame_bury 0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +869 frame_dig -1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 1 +871 bz mutate_tuple_items_and_reassign_after_if_else@20 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +874 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x64670504 +876 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x64670504, 0x65680304 +878 swap 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x65680304, 0x64670504 +879 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x65680304, 0x64670504, 0x66690304 +881 cover 2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x66690304, 0x65680304, 0x64670504 +883 intc_1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x66690304, 0x65680304, 0x64670504, 0 +884 frame_bury 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x66690304, 0x65680304, 0x64670504 +886 intc_1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x66690304, 0x65680304, 0x64670504, 0 +887 frame_bury 8 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 1, 0x66690304, 0x66690304, 0x65680304, 0x64670504 +889 intc_1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 1, 0x66690304, 0x66690304, 0x65680304, 0x64670504, 0 +890 frame_bury 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304, 0x65680304, 0x64670504 +892 frame_bury -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304, 0x65680304 +894 frame_bury -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304 +896 frame_bury -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +898 intc_1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0 +899 bz mutate_tuple_items_and_reassign_after_if_else@15 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +906 intc_1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0 +907 bz mutate_tuple_items_and_reassign_after_if_else@17 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +914 intc_1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0 +915 bz mutate_tuple_items_and_reassign_after_if_else@19 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +922 frame_dig 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304 +924 frame_bury 5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +926 frame_dig 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x65680304 +928 frame_bury 3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +930 frame_dig 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504 +932 frame_bury 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +934 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304 +936 frame_bury 4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +938 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x65680304 +940 frame_bury 2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +942 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504 +944 frame_bury 0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +946 frame_dig 5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304 +948 frame_bury 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +950 frame_dig 3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x65680304 +952 frame_bury 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +954 frame_dig 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504 +956 frame_bury 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +958 frame_dig 4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304 +960 frame_bury -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +962 frame_dig 2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x65680304 +964 frame_bury -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +966 frame_dig 0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504 +968 frame_bury -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +970 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 100 +972 pushint 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 100, 6 +974 + 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 106 +975 itob 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x000000000000006A +976 extract 7 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j" +979 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j", 0x64670504 +981 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j", 0x64670504, 1 +982 uncover 2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504, 1, "j" +984 replace3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x646A0504 +985 frame_bury -5 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +987 frame_dig 6 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0 +989 bz mutate_tuple_items_and_reassign_after_if_else@22 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +996 frame_dig -2 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 100 +998 pushint 7 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 100, 7 +1000 + 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 107 +1001 itob 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x000000000000006B +1002 extract 7 1 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k" +1005 frame_dig -4 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k", 0x65680304 +1007 intc_0 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k", 0x65680304, 1 +1008 uncover 2 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x65680304, 1, "k" +1010 replace3 0x646A0504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x656B0304 +1011 frame_bury -4 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1013 frame_dig 8 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0 +1015 bz mutate_tuple_items_and_reassign_after_if_else@24 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1022 frame_dig -2 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 100 +1024 pushint 8 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 100, 8 +1026 + 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 108 +1027 itob 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x000000000000006C +1028 extract 7 1 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l" +1031 frame_dig -3 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l", 0x66690304 +1033 intc_0 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l", 0x66690304, 1 +1034 uncover 2 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x66690304, 1, "l" +1036 replace3 0x646A0504, 0x656B0304, 0x66690304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x666C0304 +1037 frame_bury -3 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1039 frame_dig 10 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0 +1041 bz mutate_tuple_items_and_reassign_after_if_else@26 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1048 frame_dig -5 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x646A0504 +1050 intc_0 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x646A0504, 1 +1051 dup 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x646A0504, 1, 1 +1052 * 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x646A0504, 1 +1053 intc_0 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x646A0504, 1, 1 +1054 extract3 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j" +1055 frame_dig -2 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j", 100 +1057 pushint 6 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j", 100, 6 +1059 + 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j", 106 +1060 itob 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "j", 0x000000000000006A +1061 b== 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 1 +1062 assert 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1063 frame_dig -4 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x656B0304 +1065 intc_0 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x656B0304, 1 +1066 dup 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x656B0304, 1, 1 +1067 * 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x656B0304, 1 +1068 intc_0 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x656B0304, 1, 1 +1069 extract3 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k" +1070 frame_dig -2 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k", 100 +1072 pushint 7 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k", 100, 7 +1074 + 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k", 107 +1075 itob 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "k", 0x000000000000006B +1076 b== 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 1 +1077 assert 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1078 frame_dig -3 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x666C0304 +1080 intc_0 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x666C0304, 1 +1081 dup 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x666C0304, 1, 1 +1082 * 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x666C0304, 1 +1083 intc_0 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x666C0304, 1, 1 +1084 extract3 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l" +1085 frame_dig -2 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l", 100 +1087 pushint 8 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l", 100, 8 +1089 + 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l", 108 +1090 itob 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, "l", 0x000000000000006C +1091 b== 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 1 +1092 assert 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1093 frame_dig 7 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504 +1095 frame_dig 9 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504, 0x65680304 +1097 frame_dig 11 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x65680304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504, 0x65680304, 0x66690304 +1099 frame_bury 2 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x64670504, 0x66690304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504, 0x65680304 +1101 frame_bury 1 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304, 0x64670504 +1103 frame_bury 0 0x646A0504, 0x656B0304, 0x666C0304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x65680304, 0x66690304, 0x66690304, 0, 0x64670504, 0, 0x65680304, 0, 0x66690304 +1105 retsub 0x64670504, 0x65680304, 0x66690304 +353 cover 2 0x66690304, 0x64670504, 0x65680304 +355 cover 2 0x65680304, 0x66690304, 0x64670504 +357 cover 2 0x64670504, 0x65680304, 0x66690304 +359 cover 2 0x66690304, 0x64670504, 0x65680304 +361 swap 0x66690304, 0x65680304, 0x64670504 +362 dup 0x66690304, 0x65680304, 0x64670504, 0x64670504 +363 intc_1 0x66690304, 0x65680304, 0x64670504, 0x64670504, 0 +364 intc_0 0x66690304, 0x65680304, 0x64670504, 0x64670504, 0, 1 +365 * 0x66690304, 0x65680304, 0x64670504, 0x64670504, 0 +366 intc_0 0x66690304, 0x65680304, 0x64670504, 0x64670504, 0, 1 +367 extract3 0x66690304, 0x65680304, 0x64670504, "d" +368 pushbytes 0x64 0x66690304, 0x65680304, 0x64670504, "d", "d" +371 b== 0x66690304, 0x65680304, 0x64670504, 1 +372 assert 0x66690304, 0x65680304, 0x64670504 +373 dig 1 0x66690304, 0x65680304, 0x64670504, 0x65680304 +375 intc_1 0x66690304, 0x65680304, 0x64670504, 0x65680304, 0 +376 intc_0 0x66690304, 0x65680304, 0x64670504, 0x65680304, 0, 1 +377 * 0x66690304, 0x65680304, 0x64670504, 0x65680304, 0 +378 intc_0 0x66690304, 0x65680304, 0x64670504, 0x65680304, 0, 1 +379 extract3 0x66690304, 0x65680304, 0x64670504, "e" +380 pushbytes 0x65 0x66690304, 0x65680304, 0x64670504, "e", "e" +383 b== 0x66690304, 0x65680304, 0x64670504, 1 +384 assert 0x66690304, 0x65680304, 0x64670504 +385 dig 2 0x66690304, 0x65680304, 0x64670504, 0x66690304 +387 intc_1 0x66690304, 0x65680304, 0x64670504, 0x66690304, 0 +388 intc_0 0x66690304, 0x65680304, 0x64670504, 0x66690304, 0, 1 +389 * 0x66690304, 0x65680304, 0x64670504, 0x66690304, 0 +390 intc_0 0x66690304, 0x65680304, 0x64670504, 0x66690304, 0, 1 +391 extract3 0x66690304, 0x65680304, 0x64670504, "f" +392 pushbytes 0x66 0x66690304, 0x65680304, 0x64670504, "f", "f" +395 b== 0x66690304, 0x65680304, 0x64670504, 1 +396 assert 0x66690304, 0x65680304, 0x64670504 +397 dup 0x66690304, 0x65680304, 0x64670504, 0x64670504 +398 intc_0 0x66690304, 0x65680304, 0x64670504, 0x64670504, 1 +399 dup 0x66690304, 0x65680304, 0x64670504, 0x64670504, 1, 1 +400 * 0x66690304, 0x65680304, 0x64670504, 0x64670504, 1 +401 intc_0 0x66690304, 0x65680304, 0x64670504, 0x64670504, 1, 1 +402 extract3 0x66690304, 0x65680304, 0x64670504, "g" +403 pushbytes 0x67 0x66690304, 0x65680304, 0x64670504, "g", "g" +406 b== 0x66690304, 0x65680304, 0x64670504, 1 +407 assert 0x66690304, 0x65680304, 0x64670504 +408 dig 1 0x66690304, 0x65680304, 0x64670504, 0x65680304 +410 intc_0 0x66690304, 0x65680304, 0x64670504, 0x65680304, 1 +411 dup 0x66690304, 0x65680304, 0x64670504, 0x65680304, 1, 1 +412 * 0x66690304, 0x65680304, 0x64670504, 0x65680304, 1 +413 intc_0 0x66690304, 0x65680304, 0x64670504, 0x65680304, 1, 1 +414 extract3 0x66690304, 0x65680304, 0x64670504, "h" +415 pushbytes 0x68 0x66690304, 0x65680304, 0x64670504, "h", "h" +418 b== 0x66690304, 0x65680304, 0x64670504, 1 +419 assert 0x66690304, 0x65680304, 0x64670504 +420 dig 2 0x66690304, 0x65680304, 0x64670504, 0x66690304 +422 intc_0 0x66690304, 0x65680304, 0x64670504, 0x66690304, 1 +423 dup 0x66690304, 0x65680304, 0x64670504, 0x66690304, 1, 1 +424 * 0x66690304, 0x65680304, 0x64670504, 0x66690304, 1 +425 intc_0 0x66690304, 0x65680304, 0x64670504, 0x66690304, 1, 1 +426 extract3 0x66690304, 0x65680304, 0x64670504, "i" +427 pushbytes 0x69 0x66690304, 0x65680304, 0x64670504, "i", "i" +430 b== 0x66690304, 0x65680304, 0x64670504, 1 +431 assert 0x66690304, 0x65680304, 0x64670504 +432 swap 0x66690304, 0x64670504, 0x65680304 +433 uncover 2 0x64670504, 0x65680304, 0x66690304 +435 pushint 200 0x64670504, 0x65680304, 0x66690304, 200 +438 intc_1 0x64670504, 0x65680304, 0x66690304, 200, 0 +439 callsub mutate_tuple_items_and_reassign 0x64670504, 0x65680304, 0x66690304, 200, 0 +646 proto 5 3 0x64670504, 0x65680304, 0x66690304, 200, 0 +649 intc_1 0x64670504, 0x65680304, 0x66690304, 200, 0, 0 +650 dupn 5 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0 +652 intc_0 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1 +653 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504 +655 intc_0 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1 +656 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304 +658 intc_0 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1 +659 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +661 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 200 +663 itob 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x00000000000000C8 +664 extract 7 1 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0xC8 +667 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0xC8, 0x64670504 +669 intc_1 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0xC8, 0x64670504, 0 +670 uncover 2 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0x64670504, 0, 0xC8 +672 replace3 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0xC8670504 +673 frame_bury -5 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +675 intc_0 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 1 +676 bz mutate_tuple_items_and_reassign_after_if_else@2 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304 +679 frame_dig -5 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0x64670504, 1, 0x65680304, 1, 0x66690304, 0xC8670504 +681 frame_bury 7 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304 +683 frame_dig -2 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 200 +685 intc_0 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 200, 1 +686 + 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 201 +687 itob 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 0x00000000000000C9 +688 extract 7 1 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 0xC9 +691 frame_dig -4 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 0xC9, 0x65680304 +693 intc_1 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 0xC9, 0x65680304, 0 +694 uncover 2 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 0x65680304, 0, 0xC9 +696 replace3 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 0xC9680304 +697 frame_bury -4 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304 +699 intc_0 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 1 +700 bz mutate_tuple_items_and_reassign_after_if_else@4 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304 +703 frame_dig -4 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0x65680304, 1, 0x66690304, 0xC9680304 +705 frame_bury 9 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304 +707 frame_dig -2 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 200 +709 intc_2 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 200, 2 +710 + 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 202 +711 itob 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 0x00000000000000CA +712 extract 7 1 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 0xCA +715 frame_dig -3 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 0xCA, 0x66690304 +717 intc_1 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 0xCA, 0x66690304, 0 +718 uncover 2 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 0x66690304, 0, 0xCA +720 replace3 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 0xCA690304 +721 frame_bury -3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304 +723 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 1 +724 bz mutate_tuple_items_and_reassign_after_if_else@6 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304 +727 frame_dig -3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0x66690304, 0xCA690304 +729 frame_bury 11 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304 +731 frame_dig -5 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8670504 +733 intc_1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8670504, 0 +734 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8670504, 0, 1 +735 * 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8670504, 0 +736 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8670504, 0, 1 +737 extract3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8 +738 frame_dig -2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8, 200 +740 itob 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8, 0x00000000000000C8 +741 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 1 +742 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304 +743 frame_dig -4 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9680304 +745 intc_1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9680304, 0 +746 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9680304, 0, 1 +747 * 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9680304, 0 +748 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9680304, 0, 1 +749 extract3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9 +750 frame_dig -2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9, 200 +752 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9, 200, 1 +753 + 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9, 201 +754 itob 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC9, 0x00000000000000C9 +755 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 1 +756 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304 +757 frame_dig -3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA690304 +759 intc_1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA690304, 0 +760 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA690304, 0, 1 +761 * 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA690304, 0 +762 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA690304, 0, 1 +763 extract3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA +764 frame_dig -2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA, 200 +766 intc_2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA, 200, 2 +767 + 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA, 202 +768 itob 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCA, 0x00000000000000CA +769 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 1 +770 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304 +771 frame_dig -2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 200 +773 pushint 3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 200, 3 +775 + 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 203 +776 itob 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0x00000000000000CB +777 extract 7 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCB +780 frame_dig -5 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCB, 0xC8670504 +782 intc_0 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xCB, 0xC8670504, 1 +783 uncover 2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8670504, 1, 0xCB +785 replace3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8CB0504 +786 frame_bury -5 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304 +788 intc_0 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 1 +789 bz mutate_tuple_items_and_reassign_after_if_else@8 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304 +792 frame_dig -5 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8670504, 1, 0xC9680304, 1, 0xCA690304, 0xC8CB0504 +794 frame_bury 7 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304 +796 frame_dig -2 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 200 +798 intc_3 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 200, 4 +799 + 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 204 +800 itob 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 0x00000000000000CC +801 extract 7 1 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 0xCC +804 frame_dig -4 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 0xCC, 0xC9680304 +806 intc_0 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 0xCC, 0xC9680304, 1 +807 uncover 2 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 0xC9680304, 1, 0xCC +809 replace3 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 0xC9CC0304 +810 frame_bury -4 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304 +812 intc_0 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 1 +813 bz mutate_tuple_items_and_reassign_after_if_else@10 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304 +816 frame_dig -4 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9680304, 1, 0xCA690304, 0xC9CC0304 +818 frame_bury 9 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304 +820 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 200 +822 pushint 5 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 200, 5 +824 + 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 205 +825 itob 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 0x00000000000000CD +826 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 0xCD +829 frame_dig -3 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 0xCD, 0xCA690304 +831 intc_0 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 0xCD, 0xCA690304, 1 +832 uncover 2 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 0xCA690304, 1, 0xCD +834 replace3 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 0xCACD0304 +835 frame_bury -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304 +837 intc_0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 1 +838 bz mutate_tuple_items_and_reassign_after_if_else@12 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304 +841 frame_dig -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCA690304, 0xCACD0304 +843 frame_bury 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +845 frame_dig 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCACD0304 +847 frame_bury 5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +849 frame_dig 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC9CC0304 +851 frame_bury 3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0xC9CC0304, 0, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +853 frame_dig 7 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0xC9CC0304, 0, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC8CB0504 +855 frame_bury 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0xC8CB0504, 0, 0xC9CC0304, 0, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +857 frame_dig -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0xC8CB0504, 0, 0xC9CC0304, 0, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCACD0304 +859 frame_bury 4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0xC8CB0504, 0, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +861 frame_dig -4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0xC8CB0504, 0, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC9CC0304 +863 frame_bury 2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +865 frame_dig -5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC8CB0504 +867 frame_bury 0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +869 frame_dig -1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0 +871 bz mutate_tuple_items_and_reassign_after_if_else@20 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +946 frame_dig 5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCACD0304 +948 frame_bury 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +950 frame_dig 3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC9CC0304 +952 frame_bury 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +954 frame_dig 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC8CB0504 +956 frame_bury 7 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +958 frame_dig 4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCACD0304 +960 frame_bury -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +962 frame_dig 2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC9CC0304 +964 frame_bury -4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +966 frame_dig 0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC8CB0504 +968 frame_bury -5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +970 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 200 +972 pushint 6 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 200, 6 +974 + 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 206 +975 itob 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0x00000000000000CE +976 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCE +979 frame_dig -5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCE, 0xC8CB0504 +981 intc_0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCE, 0xC8CB0504, 1 +982 uncover 2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC8CB0504, 1, 0xCE +984 replace3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC8CE0504 +985 frame_bury -5 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +987 frame_dig 6 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 1 +989 bz mutate_tuple_items_and_reassign_after_if_else@22 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304 +992 frame_dig -5 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CB0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC8CE0504 +994 frame_bury 7 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304 +996 frame_dig -2 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 200 +998 pushint 7 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 200, 7 +1000 + 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 207 +1001 itob 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0x00000000000000CF +1002 extract 7 1 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCF +1005 frame_dig -4 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCF, 0xC9CC0304 +1007 intc_0 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xCF, 0xC9CC0304, 1 +1008 uncover 2 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC9CC0304, 1, 0xCF +1010 replace3 0xC8CE0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC9CF0304 +1011 frame_bury -4 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304 +1013 frame_dig 8 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 1 +1015 bz mutate_tuple_items_and_reassign_after_if_else@24 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304 +1018 frame_dig -4 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CC0304, 1, 0xCACD0304, 0xC9CF0304 +1020 frame_bury 9 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304 +1022 frame_dig -2 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 200 +1024 pushint 8 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 200, 8 +1026 + 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 208 +1027 itob 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 0x00000000000000D0 +1028 extract 7 1 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 0xD0 +1031 frame_dig -3 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 0xD0, 0xCACD0304 +1033 intc_0 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 0xD0, 0xCACD0304, 1 +1034 uncover 2 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 0xCACD0304, 1, 0xD0 +1036 replace3 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 0xCAD00304 +1037 frame_bury -3 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304 +1039 frame_dig 10 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 1 +1041 bz mutate_tuple_items_and_reassign_after_if_else@26 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304 +1044 frame_dig -3 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCACD0304, 0xCAD00304 +1046 frame_bury 11 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304 +1048 frame_dig -5 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504 +1050 intc_0 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504, 1 +1051 dup 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504, 1, 1 +1052 * 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504, 1 +1053 intc_0 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504, 1, 1 +1054 extract3 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCE +1055 frame_dig -2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCE, 200 +1057 pushint 6 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCE, 200, 6 +1059 + 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCE, 206 +1060 itob 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCE, 0x00000000000000CE +1061 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 1 +1062 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304 +1063 frame_dig -4 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC9CF0304 +1065 intc_0 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC9CF0304, 1 +1066 dup 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC9CF0304, 1, 1 +1067 * 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC9CF0304, 1 +1068 intc_0 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC9CF0304, 1, 1 +1069 extract3 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCF +1070 frame_dig -2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCF, 200 +1072 pushint 7 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCF, 200, 7 +1074 + 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCF, 207 +1075 itob 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCF, 0x00000000000000CF +1076 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 1 +1077 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304 +1078 frame_dig -3 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCAD00304 +1080 intc_0 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCAD00304, 1 +1081 dup 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCAD00304, 1, 1 +1082 * 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCAD00304, 1 +1083 intc_0 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xCAD00304, 1, 1 +1084 extract3 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xD0 +1085 frame_dig -2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xD0, 200 +1087 pushint 8 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xD0, 200, 8 +1089 + 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xD0, 208 +1090 itob 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xD0, 0x00000000000000D0 +1091 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 1 +1092 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304 +1093 frame_dig 7 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504 +1095 frame_dig 9 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504, 0xC9CF0304 +1097 frame_dig 11 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xC9CC0304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +1099 frame_bury 2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC8CB0504, 0xCAD00304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504, 0xC9CF0304 +1101 frame_bury 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CB0504, 0xC9CF0304, 0xCAD00304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304, 0xC8CE0504 +1103 frame_bury 0 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC9CC0304, 0xCACD0304, 0xCACD0304, 1, 0xC8CE0504, 1, 0xC9CF0304, 1, 0xCAD00304 +1105 retsub 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +442 cover 2 0xCAD00304, 0xC8CE0504, 0xC9CF0304 +444 cover 2 0xC9CF0304, 0xCAD00304, 0xC8CE0504 +446 cover 2 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +448 cover 2 0xCAD00304, 0xC8CE0504, 0xC9CF0304 +450 swap 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +451 dup 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504 +452 intc_1 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 0 +453 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 0, 1 +454 * 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 0 +455 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 0, 1 +456 extract3 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8 +457 pushbytes 0xc8 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8, 0xC8 +460 b== 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +461 assert 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +462 dig 1 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304 +464 intc_1 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304, 0 +465 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304, 0, 1 +466 * 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304, 0 +467 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304, 0, 1 +468 extract3 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9 +469 pushbytes 0xc9 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9, 0xC9 +472 b== 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +473 assert 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +474 dig 2 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304 +476 intc_1 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304, 0 +477 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304, 0, 1 +478 * 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304, 0 +479 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304, 0, 1 +480 extract3 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCA +481 pushbytes 0xca 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCA, 0xCA +484 b== 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +485 assert 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +486 dup 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504 +487 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 1 +488 dup 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 1, 1 +489 * 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 1 +490 intc_0 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504, 1, 1 +491 extract3 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCE +492 pushbytes 0xce 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCE, 0xCE +495 b== 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +496 assert 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +497 swap 0xCAD00304, 0xC8CE0504, 0xC9CF0304 +498 intc_0 0xCAD00304, 0xC8CE0504, 0xC9CF0304, 1 +499 dup 0xCAD00304, 0xC8CE0504, 0xC9CF0304, 1, 1 +500 * 0xCAD00304, 0xC8CE0504, 0xC9CF0304, 1 +501 intc_0 0xCAD00304, 0xC8CE0504, 0xC9CF0304, 1, 1 +502 extract3 0xCAD00304, 0xC8CE0504, 0xCF +503 pushbytes 0xcf 0xCAD00304, 0xC8CE0504, 0xCF, 0xCF +506 b== 0xCAD00304, 0xC8CE0504, 1 +507 assert 0xCAD00304, 0xC8CE0504 +508 swap 0xC8CE0504, 0xCAD00304 +509 intc_0 0xC8CE0504, 0xCAD00304, 1 +510 dup 0xC8CE0504, 0xCAD00304, 1, 1 +511 * 0xC8CE0504, 0xCAD00304, 1 +512 intc_0 0xC8CE0504, 0xCAD00304, 1, 1 +513 extract3 0xC8CE0504, 0xD0 +514 pushbytes 0xd0 0xC8CE0504, 0xD0, 0xD0 +517 b== 0xC8CE0504, 1 +518 assert 0xC8CE0504 +519 bytec_0 0xC8CE0504, 0x +520 swap 0x, 0xC8CE0504 +521 concat 0xC8CE0504 +522 intc_1 0xC8CE0504, 0 +523 intc_3 0xC8CE0504, 0, 4 +524 extract3 0xC8CE0504 +525 callsub other_routine_2 0xC8CE0504 +622 proto 1 2 0xC8CE0504 +625 frame_dig -1 0xC8CE0504, 0xC8CE0504 +627 dup 0xC8CE0504, 0xC8CE0504, 0xC8CE0504 +628 intc_1 0xC8CE0504, 0xC8CE0504, 0xC8CE0504, 0 +629 pushbytes 0x0a 0xC8CE0504, 0xC8CE0504, 0xC8CE0504, 0, 0x0A +632 replace3 0xC8CE0504, 0xC8CE0504, 0x0ACE0504 +633 frame_bury -1 0x0ACE0504, 0xC8CE0504 +635 intc_0 0x0ACE0504, 0xC8CE0504, 1 +636 bz other_routine_2_after_if_else@2 0x0ACE0504, 0xC8CE0504 +639 frame_dig 0 0x0ACE0504, 0xC8CE0504, 0xC8CE0504 +641 frame_dig -1 0x0ACE0504, 0xC8CE0504, 0xC8CE0504, 0x0ACE0504 +643 uncover 2 0x0ACE0504, 0xC8CE0504, 0x0ACE0504, 0xC8CE0504 +645 retsub 0xC8CE0504, 0x0ACE0504 +528 popn 2 +530 retsub +34 intc_0 1 +35 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/mutable_params.O1.log b/test_cases/arc4_types/out/mutable_params.O1.log index de953cd79e..45bd537877 100644 --- a/test_cases/arc4_types/out/mutable_params.O1.log +++ b/test_cases/arc4_types/out/mutable_params.O1.log @@ -1,201 +1,693 @@ -PC Teal Stack -1 intcblock 1 2 4 0 -7 bytecblock 0x05 0x01020304 0x63 0x80320006000d00054861707079000444617973 0x000741415252474821 -48 callsub mutating_copies -53 proto 0 0 -56 bytec_1 0x01020304 -57 bytec_0 0x01020304, 0x05 -58 replace2 2 0x01020504 -60 dup 0x01020504, 0x01020504 -61 extract 2 1 0x01020504, 0x05 -64 bytec_0 0x01020504, 0x05, 0x05 -65 b== 0x01020504, 1 -66 assert 0x01020504 -67 bytec_3 0x01020504, 0x80320006000D00054861707079000444617973 -68 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 -150 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 -153 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -155 bytec_0 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 -156 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 -158 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 -160 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -162 intc_1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -163 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 -164 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -166 intc_3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -167 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -169 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -170 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -172 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -173 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -174 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -176 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -177 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -179 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -181 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -183 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -184 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -186 bytec 4 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -188 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -189 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -190 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -191 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -192 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -194 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -195 dig 1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 -197 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 -198 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 -199 pushint 9 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 -201 + 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 -202 swap 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -203 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -204 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -205 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -208 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -210 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 -212 intc_0 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -213 intc_3 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -214 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -216 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -218 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -71 uncover 3 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -73 assert 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -74 uncover 2 0x01050504, 0x80320006000F000741415252474821000444617973, 0 -76 ! 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -77 assert 0x01050504, 0x80320006000F000741415252474821000444617973 -78 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x01050504 -80 extract 1 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05 -83 bytec_0 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05, 0x05 -84 b== 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -85 assert 0x01050504, 0x80320006000F000741415252474821000444617973 -86 dup 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973 -87 intc_1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973, 2 -88 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6 -89 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973 -91 intc_2 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973, 4 -92 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 -93 substring3 0x01050504, 0x000741415252474821 -94 bytec 4 0x01050504, 0x000741415252474821, 0x000741415252474821 -96 == 0x01050504, 1 -97 assert 0x01050504 -98 bytec_1 0x01050504, 0x01020304 -99 bytec_3 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -100 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -150 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -153 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -155 bytec_0 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 -156 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 -158 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 -160 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -162 intc_1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -163 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 -164 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -166 intc_3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -167 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -169 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -170 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -172 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -173 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -174 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -176 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -177 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -179 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -181 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -183 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -184 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -186 bytec 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -188 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -189 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -190 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -191 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -192 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -194 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -195 dig 1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 -197 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 -198 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 -199 pushint 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 -201 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 -202 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -203 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -204 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -205 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -208 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -210 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 -212 intc_0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 -213 intc_3 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 -214 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 -216 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -218 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -103 popn 4 0x01050504 -105 bytec_1 0x01050504, 0x01020304 -106 callsub other_routine_2 0x01050504, 0x01020304 -219 proto 1 2 0x01050504, 0x01020304 -222 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -224 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -227 replace2 0 0x01050504, 0x01020304, 0x0A020304 -229 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -231 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -232 retsub 0x01050504, 0x01020304, 0x0A020304 -109 pop 0x01050504, 0x01020304 -110 dup 0x01050504, 0x01020304, 0x01020304 -111 extract 0 1 0x01050504, 0x01020304, 0x01 -114 pushbytes 0x01 0x01050504, 0x01020304, 0x01, 0x01 -117 b== 0x01050504, 0x01020304, 1 -118 assert 0x01050504, 0x01020304 -119 callsub other_routine_2 0x01050504, 0x01020304 -219 proto 1 2 0x01050504, 0x01020304 -222 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -224 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -227 replace2 0 0x01050504, 0x01020304, 0x0A020304 -229 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -231 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -232 retsub 0x01050504, 0x01020304, 0x0A020304 -122 bury 1 0x01050504, 0x0A020304 -124 dup 0x01050504, 0x0A020304, 0x0A020304 -125 extract 0 1 0x01050504, 0x0A020304, 0x0A -128 pushbytes 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A -131 b== 0x01050504, 0x0A020304, 1 -132 assert 0x01050504, 0x0A020304 -133 dup2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 -134 uncover 2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -136 callsub other_routine_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -233 proto 3 3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -236 intc_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0 -237 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -246 intc_0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 -247 b other_routine_3_for_body@1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 -237 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -250 intc_1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -251 b other_routine_3_for_body@1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -237 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -243 b other_routine_3_after_for@5 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -254 frame_dig -3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x01050504 -256 bytec_2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x01050504, "c" -257 replace2 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x63050504 -259 frame_bury -3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304 -261 frame_dig -2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 0x0A020304 -263 bytec_2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 0x0A020304, "c" -264 replace2 0 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 0x63020304 -266 frame_bury -2 0x01050504, 0x63050504, 0x63020304, 0x0A020304 -268 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 0x0A020304 -270 bytec_2 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 0x0A020304, "c" -271 replace2 0 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 0x63020304 -273 frame_bury -1 0x01050504, 0x63050504, 0x63020304, 0x63020304 -275 frame_dig -3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504 -277 frame_dig -2 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304 -279 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304, 0x63020304 -281 retsub 0x01050504, 0x63050504, 0x63020304, 0x63020304 -139 popn 3 0x01050504 -141 extract 0 4 0x01050504 -144 callsub other_routine_2 0x01050504 -219 proto 1 2 0x01050504 -222 frame_dig -1 0x01050504, 0x01050504 -224 pushbytes 0x0a 0x01050504, 0x01050504, 0x0A -227 replace2 0 0x01050504, 0x0A050504 -229 frame_dig -1 0x01050504, 0x0A050504, 0x01050504 -231 swap 0x01050504, 0x01050504, 0x0A050504 -232 retsub 0x01050504, 0x0A050504 -147 popn 2 -149 retsub -51 intc_0 1 -52 return 1 \ No newline at end of file +PC Teal Stack +1 intcblock 0 1 4 2 +7 bytecblock 0x01020304 0x05 0x80320006000d00054861707079000444617973 0x000741415252474821 +46 callsub mutating_copies +51 proto 0 0 +54 bytec_0 0x01020304 +55 bytec_1 0x01020304, 0x05 +56 replace2 2 0x01020504 +58 dup 0x01020504, 0x01020504 +59 extract 2 1 0x01020504, 0x05 +62 bytec_1 0x01020504, 0x05, 0x05 +63 b== 0x01020504, 1 +64 assert 0x01020504 +65 bytec_2 0x01020504, 0x80320006000D00054861707079000444617973 +66 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 +276 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 +279 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +281 bytec_1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 +282 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 +284 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 +286 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +288 intc_3 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +289 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 +290 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +292 intc_0 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +293 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +295 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +296 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +298 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +299 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +300 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +302 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +303 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +305 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +307 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +309 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +310 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +312 bytec_3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +313 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +314 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +315 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +316 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +317 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +319 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +320 dig 1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 +322 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 +323 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 +324 pushint 9 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 +326 + 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 +327 swap 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +328 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +329 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +330 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +333 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +335 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 +337 intc_1 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +338 intc_0 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +339 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +341 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +343 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +69 uncover 3 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +71 assert 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +72 uncover 2 0x01050504, 0x80320006000F000741415252474821000444617973, 0 +74 ! 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +75 assert 0x01050504, 0x80320006000F000741415252474821000444617973 +76 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x01050504 +78 extract 1 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05 +81 bytec_1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05, 0x05 +82 b== 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +83 assert 0x01050504, 0x80320006000F000741415252474821000444617973 +84 dup 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973 +85 intc_3 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973, 2 +86 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6 +87 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973 +89 intc_2 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973, 4 +90 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 +91 substring3 0x01050504, 0x000741415252474821 +92 bytec_3 0x01050504, 0x000741415252474821, 0x000741415252474821 +93 == 0x01050504, 1 +94 assert 0x01050504 +95 bytec_0 0x01050504, 0x01020304 +96 bytec_2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +97 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +276 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +279 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +281 bytec_1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 +282 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 +284 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 +286 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +288 intc_3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +289 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 +290 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +292 intc_0 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +293 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +295 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +296 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +298 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +299 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +300 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +302 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +303 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +305 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +307 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +309 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +310 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +312 bytec_3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +313 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +314 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +315 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +316 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +317 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +319 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +320 dig 1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 +322 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 +323 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 +324 pushint 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 +326 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 +327 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +328 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +329 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +330 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +333 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +335 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 +337 intc_1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 +338 intc_0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 +339 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 +341 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +343 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +100 popn 4 0x01050504 +102 bytec_0 0x01050504, 0x01020304 +103 callsub other_routine_2 0x01050504, 0x01020304 +344 proto 1 2 0x01050504, 0x01020304 +347 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +349 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +352 replace2 0 0x01050504, 0x01020304, 0x0A020304 +354 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +356 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +357 retsub 0x01050504, 0x01020304, 0x0A020304 +106 pop 0x01050504, 0x01020304 +107 dup 0x01050504, 0x01020304, 0x01020304 +108 extract 0 1 0x01050504, 0x01020304, 0x01 +111 pushbytes 0x01 0x01050504, 0x01020304, 0x01, 0x01 +114 b== 0x01050504, 0x01020304, 1 +115 assert 0x01050504, 0x01020304 +116 callsub other_routine_2 0x01050504, 0x01020304 +344 proto 1 2 0x01050504, 0x01020304 +347 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +349 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +352 replace2 0 0x01050504, 0x01020304, 0x0A020304 +354 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +356 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +357 retsub 0x01050504, 0x01020304, 0x0A020304 +119 bury 1 0x01050504, 0x0A020304 +121 dup 0x01050504, 0x0A020304, 0x0A020304 +122 extract 0 1 0x01050504, 0x0A020304, 0x0A +125 pushbytes 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A +128 b== 0x01050504, 0x0A020304, 1 +129 assert 0x01050504, 0x0A020304 +130 dup2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 +131 bytec_0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304 +132 intc_0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0 +133 intc_1 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +134 callsub mutate_tuple_items_and_reassign 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +358 proto 5 3 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +361 intc_0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0 +362 dupn 5 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0 +364 intc_1 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1 +365 dupn 2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +367 frame_dig -2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +369 itob 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000 +370 dup 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000000 +371 extract 7 1 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x00 +374 frame_dig -5 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x00, 0x01050504 +376 swap 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x01050504, 0x00 +377 replace2 0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x00050504 +379 frame_bury -5 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000 +381 frame_dig -2 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0 +383 intc_1 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0, 1 +384 + 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 1 +385 itob 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001 +386 dup 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000001 +387 extract 7 1 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x01 +390 frame_dig -4 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x01, 0x0A020304 +392 swap 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0A020304, 0x01 +393 replace2 0 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x01020304 +395 frame_bury -4 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001 +397 frame_dig -2 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0 +399 intc_3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0, 2 +400 + 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 2 +401 itob 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002 +402 dup 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x0000000000000002 +403 extract 7 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x02 +406 frame_dig -3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x02, 0x01020304 +408 swap 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x01020304, 0x02 +409 replace2 0 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x02020304 +411 frame_bury -3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002 +413 frame_dig -5 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x00050504 +415 extract 0 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x00 +418 uncover 3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 0x00, 0x0000000000000000 +420 b== 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 1 +421 assert 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002 +422 frame_dig -4 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 0x01020304 +424 extract 0 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 0x01 +427 uncover 2 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 0x01, 0x0000000000000001 +429 b== 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 1 +430 assert 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002 +431 frame_dig -3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 0x02020304 +433 extract 0 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 0x02 +436 b== 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 +437 assert 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +438 frame_dig -2 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +440 pushint 3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 3 +442 + 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3 +443 itob 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000003 +444 extract 7 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x03 +447 frame_dig -5 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x03, 0x00050504 +449 swap 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00050504, 0x03 +450 replace2 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00030504 +452 frame_bury -5 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +454 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +456 intc_2 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 4 +457 + 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 4 +458 itob 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000004 +459 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x04 +462 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x04, 0x01020304 +464 swap 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x01020304, 0x04 +465 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x01040304 +467 frame_bury -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +469 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +471 pushint 5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 5 +473 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 5 +474 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000005 +475 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x05 +478 frame_dig -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x05, 0x02020304 +480 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02020304, 0x05 +481 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304 +483 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x02050304 +484 frame_bury -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304 +486 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304 +488 frame_dig -5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504 +490 frame_dig -1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504, 1 +492 bz mutate_tuple_items_and_reassign_after_if_else@20 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504 +495 intc_0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504, 0 +496 frame_bury 6 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x02050304, 0x01040304, 0x00030504 +498 intc_0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x02050304, 0x01040304, 0x00030504, 0 +499 frame_bury 7 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x02050304, 0x01040304, 0x00030504 +501 intc_0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x02050304, 0x01040304, 0x00030504, 0 +502 frame_bury 8 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +504 frame_dig -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x02050304 +506 frame_bury 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +508 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x01040304 +510 frame_bury 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +512 frame_dig -5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x00030504 +514 frame_bury 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +516 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0 +518 pushint 6 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0, 6 +520 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 6 +521 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x0000000000000006 +522 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x0000000000000006, 0x0000000000000006 +523 frame_bury 3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x0000000000000006 +525 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x06 +528 frame_dig 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x06, 0x00030504 +530 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x00030504, 0x06 +531 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x00060504 +533 frame_bury 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504 +535 frame_dig -5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x00030504 +537 frame_bury 0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504 +539 frame_dig 6 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0 +541 bz mutate_tuple_items_and_reassign_after_if_else@22 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504 +548 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0 +550 pushint 7 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0, 7 +552 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 7 +553 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x0000000000000007 +554 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x0000000000000007, 0x0000000000000007 +555 frame_bury 4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x0000000000000007 +557 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x07 +560 frame_dig 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x07, 0x01040304 +562 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x01040304, 0x07 +563 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x01070304 +565 frame_bury 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504 +567 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x01040304 +569 frame_bury 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504 +571 frame_dig 7 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0 +573 bz mutate_tuple_items_and_reassign_after_if_else@24 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504 +580 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0 +582 pushint 8 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0, 8 +584 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 8 +585 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x0000000000000008 +586 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x0000000000000008, 0x0000000000000008 +587 frame_bury 5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x0000000000000008 +589 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x08 +592 frame_dig 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x08, 0x02050304 +594 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x02050304, 0x08 +595 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x02080304 +597 frame_bury 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +599 frame_dig -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x02050304 +601 frame_bury 2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +603 frame_dig 8 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0 +605 bz mutate_tuple_items_and_reassign_after_if_else@26 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +612 frame_dig 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x00060504 +614 extract 1 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x06 +617 frame_dig 3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x06, 0x0000000000000006 +619 b== 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 1 +620 assert 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +621 frame_dig 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x01070304 +623 extract 1 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x07 +626 frame_dig 4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x07, 0x0000000000000007 +628 b== 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 1 +629 assert 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +630 frame_dig 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x02080304 +632 extract 1 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x08 +635 frame_dig 5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x08, 0x0000000000000008 +637 b== 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 1 +638 assert 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +639 retsub 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304 +137 popn 3 0x01050504, 0x0A020304 +139 bytec_0 0x01050504, 0x0A020304, 0x01020304 +140 pushint 100 0x01050504, 0x0A020304, 0x01020304, 100 +142 intc_1 0x01050504, 0x0A020304, 0x01020304, 100, 1 +143 callsub mutate_tuple_items_and_reassign 0x01050504, 0x0A020304, 0x01020304, 100, 1 +358 proto 5 3 0x01050504, 0x0A020304, 0x01020304, 100, 1 +361 intc_0 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0 +362 dupn 5 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0 +364 intc_1 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1 +365 dupn 2 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +367 frame_dig -2 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +369 itob 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064 +370 dup 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000064 +371 extract 7 1 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, "d" +374 frame_dig -5 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, "d", 0x01050504 +376 swap 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x01050504, "d" +377 replace2 0 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x64050504 +379 frame_bury -5 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064 +381 frame_dig -2 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 100 +383 intc_1 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 100, 1 +384 + 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 101 +385 itob 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065 +386 dup 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000065 +387 extract 7 1 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, "e" +390 frame_dig -4 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, "e", 0x0A020304 +392 swap 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0A020304, "e" +393 replace2 0 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x65020304 +395 frame_bury -4 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065 +397 frame_dig -2 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 100 +399 intc_3 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 100, 2 +400 + 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 102 +401 itob 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066 +402 dup 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x0000000000000066 +403 extract 7 1 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, "f" +406 frame_dig -3 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, "f", 0x01020304 +408 swap 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x01020304, "f" +409 replace2 0 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x66020304 +411 frame_bury -3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066 +413 frame_dig -5 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x64050504 +415 extract 0 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, "d" +418 uncover 3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, "d", 0x0000000000000064 +420 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, 1 +421 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066 +422 frame_dig -4 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, 0x65020304 +424 extract 0 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, "e" +427 uncover 2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, "e", 0x0000000000000065 +429 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, 1 +430 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066 +431 frame_dig -3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, 0x66020304 +433 extract 0 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, "f" +436 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 +437 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +438 frame_dig -2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +440 pushint 3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100, 3 +442 + 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 103 +443 itob 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000067 +444 extract 7 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "g" +447 frame_dig -5 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "g", 0x64050504 +449 swap 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x64050504, "g" +450 replace2 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x64670504 +452 frame_bury -5 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +454 frame_dig -2 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +456 intc_2 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100, 4 +457 + 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 104 +458 itob 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000068 +459 extract 7 1 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "h" +462 frame_dig -4 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "h", 0x65020304 +464 swap 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x65020304, "h" +465 replace2 1 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x65680304 +467 frame_bury -4 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +469 frame_dig -2 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +471 pushint 5 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100, 5 +473 + 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 105 +474 itob 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000069 +475 extract 7 1 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "i" +478 frame_dig -3 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "i", 0x66020304 +480 swap 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66020304, "i" +481 replace2 1 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304 +483 dup 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x66690304 +484 frame_bury -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304 +486 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304 +488 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504 +490 frame_dig -1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504, 1 +492 bz mutate_tuple_items_and_reassign_after_if_else@20 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504 +495 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504, 0 +496 frame_bury 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x66690304, 0x65680304, 0x64670504 +498 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x66690304, 0x65680304, 0x64670504, 0 +499 frame_bury 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x66690304, 0x65680304, 0x64670504 +501 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x66690304, 0x65680304, 0x64670504, 0 +502 frame_bury 8 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +504 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x66690304 +506 frame_bury 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +508 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x65680304 +510 frame_bury 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +512 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x64670504 +514 frame_bury 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +516 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 100 +518 pushint 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 100, 6 +520 + 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 106 +521 itob 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x000000000000006A +522 dup 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x000000000000006A, 0x000000000000006A +523 frame_bury 3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x000000000000006A +525 extract 7 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, "j" +528 frame_dig 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, "j", 0x64670504 +530 swap 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x64670504, "j" +531 replace2 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x646A0504 +533 frame_bury 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504 +535 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x64670504 +537 frame_bury 0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504 +539 frame_dig 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0 +541 bz mutate_tuple_items_and_reassign_after_if_else@22 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504 +548 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 100 +550 pushint 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 100, 7 +552 + 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 107 +553 itob 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x000000000000006B +554 dup 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x000000000000006B, 0x000000000000006B +555 frame_bury 4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x000000000000006B +557 extract 7 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, "k" +560 frame_dig 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, "k", 0x65680304 +562 swap 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x65680304, "k" +563 replace2 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x656B0304 +565 frame_bury 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504 +567 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x65680304 +569 frame_bury 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504 +571 frame_dig 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0 +573 bz mutate_tuple_items_and_reassign_after_if_else@24 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504 +580 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 100 +582 pushint 8 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 100, 8 +584 + 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 108 +585 itob 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x000000000000006C +586 dup 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x000000000000006C, 0x000000000000006C +587 frame_bury 5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x000000000000006C +589 extract 7 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, "l" +592 frame_dig 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, "l", 0x66690304 +594 swap 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x66690304, "l" +595 replace2 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x666C0304 +597 frame_bury 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +599 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x66690304 +601 frame_bury 2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +603 frame_dig 8 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0 +605 bz mutate_tuple_items_and_reassign_after_if_else@26 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +612 frame_dig 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x646A0504 +614 extract 1 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "j" +617 frame_dig 3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "j", 0x000000000000006A +619 b== 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 1 +620 assert 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +621 frame_dig 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x656B0304 +623 extract 1 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "k" +626 frame_dig 4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "k", 0x000000000000006B +628 b== 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 1 +629 assert 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +630 frame_dig 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x666C0304 +632 extract 1 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "l" +635 frame_dig 5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "l", 0x000000000000006C +637 b== 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 1 +638 assert 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +639 retsub 0x64670504, 0x65680304, 0x66690304 +146 dig 2 0x64670504, 0x65680304, 0x66690304, 0x64670504 +148 extract 0 1 0x64670504, 0x65680304, 0x66690304, "d" +151 pushbytes 0x64 0x64670504, 0x65680304, 0x66690304, "d", "d" +154 b== 0x64670504, 0x65680304, 0x66690304, 1 +155 assert 0x64670504, 0x65680304, 0x66690304 +156 dig 1 0x64670504, 0x65680304, 0x66690304, 0x65680304 +158 extract 0 1 0x64670504, 0x65680304, 0x66690304, "e" +161 pushbytes 0x65 0x64670504, 0x65680304, 0x66690304, "e", "e" +164 b== 0x64670504, 0x65680304, 0x66690304, 1 +165 assert 0x64670504, 0x65680304, 0x66690304 +166 dup 0x64670504, 0x65680304, 0x66690304, 0x66690304 +167 extract 0 1 0x64670504, 0x65680304, 0x66690304, "f" +170 pushbytes 0x66 0x64670504, 0x65680304, 0x66690304, "f", "f" +173 b== 0x64670504, 0x65680304, 0x66690304, 1 +174 assert 0x64670504, 0x65680304, 0x66690304 +175 dig 2 0x64670504, 0x65680304, 0x66690304, 0x64670504 +177 extract 1 1 0x64670504, 0x65680304, 0x66690304, "g" +180 pushbytes 0x67 0x64670504, 0x65680304, 0x66690304, "g", "g" +183 b== 0x64670504, 0x65680304, 0x66690304, 1 +184 assert 0x64670504, 0x65680304, 0x66690304 +185 dig 1 0x64670504, 0x65680304, 0x66690304, 0x65680304 +187 extract 1 1 0x64670504, 0x65680304, 0x66690304, "h" +190 pushbytes 0x68 0x64670504, 0x65680304, 0x66690304, "h", "h" +193 b== 0x64670504, 0x65680304, 0x66690304, 1 +194 assert 0x64670504, 0x65680304, 0x66690304 +195 dup 0x64670504, 0x65680304, 0x66690304, 0x66690304 +196 extract 1 1 0x64670504, 0x65680304, 0x66690304, "i" +199 pushbytes 0x69 0x64670504, 0x65680304, 0x66690304, "i", "i" +202 b== 0x64670504, 0x65680304, 0x66690304, 1 +203 assert 0x64670504, 0x65680304, 0x66690304 +204 pushint 200 0x64670504, 0x65680304, 0x66690304, 200 +207 intc_0 0x64670504, 0x65680304, 0x66690304, 200, 0 +208 callsub mutate_tuple_items_and_reassign 0x64670504, 0x65680304, 0x66690304, 200, 0 +358 proto 5 3 0x64670504, 0x65680304, 0x66690304, 200, 0 +361 intc_0 0x64670504, 0x65680304, 0x66690304, 200, 0, 0 +362 dupn 5 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0 +364 intc_1 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1 +365 dupn 2 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +367 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +369 itob 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8 +370 dup 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C8 +371 extract 7 1 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0xC8 +374 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0xC8, 0x64670504 +376 swap 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x64670504, 0xC8 +377 replace2 0 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0xC8670504 +379 frame_bury -5 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8 +381 frame_dig -2 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 200 +383 intc_1 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 200, 1 +384 + 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 201 +385 itob 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9 +386 dup 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000C9 +387 extract 7 1 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0xC9 +390 frame_dig -4 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0xC9, 0x65680304 +392 swap 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x65680304, 0xC9 +393 replace2 0 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0xC9680304 +395 frame_bury -4 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9 +397 frame_dig -2 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 200 +399 intc_3 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 200, 2 +400 + 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 202 +401 itob 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA +402 dup 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0x00000000000000CA +403 extract 7 1 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xCA +406 frame_dig -3 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xCA, 0x66690304 +408 swap 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0x66690304, 0xCA +409 replace2 0 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xCA690304 +411 frame_bury -3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA +413 frame_dig -5 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xC8670504 +415 extract 0 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xC8 +418 uncover 3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 0xC8, 0x00000000000000C8 +420 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 1 +421 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA +422 frame_dig -4 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 0xC9680304 +424 extract 0 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 0xC9 +427 uncover 2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 0xC9, 0x00000000000000C9 +429 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 1 +430 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA +431 frame_dig -3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 0xCA690304 +433 extract 0 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 0xCA +436 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 +437 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +438 frame_dig -2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +440 pushint 3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200, 3 +442 + 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 203 +443 itob 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CB +444 extract 7 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCB +447 frame_dig -5 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCB, 0xC8670504 +449 swap 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC8670504, 0xCB +450 replace2 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC8CB0504 +452 frame_bury -5 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +454 frame_dig -2 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +456 intc_2 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200, 4 +457 + 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 204 +458 itob 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CC +459 extract 7 1 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCC +462 frame_dig -4 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCC, 0xC9680304 +464 swap 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC9680304, 0xCC +465 replace2 1 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC9CC0304 +467 frame_bury -4 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +469 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +471 pushint 5 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200, 5 +473 + 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 205 +474 itob 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CD +475 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCD +478 frame_dig -3 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCD, 0xCA690304 +480 swap 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCA690304, 0xCD +481 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304 +483 dup 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xCACD0304 +484 frame_bury -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304 +486 frame_dig -4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304 +488 frame_dig -5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504 +490 frame_dig -1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0 +492 bz mutate_tuple_items_and_reassign_after_if_else@20 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504 +516 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 200 +518 pushint 6 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 200, 6 +520 + 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 206 +521 itob 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0x00000000000000CE +522 dup 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0x00000000000000CE, 0x00000000000000CE +523 frame_bury 3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0x00000000000000CE +525 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xCE +528 frame_dig 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xCE, 0xC8CB0504 +530 swap 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xC8CB0504, 0xCE +531 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xC8CE0504 +533 frame_bury 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +535 frame_dig -5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC8CB0504 +537 frame_bury 0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +539 frame_dig 6 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 1 +541 bz mutate_tuple_items_and_reassign_after_if_else@22 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +544 frame_dig 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC8CE0504 +546 frame_bury 0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +548 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 200 +550 pushint 7 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 200, 7 +552 + 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 207 +553 itob 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0x00000000000000CF +554 dup 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0x00000000000000CF, 0x00000000000000CF +555 frame_bury 4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0x00000000000000CF +557 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xCF +560 frame_dig 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xCF, 0xC9CC0304 +562 swap 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC9CC0304, 0xCF +563 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC9CF0304 +565 frame_bury 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +567 frame_dig -4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xC9CC0304 +569 frame_bury 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +571 frame_dig 7 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 1 +573 bz mutate_tuple_items_and_reassign_after_if_else@24 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +576 frame_dig 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304 +578 frame_bury 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +580 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 200 +582 pushint 8 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 200, 8 +584 + 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 208 +585 itob 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0x00000000000000D0 +586 dup 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0x00000000000000D0, 0x00000000000000D0 +587 frame_bury 5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0x00000000000000D0 +589 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xD0 +592 frame_dig 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xD0, 0xCACD0304 +594 swap 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xCACD0304, 0xD0 +595 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304 +597 frame_bury 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +599 frame_dig -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCACD0304 +601 frame_bury 2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +603 frame_dig 8 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +605 bz mutate_tuple_items_and_reassign_after_if_else@26 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +608 frame_dig 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304 +610 frame_bury 2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +612 frame_dig 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504 +614 extract 1 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCE +617 frame_dig 3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCE, 0x00000000000000CE +619 b== 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +620 assert 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +621 frame_dig 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304 +623 extract 1 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCF +626 frame_dig 4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCF, 0x00000000000000CF +628 b== 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +629 assert 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +630 frame_dig 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304 +632 extract 1 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xD0 +635 frame_dig 5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xD0, 0x00000000000000D0 +637 b== 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +638 assert 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +639 retsub 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +211 dig 2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8CE0504 +213 extract 0 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8 +216 pushbytes 0xc8 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8, 0xC8 +219 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +220 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +221 dig 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC9CF0304 +223 extract 0 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC9 +226 pushbytes 0xc9 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC9, 0xC9 +229 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +230 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +231 dup 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCAD00304 +232 extract 0 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCA +235 pushbytes 0xca 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCA, 0xCA +238 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +239 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +240 dig 2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8CE0504 +242 extract 1 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCE +245 pushbytes 0xce 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCE, 0xCE +248 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +249 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +250 swap 0xC8CE0504, 0xCAD00304, 0xC9CF0304 +251 extract 1 1 0xC8CE0504, 0xCAD00304, 0xCF +254 pushbytes 0xcf 0xC8CE0504, 0xCAD00304, 0xCF, 0xCF +257 b== 0xC8CE0504, 0xCAD00304, 1 +258 assert 0xC8CE0504, 0xCAD00304 +259 extract 1 1 0xC8CE0504, 0xD0 +262 pushbytes 0xd0 0xC8CE0504, 0xD0, 0xD0 +265 b== 0xC8CE0504, 1 +266 assert 0xC8CE0504 +267 extract 0 4 0xC8CE0504 +270 callsub other_routine_2 0xC8CE0504 +344 proto 1 2 0xC8CE0504 +347 frame_dig -1 0xC8CE0504, 0xC8CE0504 +349 pushbytes 0x0a 0xC8CE0504, 0xC8CE0504, 0x0A +352 replace2 0 0xC8CE0504, 0x0ACE0504 +354 frame_dig -1 0xC8CE0504, 0x0ACE0504, 0xC8CE0504 +356 swap 0xC8CE0504, 0xC8CE0504, 0x0ACE0504 +357 retsub 0xC8CE0504, 0x0ACE0504 +273 popn 2 +275 retsub +49 intc_1 1 +50 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/mutable_params.O2.log b/test_cases/arc4_types/out/mutable_params.O2.log index de953cd79e..45bd537877 100644 --- a/test_cases/arc4_types/out/mutable_params.O2.log +++ b/test_cases/arc4_types/out/mutable_params.O2.log @@ -1,201 +1,693 @@ -PC Teal Stack -1 intcblock 1 2 4 0 -7 bytecblock 0x05 0x01020304 0x63 0x80320006000d00054861707079000444617973 0x000741415252474821 -48 callsub mutating_copies -53 proto 0 0 -56 bytec_1 0x01020304 -57 bytec_0 0x01020304, 0x05 -58 replace2 2 0x01020504 -60 dup 0x01020504, 0x01020504 -61 extract 2 1 0x01020504, 0x05 -64 bytec_0 0x01020504, 0x05, 0x05 -65 b== 0x01020504, 1 -66 assert 0x01020504 -67 bytec_3 0x01020504, 0x80320006000D00054861707079000444617973 -68 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 -150 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 -153 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -155 bytec_0 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 -156 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 -158 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 -160 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -162 intc_1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -163 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 -164 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -166 intc_3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -167 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -169 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -170 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -172 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -173 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -174 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -176 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -177 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -179 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -181 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -183 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -184 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -186 bytec 4 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -188 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -189 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -190 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -191 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -192 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -194 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -195 dig 1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 -197 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 -198 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 -199 pushint 9 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 -201 + 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 -202 swap 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -203 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -204 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -205 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -208 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -210 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 -212 intc_0 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -213 intc_3 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -214 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -216 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -218 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -71 uncover 3 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -73 assert 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -74 uncover 2 0x01050504, 0x80320006000F000741415252474821000444617973, 0 -76 ! 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -77 assert 0x01050504, 0x80320006000F000741415252474821000444617973 -78 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x01050504 -80 extract 1 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05 -83 bytec_0 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05, 0x05 -84 b== 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -85 assert 0x01050504, 0x80320006000F000741415252474821000444617973 -86 dup 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973 -87 intc_1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973, 2 -88 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6 -89 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973 -91 intc_2 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973, 4 -92 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 -93 substring3 0x01050504, 0x000741415252474821 -94 bytec 4 0x01050504, 0x000741415252474821, 0x000741415252474821 -96 == 0x01050504, 1 -97 assert 0x01050504 -98 bytec_1 0x01050504, 0x01020304 -99 bytec_3 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -100 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -150 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -153 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -155 bytec_0 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 -156 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 -158 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 -160 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -162 intc_1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -163 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 -164 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -166 intc_3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -167 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -169 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -170 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -172 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -173 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -174 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -176 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -177 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -179 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -181 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -183 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -184 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -186 bytec 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -188 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -189 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -190 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -191 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -192 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -194 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -195 dig 1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 -197 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 -198 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 -199 pushint 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 -201 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 -202 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -203 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -204 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -205 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -208 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -210 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 -212 intc_0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 -213 intc_3 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 -214 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 -216 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -218 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -103 popn 4 0x01050504 -105 bytec_1 0x01050504, 0x01020304 -106 callsub other_routine_2 0x01050504, 0x01020304 -219 proto 1 2 0x01050504, 0x01020304 -222 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -224 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -227 replace2 0 0x01050504, 0x01020304, 0x0A020304 -229 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -231 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -232 retsub 0x01050504, 0x01020304, 0x0A020304 -109 pop 0x01050504, 0x01020304 -110 dup 0x01050504, 0x01020304, 0x01020304 -111 extract 0 1 0x01050504, 0x01020304, 0x01 -114 pushbytes 0x01 0x01050504, 0x01020304, 0x01, 0x01 -117 b== 0x01050504, 0x01020304, 1 -118 assert 0x01050504, 0x01020304 -119 callsub other_routine_2 0x01050504, 0x01020304 -219 proto 1 2 0x01050504, 0x01020304 -222 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -224 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -227 replace2 0 0x01050504, 0x01020304, 0x0A020304 -229 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -231 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -232 retsub 0x01050504, 0x01020304, 0x0A020304 -122 bury 1 0x01050504, 0x0A020304 -124 dup 0x01050504, 0x0A020304, 0x0A020304 -125 extract 0 1 0x01050504, 0x0A020304, 0x0A -128 pushbytes 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A -131 b== 0x01050504, 0x0A020304, 1 -132 assert 0x01050504, 0x0A020304 -133 dup2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 -134 uncover 2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -136 callsub other_routine_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -233 proto 3 3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -236 intc_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0 -237 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -246 intc_0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 -247 b other_routine_3_for_body@1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 -237 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -250 intc_1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -251 b other_routine_3_for_body@1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 -237 switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -243 b other_routine_3_after_for@5 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 -254 frame_dig -3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x01050504 -256 bytec_2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x01050504, "c" -257 replace2 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x63050504 -259 frame_bury -3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304 -261 frame_dig -2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 0x0A020304 -263 bytec_2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 0x0A020304, "c" -264 replace2 0 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 0x63020304 -266 frame_bury -2 0x01050504, 0x63050504, 0x63020304, 0x0A020304 -268 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 0x0A020304 -270 bytec_2 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 0x0A020304, "c" -271 replace2 0 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 0x63020304 -273 frame_bury -1 0x01050504, 0x63050504, 0x63020304, 0x63020304 -275 frame_dig -3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504 -277 frame_dig -2 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304 -279 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304, 0x63020304 -281 retsub 0x01050504, 0x63050504, 0x63020304, 0x63020304 -139 popn 3 0x01050504 -141 extract 0 4 0x01050504 -144 callsub other_routine_2 0x01050504 -219 proto 1 2 0x01050504 -222 frame_dig -1 0x01050504, 0x01050504 -224 pushbytes 0x0a 0x01050504, 0x01050504, 0x0A -227 replace2 0 0x01050504, 0x0A050504 -229 frame_dig -1 0x01050504, 0x0A050504, 0x01050504 -231 swap 0x01050504, 0x01050504, 0x0A050504 -232 retsub 0x01050504, 0x0A050504 -147 popn 2 -149 retsub -51 intc_0 1 -52 return 1 \ No newline at end of file +PC Teal Stack +1 intcblock 0 1 4 2 +7 bytecblock 0x01020304 0x05 0x80320006000d00054861707079000444617973 0x000741415252474821 +46 callsub mutating_copies +51 proto 0 0 +54 bytec_0 0x01020304 +55 bytec_1 0x01020304, 0x05 +56 replace2 2 0x01020504 +58 dup 0x01020504, 0x01020504 +59 extract 2 1 0x01020504, 0x05 +62 bytec_1 0x01020504, 0x05, 0x05 +63 b== 0x01020504, 1 +64 assert 0x01020504 +65 bytec_2 0x01020504, 0x80320006000D00054861707079000444617973 +66 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 +276 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 +279 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +281 bytec_1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 +282 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 +284 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 +286 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +288 intc_3 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +289 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 +290 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +292 intc_0 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +293 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +295 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +296 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +298 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +299 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +300 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +302 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +303 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +305 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +307 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +309 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +310 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +312 bytec_3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +313 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +314 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +315 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +316 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +317 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +319 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +320 dig 1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 +322 intc_2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 +323 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 +324 pushint 9 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 +326 + 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 +327 swap 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +328 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +329 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +330 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +333 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +335 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 +337 intc_1 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +338 intc_0 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +339 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +341 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +343 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +69 uncover 3 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +71 assert 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +72 uncover 2 0x01050504, 0x80320006000F000741415252474821000444617973, 0 +74 ! 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +75 assert 0x01050504, 0x80320006000F000741415252474821000444617973 +76 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x01050504 +78 extract 1 1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05 +81 bytec_1 0x01050504, 0x80320006000F000741415252474821000444617973, 0x05, 0x05 +82 b== 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +83 assert 0x01050504, 0x80320006000F000741415252474821000444617973 +84 dup 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973 +85 intc_3 0x01050504, 0x80320006000F000741415252474821000444617973, 0x80320006000F000741415252474821000444617973, 2 +86 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6 +87 dig 1 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973 +89 intc_2 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 0x80320006000F000741415252474821000444617973, 4 +90 extract_uint16 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 +91 substring3 0x01050504, 0x000741415252474821 +92 bytec_3 0x01050504, 0x000741415252474821, 0x000741415252474821 +93 == 0x01050504, 1 +94 assert 0x01050504 +95 bytec_0 0x01050504, 0x01020304 +96 bytec_2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +97 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +276 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +279 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +281 bytec_1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 +282 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 +284 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 +286 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +288 intc_3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +289 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 +290 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +292 intc_0 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +293 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +295 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +296 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +298 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +299 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +300 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +302 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +303 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +305 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +307 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +309 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +310 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +312 bytec_3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +313 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +314 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +315 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +316 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +317 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +319 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +320 dig 1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973 +322 intc_2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 0x80320006000D000741415252474821000444617973, 4 +323 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13 +324 pushint 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 13, 9 +326 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7, 22 +327 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +328 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +329 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +330 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +333 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +335 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 +337 intc_1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 +338 intc_0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 +339 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 +341 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +343 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +100 popn 4 0x01050504 +102 bytec_0 0x01050504, 0x01020304 +103 callsub other_routine_2 0x01050504, 0x01020304 +344 proto 1 2 0x01050504, 0x01020304 +347 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +349 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +352 replace2 0 0x01050504, 0x01020304, 0x0A020304 +354 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +356 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +357 retsub 0x01050504, 0x01020304, 0x0A020304 +106 pop 0x01050504, 0x01020304 +107 dup 0x01050504, 0x01020304, 0x01020304 +108 extract 0 1 0x01050504, 0x01020304, 0x01 +111 pushbytes 0x01 0x01050504, 0x01020304, 0x01, 0x01 +114 b== 0x01050504, 0x01020304, 1 +115 assert 0x01050504, 0x01020304 +116 callsub other_routine_2 0x01050504, 0x01020304 +344 proto 1 2 0x01050504, 0x01020304 +347 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +349 pushbytes 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +352 replace2 0 0x01050504, 0x01020304, 0x0A020304 +354 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +356 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +357 retsub 0x01050504, 0x01020304, 0x0A020304 +119 bury 1 0x01050504, 0x0A020304 +121 dup 0x01050504, 0x0A020304, 0x0A020304 +122 extract 0 1 0x01050504, 0x0A020304, 0x0A +125 pushbytes 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A +128 b== 0x01050504, 0x0A020304, 1 +129 assert 0x01050504, 0x0A020304 +130 dup2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 +131 bytec_0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304 +132 intc_0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0 +133 intc_1 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +134 callsub mutate_tuple_items_and_reassign 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +358 proto 5 3 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1 +361 intc_0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0 +362 dupn 5 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0 +364 intc_1 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1 +365 dupn 2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +367 frame_dig -2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +369 itob 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000 +370 dup 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000000 +371 extract 7 1 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x00 +374 frame_dig -5 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x00, 0x01050504 +376 swap 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x01050504, 0x00 +377 replace2 0 0x01050504, 0x0A020304, 0x01050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x00050504 +379 frame_bury -5 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000 +381 frame_dig -2 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0 +383 intc_1 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0, 1 +384 + 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 1 +385 itob 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001 +386 dup 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000001 +387 extract 7 1 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x01 +390 frame_dig -4 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x01, 0x0A020304 +392 swap 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0A020304, 0x01 +393 replace2 0 0x01050504, 0x0A020304, 0x00050504, 0x0A020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x01020304 +395 frame_bury -4 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001 +397 frame_dig -2 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0 +399 intc_3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0, 2 +400 + 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 2 +401 itob 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002 +402 dup 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x0000000000000002 +403 extract 7 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x02 +406 frame_dig -3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x02, 0x01020304 +408 swap 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x01020304, 0x02 +409 replace2 0 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x01020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x02020304 +411 frame_bury -3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002 +413 frame_dig -5 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x00050504 +415 extract 0 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000000, 0x0000000000000001, 0x0000000000000002, 0x00 +418 uncover 3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 0x00, 0x0000000000000000 +420 b== 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 1 +421 assert 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002 +422 frame_dig -4 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 0x01020304 +424 extract 0 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000001, 0x0000000000000002, 0x01 +427 uncover 2 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 0x01, 0x0000000000000001 +429 b== 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 1 +430 assert 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002 +431 frame_dig -3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 0x02020304 +433 extract 0 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000002, 0x02 +436 b== 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 +437 assert 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +438 frame_dig -2 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +440 pushint 3 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 3 +442 + 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3 +443 itob 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000003 +444 extract 7 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x03 +447 frame_dig -5 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x03, 0x00050504 +449 swap 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00050504, 0x03 +450 replace2 1 0x01050504, 0x0A020304, 0x00050504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00030504 +452 frame_bury -5 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +454 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +456 intc_2 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 4 +457 + 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 4 +458 itob 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000004 +459 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x04 +462 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x04, 0x01020304 +464 swap 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x01020304, 0x04 +465 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01020304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x01040304 +467 frame_bury -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +469 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 +471 pushint 5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 5 +473 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 5 +474 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000005 +475 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x05 +478 frame_dig -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x05, 0x02020304 +480 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02020304, 0x05 +481 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304 +483 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02020304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x02050304 +484 frame_bury -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304 +486 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304 +488 frame_dig -5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504 +490 frame_dig -1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504, 1 +492 bz mutate_tuple_items_and_reassign_after_if_else@20 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504 +495 intc_0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x02050304, 0x01040304, 0x00030504, 0 +496 frame_bury 6 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x02050304, 0x01040304, 0x00030504 +498 intc_0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x02050304, 0x01040304, 0x00030504, 0 +499 frame_bury 7 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x02050304, 0x01040304, 0x00030504 +501 intc_0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x02050304, 0x01040304, 0x00030504, 0 +502 frame_bury 8 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +504 frame_dig -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x02050304 +506 frame_bury 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +508 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x01040304 +510 frame_bury 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +512 frame_dig -5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x00030504 +514 frame_bury 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504 +516 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0 +518 pushint 6 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0, 6 +520 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 6 +521 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x0000000000000006 +522 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x0000000000000006, 0x0000000000000006 +523 frame_bury 3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x0000000000000006 +525 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x06 +528 frame_dig 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x06, 0x00030504 +530 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x00030504, 0x06 +531 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00030504, 0x00060504 +533 frame_bury 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504 +535 frame_dig -5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x00030504 +537 frame_bury 0 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504 +539 frame_dig 6 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0 +541 bz mutate_tuple_items_and_reassign_after_if_else@22 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504 +548 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0 +550 pushint 7 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0, 7 +552 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 7 +553 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x0000000000000007 +554 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x0000000000000007, 0x0000000000000007 +555 frame_bury 4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x0000000000000007 +557 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x07 +560 frame_dig 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x07, 0x01040304 +562 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x01040304, 0x07 +563 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01040304, 0x00060504, 0x01070304 +565 frame_bury 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504 +567 frame_dig -4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x01040304 +569 frame_bury 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504 +571 frame_dig 7 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0 +573 bz mutate_tuple_items_and_reassign_after_if_else@24 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504 +580 frame_dig -2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0 +582 pushint 8 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0, 8 +584 + 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 8 +585 itob 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x0000000000000008 +586 dup 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x0000000000000008, 0x0000000000000008 +587 frame_bury 5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x0000000000000008 +589 extract 7 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x08 +592 frame_dig 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x08, 0x02050304 +594 swap 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x02050304, 0x08 +595 replace2 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02050304, 0x01070304, 0x00060504, 0x02080304 +597 frame_bury 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +599 frame_dig -3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x02050304 +601 frame_bury 2 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +603 frame_dig 8 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0 +605 bz mutate_tuple_items_and_reassign_after_if_else@26 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +612 frame_dig 11 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x00060504 +614 extract 1 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x06 +617 frame_dig 3 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x06, 0x0000000000000006 +619 b== 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 1 +620 assert 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +621 frame_dig 10 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x01070304 +623 extract 1 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x07 +626 frame_dig 4 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x07, 0x0000000000000007 +628 b== 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 1 +629 assert 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +630 frame_dig 9 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x02080304 +632 extract 1 1 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x08 +635 frame_dig 5 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 0x08, 0x0000000000000008 +637 b== 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504, 1 +638 assert 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304, 0, 1, 0x00030504, 0x01040304, 0x02050304, 0x0000000000000006, 0x0000000000000007, 0x0000000000000008, 0, 0, 0, 0x02080304, 0x01070304, 0x00060504 +639 retsub 0x01050504, 0x0A020304, 0x00030504, 0x01040304, 0x02050304 +137 popn 3 0x01050504, 0x0A020304 +139 bytec_0 0x01050504, 0x0A020304, 0x01020304 +140 pushint 100 0x01050504, 0x0A020304, 0x01020304, 100 +142 intc_1 0x01050504, 0x0A020304, 0x01020304, 100, 1 +143 callsub mutate_tuple_items_and_reassign 0x01050504, 0x0A020304, 0x01020304, 100, 1 +358 proto 5 3 0x01050504, 0x0A020304, 0x01020304, 100, 1 +361 intc_0 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0 +362 dupn 5 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0 +364 intc_1 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1 +365 dupn 2 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +367 frame_dig -2 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +369 itob 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064 +370 dup 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000064 +371 extract 7 1 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, "d" +374 frame_dig -5 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, "d", 0x01050504 +376 swap 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x01050504, "d" +377 replace2 0 0x01050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x64050504 +379 frame_bury -5 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064 +381 frame_dig -2 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 100 +383 intc_1 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 100, 1 +384 + 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 101 +385 itob 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065 +386 dup 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000065 +387 extract 7 1 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, "e" +390 frame_dig -4 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, "e", 0x0A020304 +392 swap 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0A020304, "e" +393 replace2 0 0x64050504, 0x0A020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x65020304 +395 frame_bury -4 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065 +397 frame_dig -2 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 100 +399 intc_3 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 100, 2 +400 + 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 102 +401 itob 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066 +402 dup 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x0000000000000066 +403 extract 7 1 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, "f" +406 frame_dig -3 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, "f", 0x01020304 +408 swap 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x01020304, "f" +409 replace2 0 0x64050504, 0x65020304, 0x01020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x66020304 +411 frame_bury -3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066 +413 frame_dig -5 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, 0x64050504 +415 extract 0 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000064, 0x0000000000000065, 0x0000000000000066, "d" +418 uncover 3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, "d", 0x0000000000000064 +420 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, 1 +421 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066 +422 frame_dig -4 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, 0x65020304 +424 extract 0 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000065, 0x0000000000000066, "e" +427 uncover 2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, "e", 0x0000000000000065 +429 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, 1 +430 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066 +431 frame_dig -3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, 0x66020304 +433 extract 0 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000066, "f" +436 b== 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 +437 assert 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +438 frame_dig -2 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +440 pushint 3 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100, 3 +442 + 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 103 +443 itob 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000067 +444 extract 7 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "g" +447 frame_dig -5 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "g", 0x64050504 +449 swap 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x64050504, "g" +450 replace2 1 0x64050504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x64670504 +452 frame_bury -5 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +454 frame_dig -2 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +456 intc_2 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100, 4 +457 + 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 104 +458 itob 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000068 +459 extract 7 1 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "h" +462 frame_dig -4 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "h", 0x65020304 +464 swap 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x65020304, "h" +465 replace2 1 0x64670504, 0x65020304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x65680304 +467 frame_bury -4 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 +469 frame_dig -2 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100 +471 pushint 5 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 100, 5 +473 + 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 105 +474 itob 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x0000000000000069 +475 extract 7 1 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "i" +478 frame_dig -3 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, "i", 0x66020304 +480 swap 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66020304, "i" +481 replace2 1 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304 +483 dup 0x64670504, 0x65680304, 0x66020304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x66690304 +484 frame_bury -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304 +486 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304 +488 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504 +490 frame_dig -1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504, 1 +492 bz mutate_tuple_items_and_reassign_after_if_else@20 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504 +495 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x66690304, 0x65680304, 0x64670504, 0 +496 frame_bury 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x66690304, 0x65680304, 0x64670504 +498 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0x66690304, 0x65680304, 0x64670504, 0 +499 frame_bury 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x66690304, 0x65680304, 0x64670504 +501 intc_0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x66690304, 0x65680304, 0x64670504, 0 +502 frame_bury 8 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +504 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x66690304 +506 frame_bury 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +508 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x65680304 +510 frame_bury 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +512 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x64670504 +514 frame_bury 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504 +516 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 100 +518 pushint 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 100, 6 +520 + 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 106 +521 itob 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x000000000000006A +522 dup 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x000000000000006A, 0x000000000000006A +523 frame_bury 3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x000000000000006A +525 extract 7 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, "j" +528 frame_dig 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, "j", 0x64670504 +530 swap 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x64670504, "j" +531 replace2 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x64670504, 0x646A0504 +533 frame_bury 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504 +535 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x64670504 +537 frame_bury 0 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504 +539 frame_dig 6 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0 +541 bz mutate_tuple_items_and_reassign_after_if_else@22 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504 +548 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 100 +550 pushint 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 100, 7 +552 + 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 107 +553 itob 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x000000000000006B +554 dup 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x000000000000006B, 0x000000000000006B +555 frame_bury 4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x000000000000006B +557 extract 7 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, "k" +560 frame_dig 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, "k", 0x65680304 +562 swap 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x65680304, "k" +563 replace2 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x65680304, 0x646A0504, 0x656B0304 +565 frame_bury 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504 +567 frame_dig -4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x65680304 +569 frame_bury 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504 +571 frame_dig 7 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0 +573 bz mutate_tuple_items_and_reassign_after_if_else@24 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504 +580 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 100 +582 pushint 8 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 100, 8 +584 + 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 108 +585 itob 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x000000000000006C +586 dup 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x000000000000006C, 0x000000000000006C +587 frame_bury 5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x000000000000006C +589 extract 7 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, "l" +592 frame_dig 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, "l", 0x66690304 +594 swap 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x66690304, "l" +595 replace2 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x66690304, 0x656B0304, 0x646A0504, 0x666C0304 +597 frame_bury 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +599 frame_dig -3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x66690304 +601 frame_bury 2 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +603 frame_dig 8 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0 +605 bz mutate_tuple_items_and_reassign_after_if_else@26 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +612 frame_dig 11 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x646A0504 +614 extract 1 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "j" +617 frame_dig 3 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "j", 0x000000000000006A +619 b== 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 1 +620 assert 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +621 frame_dig 10 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x656B0304 +623 extract 1 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "k" +626 frame_dig 4 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "k", 0x000000000000006B +628 b== 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 1 +629 assert 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +630 frame_dig 9 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 0x666C0304 +632 extract 1 1 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "l" +635 frame_dig 5 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, "l", 0x000000000000006C +637 b== 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504, 1 +638 assert 0x64670504, 0x65680304, 0x66690304, 100, 1, 0x64670504, 0x65680304, 0x66690304, 0x000000000000006A, 0x000000000000006B, 0x000000000000006C, 0, 0, 0, 0x666C0304, 0x656B0304, 0x646A0504 +639 retsub 0x64670504, 0x65680304, 0x66690304 +146 dig 2 0x64670504, 0x65680304, 0x66690304, 0x64670504 +148 extract 0 1 0x64670504, 0x65680304, 0x66690304, "d" +151 pushbytes 0x64 0x64670504, 0x65680304, 0x66690304, "d", "d" +154 b== 0x64670504, 0x65680304, 0x66690304, 1 +155 assert 0x64670504, 0x65680304, 0x66690304 +156 dig 1 0x64670504, 0x65680304, 0x66690304, 0x65680304 +158 extract 0 1 0x64670504, 0x65680304, 0x66690304, "e" +161 pushbytes 0x65 0x64670504, 0x65680304, 0x66690304, "e", "e" +164 b== 0x64670504, 0x65680304, 0x66690304, 1 +165 assert 0x64670504, 0x65680304, 0x66690304 +166 dup 0x64670504, 0x65680304, 0x66690304, 0x66690304 +167 extract 0 1 0x64670504, 0x65680304, 0x66690304, "f" +170 pushbytes 0x66 0x64670504, 0x65680304, 0x66690304, "f", "f" +173 b== 0x64670504, 0x65680304, 0x66690304, 1 +174 assert 0x64670504, 0x65680304, 0x66690304 +175 dig 2 0x64670504, 0x65680304, 0x66690304, 0x64670504 +177 extract 1 1 0x64670504, 0x65680304, 0x66690304, "g" +180 pushbytes 0x67 0x64670504, 0x65680304, 0x66690304, "g", "g" +183 b== 0x64670504, 0x65680304, 0x66690304, 1 +184 assert 0x64670504, 0x65680304, 0x66690304 +185 dig 1 0x64670504, 0x65680304, 0x66690304, 0x65680304 +187 extract 1 1 0x64670504, 0x65680304, 0x66690304, "h" +190 pushbytes 0x68 0x64670504, 0x65680304, 0x66690304, "h", "h" +193 b== 0x64670504, 0x65680304, 0x66690304, 1 +194 assert 0x64670504, 0x65680304, 0x66690304 +195 dup 0x64670504, 0x65680304, 0x66690304, 0x66690304 +196 extract 1 1 0x64670504, 0x65680304, 0x66690304, "i" +199 pushbytes 0x69 0x64670504, 0x65680304, 0x66690304, "i", "i" +202 b== 0x64670504, 0x65680304, 0x66690304, 1 +203 assert 0x64670504, 0x65680304, 0x66690304 +204 pushint 200 0x64670504, 0x65680304, 0x66690304, 200 +207 intc_0 0x64670504, 0x65680304, 0x66690304, 200, 0 +208 callsub mutate_tuple_items_and_reassign 0x64670504, 0x65680304, 0x66690304, 200, 0 +358 proto 5 3 0x64670504, 0x65680304, 0x66690304, 200, 0 +361 intc_0 0x64670504, 0x65680304, 0x66690304, 200, 0, 0 +362 dupn 5 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0 +364 intc_1 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1 +365 dupn 2 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +367 frame_dig -2 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +369 itob 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8 +370 dup 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C8 +371 extract 7 1 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0xC8 +374 frame_dig -5 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0xC8, 0x64670504 +376 swap 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x64670504, 0xC8 +377 replace2 0 0x64670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0xC8670504 +379 frame_bury -5 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8 +381 frame_dig -2 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 200 +383 intc_1 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 200, 1 +384 + 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 201 +385 itob 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9 +386 dup 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000C9 +387 extract 7 1 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0xC9 +390 frame_dig -4 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0xC9, 0x65680304 +392 swap 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x65680304, 0xC9 +393 replace2 0 0xC8670504, 0x65680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0xC9680304 +395 frame_bury -4 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9 +397 frame_dig -2 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 200 +399 intc_3 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 200, 2 +400 + 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 202 +401 itob 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA +402 dup 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0x00000000000000CA +403 extract 7 1 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xCA +406 frame_dig -3 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xCA, 0x66690304 +408 swap 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0x66690304, 0xCA +409 replace2 0 0xC8670504, 0xC9680304, 0x66690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xCA690304 +411 frame_bury -3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA +413 frame_dig -5 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xC8670504 +415 extract 0 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C8, 0x00000000000000C9, 0x00000000000000CA, 0xC8 +418 uncover 3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 0xC8, 0x00000000000000C8 +420 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 1 +421 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA +422 frame_dig -4 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 0xC9680304 +424 extract 0 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000C9, 0x00000000000000CA, 0xC9 +427 uncover 2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 0xC9, 0x00000000000000C9 +429 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 1 +430 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA +431 frame_dig -3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 0xCA690304 +433 extract 0 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CA, 0xCA +436 b== 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 +437 assert 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +438 frame_dig -2 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +440 pushint 3 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200, 3 +442 + 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 203 +443 itob 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CB +444 extract 7 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCB +447 frame_dig -5 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCB, 0xC8670504 +449 swap 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC8670504, 0xCB +450 replace2 1 0xC8670504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC8CB0504 +452 frame_bury -5 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +454 frame_dig -2 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +456 intc_2 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200, 4 +457 + 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 204 +458 itob 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CC +459 extract 7 1 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCC +462 frame_dig -4 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCC, 0xC9680304 +464 swap 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC9680304, 0xCC +465 replace2 1 0xC8CB0504, 0xC9680304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xC9CC0304 +467 frame_bury -4 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 +469 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200 +471 pushint 5 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 200, 5 +473 + 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 205 +474 itob 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0x00000000000000CD +475 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCD +478 frame_dig -3 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCD, 0xCA690304 +480 swap 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCA690304, 0xCD +481 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304 +483 dup 0xC8CB0504, 0xC9CC0304, 0xCA690304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xCACD0304 +484 frame_bury -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304 +486 frame_dig -4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304 +488 frame_dig -5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504 +490 frame_dig -1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0 +492 bz mutate_tuple_items_and_reassign_after_if_else@20 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504 +516 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 200 +518 pushint 6 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 200, 6 +520 + 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 206 +521 itob 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0x00000000000000CE +522 dup 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0x00000000000000CE, 0x00000000000000CE +523 frame_bury 3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0x00000000000000CE +525 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xCE +528 frame_dig 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xCE, 0xC8CB0504 +530 swap 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xC8CB0504, 0xCE +531 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CB0504, 0xC8CE0504 +533 frame_bury 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +535 frame_dig -5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC8CB0504 +537 frame_bury 0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +539 frame_dig 6 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 1 +541 bz mutate_tuple_items_and_reassign_after_if_else@22 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +544 frame_dig 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CB0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC8CE0504 +546 frame_bury 0 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504 +548 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 200 +550 pushint 7 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 200, 7 +552 + 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 207 +553 itob 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0x00000000000000CF +554 dup 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0x00000000000000CF, 0x00000000000000CF +555 frame_bury 4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0x00000000000000CF +557 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xCF +560 frame_dig 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xCF, 0xC9CC0304 +562 swap 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC9CC0304, 0xCF +563 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CC0304, 0xC8CE0504, 0xC9CF0304 +565 frame_bury 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +567 frame_dig -4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xC9CC0304 +569 frame_bury 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +571 frame_dig 7 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 1 +573 bz mutate_tuple_items_and_reassign_after_if_else@24 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +576 frame_dig 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CC0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304 +578 frame_bury 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504 +580 frame_dig -2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 200 +582 pushint 8 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 200, 8 +584 + 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 208 +585 itob 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0x00000000000000D0 +586 dup 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0x00000000000000D0, 0x00000000000000D0 +587 frame_bury 5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0x00000000000000D0 +589 extract 7 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xD0 +592 frame_dig 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xD0, 0xCACD0304 +594 swap 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xCACD0304, 0xD0 +595 replace2 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCACD0304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304 +597 frame_bury 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +599 frame_dig -3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCACD0304 +601 frame_bury 2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +603 frame_dig 8 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +605 bz mutate_tuple_items_and_reassign_after_if_else@26 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +608 frame_dig 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCACD0304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304 +610 frame_bury 2 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +612 frame_dig 11 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC8CE0504 +614 extract 1 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCE +617 frame_dig 3 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCE, 0x00000000000000CE +619 b== 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +620 assert 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +621 frame_dig 10 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xC9CF0304 +623 extract 1 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCF +626 frame_dig 4 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCF, 0x00000000000000CF +628 b== 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +629 assert 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +630 frame_dig 9 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xCAD00304 +632 extract 1 1 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xD0 +635 frame_dig 5 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 0xD0, 0x00000000000000D0 +637 b== 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504, 1 +638 assert 0xC8CB0504, 0xC9CC0304, 0xCACD0304, 200, 0, 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0x00000000000000CE, 0x00000000000000CF, 0x00000000000000D0, 1, 1, 1, 0xCAD00304, 0xC9CF0304, 0xC8CE0504 +639 retsub 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +211 dig 2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8CE0504 +213 extract 0 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8 +216 pushbytes 0xc8 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8, 0xC8 +219 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +220 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +221 dig 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC9CF0304 +223 extract 0 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC9 +226 pushbytes 0xc9 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC9, 0xC9 +229 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +230 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +231 dup 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCAD00304 +232 extract 0 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCA +235 pushbytes 0xca 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCA, 0xCA +238 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +239 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +240 dig 2 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xC8CE0504 +242 extract 1 1 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCE +245 pushbytes 0xce 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 0xCE, 0xCE +248 b== 0xC8CE0504, 0xC9CF0304, 0xCAD00304, 1 +249 assert 0xC8CE0504, 0xC9CF0304, 0xCAD00304 +250 swap 0xC8CE0504, 0xCAD00304, 0xC9CF0304 +251 extract 1 1 0xC8CE0504, 0xCAD00304, 0xCF +254 pushbytes 0xcf 0xC8CE0504, 0xCAD00304, 0xCF, 0xCF +257 b== 0xC8CE0504, 0xCAD00304, 1 +258 assert 0xC8CE0504, 0xCAD00304 +259 extract 1 1 0xC8CE0504, 0xD0 +262 pushbytes 0xd0 0xC8CE0504, 0xD0, 0xD0 +265 b== 0xC8CE0504, 1 +266 assert 0xC8CE0504 +267 extract 0 4 0xC8CE0504 +270 callsub other_routine_2 0xC8CE0504 +344 proto 1 2 0xC8CE0504 +347 frame_dig -1 0xC8CE0504, 0xC8CE0504 +349 pushbytes 0x0a 0xC8CE0504, 0xC8CE0504, 0x0A +352 replace2 0 0xC8CE0504, 0x0ACE0504 +354 frame_dig -1 0xC8CE0504, 0x0ACE0504, 0xC8CE0504 +356 swap 0xC8CE0504, 0xC8CE0504, 0x0ACE0504 +357 retsub 0xC8CE0504, 0x0ACE0504 +273 popn 2 +275 retsub +49 intc_1 1 +50 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/structs.O0.log b/test_cases/arc4_types/out/structs.O0.log index 269ee67913..9adf9a5aec 100644 --- a/test_cases/arc4_types/out/structs.O0.log +++ b/test_cases/arc4_types/out/structs.O0.log @@ -125,49 +125,49 @@ PC Teal Stack 124 callsub check 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 289 proto 1 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 292 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -294 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0 -295 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -296 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00 -297 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00, 0 -298 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 1 -300 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80 -301 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80, 0 -302 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -303 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -304 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -306 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 -307 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -308 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00 -309 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00, 0 -310 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 0 -312 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00 -313 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0 -314 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -315 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -316 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -317 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -319 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 2 -320 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -321 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00 -322 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1, 0x00, 0 -323 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 1 -325 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80 -326 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x80, 0 -327 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -328 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -329 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -331 pushint 3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 3 -333 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -334 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00 -335 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0, 0x00, 0 -336 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0, 0 -338 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00 -339 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0x00, 0 -340 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0 -341 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 1 -342 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 -343 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 -345 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 +294 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0 +295 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0, 0 +296 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 +297 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1, 0x00 +298 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1, 0x00, 0 +299 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00, 0, 1 +301 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x80 +302 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x80, 0 +303 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 +304 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +305 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0 +307 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0, 1 +308 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0 +309 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0, 0x00 +310 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0, 0x00, 0 +311 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00, 0, 0 +313 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00 +314 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00, 0 +315 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0 +316 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 +317 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +318 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0 +320 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0, 2 +321 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 +322 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1, 0x00 +323 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1, 0x00, 0 +324 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00, 0, 1 +326 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x80 +327 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x80, 0 +328 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 +329 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +330 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0 +332 pushint 3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0xA0, 3 +334 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0 +335 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0, 0x00 +336 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0, 0x00, 0 +337 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00, 0, 0 +339 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00 +340 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0x00, 0 +341 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 0 +342 ! 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0, 1 +343 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0, 0xA0 +344 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 127 pop 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0 128 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0, 0xA0 129 log 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0xA0 @@ -182,33 +182,33 @@ PC Teal Stack 140 swap 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842, 0xA0 141 concat 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 142 callsub nested_decode 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -346 proto 1 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -349 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 -351 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0 -352 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0, 16 -354 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842 -355 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0 -356 intc_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0, 8 -357 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217 -358 pushint 35382882839 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 35382882839 -365 itob 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 0x000000083CFBF217 -366 == 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 -367 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -368 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 -370 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16 -372 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16, 1 -373 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0xA0 -374 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0xA0, 2 -375 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 -376 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1, 0x00 -377 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1, 0x00, 0 -378 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x00, 0, 1 -380 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x80 -381 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x80, 0 -382 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 1 -383 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 -384 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 -386 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 +345 proto 1 1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 +348 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +350 dup 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +351 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0 +352 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0, 16 +354 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842 +355 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0 +356 intc_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842, 0, 8 +357 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217 +358 pushint 35382882839 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 35382882839 +365 itob 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217, 0x000000083CFBF217 +366 == 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 1 +367 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +368 frame_dig -1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +370 pushint 16 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16 +372 intc_2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 16, 1 +373 extract3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0xA0 +374 intc_3 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0xA0, 2 +375 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 1 +376 bytec_1 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 1, 0x00 +377 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 1, 0x00, 0 +378 uncover 2 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x00, 0, 1 +380 setbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x80 +381 intc_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 0x80, 0 +382 getbit 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0, 1 +383 assert 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0, 0x000000083CFBF217000000230384B842A0 +384 retsub 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x000000083CFBF217000000230384B842A0 145 pop 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1 146 bytec_0 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0x 147 len 0x000000083CFBF217000000230384B842, 0x0000004607097084, 1, 0 diff --git a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal index 8eb2947782..1a76a1626f 100644 --- a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal @@ -1,25 +1,25 @@ #pragma version 10 test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program: - intcblock 1 2 4 0 - bytecblock 0x05 0x01020304 0x63 0x80320006000d00054861707079000444617973 0x000741415252474821 + intcblock 0 1 4 2 + bytecblock 0x01020304 0x05 0x80320006000d00054861707079000444617973 0x000741415252474821 callsub mutating_copies - intc_0 // 1 + intc_1 // 1 return // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies() -> void: mutating_copies: proto 0 0 - bytec_1 // 0x01020304 - bytec_0 // 0x05 + bytec_0 // 0x01020304 + bytec_1 // 0x05 replace2 2 dup extract 2 1 // on error: Index access is out of bounds - bytec_0 // 0x05 + bytec_1 // 0x05 b== assert // my_array should be mutated - bytec_3 // 0x80320006000d00054861707079000444617973 + bytec_2 // 0x80320006000d00054861707079000444617973 callsub other_routine uncover 3 assert @@ -28,24 +28,24 @@ mutating_copies: assert dig 1 extract 1 1 // on error: Index access is out of bounds - bytec_0 // 0x05 + bytec_1 // 0x05 b== assert // my_array has been mutated by the subroutine dup - intc_1 // 2 + intc_3 // 2 extract_uint16 dig 1 intc_2 // 4 extract_uint16 substring3 - bytec 4 // 0x000741415252474821 + bytec_3 // 0x000741415252474821 == assert // my_struct has been mutated by the subroutine - bytec_1 // 0x01020304 - bytec_3 // 0x80320006000d00054861707079000444617973 + bytec_0 // 0x01020304 + bytec_2 // 0x80320006000d00054861707079000444617973 callsub other_routine popn 4 - bytec_1 // 0x01020304 + bytec_0 // 0x01020304 callsub other_routine_2 pop dup @@ -61,9 +61,77 @@ mutating_copies: b== assert // my_array_copy_2 should have mutated value dup2 - uncover 2 - callsub other_routine_3 + bytec_0 // 0x01020304 + intc_0 // 0 + intc_1 // 1 + callsub mutate_tuple_items_and_reassign popn 3 + bytec_0 // 0x01020304 + pushint 100 // 100 + intc_1 // 1 + callsub mutate_tuple_items_and_reassign + dig 2 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0x64 + b== + assert + dig 1 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0x65 + b== + assert + dup + extract 0 1 // on error: Index access is out of bounds + pushbytes 0x66 + b== + assert + dig 2 + extract 1 1 // on error: Index access is out of bounds + pushbytes 0x67 + b== + assert + dig 1 + extract 1 1 // on error: Index access is out of bounds + pushbytes 0x68 + b== + assert + dup + extract 1 1 // on error: Index access is out of bounds + pushbytes 0x69 + b== + assert + pushint 200 // 200 + intc_0 // 0 + callsub mutate_tuple_items_and_reassign + dig 2 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0xc8 + b== + assert + dig 1 + extract 0 1 // on error: Index access is out of bounds + pushbytes 0xc9 + b== + assert + dup + extract 0 1 // on error: Index access is out of bounds + pushbytes 0xca + b== + assert + dig 2 + extract 1 1 // on error: Index access is out of bounds + pushbytes 0xce + b== + assert + swap + extract 1 1 // on error: Index access is out of bounds + pushbytes 0xcf + b== + assert + extract 1 1 // on error: Index access is out of bounds + pushbytes 0xd0 + b== + assert extract 0 4 // on error: Index access is out of bounds callsub other_routine_2 popn 2 @@ -74,14 +142,14 @@ mutating_copies: other_routine: proto 2 4 frame_dig -2 - bytec_0 // 0x05 + bytec_1 // 0x05 replace2 1 frame_bury -2 frame_dig -1 - intc_1 // 2 + intc_3 // 2 extract_uint16 frame_dig -1 - intc_3 // 0 + intc_0 // 0 dig 2 extract3 frame_dig -1 @@ -94,7 +162,7 @@ other_routine: uncover 2 substring3 uncover 2 - bytec 4 // 0x000741415252474821 + bytec_3 // 0x000741415252474821 concat swap concat @@ -112,8 +180,8 @@ other_routine: extract 6 2 replace2 4 frame_bury -1 - intc_0 // 1 - intc_3 // 0 + intc_1 // 1 + intc_0 // 0 frame_dig -2 frame_dig -1 retsub @@ -130,37 +198,171 @@ other_routine_2: retsub -// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: -other_routine_3: - proto 3 3 - intc_3 // 0 - -other_routine_3_for_body@1: - switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 - b other_routine_3_after_for@5 - -other_routine_3_for_header_1@3: - intc_0 // 1 - b other_routine_3_for_body@1 - -other_routine_3_for_header_2@4: - intc_1 // 2 - b other_routine_3_for_body@1 - -other_routine_3_after_for@5: - frame_dig -3 - bytec_2 // 0x63 +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: uint64) -> bytes, bytes, bytes: +mutate_tuple_items_and_reassign: + proto 5 3 + intc_0 // 0 + dupn 5 + intc_1 // 1 + dupn 2 + frame_dig -2 + itob + dup + extract 7 1 + frame_dig -5 + swap replace2 0 - frame_bury -3 + frame_bury -5 frame_dig -2 - bytec_2 // 0x63 + intc_1 // 1 + + + itob + dup + extract 7 1 + frame_dig -4 + swap replace2 0 - frame_bury -2 - frame_dig -1 - bytec_2 // 0x63 + frame_bury -4 + frame_dig -2 + intc_3 // 2 + + + itob + dup + extract 7 1 + frame_dig -3 + swap replace2 0 - frame_bury -1 + frame_bury -3 + frame_dig -5 + extract 0 1 // on error: Index access is out of bounds + uncover 3 + b== + assert + frame_dig -4 + extract 0 1 // on error: Index access is out of bounds + uncover 2 + b== + assert frame_dig -3 + extract 0 1 // on error: Index access is out of bounds + b== + assert + frame_dig -2 + pushint 3 // 3 + + + itob + extract 7 1 + frame_dig -5 + swap + replace2 1 + frame_bury -5 frame_dig -2 + intc_2 // 4 + + + itob + extract 7 1 + frame_dig -4 + swap + replace2 1 + frame_bury -4 + frame_dig -2 + pushint 5 // 5 + + + itob + extract 7 1 + frame_dig -3 + swap + replace2 1 + dup + frame_bury -3 + frame_dig -4 + frame_dig -5 frame_dig -1 + bz mutate_tuple_items_and_reassign_after_if_else@20 + intc_0 // 0 + frame_bury 6 + intc_0 // 0 + frame_bury 7 + intc_0 // 0 + frame_bury 8 + frame_dig -3 + frame_bury 9 + frame_dig -4 + frame_bury 10 + frame_dig -5 + frame_bury 11 + +mutate_tuple_items_and_reassign_after_if_else@20: + frame_dig -2 + pushint 6 // 6 + + + itob + dup + frame_bury 3 + extract 7 1 + frame_dig 11 + swap + replace2 1 + frame_bury 11 + frame_dig -5 + frame_bury 0 + frame_dig 6 + bz mutate_tuple_items_and_reassign_after_if_else@22 + frame_dig 11 + frame_bury 0 + +mutate_tuple_items_and_reassign_after_if_else@22: + frame_dig -2 + pushint 7 // 7 + + + itob + dup + frame_bury 4 + extract 7 1 + frame_dig 10 + swap + replace2 1 + frame_bury 10 + frame_dig -4 + frame_bury 1 + frame_dig 7 + bz mutate_tuple_items_and_reassign_after_if_else@24 + frame_dig 10 + frame_bury 1 + +mutate_tuple_items_and_reassign_after_if_else@24: + frame_dig -2 + pushint 8 // 8 + + + itob + dup + frame_bury 5 + extract 7 1 + frame_dig 9 + swap + replace2 1 + frame_bury 9 + frame_dig -3 + frame_bury 2 + frame_dig 8 + bz mutate_tuple_items_and_reassign_after_if_else@26 + frame_dig 9 + frame_bury 2 + +mutate_tuple_items_and_reassign_after_if_else@26: + frame_dig 11 + extract 1 1 // on error: Index access is out of bounds + frame_dig 3 + b== + assert + frame_dig 10 + extract 1 1 // on error: Index access is out of bounds + frame_dig 4 + b== + assert + frame_dig 9 + extract 1 1 // on error: Index access is out of bounds + frame_dig 5 + b== + assert retsub diff --git a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir index b5846911c8..4e6b90e337 100644 --- a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir +++ b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir @@ -32,13 +32,51 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#1, my_array_copy_2#2, my_array_copy_2#2) - let tmp%11#0: bytes = ((extract 0 4) my_array#1) // on error: Index access is out of bounds - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#1, my_array_copy_2#2, 0x01020304, 0u, 1u) + let (my_array#1: bytes, my_array_copy_2#2: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#1, my_array_copy_2#2, 0x01020304, 100u, 1u) + let reinterpret_biguint%12#0: biguint = ((extract 0 1) my_array#1) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let reinterpret_biguint%14#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let reinterpret_biguint%16#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let reinterpret_biguint%18#0: biguint = ((extract 1 1) my_array#1) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let reinterpret_biguint%20#0: biguint = ((extract 1 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let reinterpret_biguint%22#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (my_array#1: bytes, my_array_copy_2#2: bytes, my_array_copy_3#1: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#1, my_array_copy_2#2, my_array_copy_3#1, 200u, 0u) + let reinterpret_biguint%24#0: biguint = ((extract 0 1) my_array#1) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let reinterpret_biguint%26#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let reinterpret_biguint%28#0: biguint = ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let reinterpret_biguint%30#0: biguint = ((extract 1 1) my_array#1) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let reinterpret_biguint%32#0: biguint = ((extract 1 1) my_array_copy_2#2) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let reinterpret_biguint%34#0: biguint = ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let tmp%28#0: bytes = ((extract 0 4) my_array#1) // on error: Index access is out of bounds + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let array#0: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -57,29 +95,102 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#0 struct#0 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 - goto_nth [block@3, block@4][loop_counter%0#0] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#0: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#0: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let arrays.0#0: bytes = ((replace2 0) arrays.0#0 0x63) - let arrays.1#0: bytes = ((replace2 0) arrays.1#0 0x63) - let arrays.2#0: bytes = ((replace2 0) arrays.2#0 0x63) - return arrays.0#0 arrays.1#0 arrays.2#0 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.1%is_original#0: bool = 1u + let arrays.2%is_original#0: bool = 1u + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let arrays.0#0: bytes = ((replace2 0) arrays.0#0 assigned_value%0#0) + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let arrays.1#0: bytes = ((replace2 0) arrays.1#0 assigned_value%1#0) + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let arrays.2#0: bytes = ((replace2 0) arrays.2#0 assigned_value%2#0) + let reinterpret_biguint%0#0: biguint = ((extract 0 1) arrays.0#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 val_as_bytes%0#0) + (assert tmp%1#0) + let reinterpret_biguint%1#0: biguint = ((extract 0 1) arrays.1#0) // on error: Index access is out of bounds + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 val_as_bytes%1#0) + (assert tmp%4#0) + let reinterpret_biguint%2#0: biguint = ((extract 0 1) arrays.2#0) // on error: Index access is out of bounds + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 val_as_bytes%2#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let arrays.0#0: bytes = ((replace2 1) arrays.0#0 assigned_value%3#0) + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let arrays.1#0: bytes = ((replace2 1) arrays.1#0 assigned_value%4#0) + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let arrays.2#0: bytes = ((replace2 1) arrays.2#0 assigned_value%5#0) + let arrays.2#12: bytes = arrays.2#0 + let arrays.1#11: bytes = arrays.1#0 + let arrays.0#10: bytes = arrays.0#0 + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let arrays.0%is_original#0: bool = 0u + let arrays.1%is_original#0: bool = 0u + let arrays.2%is_original#0: bool = 0u + let arrays.2#12: bytes = arrays.2#0 + let arrays.1#11: bytes = arrays.1#0 + let arrays.0#10: bytes = arrays.0#0 + goto block@20 + block@20: // after_if_else_L147 + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let arrays.0#10: bytes = ((replace2 1) arrays.0#10 assigned_value%6#0) + let arrays.0%out#7: bytes = arrays.0#0 + goto arrays.0%is_original#0 ? block@21 : block@22 + block@21: // if_body_L1 + let arrays.0%out#7: bytes = arrays.0#10 + goto block@22 + block@22: // after_if_else_L1 + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let arrays.1#11: bytes = ((replace2 1) arrays.1#11 assigned_value%7#0) + let arrays.1%out#6: bytes = arrays.1#0 + goto arrays.1%is_original#0 ? block@23 : block@24 + block@23: // if_body_L1 + let arrays.1%out#6: bytes = arrays.1#11 + goto block@24 + block@24: // after_if_else_L1 + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let arrays.2#12: bytes = ((replace2 1) arrays.2#12 assigned_value%8#0) + let arrays.2%out#5: bytes = arrays.2#0 + goto arrays.2%is_original#0 ? block@25 : block@26 + block@25: // if_body_L1 + let arrays.2%out#5: bytes = arrays.2#12 + goto block@26 + block@26: // after_if_else_L1 + let reinterpret_biguint%3#0: biguint = ((extract 1 1) arrays.0#10) // on error: Index access is out of bounds + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 val_as_bytes%6#0) + (assert tmp%10#0) + let reinterpret_biguint%4#0: biguint = ((extract 1 1) arrays.1#11) // on error: Index access is out of bounds + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 val_as_bytes%7#0) + (assert tmp%13#0) + let reinterpret_biguint%5#0: biguint = ((extract 1 1) arrays.2#12) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 val_as_bytes%8#0) + (assert tmp%16#0) + return arrays.0%out#7 arrays.1%out#6 arrays.2%out#5 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_O2/MutableParams2.approval.teal b/test_cases/arc4_types/out_O2/MutableParams2.approval.teal new file mode 100644 index 0000000000..0c43532309 --- /dev/null +++ b/test_cases/arc4_types/out_O2/MutableParams2.approval.teal @@ -0,0 +1,122 @@ +#pragma version 10 + +test_cases.arc4_types.mutable_params2.MutableParams2.approval_program: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@5 + pushbytes 0x6ac4a557 // method "test_array_rebinding()void" + txna ApplicationArgs 0 + match __puya_arc4_router___test_array_rebinding_route@2 + intc_0 // 0 + retsub + +__puya_arc4_router___test_array_rebinding_route@2: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub test_array_rebinding + intc_1 // 1 + retsub + +__puya_arc4_router___bare_routing@5: + txn OnCompletion + bnz __puya_arc4_router___after_if_else@9 + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@9: + intc_0 // 0 + retsub + + +// test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: +test_array_rebinding: + proto 0 0 + pushbytes 0x000100 + intc_1 // 1 + callsub maybe_modify_array + pushbytes 0x00020001 + == + assert + pushbytes 0x000101 + intc_0 // 0 + callsub maybe_modify_array + pushbytes 0x0003012a04 + == + assert + retsub + + +// test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: uint64) -> bytes: +maybe_modify_array: + proto 2 1 + intc_0 // 0 + intc_1 // 1 + frame_dig -1 + bz maybe_modify_array_else_body@10 + frame_dig -2 + extract 2 0 + pushbytes 0x01 + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + pushbytes 0x0003010204 + intc_0 // 0 + frame_bury 1 + frame_dig -2 + frame_bury 0 + frame_bury -2 + b maybe_modify_array_after_if_else@13 + +maybe_modify_array_else_body@10: + frame_dig -2 + extract 2 0 + pushbytes 0x2a + concat + dup + len + itob + extract 6 2 + swap + concat + dupn 2 + frame_bury -2 + frame_bury 0 + frame_bury -2 + +maybe_modify_array_after_if_else@13: + frame_dig -2 + extract 2 0 + pushbytes 0x04 + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + frame_dig 1 + bz maybe_modify_array_after_if_else@15 + frame_dig -2 + frame_bury 0 + +maybe_modify_array_after_if_else@15: + retsub diff --git a/test_cases/arc4_types/out_O2/MutableParams2.clear.teal b/test_cases/arc4_types/out_O2/MutableParams2.clear.teal new file mode 100644 index 0000000000..e138fea62e --- /dev/null +++ b/test_cases/arc4_types/out_O2/MutableParams2.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +test_cases.arc4_types.mutable_params2.MutableParams2.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/arc4_types/out_O2/MutableParams2.destructured.ir b/test_cases/arc4_types/out_O2/MutableParams2.destructured.ir new file mode 100644 index 0000000000..e39aa56ece --- /dev/null +++ b/test_cases/arc4_types/out_O2/MutableParams2.destructured.ir @@ -0,0 +1,87 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000100, 1u) + let tmp%0#0: bool = (== a#1 0x00020001) + (assert tmp%0#0) + let a#1: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(0x000101, 0u) + let tmp%1#0: bool = (== a#1 0x0003012a04) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x01) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let a#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let a#5: bytes = 0x0003010204 + let a%is_original#0: bool = 0u + let a%out#7: bytes = a#0 + let a#0: bytes = a#5 + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 0x2a) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let a#0: bytes = (concat len_16_bit%2#0 concatenated%2#0) + let a%out#7: bytes = a#0 + let a#0: bytes = a%out#7 + goto block@13 + block@13: // after_if_else_L17 + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#0) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 0x04) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let a#0: bytes = (concat len_16_bit%3#0 concatenated%3#0) + goto a%is_original#0 ? block@14 : block@15 + block@14: // if_body_L1 + let a%out#7: bytes = a#0 + goto block@15 + block@15: // after_if_else_L1 + return a%out#7 + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal index d129478ee1..d98ef2b828 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal @@ -2,7 +2,7 @@ test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program: intcblock 1 0 2 4 - bytecblock 0x "Happy" 0x05 "AARRGH!" 0x63 "Days" + bytecblock 0x "Happy" 0x05 "AARRGH!" "Days" // arc4_types/mutable_params.py:29 // self.mutating_copies() callsub mutating_copies @@ -49,11 +49,11 @@ mutating_copies: swap // arc4_types/mutable_params.py:40 // s_val_2=String("Days"), - bytec 5 // "Days" + bytec 4 // "Days" len itob extract 6 2 - bytec 5 // "Days" + bytec 4 // "Days" concat cover 2 // arc4_types/mutable_params.py:36-41 @@ -231,7 +231,7 @@ mutating_copies: assert // my_struct_copy should not be mutated by the subroutine // arc4_types/mutable_params.py:73 // my_array_copy_2 = my_array_copy.copy() - swap + dig 1 // arc4_types/mutable_params.py:75 // my_array_copy_2 = self.other_routine_2(my_array_copy_2) callsub other_routine_2 @@ -262,24 +262,245 @@ mutating_copies: pushbytes 0x0a b== assert // my_array_copy_2 should have mutated value - // arc4_types/mutable_params.py:82-83 - // # tuples of mutable types only work with a .copy() - // self.other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) - dup2 + // arc4_types/mutable_params.py:82 + // my_array_copy_3 = my_array_copy.copy() + uncover 2 + // arc4_types/mutable_params.py:84 + // originals = (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()) + dig 2 swap + dig 2 + cover 2 + dup + cover 2 + swap + cover 5 uncover 2 + cover 5 swap + cover 5 + // arc4_types/mutable_params.py:86 + // (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + dig 2 + dig 2 + dig 2 + // arc4_types/mutable_params.py:85-89 + // self.mutate_tuple_items_and_reassign( + // (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + // start=UInt64(0), + // reassign=True, + // ) + uncover 2 uncover 2 uncover 2 - callsub other_routine_3 + // arc4_types/mutable_params.py:87 + // start=UInt64(0), + intc_1 // 0 + // arc4_types/mutable_params.py:88 + // reassign=True, + intc_0 // 1 + // arc4_types/mutable_params.py:85-89 + // self.mutate_tuple_items_and_reassign( + // (my_array.copy(), my_array_copy_2.copy(), my_array_copy_3.copy()), + // start=UInt64(0), + // reassign=True, + // ) + callsub mutate_tuple_items_and_reassign popn 3 - // arc4_types/mutable_params.py:85-86 + // arc4_types/mutable_params.py:90 + // assert originals == (my_array, my_array_copy_2, my_array_copy_3) + uncover 3 + dig 3 + == + uncover 4 + dig 3 + == + && + uncover 4 + dig 2 + == + && + assert + // arc4_types/mutable_params.py:92-94 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + // ) + uncover 2 + uncover 2 + uncover 2 + // arc4_types/mutable_params.py:93 + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + pushint 100 // 100 + intc_0 // 1 + // arc4_types/mutable_params.py:92-94 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(100), reassign=True + // ) + callsub mutate_tuple_items_and_reassign + cover 2 + cover 2 + cover 2 + cover 2 + swap + // arc4_types/mutable_params.py:96 + // assert my_array[0] == 100 + dup + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0x64 + b== + assert + // arc4_types/mutable_params.py:97 + // assert my_array_copy_2[0] == 101 + dig 1 + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0x65 + b== + assert + // arc4_types/mutable_params.py:98 + // assert my_array_copy_3[0] == 102 + dig 2 + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0x66 + b== + assert + // arc4_types/mutable_params.py:99 + // assert my_array[1] == 103 + dup + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0x67 + b== + assert + // arc4_types/mutable_params.py:100 + // assert my_array_copy_2[1] == 104 + dig 1 + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0x68 + b== + assert + // arc4_types/mutable_params.py:101 + // assert my_array_copy_3[1] == 105 + dig 2 + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0x69 + b== + assert + // arc4_types/mutable_params.py:103-105 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + // ) + swap + uncover 2 + // arc4_types/mutable_params.py:104 + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + pushint 200 // 200 + intc_1 // 0 + // arc4_types/mutable_params.py:103-105 + // self.mutate_tuple_items_and_reassign( + // (my_array, my_array_copy_2, my_array_copy_3), start=UInt64(200), reassign=False + // ) + callsub mutate_tuple_items_and_reassign + cover 2 + cover 2 + cover 2 + cover 2 + swap + // arc4_types/mutable_params.py:107 + // assert my_array[0] == 200 + dup + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0xc8 + b== + assert + // arc4_types/mutable_params.py:108 + // assert my_array_copy_2[0] == 201 + dig 1 + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0xc9 + b== + assert + // arc4_types/mutable_params.py:109 + // assert my_array_copy_3[0] == 202 + dig 2 + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0xca + b== + assert + // arc4_types/mutable_params.py:110 + // assert my_array[1] == 206 + dup + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0xce + b== + assert + // arc4_types/mutable_params.py:111 + // assert my_array_copy_2[1] == 207 + swap + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0xcf + b== + assert + // arc4_types/mutable_params.py:112 + // assert my_array_copy_3[1] == 208 + swap + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + pushbytes 0xd0 + b== + assert + // arc4_types/mutable_params.py:114-115 // # Nested array items should still require a copy // nested = StructWithArray(test_array=my_array.copy()) bytec_0 // 0x swap concat - // arc4_types/mutable_params.py:87 + // arc4_types/mutable_params.py:116 // self.other_routine_2(nested.test_array.copy()) intc_1 // 0 intc_3 // 4 @@ -291,18 +512,22 @@ mutating_copies: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> uint64, uint64, bytes, bytes: other_routine: - // arc4_types/mutable_params.py:89-90 + // arc4_types/mutable_params.py:118-119 // @subroutine // def other_routine(self, array: TestArray, struct: TestStruct) -> tuple[bool, bool]: proto 2 4 - // arc4_types/mutable_params.py:91 + // arc4_types/mutable_params.py:120 // array[1] = UInt8(5) frame_dig -2 intc_0 // 1 bytec_2 // 0x05 replace3 frame_bury -2 - // arc4_types/mutable_params.py:92 + intc_0 // 1 + bz other_routine_after_if_else@2 + +other_routine_after_if_else@2: + // arc4_types/mutable_params.py:121 // struct.s_val_1 = String("AARRGH!") bytec_3 // "AARRGH!" len @@ -350,7 +575,11 @@ other_routine: uncover 2 replace3 frame_bury -1 - // arc4_types/mutable_params.py:93 + intc_0 // 1 + bz other_routine_after_if_else@4 + +other_routine_after_if_else@4: + // arc4_types/mutable_params.py:122 // return True, False intc_0 // 1 intc_1 // 0 @@ -361,76 +590,371 @@ other_routine: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> bytes, bytes: other_routine_2: - // arc4_types/mutable_params.py:95-96 + // arc4_types/mutable_params.py:124-125 // @subroutine // def other_routine_2(self, array: TestArray) -> TestArray: proto 1 2 - // arc4_types/mutable_params.py:97 + // arc4_types/mutable_params.py:126 // copy = array.copy() frame_dig -1 - // arc4_types/mutable_params.py:98 + // arc4_types/mutable_params.py:127 // array[0] = UInt8(10) dup intc_1 // 0 pushbytes 0x0a replace3 - dup frame_bury -1 - // arc4_types/mutable_params.py:99 + intc_0 // 1 + bz other_routine_2_after_if_else@2 + +other_routine_2_after_if_else@2: + // arc4_types/mutable_params.py:128 // return copy + frame_dig 0 + frame_dig -1 + uncover 2 retsub -// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: -other_routine_3: - // arc4_types/mutable_params.py:101-102 +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: uint64) -> bytes, bytes, bytes: +mutate_tuple_items_and_reassign: + // arc4_types/mutable_params.py:130-133 // @subroutine - // def other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: - proto 3 3 + // def mutate_tuple_items_and_reassign( + // self, arrays: tuple[TestArray, TestArray, TestArray], *, start: UInt64, reassign: bool + // ) -> None: + proto 5 3 intc_1 // 0 + dupn 5 + intc_0 // 1 + frame_dig -5 + intc_0 // 1 + frame_dig -4 + intc_0 // 1 + frame_dig -3 + // arc4_types/mutable_params.py:134 + // arrays[0][0] = UInt8(start) + frame_dig -2 + itob + extract 7 1 + frame_dig -5 + intc_1 // 0 + uncover 2 + replace3 + frame_bury -5 + intc_0 // 1 + bz mutate_tuple_items_and_reassign_after_if_else@2 + frame_dig -5 + frame_bury 7 -other_routine_3_for_body@1: - // arc4_types/mutable_params.py:103-104 - // # this modifies the local copy - // for array in arrays: - frame_dig 0 - switch other_routine_3_for_header_1@3 other_routine_3_for_header_2@4 - b other_routine_3_after_for@5 - -other_routine_3_for_header_1@3: +mutate_tuple_items_and_reassign_after_if_else@2: + // arc4_types/mutable_params.py:135 + // arrays[1][0] = UInt8(start + 1) + frame_dig -2 intc_0 // 1 - frame_bury 0 - b other_routine_3_for_body@1 + + + itob + extract 7 1 + frame_dig -4 + intc_1 // 0 + uncover 2 + replace3 + frame_bury -4 + intc_0 // 1 + bz mutate_tuple_items_and_reassign_after_if_else@4 + frame_dig -4 + frame_bury 9 -other_routine_3_for_header_2@4: +mutate_tuple_items_and_reassign_after_if_else@4: + // arc4_types/mutable_params.py:136 + // arrays[2][0] = UInt8(start + 2) + frame_dig -2 intc_2 // 2 - frame_bury 0 - b other_routine_3_for_body@1 - -other_routine_3_after_for@5: - // arc4_types/mutable_params.py:107 - // arrays[0][0] = UInt8(99) + + + itob + extract 7 1 frame_dig -3 intc_1 // 0 - bytec 4 // 0x63 + uncover 2 replace3 frame_bury -3 - // arc4_types/mutable_params.py:108 - // arrays[1][0] = UInt8(99) + intc_0 // 1 + bz mutate_tuple_items_and_reassign_after_if_else@6 + frame_dig -3 + frame_bury 11 + +mutate_tuple_items_and_reassign_after_if_else@6: + // arc4_types/mutable_params.py:138 + // assert arrays[0][0] == start + frame_dig -5 + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + frame_dig -2 + itob + b== + assert + // arc4_types/mutable_params.py:139 + // assert arrays[1][0] == start + 1 + frame_dig -4 + intc_1 // 0 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds frame_dig -2 + intc_0 // 1 + + + itob + b== + assert + // arc4_types/mutable_params.py:140 + // assert arrays[2][0] == start + 2 + frame_dig -3 intc_1 // 0 - bytec 4 // 0x63 + intc_0 // 1 + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + frame_dig -2 + intc_2 // 2 + + + itob + b== + assert + // arc4_types/mutable_params.py:142 + // arrays[0][1] = UInt8(start + 3) + frame_dig -2 + pushint 3 // 3 + + + itob + extract 7 1 + frame_dig -5 + intc_0 // 1 + uncover 2 replace3 - frame_bury -2 - // arc4_types/mutable_params.py:109 - // arrays[2][0] = UInt8(99) + frame_bury -5 + intc_0 // 1 + bz mutate_tuple_items_and_reassign_after_if_else@8 + frame_dig -5 + frame_bury 7 + +mutate_tuple_items_and_reassign_after_if_else@8: + // arc4_types/mutable_params.py:143 + // arrays[1][1] = UInt8(start + 4) + frame_dig -2 + intc_3 // 4 + + + itob + extract 7 1 + frame_dig -4 + intc_0 // 1 + uncover 2 + replace3 + frame_bury -4 + intc_0 // 1 + bz mutate_tuple_items_and_reassign_after_if_else@10 + frame_dig -4 + frame_bury 9 + +mutate_tuple_items_and_reassign_after_if_else@10: + // arc4_types/mutable_params.py:144 + // arrays[2][1] = UInt8(start + 5) + frame_dig -2 + pushint 5 // 5 + + + itob + extract 7 1 + frame_dig -3 + intc_0 // 1 + uncover 2 + replace3 + frame_bury -3 + intc_0 // 1 + bz mutate_tuple_items_and_reassign_after_if_else@12 + frame_dig -3 + frame_bury 11 + +mutate_tuple_items_and_reassign_after_if_else@12: + frame_dig 11 + frame_bury 5 + frame_dig 9 + frame_bury 3 + frame_dig 7 + frame_bury 1 + frame_dig -3 + frame_bury 4 + frame_dig -4 + frame_bury 2 + frame_dig -5 + frame_bury 0 + // arc4_types/mutable_params.py:146-147 + // # overwrite params + // if reassign: frame_dig -1 + bz mutate_tuple_items_and_reassign_after_if_else@20 + // arc4_types/mutable_params.py:148 + // arrays = (arrays[0].copy(), arrays[1].copy(), arrays[2].copy()) + frame_dig -5 + frame_dig -4 + swap + frame_dig -3 + cover 2 + intc_1 // 0 + frame_bury 6 intc_1 // 0 - bytec 4 // 0x63 + frame_bury 8 + intc_1 // 0 + frame_bury 10 + frame_bury -5 + frame_bury -4 + frame_bury -3 + intc_1 // 0 + bz mutate_tuple_items_and_reassign_after_if_else@15 + frame_dig -5 + frame_bury 7 + +mutate_tuple_items_and_reassign_after_if_else@15: + intc_1 // 0 + bz mutate_tuple_items_and_reassign_after_if_else@17 + frame_dig -4 + frame_bury 9 + +mutate_tuple_items_and_reassign_after_if_else@17: + intc_1 // 0 + bz mutate_tuple_items_and_reassign_after_if_else@19 + frame_dig -3 + frame_bury 11 + +mutate_tuple_items_and_reassign_after_if_else@19: + frame_dig 11 + frame_bury 5 + frame_dig 9 + frame_bury 3 + frame_dig 7 + frame_bury 1 + frame_dig -3 + frame_bury 4 + frame_dig -4 + frame_bury 2 + frame_dig -5 + frame_bury 0 + +mutate_tuple_items_and_reassign_after_if_else@20: + frame_dig 5 + frame_bury 11 + frame_dig 3 + frame_bury 9 + frame_dig 1 + frame_bury 7 + frame_dig 4 + frame_bury -3 + frame_dig 2 + frame_bury -4 + frame_dig 0 + frame_bury -5 + // arc4_types/mutable_params.py:150 + // arrays[0][1] = UInt8(start + 6) + frame_dig -2 + pushint 6 // 6 + + + itob + extract 7 1 + frame_dig -5 + intc_0 // 1 + uncover 2 replace3 - frame_bury -1 + frame_bury -5 + frame_dig 6 + bz mutate_tuple_items_and_reassign_after_if_else@22 + frame_dig -5 + frame_bury 7 + +mutate_tuple_items_and_reassign_after_if_else@22: + // arc4_types/mutable_params.py:151 + // arrays[1][1] = UInt8(start + 7) + frame_dig -2 + pushint 7 // 7 + + + itob + extract 7 1 + frame_dig -4 + intc_0 // 1 + uncover 2 + replace3 + frame_bury -4 + frame_dig 8 + bz mutate_tuple_items_and_reassign_after_if_else@24 + frame_dig -4 + frame_bury 9 + +mutate_tuple_items_and_reassign_after_if_else@24: + // arc4_types/mutable_params.py:152 + // arrays[2][1] = UInt8(start + 8) + frame_dig -2 + pushint 8 // 8 + + + itob + extract 7 1 + frame_dig -3 + intc_0 // 1 + uncover 2 + replace3 + frame_bury -3 + frame_dig 10 + bz mutate_tuple_items_and_reassign_after_if_else@26 frame_dig -3 + frame_bury 11 + +mutate_tuple_items_and_reassign_after_if_else@26: + // arc4_types/mutable_params.py:154 + // assert arrays[0][1] == start + 6 + frame_dig -5 + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds frame_dig -2 - frame_dig -1 - uncover 3 + pushint 6 // 6 + + + itob + b== + assert + // arc4_types/mutable_params.py:155 + // assert arrays[1][1] == start + 7 + frame_dig -4 + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + frame_dig -2 + pushint 7 // 7 + + + itob + b== + assert + // arc4_types/mutable_params.py:156 + // assert arrays[2][1] == start + 8 + frame_dig -3 + intc_0 // 1 + dup + * + intc_0 // 1 + extract3 // on error: Index access is out of bounds + frame_dig -2 + pushint 8 // 8 + + + itob + b== + assert + frame_dig 7 + frame_dig 9 + frame_dig 11 + frame_bury 2 + frame_bury 1 + frame_bury 0 retsub diff --git a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal index 533fc84667..825e67715f 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program: - // arc4_types/mutable_params.py:112 + // arc4_types/mutable_params.py:159 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir index 3168095c73..d8abd2520d 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir +++ b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir @@ -106,22 +106,108 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = (extract3 array_head_and_tail%5#0 item_offset%5#0 1u) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value - let copy%5#0: bytes = my_array#0 - let copy%6#0: bytes = my_array_copy_2#0 + let copy%5#0: bytes = my_array_copy#0 + let my_array_copy_3#0: bytes = copy%5#0 + let copy%6#0: bytes = my_array#0 let copy%7#0: bytes = my_array_copy_2#0 - let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(copy%5#0, copy%6#0, copy%7#0) - let copy%8#0: bytes = my_array#0 - let encoded_tuple_buffer%8#0: bytes = (concat 0x copy%8#0) + let copy%8#0: bytes = my_array_copy_3#0 + let originals.0#0: bytes = copy%6#0 + let originals.1#0: bytes = copy%7#0 + let originals.2#0: bytes = copy%8#0 + let copy%9#0: bytes = my_array#0 + let copy%10#0: bytes = my_array_copy_2#0 + let copy%11#0: bytes = my_array_copy_3#0 + let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(copy%9#0, copy%10#0, copy%11#0, 0u, 1u) + let tmp%11#0: bool = (== originals.0#0 my_array#0) + let tmp%12#0: bool = (== originals.1#0 my_array_copy_2#0) + let tmp%13#0: bool = (&& tmp%11#0 tmp%12#0) + let tmp%14#0: bool = (== originals.2#0 my_array_copy_3#0) + let tmp%15#0: bool = (&& tmp%13#0 tmp%14#0) + (assert tmp%15#0) + let (mutate_tuple_items_and_reassign%3#0: bytes, mutate_tuple_items_and_reassign%4#0: bytes, mutate_tuple_items_and_reassign%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#0, my_array_copy_2#0, my_array_copy_3#0, 100u, 1u) + let my_array_copy_3#0: bytes = mutate_tuple_items_and_reassign%5#0 + let my_array_copy_2#0: bytes = mutate_tuple_items_and_reassign%4#0 + let my_array#0: bytes = mutate_tuple_items_and_reassign%3#0 + let array_head_and_tail%6#0: bytes = my_array#0 + let item_offset%6#0: uint64 = (* 0u 1u) + let reinterpret_biguint%12#0: biguint = (extract3 array_head_and_tail%6#0 item_offset%6#0 1u) // on error: Index access is out of bounds + let tmp%16#0: bool = (b== reinterpret_biguint%12#0 0x64) + (assert tmp%16#0) + let array_head_and_tail%7#0: bytes = my_array_copy_2#0 + let item_offset%7#0: uint64 = (* 0u 1u) + let reinterpret_biguint%14#0: biguint = (extract3 array_head_and_tail%7#0 item_offset%7#0 1u) // on error: Index access is out of bounds + let tmp%17#0: bool = (b== reinterpret_biguint%14#0 0x65) + (assert tmp%17#0) + let array_head_and_tail%8#0: bytes = my_array_copy_3#0 + let item_offset%8#0: uint64 = (* 0u 1u) + let reinterpret_biguint%16#0: biguint = (extract3 array_head_and_tail%8#0 item_offset%8#0 1u) // on error: Index access is out of bounds + let tmp%18#0: bool = (b== reinterpret_biguint%16#0 0x66) + (assert tmp%18#0) + let array_head_and_tail%9#0: bytes = my_array#0 + let item_offset%9#0: uint64 = (* 1u 1u) + let reinterpret_biguint%18#0: biguint = (extract3 array_head_and_tail%9#0 item_offset%9#0 1u) // on error: Index access is out of bounds + let tmp%19#0: bool = (b== reinterpret_biguint%18#0 0x67) + (assert tmp%19#0) + let array_head_and_tail%10#0: bytes = my_array_copy_2#0 + let item_offset%10#0: uint64 = (* 1u 1u) + let reinterpret_biguint%20#0: biguint = (extract3 array_head_and_tail%10#0 item_offset%10#0 1u) // on error: Index access is out of bounds + let tmp%20#0: bool = (b== reinterpret_biguint%20#0 0x68) + (assert tmp%20#0) + let array_head_and_tail%11#0: bytes = my_array_copy_3#0 + let item_offset%11#0: uint64 = (* 1u 1u) + let reinterpret_biguint%22#0: biguint = (extract3 array_head_and_tail%11#0 item_offset%11#0 1u) // on error: Index access is out of bounds + let tmp%21#0: bool = (b== reinterpret_biguint%22#0 0x69) + (assert tmp%21#0) + let (mutate_tuple_items_and_reassign%6#0: bytes, mutate_tuple_items_and_reassign%7#0: bytes, mutate_tuple_items_and_reassign%8#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#0, my_array_copy_2#0, my_array_copy_3#0, 200u, 0u) + let my_array_copy_3#0: bytes = mutate_tuple_items_and_reassign%8#0 + let my_array_copy_2#0: bytes = mutate_tuple_items_and_reassign%7#0 + let my_array#0: bytes = mutate_tuple_items_and_reassign%6#0 + let array_head_and_tail%12#0: bytes = my_array#0 + let item_offset%12#0: uint64 = (* 0u 1u) + let reinterpret_biguint%24#0: biguint = (extract3 array_head_and_tail%12#0 item_offset%12#0 1u) // on error: Index access is out of bounds + let tmp%22#0: bool = (b== reinterpret_biguint%24#0 0xc8) + (assert tmp%22#0) + let array_head_and_tail%13#0: bytes = my_array_copy_2#0 + let item_offset%13#0: uint64 = (* 0u 1u) + let reinterpret_biguint%26#0: biguint = (extract3 array_head_and_tail%13#0 item_offset%13#0 1u) // on error: Index access is out of bounds + let tmp%23#0: bool = (b== reinterpret_biguint%26#0 0xc9) + (assert tmp%23#0) + let array_head_and_tail%14#0: bytes = my_array_copy_3#0 + let item_offset%14#0: uint64 = (* 0u 1u) + let reinterpret_biguint%28#0: biguint = (extract3 array_head_and_tail%14#0 item_offset%14#0 1u) // on error: Index access is out of bounds + let tmp%24#0: bool = (b== reinterpret_biguint%28#0 0xca) + (assert tmp%24#0) + let array_head_and_tail%15#0: bytes = my_array#0 + let item_offset%15#0: uint64 = (* 1u 1u) + let reinterpret_biguint%30#0: biguint = (extract3 array_head_and_tail%15#0 item_offset%15#0 1u) // on error: Index access is out of bounds + let tmp%25#0: bool = (b== reinterpret_biguint%30#0 0xce) + (assert tmp%25#0) + let array_head_and_tail%16#0: bytes = my_array_copy_2#0 + let item_offset%16#0: uint64 = (* 1u 1u) + let reinterpret_biguint%32#0: biguint = (extract3 array_head_and_tail%16#0 item_offset%16#0 1u) // on error: Index access is out of bounds + let tmp%26#0: bool = (b== reinterpret_biguint%32#0 0xcf) + (assert tmp%26#0) + let array_head_and_tail%17#0: bytes = my_array_copy_3#0 + let item_offset%17#0: uint64 = (* 1u 1u) + let reinterpret_biguint%34#0: biguint = (extract3 array_head_and_tail%17#0 item_offset%17#0 1u) // on error: Index access is out of bounds + let tmp%27#0: bool = (b== reinterpret_biguint%34#0 0xd0) + (assert tmp%27#0) + let copy%12#0: bytes = my_array#0 + let encoded_tuple_buffer%8#0: bytes = (concat 0x copy%12#0) let nested#0: bytes = encoded_tuple_buffer%8#0 - let tmp%11#0: bytes = (extract3 nested#0 0u 4u) // on error: Index access is out of bounds - let copy%9#0: bytes = tmp%11#0 - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%9#0) + let tmp%28#0: bytes = (extract3 nested#0 0u 4u) // on error: Index access is out of bounds + let copy%13#0: bytes = tmp%28#0 + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%13#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L89 + block@0: // L118 let updated_target%0#0: bytes = (replace3 array#0 1u 0x05) let array#0: bytes = updated_target%0#0 + goto 1u ? block@1 : block@2 + block@1: // if_body_L1 + goto block@2 + block@2: // after_if_else_L1 let length%0#0: uint64 = (len "AARRGH!") let as_bytes%0#0: bytes = (itob length%0#0) let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) @@ -143,40 +229,211 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tail_offset_bytes%0#0: bytes = ((extract 6 2) as_bytes%1#0) let updated_data%2#0: bytes = (replace3 updated_data%1#0 4u tail_offset_bytes%0#0) let struct#0: bytes = updated_data%2#0 + goto 1u ? block@3 : block@4 + block@3: // if_body_L1 + goto block@4 + block@4: // after_if_else_L1 return 1u 0u array#0 struct#0 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L95 + block@0: // L124 let copy%0#0: bytes = array#0 let copy#0: bytes = copy%0#0 let updated_target%0#0: bytes = (replace3 array#0 0u 0x0a) let array#0: bytes = updated_target%0#0 + goto 1u ? block@1 : block@2 + block@1: // if_body_L1 + goto block@2 + block@2: // after_if_else_L1 return copy#0 array#0 - subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : - block@0: // L101 - let loop_counter%0#0: uint64 = 0u - goto block@1 - block@1: // for_body_L105 + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes, start: uint64, reassign: bool) -> : + block@0: // L130 + let arrays.0%is_original#0: bool = 1u + let arrays.0%out#0: bytes = arrays.0#0 + let arrays.1%is_original#0: bool = 1u + let arrays.1%out#0: bytes = arrays.1#0 + let arrays.2%is_original#0: bool = 1u + let arrays.2%out#0: bytes = arrays.2#0 + let val_as_bytes%0#0: bytes = (itob start#0) + let assigned_value%0#0: bytes = ((extract 7 1) val_as_bytes%0#0) + let updated_target%0#0: bytes = (replace3 arrays.0#0 0u assigned_value%0#0) + let arrays.0#0: bytes = updated_target%0#0 + goto 1u ? block@1 : block@2 + block@1: // if_body_L1 + let arrays.0%out#0: bytes = arrays.0#0 goto block@2 - block@2: // for_footer_L104 - goto_nth [block@3, block@4][loop_counter%0#0] else goto block@5 - block@3: // for_header_1_L104 - let loop_counter%0#0: uint64 = 1u - goto block@1 - block@4: // for_header_2_L104 - let loop_counter%0#0: uint64 = 2u - goto block@1 - block@5: // after_for_L104 - let updated_target%1#0: bytes = (replace3 arrays.0#0 0u 0x63) - let arrays.0#0: bytes = updated_target%1#0 - let updated_target%2#0: bytes = (replace3 arrays.1#0 0u 0x63) - let arrays.1#0: bytes = updated_target%2#0 - let updated_target%3#0: bytes = (replace3 arrays.2#0 0u 0x63) - let arrays.2#0: bytes = updated_target%3#0 - return arrays.0#0 arrays.1#0 arrays.2#0 + block@2: // after_if_else_L1 + let to_encode%0#0: uint64 = (+ start#0 1u) + let val_as_bytes%1#0: bytes = (itob to_encode%0#0) + let assigned_value%1#0: bytes = ((extract 7 1) val_as_bytes%1#0) + let updated_target%1#0: bytes = (replace3 arrays.1#0 0u assigned_value%1#0) + let arrays.1#0: bytes = updated_target%1#0 + goto 1u ? block@3 : block@4 + block@3: // if_body_L1 + let arrays.1%out#0: bytes = arrays.1#0 + goto block@4 + block@4: // after_if_else_L1 + let to_encode%1#0: uint64 = (+ start#0 2u) + let val_as_bytes%2#0: bytes = (itob to_encode%1#0) + let assigned_value%2#0: bytes = ((extract 7 1) val_as_bytes%2#0) + let updated_target%2#0: bytes = (replace3 arrays.2#0 0u assigned_value%2#0) + let arrays.2#0: bytes = updated_target%2#0 + goto 1u ? block@5 : block@6 + block@5: // if_body_L1 + let arrays.2%out#0: bytes = arrays.2#0 + goto block@6 + block@6: // after_if_else_L1 + let array_head_and_tail%0#0: bytes = arrays.0#0 + let item_offset%0#0: uint64 = (* 0u 1u) + let reinterpret_biguint%0#0: biguint = (extract3 array_head_and_tail%0#0 item_offset%0#0 1u) // on error: Index access is out of bounds + let tmp%0#0: biguint = (itob start#0) + let tmp%1#0: bool = (b== reinterpret_biguint%0#0 tmp%0#0) + (assert tmp%1#0) + let array_head_and_tail%1#0: bytes = arrays.1#0 + let item_offset%1#0: uint64 = (* 0u 1u) + let reinterpret_biguint%1#0: biguint = (extract3 array_head_and_tail%1#0 item_offset%1#0 1u) // on error: Index access is out of bounds + let tmp%2#0: uint64 = (+ start#0 1u) + let tmp%3#0: biguint = (itob tmp%2#0) + let tmp%4#0: bool = (b== reinterpret_biguint%1#0 tmp%3#0) + (assert tmp%4#0) + let array_head_and_tail%2#0: bytes = arrays.2#0 + let item_offset%2#0: uint64 = (* 0u 1u) + let reinterpret_biguint%2#0: biguint = (extract3 array_head_and_tail%2#0 item_offset%2#0 1u) // on error: Index access is out of bounds + let tmp%5#0: uint64 = (+ start#0 2u) + let tmp%6#0: biguint = (itob tmp%5#0) + let tmp%7#0: bool = (b== reinterpret_biguint%2#0 tmp%6#0) + (assert tmp%7#0) + let to_encode%2#0: uint64 = (+ start#0 3u) + let val_as_bytes%3#0: bytes = (itob to_encode%2#0) + let assigned_value%3#0: bytes = ((extract 7 1) val_as_bytes%3#0) + let updated_target%3#0: bytes = (replace3 arrays.0#0 1u assigned_value%3#0) + let arrays.0#0: bytes = updated_target%3#0 + goto 1u ? block@7 : block@8 + block@7: // if_body_L1 + let arrays.0%out#0: bytes = arrays.0#0 + goto block@8 + block@8: // after_if_else_L1 + let to_encode%3#0: uint64 = (+ start#0 4u) + let val_as_bytes%4#0: bytes = (itob to_encode%3#0) + let assigned_value%4#0: bytes = ((extract 7 1) val_as_bytes%4#0) + let updated_target%4#0: bytes = (replace3 arrays.1#0 1u assigned_value%4#0) + let arrays.1#0: bytes = updated_target%4#0 + goto 1u ? block@9 : block@10 + block@9: // if_body_L1 + let arrays.1%out#0: bytes = arrays.1#0 + goto block@10 + block@10: // after_if_else_L1 + let to_encode%4#0: uint64 = (+ start#0 5u) + let val_as_bytes%5#0: bytes = (itob to_encode%4#0) + let assigned_value%5#0: bytes = ((extract 7 1) val_as_bytes%5#0) + let updated_target%5#0: bytes = (replace3 arrays.2#0 1u assigned_value%5#0) + let arrays.2#0: bytes = updated_target%5#0 + goto 1u ? block@11 : block@12 + block@11: // if_body_L1 + let arrays.2%out#0: bytes = arrays.2#0 + goto block@12 + block@12: // after_if_else_L1 + let arrays.2%out#27: bytes = arrays.2%out#0 + let arrays.1%out#28: bytes = arrays.1%out#0 + let arrays.0%out#29: bytes = arrays.0%out#0 + let arrays.2#19: bytes = arrays.2#0 + let arrays.1#18: bytes = arrays.1#0 + let arrays.0#17: bytes = arrays.0#0 + goto reassign#0 ? block@13 : block@20 + block@13: // if_body_L148 + let copy%0#0: bytes = arrays.0#0 + let copy%1#0: bytes = arrays.1#0 + let copy%2#0: bytes = arrays.2#0 + let arrays.0%is_original#0: bool = 0u + let arrays.1%is_original#0: bool = 0u + let arrays.2%is_original#0: bool = 0u + let arrays.0#0: bytes = copy%0#0 + let arrays.1#0: bytes = copy%1#0 + let arrays.2#0: bytes = copy%2#0 + goto 0u ? block@14 : block@15 + block@14: // if_body_L1 + let arrays.0%out#0: bytes = arrays.0#0 + goto block@15 + block@15: // after_if_else_L1 + goto 0u ? block@16 : block@17 + block@16: // if_body_L1 + let arrays.1%out#0: bytes = arrays.1#0 + goto block@17 + block@17: // after_if_else_L1 + goto 0u ? block@18 : block@19 + block@18: // if_body_L1 + let arrays.2%out#0: bytes = arrays.2#0 + goto block@19 + block@19: // after_if_else_L1 + let arrays.2%out#27: bytes = arrays.2%out#0 + let arrays.1%out#28: bytes = arrays.1%out#0 + let arrays.0%out#29: bytes = arrays.0%out#0 + let arrays.2#19: bytes = arrays.2#0 + let arrays.1#18: bytes = arrays.1#0 + let arrays.0#17: bytes = arrays.0#0 + goto block@20 + block@20: // after_if_else_L147 + let arrays.2%out#0: bytes = arrays.2%out#27 + let arrays.1%out#0: bytes = arrays.1%out#28 + let arrays.0%out#0: bytes = arrays.0%out#29 + let arrays.2#0: bytes = arrays.2#19 + let arrays.1#0: bytes = arrays.1#18 + let arrays.0#0: bytes = arrays.0#17 + let to_encode%5#0: uint64 = (+ start#0 6u) + let val_as_bytes%6#0: bytes = (itob to_encode%5#0) + let assigned_value%6#0: bytes = ((extract 7 1) val_as_bytes%6#0) + let updated_target%6#0: bytes = (replace3 arrays.0#0 1u assigned_value%6#0) + let arrays.0#0: bytes = updated_target%6#0 + goto arrays.0%is_original#0 ? block@21 : block@22 + block@21: // if_body_L1 + let arrays.0%out#0: bytes = arrays.0#0 + goto block@22 + block@22: // after_if_else_L1 + let to_encode%6#0: uint64 = (+ start#0 7u) + let val_as_bytes%7#0: bytes = (itob to_encode%6#0) + let assigned_value%7#0: bytes = ((extract 7 1) val_as_bytes%7#0) + let updated_target%7#0: bytes = (replace3 arrays.1#0 1u assigned_value%7#0) + let arrays.1#0: bytes = updated_target%7#0 + goto arrays.1%is_original#0 ? block@23 : block@24 + block@23: // if_body_L1 + let arrays.1%out#0: bytes = arrays.1#0 + goto block@24 + block@24: // after_if_else_L1 + let to_encode%7#0: uint64 = (+ start#0 8u) + let val_as_bytes%8#0: bytes = (itob to_encode%7#0) + let assigned_value%8#0: bytes = ((extract 7 1) val_as_bytes%8#0) + let updated_target%8#0: bytes = (replace3 arrays.2#0 1u assigned_value%8#0) + let arrays.2#0: bytes = updated_target%8#0 + goto arrays.2%is_original#0 ? block@25 : block@26 + block@25: // if_body_L1 + let arrays.2%out#0: bytes = arrays.2#0 + goto block@26 + block@26: // after_if_else_L1 + let array_head_and_tail%3#0: bytes = arrays.0#0 + let item_offset%3#0: uint64 = (* 1u 1u) + let reinterpret_biguint%3#0: biguint = (extract3 array_head_and_tail%3#0 item_offset%3#0 1u) // on error: Index access is out of bounds + let tmp%8#0: uint64 = (+ start#0 6u) + let tmp%9#0: biguint = (itob tmp%8#0) + let tmp%10#0: bool = (b== reinterpret_biguint%3#0 tmp%9#0) + (assert tmp%10#0) + let array_head_and_tail%4#0: bytes = arrays.1#0 + let item_offset%4#0: uint64 = (* 1u 1u) + let reinterpret_biguint%4#0: biguint = (extract3 array_head_and_tail%4#0 item_offset%4#0 1u) // on error: Index access is out of bounds + let tmp%11#0: uint64 = (+ start#0 7u) + let tmp%12#0: biguint = (itob tmp%11#0) + let tmp%13#0: bool = (b== reinterpret_biguint%4#0 tmp%12#0) + (assert tmp%13#0) + let array_head_and_tail%5#0: bytes = arrays.2#0 + let item_offset%5#0: uint64 = (* 1u 1u) + let reinterpret_biguint%5#0: biguint = (extract3 array_head_and_tail%5#0 item_offset%5#0 1u) // on error: Index access is out of bounds + let tmp%14#0: uint64 = (+ start#0 8u) + let tmp%15#0: biguint = (itob tmp%14#0) + let tmp%16#0: bool = (b== reinterpret_biguint%5#0 tmp%15#0) + (assert tmp%16#0) + return arrays.0%out#0 arrays.1%out#0 arrays.2%out#0 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L111 + block@0: // L158 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal index ab3c71ba12..faf4e54836 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.approval.teal @@ -265,9 +265,10 @@ check: // @subroutine // def check(flags: Flags) -> None: proto 1 1 + frame_dig -1 // arc4_types/structs.py:74 // assert flags.a.native - frame_dig -1 + dup intc_0 // 0 getbit bytec_1 // 0x00 @@ -315,7 +316,6 @@ check: getbit ! assert - frame_dig -1 retsub @@ -325,9 +325,10 @@ nested_decode: // @subroutine // def nested_decode(vector_flags: VectorFlags) -> None: proto 1 1 + frame_dig -1 // arc4_types/structs.py:82 // assert vector_flags.vector.x.bytes == op.itob(35382882839) - frame_dig -1 + dup intc_0 // 0 pushint 16 // 16 extract3 // on error: Index access is out of bounds @@ -353,5 +354,4 @@ nested_decode: intc_0 // 0 getbit assert - frame_dig -1 retsub diff --git a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir index b870eab381..73a60e77e1 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir +++ b/test_cases/arc4_types/out_unoptimized/Arc4StructsTypeContract.destructured.ir @@ -107,6 +107,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: subroutine test_cases.arc4_types.structs.check(flags: bytes) -> bytes: block@0: // L72 + let flags%out#0: bytes = flags#0 let is_true%0#0: uint64 = (getbit flags#0 0u) let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%0#0: bool = (getbit encoded_bool%0#0 0u) @@ -125,10 +126,11 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let tmp%4#0: bool = (getbit encoded_bool%3#0 0u) let tmp%5#0: bool = (! tmp%4#0) (assert tmp%5#0) - return flags#0 + return flags%out#0 subroutine test_cases.arc4_types.structs.nested_decode(vector_flags: bytes) -> bytes: block@0: // L80 + let vector_flags%out#0: bytes = vector_flags#0 let tmp%0#0: bytes = (extract3 vector_flags#0 0u 16u) // on error: Index access is out of bounds let tmp%1#0: bytes = (extract3 tmp%0#0 0u 8u) // on error: Index access is out of bounds let tmp%2#0: bytes = (itob 35382882839u) @@ -139,7 +141,7 @@ contract test_cases.arc4_types.structs.Arc4StructsTypeContract: let encoded_bool%0#0: bytes = (setbit 0x00 0u is_true%0#0) let tmp%5#0: bool = (getbit encoded_bool%0#0 0u) (assert tmp%5#0) - return vector_flags#0 + return vector_flags%out#0 program clear-state: subroutine test_cases.arc4_types.structs.Arc4StructsTypeContract.clear_state_program() -> bool: diff --git a/test_cases/arc4_types/out_unoptimized/MutableParams2.approval.teal b/test_cases/arc4_types/out_unoptimized/MutableParams2.approval.teal new file mode 100644 index 0000000000..3df87a2107 --- /dev/null +++ b/test_cases/arc4_types/out_unoptimized/MutableParams2.approval.teal @@ -0,0 +1,278 @@ +#pragma version 10 + +test_cases.arc4_types.mutable_params2.MutableParams2.approval_program: + intcblock 0 1 + bytecblock 0x 0x01 0x04 0x0003 0x0001 + callsub __puya_arc4_router__ + return + + +// test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // arc4_types/mutable_params2.py:4 + // class MutableParams2(arc4.ARC4Contract): + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 + txna ApplicationArgs 0 + pushbytes 0x6ac4a557 // method "test_array_rebinding()void" + swap + match __puya_arc4_router___test_array_rebinding_route@2 + b __puya_arc4_router___switch_case_default@3 + +__puya_arc4_router___test_array_rebinding_route@2: + // arc4_types/mutable_params2.py:5 + // @arc4.abimethod() + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + callsub test_array_rebinding + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@5: + // arc4_types/mutable_params2.py:4 + // class MutableParams2(arc4.ARC4Contract): + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algopy_default_create@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router_____algopy_default_create@6: + txn ApplicationID + intc_0 // 0 + == + assert // is creating + callsub __algopy_default_create + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@7: + +__puya_arc4_router___after_if_else@9: + // arc4_types/mutable_params2.py:4 + // class MutableParams2(arc4.ARC4Contract): + intc_0 // 0 + retsub + + +// test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: +test_array_rebinding: + // arc4_types/mutable_params2.py:5-6 + // @arc4.abimethod() + // def test_array_rebinding(self) -> None: + proto 0 0 + // arc4_types/mutable_params2.py:7 + // a = arc4.DynamicBytes(0) + bytec_0 // 0x + pushbytes 0x00 + concat + bytec 4 // 0x0001 + swap + concat + // arc4_types/mutable_params2.py:8 + // self.maybe_modify_array(a, assign_local=True) + intc_1 // 1 + callsub maybe_modify_array + // arc4_types/mutable_params2.py:9 + // assert a == arc4.DynamicBytes(0, 1) + bytec_0 // 0x + pushbytes 0x00 + concat + bytec_1 // 0x01 + concat + pushbytes 0x0002 + swap + concat + == + assert + // arc4_types/mutable_params2.py:11 + // a = arc4.DynamicBytes(1) + bytec_0 // 0x + bytec_1 // 0x01 + concat + bytec 4 // 0x0001 + swap + concat + // arc4_types/mutable_params2.py:12 + // self.maybe_modify_array(a, assign_local=False) + intc_0 // 0 + callsub maybe_modify_array + // arc4_types/mutable_params2.py:13 + // assert a == arc4.DynamicBytes(1, 42, 4) + bytec_0 // 0x + bytec_1 // 0x01 + concat + pushbytes 0x2a + concat + bytec_2 // 0x04 + concat + bytec_3 // 0x0003 + swap + concat + == + assert + retsub + + +// test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: uint64) -> bytes: +maybe_modify_array: + // arc4_types/mutable_params2.py:15-16 + // @subroutine + // def maybe_modify_array(self, a: arc4.DynamicBytes, *, assign_local: bool) -> None: # v0 + proto 2 1 + intc_1 // 1 + frame_dig -2 + // arc4_types/mutable_params2.py:17 + // if assign_local: + frame_dig -1 + bz maybe_modify_array_else_body@10 + // arc4_types/mutable_params2.py:18 + // a.append(arc4.Byte(1)) # v1: modify out + frame_dig -2 + extract 2 0 + bytec_0 // 0x + bytec_1 // 0x01 + concat + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + intc_1 // 1 + bz maybe_modify_array_after_if_else@3 + frame_dig -2 + frame_bury 1 + +maybe_modify_array_after_if_else@3: + // arc4_types/mutable_params2.py:19 + // a = arc4.DynamicBytes(1, 2, 3) # v2: BOUNDARY + bytec_0 // 0x + bytec_1 // 0x01 + concat + pushbytes 0x02 + concat + pushbytes 0x03 + concat + bytec_3 // 0x0003 + swap + concat + frame_bury -2 + intc_0 // 0 + bz maybe_modify_array_after_if_else@5 + frame_dig -2 + frame_bury 1 + +maybe_modify_array_after_if_else@5: + // arc4_types/mutable_params2.py:20 + // a.append(arc4.Byte(4)) # v3: local only + frame_dig -2 + extract 2 0 + bytec_0 // 0x + bytec_2 // 0x04 + concat + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + intc_0 // 0 + bz maybe_modify_array_after_if_else@7 + frame_dig -2 + frame_bury 1 + +maybe_modify_array_after_if_else@7: + // arc4_types/mutable_params2.py:21 + // a = arc4.DynamicBytes(1, 2, 4) # v4: local only + bytec_0 // 0x + bytec_1 // 0x01 + concat + pushbytes 0x02 + concat + bytec_2 // 0x04 + concat + bytec_3 // 0x0003 + swap + concat + intc_0 // 0 + frame_bury 0 + frame_bury -2 + intc_0 // 0 + bz maybe_modify_array_after_if_else@9 + frame_dig -2 + frame_bury 1 + +maybe_modify_array_after_if_else@9: + b maybe_modify_array_after_if_else@13 + +maybe_modify_array_else_body@10: + // arc4_types/mutable_params2.py:23 + // a.append(arc4.Byte(42)) # v5: modify out + frame_dig -2 + extract 2 0 + bytec_0 // 0x + pushbytes 0x2a + concat + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + intc_1 // 1 + bz maybe_modify_array_after_if_else@12 + frame_dig -2 + frame_bury 1 + +maybe_modify_array_after_if_else@12: + +maybe_modify_array_after_if_else@13: + // arc4_types/mutable_params2.py:25 + // a.append(arc4.Byte(4)) # v6: modify out IF not b ELSE local only + frame_dig -2 + extract 2 0 + bytec_0 // 0x + bytec_2 // 0x04 + concat + concat + dup + len + itob + extract 6 2 + swap + concat + frame_bury -2 + frame_dig 0 + bz maybe_modify_array_after_if_else@15 + frame_dig -2 + frame_bury 1 + +maybe_modify_array_after_if_else@15: + frame_dig 1 + frame_bury 0 + retsub + + +// test_cases.arc4_types.mutable_params2.MutableParams2.__algopy_default_create() -> void: +__algopy_default_create: + proto 0 0 + retsub diff --git a/test_cases/arc4_types/out_unoptimized/MutableParams2.clear.teal b/test_cases/arc4_types/out_unoptimized/MutableParams2.clear.teal new file mode 100644 index 0000000000..e138fea62e --- /dev/null +++ b/test_cases/arc4_types/out_unoptimized/MutableParams2.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +test_cases.arc4_types.mutable_params2.MutableParams2.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/arc4_types/out_unoptimized/MutableParams2.destructured.ir b/test_cases/arc4_types/out_unoptimized/MutableParams2.destructured.ir new file mode 100644 index 0000000000..d9f9171777 --- /dev/null +++ b/test_cases/arc4_types/out_unoptimized/MutableParams2.destructured.ir @@ -0,0 +1,162 @@ +contract test_cases.arc4_types.mutable_params2.MutableParams2: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__() -> bool: + block@0: // L4 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@5 + block@1: // abi_routing_L4 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => block@3} + block@2: // test_array_rebinding_route_L5 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // is not creating + test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() + return 1u + block@3: // switch_case_default_L4 + goto block@4 + block@4: // switch_case_next_L4 + goto block@9 + block@5: // bare_routing_L4 + let tmp%7#0: uint64 = (txn OnCompletion) + switch tmp%7#0 {0u => block@6, * => block@7} + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (== tmp%8#0 0u) + (assert tmp%9#0) // is creating + test_cases.arc4_types.mutable_params2.MutableParams2.__algopy_default_create() + return 1u + block@7: // switch_case_default_L4 + goto block@8 + block@8: // switch_case_next_L4 + goto block@9 + block@9: // after_if_else_L4 + return 0u + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding() -> void: + block@0: // L5 + let result%0#0: bytes = (concat 0x 0x00) + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let a#0: bytes = array_data%0#0 + let maybe_modify_array%0#0: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#0, 1u) + let a#0: bytes = maybe_modify_array%0#0 + let result%1#0: bytes = (concat 0x 0x00) + let result%2#0: bytes = (concat result%1#0 0x01) + let array_data%1#0: bytes = (concat 0x0002 result%2#0) + let tmp%0#0: bool = (== a#0 array_data%1#0) + (assert tmp%0#0) + let result%3#0: bytes = (concat 0x 0x01) + let array_data%2#0: bytes = (concat 0x0001 result%3#0) + let a#0: bytes = array_data%2#0 + let maybe_modify_array%1#0: bytes = test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a#0, 0u) + let a#0: bytes = maybe_modify_array%1#0 + let result%4#0: bytes = (concat 0x 0x01) + let result%5#0: bytes = (concat result%4#0 0x2a) + let result%6#0: bytes = (concat result%5#0 0x04) + let array_data%3#0: bytes = (concat 0x0003 result%6#0) + let tmp%1#0: bool = (== a#0 array_data%3#0) + (assert tmp%1#0) + return + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array(a: bytes, assign_local: bool) -> bytes: + block@0: // L15 + let a%is_original#0: bool = 1u + let a%out#0: bytes = a#0 + goto assign_local#0 ? block@1 : block@10 + block@1: // if_body_L18 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) a#0) + let data%0#0: bytes = (concat 0x 0x01) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%0#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let a#0: bytes = concat_result%0#0 + goto 1u ? block@2 : block@3 + block@2: // if_body_L1 + let a%out#0: bytes = a#0 + goto block@3 + block@3: // after_if_else_L1 + let result%0#0: bytes = (concat 0x 0x01) + let result%1#0: bytes = (concat result%0#0 0x02) + let result%2#0: bytes = (concat result%1#0 0x03) + let array_data%0#0: bytes = (concat 0x0003 result%2#0) + let a#0: bytes = array_data%0#0 + goto 0u ? block@4 : block@5 + block@4: // if_body_L1 + let a%out#0: bytes = a#0 + goto block@5 + block@5: // after_if_else_L1 + let expr_value_trimmed%1#0: bytes = ((extract 2 0) a#0) + let data%1#0: bytes = (concat 0x 0x04) + let concatenated%1#0: bytes = (concat expr_value_trimmed%1#0 data%1#0) + let len_%1#0: uint64 = (len concatenated%1#0) + let as_bytes%1#0: bytes = (itob len_%1#0) + let len_16_bit%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let concat_result%1#0: bytes = (concat len_16_bit%1#0 concatenated%1#0) + let a#0: bytes = concat_result%1#0 + goto 0u ? block@6 : block@7 + block@6: // if_body_L1 + let a%out#0: bytes = a#0 + goto block@7 + block@7: // after_if_else_L1 + let result%3#0: bytes = (concat 0x 0x01) + let result%4#0: bytes = (concat result%3#0 0x02) + let result%5#0: bytes = (concat result%4#0 0x04) + let array_data%1#0: bytes = (concat 0x0003 result%5#0) + let a%is_original#0: bool = 0u + let a#0: bytes = array_data%1#0 + goto 0u ? block@8 : block@9 + block@8: // if_body_L1 + let a%out#0: bytes = a#0 + goto block@9 + block@9: // after_if_else_L1 + goto block@13 + block@10: // else_body_L23 + let expr_value_trimmed%2#0: bytes = ((extract 2 0) a#0) + let data%2#0: bytes = (concat 0x 0x2a) + let concatenated%2#0: bytes = (concat expr_value_trimmed%2#0 data%2#0) + let len_%2#0: uint64 = (len concatenated%2#0) + let as_bytes%2#0: bytes = (itob len_%2#0) + let len_16_bit%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%2#0: bytes = (concat len_16_bit%2#0 concatenated%2#0) + let a#0: bytes = concat_result%2#0 + goto 1u ? block@11 : block@12 + block@11: // if_body_L1 + let a%out#0: bytes = a#0 + goto block@12 + block@12: // after_if_else_L1 + goto block@13 + block@13: // after_if_else_L17 + let expr_value_trimmed%3#0: bytes = ((extract 2 0) a#0) + let data%3#0: bytes = (concat 0x 0x04) + let concatenated%3#0: bytes = (concat expr_value_trimmed%3#0 data%3#0) + let len_%3#0: uint64 = (len concatenated%3#0) + let as_bytes%3#0: bytes = (itob len_%3#0) + let len_16_bit%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let concat_result%3#0: bytes = (concat len_16_bit%3#0 concatenated%3#0) + let a#0: bytes = concat_result%3#0 + goto a%is_original#0 ? block@14 : block@15 + block@14: // if_body_L1 + let a%out#0: bytes = a#0 + goto block@15 + block@15: // after_if_else_L1 + return a%out#0 + + subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__algopy_default_create() -> void: + block@0: // L1 + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/puya.log b/test_cases/arc4_types/puya.log index 570b904069..870b42f462 100644 --- a/test_cases/arc4_types/puya.log +++ b/test_cases/arc4_types/puya.log @@ -2,7 +2,7 @@ debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True info: Found python prefix: /.venv arc4_types/mutable_params.py:63:9 warning: expression result is ignored arc4_types/mutable_params.py:79:9 warning: expression result is ignored -arc4_types/mutable_params.py:87:9 warning: expression result is ignored +arc4_types/mutable_params.py:116:9 warning: expression result is ignored arc4_types/bool.py:13:9 warning: expression result is ignored arc4_types/array.py:71:9 warning: expression result is ignored info: writing arc4_types/out/module.awst @@ -648,6 +648,129 @@ debug: Sealing block@0: // L34 debug: Terminated block@0: // L34 debug: Sealing block@0: // L45 debug: Terminated block@0: // L45 +debug: Sealing block@0: // L4 +debug: Terminated block@0: // L4 +debug: Sealing block@1: // abi_routing_L4 +debug: Terminated block@1: // abi_routing_L4 +debug: Sealing block@2: // test_array_rebinding_route_L5 +debug: Terminated block@2: // test_array_rebinding_route_L5 +debug: Sealing block@3: // switch_case_default_L4 +debug: Terminated block@3: // switch_case_default_L4 +debug: Sealing block@4: // switch_case_next_L4 +debug: Terminated block@4: // switch_case_next_L4 +debug: Sealing block@5: // bare_routing_L4 +debug: Terminated block@5: // bare_routing_L4 +debug: Sealing block@6: // __algopy_default_create_L1 +debug: Terminated block@6: // __algopy_default_create_L1 +debug: Sealing block@7: // switch_case_default_L4 +debug: Terminated block@7: // switch_case_default_L4 +debug: Sealing block@8: // switch_case_next_L4 +debug: Terminated block@8: // switch_case_next_L4 +debug: Sealing block@9: // after_if_else_L4 +debug: Terminated block@9: // after_if_else_L4 +debug: Sealing block@0: // L5 +debug: Terminated block@0: // L5 +debug: Sealing block@0: // L15 +debug: Terminated block@0: // L15 +debug: Sealing block@1: // if_body_L18 +debug: Terminated block@1: // if_body_L18 +debug: Sealing block@2: // if_body_L1 +debug: Terminated block@2: // if_body_L1 +debug: Sealing block@3: // after_if_else_L1 +debug: Terminated block@3: // after_if_else_L1 +debug: Sealing block@4: // if_body_L1 +debug: Terminated block@4: // if_body_L1 +debug: Sealing block@5: // after_if_else_L1 +debug: Created Phi assignment: let a#3: bytes = undefined while trying to resolve 'a' in block@5: // after_if_else_L1 +debug: Added a#2 to Phi node: let a#3: bytes = φ(a#2 <- block@3) in block@3: // after_if_else_L1 +debug: Added a#2 to Phi node: let a#3: bytes = φ(a#2 <- block@3, a#2 <- block@4) in block@4: // if_body_L1 +debug: Replacing trivial Phi node: let a#3: bytes = φ(a#2 <- block@3, a#2 <- block@4) (a#3) with a#2 +debug: Deleting Phi assignment: let a#3: bytes = φ(a#2 <- block@3, a#2 <- block@4) +debug: Replaced trivial Phi node: let a#3: bytes = φ(a#2 <- block@3, a#2 <- block@4) (a#3) with a#2 in current definition for 1 blocks +debug: Created Phi assignment: let a%is_original#2: bool = undefined while trying to resolve 'a%is_original' in block@5: // after_if_else_L1 +debug: Added a%is_original#1 to Phi node: let a%is_original#2: bool = φ(a%is_original#1 <- block@3) in block@3: // after_if_else_L1 +debug: Added a%is_original#1 to Phi node: let a%is_original#2: bool = φ(a%is_original#1 <- block@3, a%is_original#1 <- block@4) in block@4: // if_body_L1 +debug: Replacing trivial Phi node: let a%is_original#2: bool = φ(a%is_original#1 <- block@3, a%is_original#1 <- block@4) (a%is_original#2) with a%is_original#1 +debug: Deleting Phi assignment: let a%is_original#2: bool = φ(a%is_original#1 <- block@3, a%is_original#1 <- block@4) +debug: Replaced trivial Phi node: let a%is_original#2: bool = φ(a%is_original#1 <- block@3, a%is_original#1 <- block@4) (a%is_original#2) with a%is_original#1 in current definition for 1 blocks +debug: Terminated block@5: // after_if_else_L1 +debug: Sealing block@6: // if_body_L1 +debug: Terminated block@6: // if_body_L1 +debug: Sealing block@7: // after_if_else_L1 +debug: Terminated block@7: // after_if_else_L1 +debug: Sealing block@8: // if_body_L1 +debug: Terminated block@8: // if_body_L1 +debug: Sealing block@9: // after_if_else_L1 +debug: Terminated block@9: // after_if_else_L1 +debug: Sealing block@10: // else_body_L23 +debug: Terminated block@10: // else_body_L23 +debug: Sealing block@11: // if_body_L1 +debug: Terminated block@11: // if_body_L1 +debug: Sealing block@12: // after_if_else_L1 +debug: Terminated block@12: // after_if_else_L1 +debug: Sealing block@13: // after_if_else_L17 +debug: Created Phi assignment: let a#7: bytes = undefined while trying to resolve 'a' in block@13: // after_if_else_L17 +debug: Created Phi assignment: let a#8: bytes = undefined while trying to resolve 'a' in block@9: // after_if_else_L1 +debug: Added a#5 to Phi node: let a#8: bytes = φ(a#5 <- block@7) in block@7: // after_if_else_L1 +debug: Added a#5 to Phi node: let a#8: bytes = φ(a#5 <- block@7, a#5 <- block@8) in block@8: // if_body_L1 +debug: Replacing trivial Phi node: let a#8: bytes = φ(a#5 <- block@7, a#5 <- block@8) (a#8) with a#5 +debug: Deleting Phi assignment: let a#8: bytes = φ(a#5 <- block@7, a#5 <- block@8) +debug: Replaced trivial Phi node: let a#8: bytes = φ(a#5 <- block@7, a#5 <- block@8) (a#8) with a#5 in current definition for 1 blocks +debug: Added a#5 to Phi node: let a#7: bytes = φ(a#5 <- block@9) in block@9: // after_if_else_L1 +debug: Created Phi assignment: let a#9: bytes = undefined while trying to resolve 'a' in block@12: // after_if_else_L1 +debug: Added a#6 to Phi node: let a#9: bytes = φ(a#6 <- block@10) in block@10: // else_body_L23 +debug: Added a#6 to Phi node: let a#9: bytes = φ(a#6 <- block@10, a#6 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let a#9: bytes = φ(a#6 <- block@10, a#6 <- block@11) (a#9) with a#6 +debug: Deleting Phi assignment: let a#9: bytes = φ(a#6 <- block@10, a#6 <- block@11) +debug: Replaced trivial Phi node: let a#9: bytes = φ(a#6 <- block@10, a#6 <- block@11) (a#9) with a#6 in current definition for 1 blocks +debug: Added a#6 to Phi node: let a#7: bytes = φ(a#5 <- block@9, a#6 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let a%is_original#4: bool = undefined while trying to resolve 'a%is_original' in block@13: // after_if_else_L17 +debug: Created Phi assignment: let a%is_original#5: bool = undefined while trying to resolve 'a%is_original' in block@9: // after_if_else_L1 +debug: Added a%is_original#3 to Phi node: let a%is_original#5: bool = φ(a%is_original#3 <- block@7) in block@7: // after_if_else_L1 +debug: Added a%is_original#3 to Phi node: let a%is_original#5: bool = φ(a%is_original#3 <- block@7, a%is_original#3 <- block@8) in block@8: // if_body_L1 +debug: Replacing trivial Phi node: let a%is_original#5: bool = φ(a%is_original#3 <- block@7, a%is_original#3 <- block@8) (a%is_original#5) with a%is_original#3 +debug: Deleting Phi assignment: let a%is_original#5: bool = φ(a%is_original#3 <- block@7, a%is_original#3 <- block@8) +debug: Replaced trivial Phi node: let a%is_original#5: bool = φ(a%is_original#3 <- block@7, a%is_original#3 <- block@8) (a%is_original#5) with a%is_original#3 in current definition for 1 blocks +debug: Added a%is_original#3 to Phi node: let a%is_original#4: bool = φ(a%is_original#3 <- block@9) in block@9: // after_if_else_L1 +debug: Created Phi assignment: let a%is_original#6: bool = undefined while trying to resolve 'a%is_original' in block@12: // after_if_else_L1 +debug: Added a%is_original#0 to Phi node: let a%is_original#6: bool = φ(a%is_original#0 <- block@10) in block@10: // else_body_L23 +debug: Added a%is_original#0 to Phi node: let a%is_original#6: bool = φ(a%is_original#0 <- block@10, a%is_original#0 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let a%is_original#6: bool = φ(a%is_original#0 <- block@10, a%is_original#0 <- block@11) (a%is_original#6) with a%is_original#0 +debug: Deleting Phi assignment: let a%is_original#6: bool = φ(a%is_original#0 <- block@10, a%is_original#0 <- block@11) +debug: Replaced trivial Phi node: let a%is_original#6: bool = φ(a%is_original#0 <- block@10, a%is_original#0 <- block@11) (a%is_original#6) with a%is_original#0 in current definition for 1 blocks +debug: Added a%is_original#0 to Phi node: let a%is_original#4: bool = φ(a%is_original#3 <- block@9, a%is_original#0 <- block@12) in block@12: // after_if_else_L1 +debug: Terminated block@13: // after_if_else_L17 +debug: Sealing block@14: // if_body_L1 +debug: Terminated block@14: // if_body_L1 +debug: Sealing block@15: // after_if_else_L1 +debug: Created Phi assignment: let a%out#7: bytes = undefined while trying to resolve 'a%out' in block@15: // after_if_else_L1 +debug: Created Phi assignment: let a%out#8: bytes = undefined while trying to resolve 'a%out' in block@13: // after_if_else_L17 +debug: Created Phi assignment: let a%out#9: bytes = undefined while trying to resolve 'a%out' in block@9: // after_if_else_L1 +debug: Created Phi assignment: let a%out#10: bytes = undefined while trying to resolve 'a%out' in block@7: // after_if_else_L1 +debug: Created Phi assignment: let a%out#11: bytes = undefined while trying to resolve 'a%out' in block@5: // after_if_else_L1 +debug: Created Phi assignment: let a%out#12: bytes = undefined while trying to resolve 'a%out' in block@3: // after_if_else_L1 +debug: Added a%out#0 to Phi node: let a%out#12: bytes = φ(a%out#0 <- block@1) in block@1: // if_body_L18 +debug: Added a%out#1 to Phi node: let a%out#12: bytes = φ(a%out#0 <- block@1, a%out#1 <- block@2) in block@2: // if_body_L1 +debug: Added a%out#12 to Phi node: let a%out#11: bytes = φ(a%out#12 <- block@3) in block@3: // after_if_else_L1 +debug: Added a%out#2 to Phi node: let a%out#11: bytes = φ(a%out#12 <- block@3, a%out#2 <- block@4) in block@4: // if_body_L1 +debug: Added a%out#11 to Phi node: let a%out#10: bytes = φ(a%out#11 <- block@5) in block@5: // after_if_else_L1 +debug: Added a%out#3 to Phi node: let a%out#10: bytes = φ(a%out#11 <- block@5, a%out#3 <- block@6) in block@6: // if_body_L1 +debug: Added a%out#10 to Phi node: let a%out#9: bytes = φ(a%out#10 <- block@7) in block@7: // after_if_else_L1 +debug: Added a%out#4 to Phi node: let a%out#9: bytes = φ(a%out#10 <- block@7, a%out#4 <- block@8) in block@8: // if_body_L1 +debug: Added a%out#9 to Phi node: let a%out#8: bytes = φ(a%out#9 <- block@9) in block@9: // after_if_else_L1 +debug: Created Phi assignment: let a%out#13: bytes = undefined while trying to resolve 'a%out' in block@12: // after_if_else_L1 +debug: Added a%out#0 to Phi node: let a%out#13: bytes = φ(a%out#0 <- block@10) in block@10: // else_body_L23 +debug: Added a%out#5 to Phi node: let a%out#13: bytes = φ(a%out#0 <- block@10, a%out#5 <- block@11) in block@11: // if_body_L1 +debug: Added a%out#13 to Phi node: let a%out#8: bytes = φ(a%out#9 <- block@9, a%out#13 <- block@12) in block@12: // after_if_else_L1 +debug: Added a%out#8 to Phi node: let a%out#7: bytes = φ(a%out#8 <- block@13) in block@13: // after_if_else_L17 +debug: Added a%out#6 to Phi node: let a%out#7: bytes = φ(a%out#8 <- block@13, a%out#6 <- block@14) in block@14: // if_body_L1 +debug: Terminated block@15: // after_if_else_L1 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 debug: Sealing block@0: // L27 debug: Terminated block@0: // L27 debug: Sealing block@1: // abi_routing_L27 @@ -658,57 +781,839 @@ debug: Sealing block@3: // after_if_else_L27 debug: Terminated block@3: // after_if_else_L27 debug: Sealing block@0: // L33 debug: Terminated block@0: // L33 -debug: Sealing block@0: // L89 -debug: Terminated block@0: // L89 -debug: Sealing block@0: // L95 -debug: Terminated block@0: // L95 -debug: Sealing block@0: // L101 -debug: Terminated block@0: // L101 -debug: Looking for 'loop_counter%0' in an unsealed block creating an incomplete Phi: block@1: // for_body_L105 -debug: Created Phi assignment: let loop_counter%0#1: uint64 = undefined while trying to resolve 'loop_counter%0' in block@1: // for_body_L105 -debug: Looking for 'array' in an unsealed block creating an incomplete Phi: block@1: // for_body_L105 -debug: Created Phi assignment: let array#1: bytes = undefined while trying to resolve 'array' in block@1: // for_body_L105 -debug: Terminated block@1: // for_body_L105 -debug: Sealing block@2: // for_footer_L104 -debug: Terminated block@2: // for_footer_L104 -debug: Sealing block@3: // for_header_1_L104 -debug: Terminated block@3: // for_header_1_L104 -debug: Sealing block@4: // for_header_2_L104 -debug: Terminated block@4: // for_header_2_L104 -debug: Sealing block@1: // for_body_L105 -debug: Added loop_counter%0#0 to Phi node: let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0) in block@0: // L101 -debug: Added loop_counter%0#2 to Phi node: let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3) in block@3: // for_header_1_L104 -debug: Added loop_counter%0#3 to Phi node: let loop_counter%0#1: uint64 = φ(loop_counter%0#0 <- block@0, loop_counter%0#2 <- block@3, loop_counter%0#3 <- block@4) in block@4: // for_header_2_L104 -debug: Added array#0 to Phi node: let array#1: bytes = φ(array#0 <- block@0) in block@0: // L101 -debug: Added array#3 to Phi node: let array#1: bytes = φ(array#0 <- block@0, array#3 <- block@3) in block@3: // for_header_1_L104 -debug: Added array#4 to Phi node: let array#1: bytes = φ(array#0 <- block@0, array#3 <- block@3, array#4 <- block@4) in block@4: // for_header_2_L104 -debug: Sealing block@5: // after_for_L104 -debug: Created Phi assignment: let arrays.0#1: bytes = undefined while trying to resolve 'arrays.0' in block@1: // for_body_L105 -debug: Added arrays.0#0 to Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@0) in block@0: // L101 -debug: Added arrays.0#1 to Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@0, arrays.0#1 <- block@3) in block@3: // for_header_1_L104 -debug: Added arrays.0#1 to Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@0, arrays.0#1 <- block@3, arrays.0#1 <- block@4) in block@4: // for_header_2_L104 -debug: Replacing trivial Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@0, arrays.0#1 <- block@3, arrays.0#1 <- block@4) (arrays.0#1) with arrays.0#0 -debug: Deleting Phi assignment: let arrays.0#1: bytes = φ(arrays.0#0 <- block@0, arrays.0#1 <- block@3, arrays.0#1 <- block@4) -debug: Replaced trivial Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@0, arrays.0#1 <- block@3, arrays.0#1 <- block@4) (arrays.0#1) with arrays.0#0 in current definition for 4 blocks -debug: Created Phi assignment: let arrays.1#1: bytes = undefined while trying to resolve 'arrays.1' in block@1: // for_body_L105 -debug: Added arrays.1#0 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0) in block@0: // L101 -debug: Added arrays.1#1 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#1 <- block@3) in block@3: // for_header_1_L104 -debug: Added arrays.1#1 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#1 <- block@3, arrays.1#1 <- block@4) in block@4: // for_header_2_L104 -debug: Replacing trivial Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#1 <- block@3, arrays.1#1 <- block@4) (arrays.1#1) with arrays.1#0 -debug: Deleting Phi assignment: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#1 <- block@3, arrays.1#1 <- block@4) -debug: Replaced trivial Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#1 <- block@3, arrays.1#1 <- block@4) (arrays.1#1) with arrays.1#0 in current definition for 4 blocks -debug: Created Phi assignment: let arrays.2#1: bytes = undefined while trying to resolve 'arrays.2' in block@1: // for_body_L105 -debug: Added arrays.2#0 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0) in block@0: // L101 -debug: Added arrays.2#1 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#1 <- block@3) in block@3: // for_header_1_L104 -debug: Added arrays.2#1 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#1 <- block@3, arrays.2#1 <- block@4) in block@4: // for_header_2_L104 -debug: Replacing trivial Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#1 <- block@3, arrays.2#1 <- block@4) (arrays.2#1) with arrays.2#0 -debug: Deleting Phi assignment: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#1 <- block@3, arrays.2#1 <- block@4) -debug: Replaced trivial Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#1 <- block@3, arrays.2#1 <- block@4) (arrays.2#1) with arrays.2#0 in current definition for 4 blocks -debug: Terminated block@5: // after_for_L104 +debug: Sealing block@0: // L118 +debug: Terminated block@0: // L118 +debug: Sealing block@1: // if_body_L1 +debug: Terminated block@1: // if_body_L1 +debug: Sealing block@2: // after_if_else_L1 +debug: Created Phi assignment: let struct#1: bytes = undefined while trying to resolve 'struct' in block@2: // after_if_else_L1 +debug: Added struct#0 to Phi node: let struct#1: bytes = φ(struct#0 <- block@0) in block@0: // L118 +debug: Added struct#0 to Phi node: let struct#1: bytes = φ(struct#0 <- block@0, struct#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let struct#1: bytes = φ(struct#0 <- block@0, struct#0 <- block@1) (struct#1) with struct#0 +debug: Deleting Phi assignment: let struct#1: bytes = φ(struct#0 <- block@0, struct#0 <- block@1) +debug: Replaced trivial Phi node: let struct#1: bytes = φ(struct#0 <- block@0, struct#0 <- block@1) (struct#1) with struct#0 in current definition for 1 blocks +debug: Created Phi assignment: let struct%is_original#1: bool = undefined while trying to resolve 'struct%is_original' in block@2: // after_if_else_L1 +debug: Added struct%is_original#0 to Phi node: let struct%is_original#1: bool = φ(struct%is_original#0 <- block@0) in block@0: // L118 +debug: Added struct%is_original#0 to Phi node: let struct%is_original#1: bool = φ(struct%is_original#0 <- block@0, struct%is_original#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let struct%is_original#1: bool = φ(struct%is_original#0 <- block@0, struct%is_original#0 <- block@1) (struct%is_original#1) with struct%is_original#0 +debug: Deleting Phi assignment: let struct%is_original#1: bool = φ(struct%is_original#0 <- block@0, struct%is_original#0 <- block@1) +debug: Replaced trivial Phi node: let struct%is_original#1: bool = φ(struct%is_original#0 <- block@0, struct%is_original#0 <- block@1) (struct%is_original#1) with struct%is_original#0 in current definition for 1 blocks +debug: Terminated block@2: // after_if_else_L1 +debug: Sealing block@3: // if_body_L1 +debug: Terminated block@3: // if_body_L1 +debug: Sealing block@4: // after_if_else_L1 +debug: Created Phi assignment: let array#2: bytes = undefined while trying to resolve 'array' in block@4: // after_if_else_L1 +debug: Created Phi assignment: let array#3: bytes = undefined while trying to resolve 'array' in block@2: // after_if_else_L1 +debug: Added array#1 to Phi node: let array#3: bytes = φ(array#1 <- block@0) in block@0: // L118 +debug: Added array#1 to Phi node: let array#3: bytes = φ(array#1 <- block@0, array#1 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let array#3: bytes = φ(array#1 <- block@0, array#1 <- block@1) (array#3) with array#1 +debug: Deleting Phi assignment: let array#3: bytes = φ(array#1 <- block@0, array#1 <- block@1) +debug: Replaced trivial Phi node: let array#3: bytes = φ(array#1 <- block@0, array#1 <- block@1) (array#3) with array#1 in current definition for 1 blocks +debug: Added array#1 to Phi node: let array#2: bytes = φ(array#1 <- block@2) in block@2: // after_if_else_L1 +debug: Added array#1 to Phi node: let array#2: bytes = φ(array#1 <- block@2, array#1 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let array#2: bytes = φ(array#1 <- block@2, array#1 <- block@3) (array#2) with array#1 +debug: Deleting Phi assignment: let array#2: bytes = φ(array#1 <- block@2, array#1 <- block@3) +debug: Replaced trivial Phi node: let array#2: bytes = φ(array#1 <- block@2, array#1 <- block@3) (array#2) with array#1 in current definition for 1 blocks +debug: Created Phi assignment: let struct#3: bytes = undefined while trying to resolve 'struct' in block@4: // after_if_else_L1 +debug: Added struct#2 to Phi node: let struct#3: bytes = φ(struct#2 <- block@2) in block@2: // after_if_else_L1 +debug: Added struct#2 to Phi node: let struct#3: bytes = φ(struct#2 <- block@2, struct#2 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let struct#3: bytes = φ(struct#2 <- block@2, struct#2 <- block@3) (struct#3) with struct#2 +debug: Deleting Phi assignment: let struct#3: bytes = φ(struct#2 <- block@2, struct#2 <- block@3) +debug: Replaced trivial Phi node: let struct#3: bytes = φ(struct#2 <- block@2, struct#2 <- block@3) (struct#3) with struct#2 in current definition for 1 blocks +debug: Terminated block@4: // after_if_else_L1 +debug: Sealing block@0: // L124 +debug: Terminated block@0: // L124 +debug: Sealing block@1: // if_body_L1 +debug: Terminated block@1: // if_body_L1 +debug: Sealing block@2: // after_if_else_L1 +debug: Created Phi assignment: let copy#1: bytes = undefined while trying to resolve 'copy' in block@2: // after_if_else_L1 +debug: Added copy#0 to Phi node: let copy#1: bytes = φ(copy#0 <- block@0) in block@0: // L124 +debug: Added copy#0 to Phi node: let copy#1: bytes = φ(copy#0 <- block@0, copy#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let copy#1: bytes = φ(copy#0 <- block@0, copy#0 <- block@1) (copy#1) with copy#0 +debug: Deleting Phi assignment: let copy#1: bytes = φ(copy#0 <- block@0, copy#0 <- block@1) +debug: Replaced trivial Phi node: let copy#1: bytes = φ(copy#0 <- block@0, copy#0 <- block@1) (copy#1) with copy#0 in current definition for 1 blocks +debug: Created Phi assignment: let array#2: bytes = undefined while trying to resolve 'array' in block@2: // after_if_else_L1 +debug: Added array#1 to Phi node: let array#2: bytes = φ(array#1 <- block@0) in block@0: // L124 +debug: Added array#1 to Phi node: let array#2: bytes = φ(array#1 <- block@0, array#1 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let array#2: bytes = φ(array#1 <- block@0, array#1 <- block@1) (array#2) with array#1 +debug: Deleting Phi assignment: let array#2: bytes = φ(array#1 <- block@0, array#1 <- block@1) +debug: Replaced trivial Phi node: let array#2: bytes = φ(array#1 <- block@0, array#1 <- block@1) (array#2) with array#1 in current definition for 1 blocks +debug: Terminated block@2: // after_if_else_L1 +debug: Sealing block@0: // L130 +debug: Terminated block@0: // L130 +debug: Sealing block@1: // if_body_L1 +debug: Terminated block@1: // if_body_L1 +debug: Sealing block@2: // after_if_else_L1 +debug: Created Phi assignment: let start#1: uint64 = undefined while trying to resolve 'start' in block@2: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#1: uint64 = φ(start#0 <- block@0) in block@0: // L130 +debug: Added start#0 to Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#0 <- block@1) (start#1) with start#0 +debug: Deleting Phi assignment: let start#1: uint64 = φ(start#0 <- block@0, start#0 <- block@1) +debug: Replaced trivial Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#0 <- block@1) (start#1) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0#2: bytes = undefined while trying to resolve 'arrays.0' in block@2: // after_if_else_L1 +debug: Added arrays.0#1 to Phi node: let arrays.0#2: bytes = φ(arrays.0#1 <- block@0) in block@0: // L130 +debug: Added arrays.0#1 to Phi node: let arrays.0#2: bytes = φ(arrays.0#1 <- block@0, arrays.0#1 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#2: bytes = φ(arrays.0#1 <- block@0, arrays.0#1 <- block@1) (arrays.0#2) with arrays.0#1 +debug: Deleting Phi assignment: let arrays.0#2: bytes = φ(arrays.0#1 <- block@0, arrays.0#1 <- block@1) +debug: Replaced trivial Phi node: let arrays.0#2: bytes = φ(arrays.0#1 <- block@0, arrays.0#1 <- block@1) (arrays.0#2) with arrays.0#1 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#1: bytes = undefined while trying to resolve 'arrays.1' in block@2: // after_if_else_L1 +debug: Added arrays.1#0 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0) in block@0: // L130 +debug: Added arrays.1#0 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#0 <- block@1) (arrays.1#1) with arrays.1#0 +debug: Deleting Phi assignment: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#0 <- block@1) +debug: Replaced trivial Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@0, arrays.1#0 <- block@1) (arrays.1#1) with arrays.1#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#1: bytes = undefined while trying to resolve 'arrays.2' in block@2: // after_if_else_L1 +debug: Added arrays.2#0 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0) in block@0: // L130 +debug: Added arrays.2#0 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#0 <- block@1) (arrays.2#1) with arrays.2#0 +debug: Deleting Phi assignment: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#0 <- block@1) +debug: Replaced trivial Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@0, arrays.2#0 <- block@1) (arrays.2#1) with arrays.2#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1%is_original#1: bool = undefined while trying to resolve 'arrays.1%is_original' in block@2: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#1: bool = φ(arrays.1%is_original#0 <- block@0) in block@0: // L130 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#1: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#1: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#0 <- block@1) (arrays.1%is_original#1) with arrays.1%is_original#0 +debug: Deleting Phi assignment: let arrays.1%is_original#1: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#0 <- block@1) +debug: Replaced trivial Phi node: let arrays.1%is_original#1: bool = φ(arrays.1%is_original#0 <- block@0, arrays.1%is_original#0 <- block@1) (arrays.1%is_original#1) with arrays.1%is_original#0 in current definition for 1 blocks +debug: Terminated block@2: // after_if_else_L1 +debug: Sealing block@3: // if_body_L1 +debug: Terminated block@3: // if_body_L1 +debug: Sealing block@4: // after_if_else_L1 +debug: Created Phi assignment: let start#2: uint64 = undefined while trying to resolve 'start' in block@4: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#2: uint64 = φ(start#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#2: uint64 = φ(start#0 <- block@2, start#0 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let start#2: uint64 = φ(start#0 <- block@2, start#0 <- block@3) (start#2) with start#0 +debug: Deleting Phi assignment: let start#2: uint64 = φ(start#0 <- block@2, start#0 <- block@3) +debug: Replaced trivial Phi node: let start#2: uint64 = φ(start#0 <- block@2, start#0 <- block@3) (start#2) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0#3: bytes = undefined while trying to resolve 'arrays.0' in block@4: // after_if_else_L1 +debug: Added arrays.0#1 to Phi node: let arrays.0#3: bytes = φ(arrays.0#1 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.0#1 to Phi node: let arrays.0#3: bytes = φ(arrays.0#1 <- block@2, arrays.0#1 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#3: bytes = φ(arrays.0#1 <- block@2, arrays.0#1 <- block@3) (arrays.0#3) with arrays.0#1 +debug: Deleting Phi assignment: let arrays.0#3: bytes = φ(arrays.0#1 <- block@2, arrays.0#1 <- block@3) +debug: Replaced trivial Phi node: let arrays.0#3: bytes = φ(arrays.0#1 <- block@2, arrays.0#1 <- block@3) (arrays.0#3) with arrays.0#1 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#3: bytes = undefined while trying to resolve 'arrays.1' in block@4: // after_if_else_L1 +debug: Added arrays.1#2 to Phi node: let arrays.1#3: bytes = φ(arrays.1#2 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.1#2 to Phi node: let arrays.1#3: bytes = φ(arrays.1#2 <- block@2, arrays.1#2 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#3: bytes = φ(arrays.1#2 <- block@2, arrays.1#2 <- block@3) (arrays.1#3) with arrays.1#2 +debug: Deleting Phi assignment: let arrays.1#3: bytes = φ(arrays.1#2 <- block@2, arrays.1#2 <- block@3) +debug: Replaced trivial Phi node: let arrays.1#3: bytes = φ(arrays.1#2 <- block@2, arrays.1#2 <- block@3) (arrays.1#3) with arrays.1#2 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#2: bytes = undefined while trying to resolve 'arrays.2' in block@4: // after_if_else_L1 +debug: Added arrays.2#0 to Phi node: let arrays.2#2: bytes = φ(arrays.2#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.2#0 to Phi node: let arrays.2#2: bytes = φ(arrays.2#0 <- block@2, arrays.2#0 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#2: bytes = φ(arrays.2#0 <- block@2, arrays.2#0 <- block@3) (arrays.2#2) with arrays.2#0 +debug: Deleting Phi assignment: let arrays.2#2: bytes = φ(arrays.2#0 <- block@2, arrays.2#0 <- block@3) +debug: Replaced trivial Phi node: let arrays.2#2: bytes = φ(arrays.2#0 <- block@2, arrays.2#0 <- block@3) (arrays.2#2) with arrays.2#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2%is_original#1: bool = undefined while trying to resolve 'arrays.2%is_original' in block@4: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#2: bool = undefined while trying to resolve 'arrays.2%is_original' in block@2: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#2: bool = φ(arrays.2%is_original#0 <- block@0) in block@0: // L130 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#2: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#2: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#0 <- block@1) (arrays.2%is_original#2) with arrays.2%is_original#0 +debug: Deleting Phi assignment: let arrays.2%is_original#2: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#0 <- block@1) +debug: Replaced trivial Phi node: let arrays.2%is_original#2: bool = φ(arrays.2%is_original#0 <- block@0, arrays.2%is_original#0 <- block@1) (arrays.2%is_original#2) with arrays.2%is_original#0 in current definition for 1 blocks +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#1: bool = φ(arrays.2%is_original#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#1: bool = φ(arrays.2%is_original#0 <- block@2, arrays.2%is_original#0 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#1: bool = φ(arrays.2%is_original#0 <- block@2, arrays.2%is_original#0 <- block@3) (arrays.2%is_original#1) with arrays.2%is_original#0 +debug: Deleting Phi assignment: let arrays.2%is_original#1: bool = φ(arrays.2%is_original#0 <- block@2, arrays.2%is_original#0 <- block@3) +debug: Replaced trivial Phi node: let arrays.2%is_original#1: bool = φ(arrays.2%is_original#0 <- block@2, arrays.2%is_original#0 <- block@3) (arrays.2%is_original#1) with arrays.2%is_original#0 in current definition for 1 blocks +debug: Terminated block@4: // after_if_else_L1 +debug: Sealing block@5: // if_body_L1 +debug: Terminated block@5: // if_body_L1 +debug: Sealing block@6: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0#4: bytes = undefined while trying to resolve 'arrays.0' in block@6: // after_if_else_L1 +debug: Added arrays.0#1 to Phi node: let arrays.0#4: bytes = φ(arrays.0#1 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.0#1 to Phi node: let arrays.0#4: bytes = φ(arrays.0#1 <- block@4, arrays.0#1 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#4: bytes = φ(arrays.0#1 <- block@4, arrays.0#1 <- block@5) (arrays.0#4) with arrays.0#1 +debug: Deleting Phi assignment: let arrays.0#4: bytes = φ(arrays.0#1 <- block@4, arrays.0#1 <- block@5) +debug: Replaced trivial Phi node: let arrays.0#4: bytes = φ(arrays.0#1 <- block@4, arrays.0#1 <- block@5) (arrays.0#4) with arrays.0#1 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#4: bytes = undefined while trying to resolve 'arrays.1' in block@6: // after_if_else_L1 +debug: Added arrays.1#2 to Phi node: let arrays.1#4: bytes = φ(arrays.1#2 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.1#2 to Phi node: let arrays.1#4: bytes = φ(arrays.1#2 <- block@4, arrays.1#2 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#4: bytes = φ(arrays.1#2 <- block@4, arrays.1#2 <- block@5) (arrays.1#4) with arrays.1#2 +debug: Deleting Phi assignment: let arrays.1#4: bytes = φ(arrays.1#2 <- block@4, arrays.1#2 <- block@5) +debug: Replaced trivial Phi node: let arrays.1#4: bytes = φ(arrays.1#2 <- block@4, arrays.1#2 <- block@5) (arrays.1#4) with arrays.1#2 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#4: bytes = undefined while trying to resolve 'arrays.2' in block@6: // after_if_else_L1 +debug: Added arrays.2#3 to Phi node: let arrays.2#4: bytes = φ(arrays.2#3 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.2#3 to Phi node: let arrays.2#4: bytes = φ(arrays.2#3 <- block@4, arrays.2#3 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#4: bytes = φ(arrays.2#3 <- block@4, arrays.2#3 <- block@5) (arrays.2#4) with arrays.2#3 +debug: Deleting Phi assignment: let arrays.2#4: bytes = φ(arrays.2#3 <- block@4, arrays.2#3 <- block@5) +debug: Replaced trivial Phi node: let arrays.2#4: bytes = φ(arrays.2#3 <- block@4, arrays.2#3 <- block@5) (arrays.2#4) with arrays.2#3 in current definition for 1 blocks +debug: Created Phi assignment: let start#3: uint64 = undefined while trying to resolve 'start' in block@6: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#3: uint64 = φ(start#0 <- block@4) in block@4: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#3: uint64 = φ(start#0 <- block@4, start#0 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let start#3: uint64 = φ(start#0 <- block@4, start#0 <- block@5) (start#3) with start#0 +debug: Deleting Phi assignment: let start#3: uint64 = φ(start#0 <- block@4, start#0 <- block@5) +debug: Replaced trivial Phi node: let start#3: uint64 = φ(start#0 <- block@4, start#0 <- block@5) (start#3) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0%is_original#1: bool = undefined while trying to resolve 'arrays.0%is_original' in block@6: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#2: bool = undefined while trying to resolve 'arrays.0%is_original' in block@4: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#3: bool = undefined while trying to resolve 'arrays.0%is_original' in block@2: // after_if_else_L1 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#3: bool = φ(arrays.0%is_original#0 <- block@0) in block@0: // L130 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#3: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#3: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#0 <- block@1) (arrays.0%is_original#3) with arrays.0%is_original#0 +debug: Deleting Phi assignment: let arrays.0%is_original#3: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#0 <- block@1) +debug: Replaced trivial Phi node: let arrays.0%is_original#3: bool = φ(arrays.0%is_original#0 <- block@0, arrays.0%is_original#0 <- block@1) (arrays.0%is_original#3) with arrays.0%is_original#0 in current definition for 1 blocks +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#2: bool = φ(arrays.0%is_original#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#2: bool = φ(arrays.0%is_original#0 <- block@2, arrays.0%is_original#0 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#2: bool = φ(arrays.0%is_original#0 <- block@2, arrays.0%is_original#0 <- block@3) (arrays.0%is_original#2) with arrays.0%is_original#0 +debug: Deleting Phi assignment: let arrays.0%is_original#2: bool = φ(arrays.0%is_original#0 <- block@2, arrays.0%is_original#0 <- block@3) +debug: Replaced trivial Phi node: let arrays.0%is_original#2: bool = φ(arrays.0%is_original#0 <- block@2, arrays.0%is_original#0 <- block@3) (arrays.0%is_original#2) with arrays.0%is_original#0 in current definition for 1 blocks +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#1: bool = φ(arrays.0%is_original#0 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#1: bool = φ(arrays.0%is_original#0 <- block@4, arrays.0%is_original#0 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#1: bool = φ(arrays.0%is_original#0 <- block@4, arrays.0%is_original#0 <- block@5) (arrays.0%is_original#1) with arrays.0%is_original#0 +debug: Deleting Phi assignment: let arrays.0%is_original#1: bool = φ(arrays.0%is_original#0 <- block@4, arrays.0%is_original#0 <- block@5) +debug: Replaced trivial Phi node: let arrays.0%is_original#1: bool = φ(arrays.0%is_original#0 <- block@4, arrays.0%is_original#0 <- block@5) (arrays.0%is_original#1) with arrays.0%is_original#0 in current definition for 1 blocks +debug: Terminated block@6: // after_if_else_L1 +debug: Sealing block@7: // if_body_L1 +debug: Terminated block@7: // if_body_L1 +debug: Sealing block@8: // after_if_else_L1 +debug: Created Phi assignment: let start#4: uint64 = undefined while trying to resolve 'start' in block@8: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#4: uint64 = φ(start#0 <- block@6) in block@6: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#4: uint64 = φ(start#0 <- block@6, start#0 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let start#4: uint64 = φ(start#0 <- block@6, start#0 <- block@7) (start#4) with start#0 +debug: Deleting Phi assignment: let start#4: uint64 = φ(start#0 <- block@6, start#0 <- block@7) +debug: Replaced trivial Phi node: let start#4: uint64 = φ(start#0 <- block@6, start#0 <- block@7) (start#4) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0#6: bytes = undefined while trying to resolve 'arrays.0' in block@8: // after_if_else_L1 +debug: Added arrays.0#5 to Phi node: let arrays.0#6: bytes = φ(arrays.0#5 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.0#5 to Phi node: let arrays.0#6: bytes = φ(arrays.0#5 <- block@6, arrays.0#5 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#6: bytes = φ(arrays.0#5 <- block@6, arrays.0#5 <- block@7) (arrays.0#6) with arrays.0#5 +debug: Deleting Phi assignment: let arrays.0#6: bytes = φ(arrays.0#5 <- block@6, arrays.0#5 <- block@7) +debug: Replaced trivial Phi node: let arrays.0#6: bytes = φ(arrays.0#5 <- block@6, arrays.0#5 <- block@7) (arrays.0#6) with arrays.0#5 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#5: bytes = undefined while trying to resolve 'arrays.1' in block@8: // after_if_else_L1 +debug: Added arrays.1#2 to Phi node: let arrays.1#5: bytes = φ(arrays.1#2 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.1#2 to Phi node: let arrays.1#5: bytes = φ(arrays.1#2 <- block@6, arrays.1#2 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#5: bytes = φ(arrays.1#2 <- block@6, arrays.1#2 <- block@7) (arrays.1#5) with arrays.1#2 +debug: Deleting Phi assignment: let arrays.1#5: bytes = φ(arrays.1#2 <- block@6, arrays.1#2 <- block@7) +debug: Replaced trivial Phi node: let arrays.1#5: bytes = φ(arrays.1#2 <- block@6, arrays.1#2 <- block@7) (arrays.1#5) with arrays.1#2 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#5: bytes = undefined while trying to resolve 'arrays.2' in block@8: // after_if_else_L1 +debug: Added arrays.2#3 to Phi node: let arrays.2#5: bytes = φ(arrays.2#3 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.2#3 to Phi node: let arrays.2#5: bytes = φ(arrays.2#3 <- block@6, arrays.2#3 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#5: bytes = φ(arrays.2#3 <- block@6, arrays.2#3 <- block@7) (arrays.2#5) with arrays.2#3 +debug: Deleting Phi assignment: let arrays.2#5: bytes = φ(arrays.2#3 <- block@6, arrays.2#3 <- block@7) +debug: Replaced trivial Phi node: let arrays.2#5: bytes = φ(arrays.2#3 <- block@6, arrays.2#3 <- block@7) (arrays.2#5) with arrays.2#3 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1%is_original#2: bool = undefined while trying to resolve 'arrays.1%is_original' in block@8: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%is_original#3: bool = undefined while trying to resolve 'arrays.1%is_original' in block@6: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%is_original#4: bool = undefined while trying to resolve 'arrays.1%is_original' in block@4: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#4: bool = φ(arrays.1%is_original#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#4: bool = φ(arrays.1%is_original#0 <- block@2, arrays.1%is_original#0 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#4: bool = φ(arrays.1%is_original#0 <- block@2, arrays.1%is_original#0 <- block@3) (arrays.1%is_original#4) with arrays.1%is_original#0 +debug: Deleting Phi assignment: let arrays.1%is_original#4: bool = φ(arrays.1%is_original#0 <- block@2, arrays.1%is_original#0 <- block@3) +debug: Replaced trivial Phi node: let arrays.1%is_original#4: bool = φ(arrays.1%is_original#0 <- block@2, arrays.1%is_original#0 <- block@3) (arrays.1%is_original#4) with arrays.1%is_original#0 in current definition for 1 blocks +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#3: bool = φ(arrays.1%is_original#0 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#3: bool = φ(arrays.1%is_original#0 <- block@4, arrays.1%is_original#0 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#3: bool = φ(arrays.1%is_original#0 <- block@4, arrays.1%is_original#0 <- block@5) (arrays.1%is_original#3) with arrays.1%is_original#0 +debug: Deleting Phi assignment: let arrays.1%is_original#3: bool = φ(arrays.1%is_original#0 <- block@4, arrays.1%is_original#0 <- block@5) +debug: Replaced trivial Phi node: let arrays.1%is_original#3: bool = φ(arrays.1%is_original#0 <- block@4, arrays.1%is_original#0 <- block@5) (arrays.1%is_original#3) with arrays.1%is_original#0 in current definition for 1 blocks +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#2: bool = φ(arrays.1%is_original#0 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#2: bool = φ(arrays.1%is_original#0 <- block@6, arrays.1%is_original#0 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#2: bool = φ(arrays.1%is_original#0 <- block@6, arrays.1%is_original#0 <- block@7) (arrays.1%is_original#2) with arrays.1%is_original#0 +debug: Deleting Phi assignment: let arrays.1%is_original#2: bool = φ(arrays.1%is_original#0 <- block@6, arrays.1%is_original#0 <- block@7) +debug: Replaced trivial Phi node: let arrays.1%is_original#2: bool = φ(arrays.1%is_original#0 <- block@6, arrays.1%is_original#0 <- block@7) (arrays.1%is_original#2) with arrays.1%is_original#0 in current definition for 1 blocks +debug: Terminated block@8: // after_if_else_L1 +debug: Sealing block@9: // if_body_L1 +debug: Terminated block@9: // if_body_L1 +debug: Sealing block@10: // after_if_else_L1 +debug: Created Phi assignment: let start#5: uint64 = undefined while trying to resolve 'start' in block@10: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#5: uint64 = φ(start#0 <- block@8) in block@8: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#5: uint64 = φ(start#0 <- block@8, start#0 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let start#5: uint64 = φ(start#0 <- block@8, start#0 <- block@9) (start#5) with start#0 +debug: Deleting Phi assignment: let start#5: uint64 = φ(start#0 <- block@8, start#0 <- block@9) +debug: Replaced trivial Phi node: let start#5: uint64 = φ(start#0 <- block@8, start#0 <- block@9) (start#5) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0#7: bytes = undefined while trying to resolve 'arrays.0' in block@10: // after_if_else_L1 +debug: Added arrays.0#5 to Phi node: let arrays.0#7: bytes = φ(arrays.0#5 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.0#5 to Phi node: let arrays.0#7: bytes = φ(arrays.0#5 <- block@8, arrays.0#5 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#7: bytes = φ(arrays.0#5 <- block@8, arrays.0#5 <- block@9) (arrays.0#7) with arrays.0#5 +debug: Deleting Phi assignment: let arrays.0#7: bytes = φ(arrays.0#5 <- block@8, arrays.0#5 <- block@9) +debug: Replaced trivial Phi node: let arrays.0#7: bytes = φ(arrays.0#5 <- block@8, arrays.0#5 <- block@9) (arrays.0#7) with arrays.0#5 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#7: bytes = undefined while trying to resolve 'arrays.1' in block@10: // after_if_else_L1 +debug: Added arrays.1#6 to Phi node: let arrays.1#7: bytes = φ(arrays.1#6 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.1#6 to Phi node: let arrays.1#7: bytes = φ(arrays.1#6 <- block@8, arrays.1#6 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#7: bytes = φ(arrays.1#6 <- block@8, arrays.1#6 <- block@9) (arrays.1#7) with arrays.1#6 +debug: Deleting Phi assignment: let arrays.1#7: bytes = φ(arrays.1#6 <- block@8, arrays.1#6 <- block@9) +debug: Replaced trivial Phi node: let arrays.1#7: bytes = φ(arrays.1#6 <- block@8, arrays.1#6 <- block@9) (arrays.1#7) with arrays.1#6 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#6: bytes = undefined while trying to resolve 'arrays.2' in block@10: // after_if_else_L1 +debug: Added arrays.2#3 to Phi node: let arrays.2#6: bytes = φ(arrays.2#3 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.2#3 to Phi node: let arrays.2#6: bytes = φ(arrays.2#3 <- block@8, arrays.2#3 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#6: bytes = φ(arrays.2#3 <- block@8, arrays.2#3 <- block@9) (arrays.2#6) with arrays.2#3 +debug: Deleting Phi assignment: let arrays.2#6: bytes = φ(arrays.2#3 <- block@8, arrays.2#3 <- block@9) +debug: Replaced trivial Phi node: let arrays.2#6: bytes = φ(arrays.2#3 <- block@8, arrays.2#3 <- block@9) (arrays.2#6) with arrays.2#3 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2%is_original#3: bool = undefined while trying to resolve 'arrays.2%is_original' in block@10: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#4: bool = undefined while trying to resolve 'arrays.2%is_original' in block@8: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#5: bool = undefined while trying to resolve 'arrays.2%is_original' in block@6: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#5: bool = φ(arrays.2%is_original#0 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#5: bool = φ(arrays.2%is_original#0 <- block@4, arrays.2%is_original#0 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#5: bool = φ(arrays.2%is_original#0 <- block@4, arrays.2%is_original#0 <- block@5) (arrays.2%is_original#5) with arrays.2%is_original#0 +debug: Deleting Phi assignment: let arrays.2%is_original#5: bool = φ(arrays.2%is_original#0 <- block@4, arrays.2%is_original#0 <- block@5) +debug: Replaced trivial Phi node: let arrays.2%is_original#5: bool = φ(arrays.2%is_original#0 <- block@4, arrays.2%is_original#0 <- block@5) (arrays.2%is_original#5) with arrays.2%is_original#0 in current definition for 1 blocks +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#4: bool = φ(arrays.2%is_original#0 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#4: bool = φ(arrays.2%is_original#0 <- block@6, arrays.2%is_original#0 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#4: bool = φ(arrays.2%is_original#0 <- block@6, arrays.2%is_original#0 <- block@7) (arrays.2%is_original#4) with arrays.2%is_original#0 +debug: Deleting Phi assignment: let arrays.2%is_original#4: bool = φ(arrays.2%is_original#0 <- block@6, arrays.2%is_original#0 <- block@7) +debug: Replaced trivial Phi node: let arrays.2%is_original#4: bool = φ(arrays.2%is_original#0 <- block@6, arrays.2%is_original#0 <- block@7) (arrays.2%is_original#4) with arrays.2%is_original#0 in current definition for 1 blocks +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#3: bool = φ(arrays.2%is_original#0 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#3: bool = φ(arrays.2%is_original#0 <- block@8, arrays.2%is_original#0 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#3: bool = φ(arrays.2%is_original#0 <- block@8, arrays.2%is_original#0 <- block@9) (arrays.2%is_original#3) with arrays.2%is_original#0 +debug: Deleting Phi assignment: let arrays.2%is_original#3: bool = φ(arrays.2%is_original#0 <- block@8, arrays.2%is_original#0 <- block@9) +debug: Replaced trivial Phi node: let arrays.2%is_original#3: bool = φ(arrays.2%is_original#0 <- block@8, arrays.2%is_original#0 <- block@9) (arrays.2%is_original#3) with arrays.2%is_original#0 in current definition for 1 blocks +debug: Terminated block@10: // after_if_else_L1 +debug: Sealing block@11: // if_body_L1 +debug: Terminated block@11: // if_body_L1 +debug: Sealing block@12: // after_if_else_L1 +debug: Created Phi assignment: let reassign#1: bool = undefined while trying to resolve 'reassign' in block@12: // after_if_else_L1 +debug: Created Phi assignment: let reassign#2: bool = undefined while trying to resolve 'reassign' in block@10: // after_if_else_L1 +debug: Created Phi assignment: let reassign#3: bool = undefined while trying to resolve 'reassign' in block@8: // after_if_else_L1 +debug: Created Phi assignment: let reassign#4: bool = undefined while trying to resolve 'reassign' in block@6: // after_if_else_L1 +debug: Created Phi assignment: let reassign#5: bool = undefined while trying to resolve 'reassign' in block@4: // after_if_else_L1 +debug: Created Phi assignment: let reassign#6: bool = undefined while trying to resolve 'reassign' in block@2: // after_if_else_L1 +debug: Added reassign#0 to Phi node: let reassign#6: bool = φ(reassign#0 <- block@0) in block@0: // L130 +debug: Added reassign#0 to Phi node: let reassign#6: bool = φ(reassign#0 <- block@0, reassign#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let reassign#6: bool = φ(reassign#0 <- block@0, reassign#0 <- block@1) (reassign#6) with reassign#0 +debug: Deleting Phi assignment: let reassign#6: bool = φ(reassign#0 <- block@0, reassign#0 <- block@1) +debug: Replaced trivial Phi node: let reassign#6: bool = φ(reassign#0 <- block@0, reassign#0 <- block@1) (reassign#6) with reassign#0 in current definition for 1 blocks +debug: Added reassign#0 to Phi node: let reassign#5: bool = φ(reassign#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added reassign#0 to Phi node: let reassign#5: bool = φ(reassign#0 <- block@2, reassign#0 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let reassign#5: bool = φ(reassign#0 <- block@2, reassign#0 <- block@3) (reassign#5) with reassign#0 +debug: Deleting Phi assignment: let reassign#5: bool = φ(reassign#0 <- block@2, reassign#0 <- block@3) +debug: Replaced trivial Phi node: let reassign#5: bool = φ(reassign#0 <- block@2, reassign#0 <- block@3) (reassign#5) with reassign#0 in current definition for 1 blocks +debug: Added reassign#0 to Phi node: let reassign#4: bool = φ(reassign#0 <- block@4) in block@4: // after_if_else_L1 +debug: Added reassign#0 to Phi node: let reassign#4: bool = φ(reassign#0 <- block@4, reassign#0 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let reassign#4: bool = φ(reassign#0 <- block@4, reassign#0 <- block@5) (reassign#4) with reassign#0 +debug: Deleting Phi assignment: let reassign#4: bool = φ(reassign#0 <- block@4, reassign#0 <- block@5) +debug: Replaced trivial Phi node: let reassign#4: bool = φ(reassign#0 <- block@4, reassign#0 <- block@5) (reassign#4) with reassign#0 in current definition for 1 blocks +debug: Added reassign#0 to Phi node: let reassign#3: bool = φ(reassign#0 <- block@6) in block@6: // after_if_else_L1 +debug: Added reassign#0 to Phi node: let reassign#3: bool = φ(reassign#0 <- block@6, reassign#0 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let reassign#3: bool = φ(reassign#0 <- block@6, reassign#0 <- block@7) (reassign#3) with reassign#0 +debug: Deleting Phi assignment: let reassign#3: bool = φ(reassign#0 <- block@6, reassign#0 <- block@7) +debug: Replaced trivial Phi node: let reassign#3: bool = φ(reassign#0 <- block@6, reassign#0 <- block@7) (reassign#3) with reassign#0 in current definition for 1 blocks +debug: Added reassign#0 to Phi node: let reassign#2: bool = φ(reassign#0 <- block@8) in block@8: // after_if_else_L1 +debug: Added reassign#0 to Phi node: let reassign#2: bool = φ(reassign#0 <- block@8, reassign#0 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let reassign#2: bool = φ(reassign#0 <- block@8, reassign#0 <- block@9) (reassign#2) with reassign#0 +debug: Deleting Phi assignment: let reassign#2: bool = φ(reassign#0 <- block@8, reassign#0 <- block@9) +debug: Replaced trivial Phi node: let reassign#2: bool = φ(reassign#0 <- block@8, reassign#0 <- block@9) (reassign#2) with reassign#0 in current definition for 1 blocks +debug: Added reassign#0 to Phi node: let reassign#1: bool = φ(reassign#0 <- block@10) in block@10: // after_if_else_L1 +debug: Added reassign#0 to Phi node: let reassign#1: bool = φ(reassign#0 <- block@10, reassign#0 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let reassign#1: bool = φ(reassign#0 <- block@10, reassign#0 <- block@11) (reassign#1) with reassign#0 +debug: Deleting Phi assignment: let reassign#1: bool = φ(reassign#0 <- block@10, reassign#0 <- block@11) +debug: Replaced trivial Phi node: let reassign#1: bool = φ(reassign#0 <- block@10, reassign#0 <- block@11) (reassign#1) with reassign#0 in current definition for 1 blocks +debug: Terminated block@12: // after_if_else_L1 +debug: Sealing block@13: // if_body_L148 +debug: Created Phi assignment: let arrays.0#8: bytes = undefined while trying to resolve 'arrays.0' in block@12: // after_if_else_L1 +debug: Added arrays.0#5 to Phi node: let arrays.0#8: bytes = φ(arrays.0#5 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.0#5 to Phi node: let arrays.0#8: bytes = φ(arrays.0#5 <- block@10, arrays.0#5 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#8: bytes = φ(arrays.0#5 <- block@10, arrays.0#5 <- block@11) (arrays.0#8) with arrays.0#5 +debug: Deleting Phi assignment: let arrays.0#8: bytes = φ(arrays.0#5 <- block@10, arrays.0#5 <- block@11) +debug: Replaced trivial Phi node: let arrays.0#8: bytes = φ(arrays.0#5 <- block@10, arrays.0#5 <- block@11) (arrays.0#8) with arrays.0#5 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#8: bytes = undefined while trying to resolve 'arrays.1' in block@12: // after_if_else_L1 +debug: Added arrays.1#6 to Phi node: let arrays.1#8: bytes = φ(arrays.1#6 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.1#6 to Phi node: let arrays.1#8: bytes = φ(arrays.1#6 <- block@10, arrays.1#6 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#8: bytes = φ(arrays.1#6 <- block@10, arrays.1#6 <- block@11) (arrays.1#8) with arrays.1#6 +debug: Deleting Phi assignment: let arrays.1#8: bytes = φ(arrays.1#6 <- block@10, arrays.1#6 <- block@11) +debug: Replaced trivial Phi node: let arrays.1#8: bytes = φ(arrays.1#6 <- block@10, arrays.1#6 <- block@11) (arrays.1#8) with arrays.1#6 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#8: bytes = undefined while trying to resolve 'arrays.2' in block@12: // after_if_else_L1 +debug: Added arrays.2#7 to Phi node: let arrays.2#8: bytes = φ(arrays.2#7 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.2#7 to Phi node: let arrays.2#8: bytes = φ(arrays.2#7 <- block@10, arrays.2#7 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#8: bytes = φ(arrays.2#7 <- block@10, arrays.2#7 <- block@11) (arrays.2#8) with arrays.2#7 +debug: Deleting Phi assignment: let arrays.2#8: bytes = φ(arrays.2#7 <- block@10, arrays.2#7 <- block@11) +debug: Replaced trivial Phi node: let arrays.2#8: bytes = φ(arrays.2#7 <- block@10, arrays.2#7 <- block@11) (arrays.2#8) with arrays.2#7 in current definition for 1 blocks +debug: Terminated block@13: // if_body_L148 +debug: Sealing block@14: // if_body_L1 +debug: Terminated block@14: // if_body_L1 +debug: Sealing block@15: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%is_original#6: bool = undefined while trying to resolve 'arrays.1%is_original' in block@15: // after_if_else_L1 +debug: Added arrays.1%is_original#5 to Phi node: let arrays.1%is_original#6: bool = φ(arrays.1%is_original#5 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.1%is_original#5 to Phi node: let arrays.1%is_original#6: bool = φ(arrays.1%is_original#5 <- block@13, arrays.1%is_original#5 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#6: bool = φ(arrays.1%is_original#5 <- block@13, arrays.1%is_original#5 <- block@14) (arrays.1%is_original#6) with arrays.1%is_original#5 +debug: Deleting Phi assignment: let arrays.1%is_original#6: bool = φ(arrays.1%is_original#5 <- block@13, arrays.1%is_original#5 <- block@14) +debug: Replaced trivial Phi node: let arrays.1%is_original#6: bool = φ(arrays.1%is_original#5 <- block@13, arrays.1%is_original#5 <- block@14) (arrays.1%is_original#6) with arrays.1%is_original#5 in current definition for 1 blocks +debug: Terminated block@15: // after_if_else_L1 +debug: Sealing block@16: // if_body_L1 +debug: Created Phi assignment: let arrays.1#10: bytes = undefined while trying to resolve 'arrays.1' in block@15: // after_if_else_L1 +debug: Added arrays.1#9 to Phi node: let arrays.1#10: bytes = φ(arrays.1#9 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.1#9 to Phi node: let arrays.1#10: bytes = φ(arrays.1#9 <- block@13, arrays.1#9 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#10: bytes = φ(arrays.1#9 <- block@13, arrays.1#9 <- block@14) (arrays.1#10) with arrays.1#9 +debug: Deleting Phi assignment: let arrays.1#10: bytes = φ(arrays.1#9 <- block@13, arrays.1#9 <- block@14) +debug: Replaced trivial Phi node: let arrays.1#10: bytes = φ(arrays.1#9 <- block@13, arrays.1#9 <- block@14) (arrays.1#10) with arrays.1#9 in current definition for 1 blocks +debug: Terminated block@16: // if_body_L1 +debug: Sealing block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#7: bool = undefined while trying to resolve 'arrays.2%is_original' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#8: bool = undefined while trying to resolve 'arrays.2%is_original' in block@15: // after_if_else_L1 +debug: Added arrays.2%is_original#6 to Phi node: let arrays.2%is_original#8: bool = φ(arrays.2%is_original#6 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.2%is_original#6 to Phi node: let arrays.2%is_original#8: bool = φ(arrays.2%is_original#6 <- block@13, arrays.2%is_original#6 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#8: bool = φ(arrays.2%is_original#6 <- block@13, arrays.2%is_original#6 <- block@14) (arrays.2%is_original#8) with arrays.2%is_original#6 +debug: Deleting Phi assignment: let arrays.2%is_original#8: bool = φ(arrays.2%is_original#6 <- block@13, arrays.2%is_original#6 <- block@14) +debug: Replaced trivial Phi node: let arrays.2%is_original#8: bool = φ(arrays.2%is_original#6 <- block@13, arrays.2%is_original#6 <- block@14) (arrays.2%is_original#8) with arrays.2%is_original#6 in current definition for 1 blocks +debug: Added arrays.2%is_original#6 to Phi node: let arrays.2%is_original#7: bool = φ(arrays.2%is_original#6 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.2%is_original#6 to Phi node: let arrays.2%is_original#7: bool = φ(arrays.2%is_original#6 <- block@15, arrays.2%is_original#6 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#7: bool = φ(arrays.2%is_original#6 <- block@15, arrays.2%is_original#6 <- block@16) (arrays.2%is_original#7) with arrays.2%is_original#6 +debug: Deleting Phi assignment: let arrays.2%is_original#7: bool = φ(arrays.2%is_original#6 <- block@15, arrays.2%is_original#6 <- block@16) +debug: Replaced trivial Phi node: let arrays.2%is_original#7: bool = φ(arrays.2%is_original#6 <- block@15, arrays.2%is_original#6 <- block@16) (arrays.2%is_original#7) with arrays.2%is_original#6 in current definition for 1 blocks +debug: Terminated block@17: // after_if_else_L1 +debug: Sealing block@18: // if_body_L1 +debug: Created Phi assignment: let arrays.2#10: bytes = undefined while trying to resolve 'arrays.2' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2#11: bytes = undefined while trying to resolve 'arrays.2' in block@15: // after_if_else_L1 +debug: Added arrays.2#9 to Phi node: let arrays.2#11: bytes = φ(arrays.2#9 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.2#9 to Phi node: let arrays.2#11: bytes = φ(arrays.2#9 <- block@13, arrays.2#9 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#11: bytes = φ(arrays.2#9 <- block@13, arrays.2#9 <- block@14) (arrays.2#11) with arrays.2#9 +debug: Deleting Phi assignment: let arrays.2#11: bytes = φ(arrays.2#9 <- block@13, arrays.2#9 <- block@14) +debug: Replaced trivial Phi node: let arrays.2#11: bytes = φ(arrays.2#9 <- block@13, arrays.2#9 <- block@14) (arrays.2#11) with arrays.2#9 in current definition for 1 blocks +debug: Added arrays.2#9 to Phi node: let arrays.2#10: bytes = φ(arrays.2#9 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.2#9 to Phi node: let arrays.2#10: bytes = φ(arrays.2#9 <- block@15, arrays.2#9 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#10: bytes = φ(arrays.2#9 <- block@15, arrays.2#9 <- block@16) (arrays.2#10) with arrays.2#9 +debug: Deleting Phi assignment: let arrays.2#10: bytes = φ(arrays.2#9 <- block@15, arrays.2#9 <- block@16) +debug: Replaced trivial Phi node: let arrays.2#10: bytes = φ(arrays.2#9 <- block@15, arrays.2#9 <- block@16) (arrays.2#10) with arrays.2#9 in current definition for 1 blocks +debug: Terminated block@18: // if_body_L1 +debug: Sealing block@19: // after_if_else_L1 +debug: Terminated block@19: // after_if_else_L1 +debug: Sealing block@20: // after_if_else_L147 +debug: Created Phi assignment: let start#6: uint64 = undefined while trying to resolve 'start' in block@20: // after_if_else_L147 +debug: Created Phi assignment: let start#7: uint64 = undefined while trying to resolve 'start' in block@12: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#7: uint64 = φ(start#0 <- block@10) in block@10: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#7: uint64 = φ(start#0 <- block@10, start#0 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let start#7: uint64 = φ(start#0 <- block@10, start#0 <- block@11) (start#7) with start#0 +debug: Deleting Phi assignment: let start#7: uint64 = φ(start#0 <- block@10, start#0 <- block@11) +debug: Replaced trivial Phi node: let start#7: uint64 = φ(start#0 <- block@10, start#0 <- block@11) (start#7) with start#0 in current definition for 1 blocks +debug: Added start#0 to Phi node: let start#6: uint64 = φ(start#0 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let start#8: uint64 = undefined while trying to resolve 'start' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let start#9: uint64 = undefined while trying to resolve 'start' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let start#10: uint64 = undefined while trying to resolve 'start' in block@15: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#10: uint64 = φ(start#0 <- block@13) in block@13: // if_body_L148 +debug: Added start#0 to Phi node: let start#10: uint64 = φ(start#0 <- block@13, start#0 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let start#10: uint64 = φ(start#0 <- block@13, start#0 <- block@14) (start#10) with start#0 +debug: Deleting Phi assignment: let start#10: uint64 = φ(start#0 <- block@13, start#0 <- block@14) +debug: Replaced trivial Phi node: let start#10: uint64 = φ(start#0 <- block@13, start#0 <- block@14) (start#10) with start#0 in current definition for 1 blocks +debug: Added start#0 to Phi node: let start#9: uint64 = φ(start#0 <- block@15) in block@15: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#9: uint64 = φ(start#0 <- block@15, start#0 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let start#9: uint64 = φ(start#0 <- block@15, start#0 <- block@16) (start#9) with start#0 +debug: Deleting Phi assignment: let start#9: uint64 = φ(start#0 <- block@15, start#0 <- block@16) +debug: Replaced trivial Phi node: let start#9: uint64 = φ(start#0 <- block@15, start#0 <- block@16) (start#9) with start#0 in current definition for 1 blocks +debug: Added start#0 to Phi node: let start#8: uint64 = φ(start#0 <- block@17) in block@17: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#8: uint64 = φ(start#0 <- block@17, start#0 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let start#8: uint64 = φ(start#0 <- block@17, start#0 <- block@18) (start#8) with start#0 +debug: Deleting Phi assignment: let start#8: uint64 = φ(start#0 <- block@17, start#0 <- block@18) +debug: Replaced trivial Phi node: let start#8: uint64 = φ(start#0 <- block@17, start#0 <- block@18) (start#8) with start#0 in current definition for 1 blocks +debug: Added start#0 to Phi node: let start#6: uint64 = φ(start#0 <- block@12, start#0 <- block@19) in block@19: // after_if_else_L1 +debug: Replacing trivial Phi node: let start#6: uint64 = φ(start#0 <- block@12, start#0 <- block@19) (start#6) with start#0 +debug: Deleting Phi assignment: let start#6: uint64 = φ(start#0 <- block@12, start#0 <- block@19) +debug: Replaced trivial Phi node: let start#6: uint64 = φ(start#0 <- block@12, start#0 <- block@19) (start#6) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0#10: bytes = undefined while trying to resolve 'arrays.0' in block@20: // after_if_else_L147 +debug: Added arrays.0#5 to Phi node: let arrays.0#10: bytes = φ(arrays.0#5 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0#11: bytes = undefined while trying to resolve 'arrays.0' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0#12: bytes = undefined while trying to resolve 'arrays.0' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0#13: bytes = undefined while trying to resolve 'arrays.0' in block@15: // after_if_else_L1 +debug: Added arrays.0#9 to Phi node: let arrays.0#13: bytes = φ(arrays.0#9 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.0#9 to Phi node: let arrays.0#13: bytes = φ(arrays.0#9 <- block@13, arrays.0#9 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#13: bytes = φ(arrays.0#9 <- block@13, arrays.0#9 <- block@14) (arrays.0#13) with arrays.0#9 +debug: Deleting Phi assignment: let arrays.0#13: bytes = φ(arrays.0#9 <- block@13, arrays.0#9 <- block@14) +debug: Replaced trivial Phi node: let arrays.0#13: bytes = φ(arrays.0#9 <- block@13, arrays.0#9 <- block@14) (arrays.0#13) with arrays.0#9 in current definition for 1 blocks +debug: Added arrays.0#9 to Phi node: let arrays.0#12: bytes = φ(arrays.0#9 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.0#9 to Phi node: let arrays.0#12: bytes = φ(arrays.0#9 <- block@15, arrays.0#9 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#12: bytes = φ(arrays.0#9 <- block@15, arrays.0#9 <- block@16) (arrays.0#12) with arrays.0#9 +debug: Deleting Phi assignment: let arrays.0#12: bytes = φ(arrays.0#9 <- block@15, arrays.0#9 <- block@16) +debug: Replaced trivial Phi node: let arrays.0#12: bytes = φ(arrays.0#9 <- block@15, arrays.0#9 <- block@16) (arrays.0#12) with arrays.0#9 in current definition for 1 blocks +debug: Added arrays.0#9 to Phi node: let arrays.0#11: bytes = φ(arrays.0#9 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.0#9 to Phi node: let arrays.0#11: bytes = φ(arrays.0#9 <- block@17, arrays.0#9 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#11: bytes = φ(arrays.0#9 <- block@17, arrays.0#9 <- block@18) (arrays.0#11) with arrays.0#9 +debug: Deleting Phi assignment: let arrays.0#11: bytes = φ(arrays.0#9 <- block@17, arrays.0#9 <- block@18) +debug: Replaced trivial Phi node: let arrays.0#11: bytes = φ(arrays.0#9 <- block@17, arrays.0#9 <- block@18) (arrays.0#11) with arrays.0#9 in current definition for 1 blocks +debug: Added arrays.0#9 to Phi node: let arrays.0#10: bytes = φ(arrays.0#5 <- block@12, arrays.0#9 <- block@19) in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1#11: bytes = undefined while trying to resolve 'arrays.1' in block@20: // after_if_else_L147 +debug: Added arrays.1#6 to Phi node: let arrays.1#11: bytes = φ(arrays.1#6 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1#12: bytes = undefined while trying to resolve 'arrays.1' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1#13: bytes = undefined while trying to resolve 'arrays.1' in block@17: // after_if_else_L1 +debug: Added arrays.1#9 to Phi node: let arrays.1#13: bytes = φ(arrays.1#9 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.1#9 to Phi node: let arrays.1#13: bytes = φ(arrays.1#9 <- block@15, arrays.1#9 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#13: bytes = φ(arrays.1#9 <- block@15, arrays.1#9 <- block@16) (arrays.1#13) with arrays.1#9 +debug: Deleting Phi assignment: let arrays.1#13: bytes = φ(arrays.1#9 <- block@15, arrays.1#9 <- block@16) +debug: Replaced trivial Phi node: let arrays.1#13: bytes = φ(arrays.1#9 <- block@15, arrays.1#9 <- block@16) (arrays.1#13) with arrays.1#9 in current definition for 1 blocks +debug: Added arrays.1#9 to Phi node: let arrays.1#12: bytes = φ(arrays.1#9 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.1#9 to Phi node: let arrays.1#12: bytes = φ(arrays.1#9 <- block@17, arrays.1#9 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#12: bytes = φ(arrays.1#9 <- block@17, arrays.1#9 <- block@18) (arrays.1#12) with arrays.1#9 +debug: Deleting Phi assignment: let arrays.1#12: bytes = φ(arrays.1#9 <- block@17, arrays.1#9 <- block@18) +debug: Replaced trivial Phi node: let arrays.1#12: bytes = φ(arrays.1#9 <- block@17, arrays.1#9 <- block@18) (arrays.1#12) with arrays.1#9 in current definition for 1 blocks +debug: Added arrays.1#9 to Phi node: let arrays.1#11: bytes = φ(arrays.1#6 <- block@12, arrays.1#9 <- block@19) in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2#12: bytes = undefined while trying to resolve 'arrays.2' in block@20: // after_if_else_L147 +debug: Added arrays.2#7 to Phi node: let arrays.2#12: bytes = φ(arrays.2#7 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2#13: bytes = undefined while trying to resolve 'arrays.2' in block@19: // after_if_else_L1 +debug: Added arrays.2#9 to Phi node: let arrays.2#13: bytes = φ(arrays.2#9 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.2#9 to Phi node: let arrays.2#13: bytes = φ(arrays.2#9 <- block@17, arrays.2#9 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#13: bytes = φ(arrays.2#9 <- block@17, arrays.2#9 <- block@18) (arrays.2#13) with arrays.2#9 +debug: Deleting Phi assignment: let arrays.2#13: bytes = φ(arrays.2#9 <- block@17, arrays.2#9 <- block@18) +debug: Replaced trivial Phi node: let arrays.2#13: bytes = φ(arrays.2#9 <- block@17, arrays.2#9 <- block@18) (arrays.2#13) with arrays.2#9 in current definition for 1 blocks +debug: Added arrays.2#9 to Phi node: let arrays.2#12: bytes = φ(arrays.2#7 <- block@12, arrays.2#9 <- block@19) in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#5: bool = undefined while trying to resolve 'arrays.0%is_original' in block@20: // after_if_else_L147 +debug: Created Phi assignment: let arrays.0%is_original#6: bool = undefined while trying to resolve 'arrays.0%is_original' in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#7: bool = undefined while trying to resolve 'arrays.0%is_original' in block@10: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#8: bool = undefined while trying to resolve 'arrays.0%is_original' in block@8: // after_if_else_L1 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#8: bool = φ(arrays.0%is_original#0 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#8: bool = φ(arrays.0%is_original#0 <- block@6, arrays.0%is_original#0 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#8: bool = φ(arrays.0%is_original#0 <- block@6, arrays.0%is_original#0 <- block@7) (arrays.0%is_original#8) with arrays.0%is_original#0 +debug: Deleting Phi assignment: let arrays.0%is_original#8: bool = φ(arrays.0%is_original#0 <- block@6, arrays.0%is_original#0 <- block@7) +debug: Replaced trivial Phi node: let arrays.0%is_original#8: bool = φ(arrays.0%is_original#0 <- block@6, arrays.0%is_original#0 <- block@7) (arrays.0%is_original#8) with arrays.0%is_original#0 in current definition for 1 blocks +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#7: bool = φ(arrays.0%is_original#0 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#7: bool = φ(arrays.0%is_original#0 <- block@8, arrays.0%is_original#0 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#7: bool = φ(arrays.0%is_original#0 <- block@8, arrays.0%is_original#0 <- block@9) (arrays.0%is_original#7) with arrays.0%is_original#0 +debug: Deleting Phi assignment: let arrays.0%is_original#7: bool = φ(arrays.0%is_original#0 <- block@8, arrays.0%is_original#0 <- block@9) +debug: Replaced trivial Phi node: let arrays.0%is_original#7: bool = φ(arrays.0%is_original#0 <- block@8, arrays.0%is_original#0 <- block@9) (arrays.0%is_original#7) with arrays.0%is_original#0 in current definition for 1 blocks +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#6: bool = φ(arrays.0%is_original#0 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#6: bool = φ(arrays.0%is_original#0 <- block@10, arrays.0%is_original#0 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#6: bool = φ(arrays.0%is_original#0 <- block@10, arrays.0%is_original#0 <- block@11) (arrays.0%is_original#6) with arrays.0%is_original#0 +debug: Deleting Phi assignment: let arrays.0%is_original#6: bool = φ(arrays.0%is_original#0 <- block@10, arrays.0%is_original#0 <- block@11) +debug: Replaced trivial Phi node: let arrays.0%is_original#6: bool = φ(arrays.0%is_original#0 <- block@10, arrays.0%is_original#0 <- block@11) (arrays.0%is_original#6) with arrays.0%is_original#0 in current definition for 1 blocks +debug: Added arrays.0%is_original#0 to Phi node: let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#9: bool = undefined while trying to resolve 'arrays.0%is_original' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#10: bool = undefined while trying to resolve 'arrays.0%is_original' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%is_original#11: bool = undefined while trying to resolve 'arrays.0%is_original' in block@15: // after_if_else_L1 +debug: Added arrays.0%is_original#4 to Phi node: let arrays.0%is_original#11: bool = φ(arrays.0%is_original#4 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.0%is_original#4 to Phi node: let arrays.0%is_original#11: bool = φ(arrays.0%is_original#4 <- block@13, arrays.0%is_original#4 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#11: bool = φ(arrays.0%is_original#4 <- block@13, arrays.0%is_original#4 <- block@14) (arrays.0%is_original#11) with arrays.0%is_original#4 +debug: Deleting Phi assignment: let arrays.0%is_original#11: bool = φ(arrays.0%is_original#4 <- block@13, arrays.0%is_original#4 <- block@14) +debug: Replaced trivial Phi node: let arrays.0%is_original#11: bool = φ(arrays.0%is_original#4 <- block@13, arrays.0%is_original#4 <- block@14) (arrays.0%is_original#11) with arrays.0%is_original#4 in current definition for 1 blocks +debug: Added arrays.0%is_original#4 to Phi node: let arrays.0%is_original#10: bool = φ(arrays.0%is_original#4 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.0%is_original#4 to Phi node: let arrays.0%is_original#10: bool = φ(arrays.0%is_original#4 <- block@15, arrays.0%is_original#4 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#10: bool = φ(arrays.0%is_original#4 <- block@15, arrays.0%is_original#4 <- block@16) (arrays.0%is_original#10) with arrays.0%is_original#4 +debug: Deleting Phi assignment: let arrays.0%is_original#10: bool = φ(arrays.0%is_original#4 <- block@15, arrays.0%is_original#4 <- block@16) +debug: Replaced trivial Phi node: let arrays.0%is_original#10: bool = φ(arrays.0%is_original#4 <- block@15, arrays.0%is_original#4 <- block@16) (arrays.0%is_original#10) with arrays.0%is_original#4 in current definition for 1 blocks +debug: Added arrays.0%is_original#4 to Phi node: let arrays.0%is_original#9: bool = φ(arrays.0%is_original#4 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.0%is_original#4 to Phi node: let arrays.0%is_original#9: bool = φ(arrays.0%is_original#4 <- block@17, arrays.0%is_original#4 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%is_original#9: bool = φ(arrays.0%is_original#4 <- block@17, arrays.0%is_original#4 <- block@18) (arrays.0%is_original#9) with arrays.0%is_original#4 +debug: Deleting Phi assignment: let arrays.0%is_original#9: bool = φ(arrays.0%is_original#4 <- block@17, arrays.0%is_original#4 <- block@18) +debug: Replaced trivial Phi node: let arrays.0%is_original#9: bool = φ(arrays.0%is_original#4 <- block@17, arrays.0%is_original#4 <- block@18) (arrays.0%is_original#9) with arrays.0%is_original#4 in current definition for 1 blocks +debug: Added arrays.0%is_original#4 to Phi node: let arrays.0%is_original#5: bool = φ(arrays.0%is_original#0 <- block@12, arrays.0%is_original#4 <- block@19) in block@19: // after_if_else_L1 +debug: Terminated block@20: // after_if_else_L147 +debug: Sealing block@21: // if_body_L1 +debug: Terminated block@21: // if_body_L1 +debug: Sealing block@22: // after_if_else_L1 +debug: Created Phi assignment: let start#11: uint64 = undefined while trying to resolve 'start' in block@22: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#11: uint64 = φ(start#0 <- block@20) in block@20: // after_if_else_L147 +debug: Added start#0 to Phi node: let start#11: uint64 = φ(start#0 <- block@20, start#0 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let start#11: uint64 = φ(start#0 <- block@20, start#0 <- block@21) (start#11) with start#0 +debug: Deleting Phi assignment: let start#11: uint64 = φ(start#0 <- block@20, start#0 <- block@21) +debug: Replaced trivial Phi node: let start#11: uint64 = φ(start#0 <- block@20, start#0 <- block@21) (start#11) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0#15: bytes = undefined while trying to resolve 'arrays.0' in block@22: // after_if_else_L1 +debug: Added arrays.0#14 to Phi node: let arrays.0#15: bytes = φ(arrays.0#14 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.0#14 to Phi node: let arrays.0#15: bytes = φ(arrays.0#14 <- block@20, arrays.0#14 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#15: bytes = φ(arrays.0#14 <- block@20, arrays.0#14 <- block@21) (arrays.0#15) with arrays.0#14 +debug: Deleting Phi assignment: let arrays.0#15: bytes = φ(arrays.0#14 <- block@20, arrays.0#14 <- block@21) +debug: Replaced trivial Phi node: let arrays.0#15: bytes = φ(arrays.0#14 <- block@20, arrays.0#14 <- block@21) (arrays.0#15) with arrays.0#14 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#14: bytes = undefined while trying to resolve 'arrays.1' in block@22: // after_if_else_L1 +debug: Added arrays.1#11 to Phi node: let arrays.1#14: bytes = φ(arrays.1#11 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.1#11 to Phi node: let arrays.1#14: bytes = φ(arrays.1#11 <- block@20, arrays.1#11 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#14: bytes = φ(arrays.1#11 <- block@20, arrays.1#11 <- block@21) (arrays.1#14) with arrays.1#11 +debug: Deleting Phi assignment: let arrays.1#14: bytes = φ(arrays.1#11 <- block@20, arrays.1#11 <- block@21) +debug: Replaced trivial Phi node: let arrays.1#14: bytes = φ(arrays.1#11 <- block@20, arrays.1#11 <- block@21) (arrays.1#14) with arrays.1#11 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#14: bytes = undefined while trying to resolve 'arrays.2' in block@22: // after_if_else_L1 +debug: Added arrays.2#12 to Phi node: let arrays.2#14: bytes = φ(arrays.2#12 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.2#12 to Phi node: let arrays.2#14: bytes = φ(arrays.2#12 <- block@20, arrays.2#12 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#14: bytes = φ(arrays.2#12 <- block@20, arrays.2#12 <- block@21) (arrays.2#14) with arrays.2#12 +debug: Deleting Phi assignment: let arrays.2#14: bytes = φ(arrays.2#12 <- block@20, arrays.2#12 <- block@21) +debug: Replaced trivial Phi node: let arrays.2#14: bytes = φ(arrays.2#12 <- block@20, arrays.2#12 <- block@21) (arrays.2#14) with arrays.2#12 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1%is_original#7: bool = undefined while trying to resolve 'arrays.1%is_original' in block@22: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%is_original#8: bool = undefined while trying to resolve 'arrays.1%is_original' in block@20: // after_if_else_L147 +debug: Created Phi assignment: let arrays.1%is_original#9: bool = undefined while trying to resolve 'arrays.1%is_original' in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%is_original#10: bool = undefined while trying to resolve 'arrays.1%is_original' in block@10: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#10: bool = φ(arrays.1%is_original#0 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#10: bool = φ(arrays.1%is_original#0 <- block@8, arrays.1%is_original#0 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#10: bool = φ(arrays.1%is_original#0 <- block@8, arrays.1%is_original#0 <- block@9) (arrays.1%is_original#10) with arrays.1%is_original#0 +debug: Deleting Phi assignment: let arrays.1%is_original#10: bool = φ(arrays.1%is_original#0 <- block@8, arrays.1%is_original#0 <- block@9) +debug: Replaced trivial Phi node: let arrays.1%is_original#10: bool = φ(arrays.1%is_original#0 <- block@8, arrays.1%is_original#0 <- block@9) (arrays.1%is_original#10) with arrays.1%is_original#0 in current definition for 1 blocks +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#9: bool = φ(arrays.1%is_original#0 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#9: bool = φ(arrays.1%is_original#0 <- block@10, arrays.1%is_original#0 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#9: bool = φ(arrays.1%is_original#0 <- block@10, arrays.1%is_original#0 <- block@11) (arrays.1%is_original#9) with arrays.1%is_original#0 +debug: Deleting Phi assignment: let arrays.1%is_original#9: bool = φ(arrays.1%is_original#0 <- block@10, arrays.1%is_original#0 <- block@11) +debug: Replaced trivial Phi node: let arrays.1%is_original#9: bool = φ(arrays.1%is_original#0 <- block@10, arrays.1%is_original#0 <- block@11) (arrays.1%is_original#9) with arrays.1%is_original#0 in current definition for 1 blocks +debug: Added arrays.1%is_original#0 to Phi node: let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%is_original#11: bool = undefined while trying to resolve 'arrays.1%is_original' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%is_original#12: bool = undefined while trying to resolve 'arrays.1%is_original' in block@17: // after_if_else_L1 +debug: Added arrays.1%is_original#5 to Phi node: let arrays.1%is_original#12: bool = φ(arrays.1%is_original#5 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.1%is_original#5 to Phi node: let arrays.1%is_original#12: bool = φ(arrays.1%is_original#5 <- block@15, arrays.1%is_original#5 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#12: bool = φ(arrays.1%is_original#5 <- block@15, arrays.1%is_original#5 <- block@16) (arrays.1%is_original#12) with arrays.1%is_original#5 +debug: Deleting Phi assignment: let arrays.1%is_original#12: bool = φ(arrays.1%is_original#5 <- block@15, arrays.1%is_original#5 <- block@16) +debug: Replaced trivial Phi node: let arrays.1%is_original#12: bool = φ(arrays.1%is_original#5 <- block@15, arrays.1%is_original#5 <- block@16) (arrays.1%is_original#12) with arrays.1%is_original#5 in current definition for 1 blocks +debug: Added arrays.1%is_original#5 to Phi node: let arrays.1%is_original#11: bool = φ(arrays.1%is_original#5 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.1%is_original#5 to Phi node: let arrays.1%is_original#11: bool = φ(arrays.1%is_original#5 <- block@17, arrays.1%is_original#5 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#11: bool = φ(arrays.1%is_original#5 <- block@17, arrays.1%is_original#5 <- block@18) (arrays.1%is_original#11) with arrays.1%is_original#5 +debug: Deleting Phi assignment: let arrays.1%is_original#11: bool = φ(arrays.1%is_original#5 <- block@17, arrays.1%is_original#5 <- block@18) +debug: Replaced trivial Phi node: let arrays.1%is_original#11: bool = φ(arrays.1%is_original#5 <- block@17, arrays.1%is_original#5 <- block@18) (arrays.1%is_original#11) with arrays.1%is_original#5 in current definition for 1 blocks +debug: Added arrays.1%is_original#5 to Phi node: let arrays.1%is_original#8: bool = φ(arrays.1%is_original#0 <- block@12, arrays.1%is_original#5 <- block@19) in block@19: // after_if_else_L1 +debug: Added arrays.1%is_original#8 to Phi node: let arrays.1%is_original#7: bool = φ(arrays.1%is_original#8 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.1%is_original#8 to Phi node: let arrays.1%is_original#7: bool = φ(arrays.1%is_original#8 <- block@20, arrays.1%is_original#8 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%is_original#7: bool = φ(arrays.1%is_original#8 <- block@20, arrays.1%is_original#8 <- block@21) (arrays.1%is_original#7) with arrays.1%is_original#8 +debug: Deleting Phi assignment: let arrays.1%is_original#7: bool = φ(arrays.1%is_original#8 <- block@20, arrays.1%is_original#8 <- block@21) +debug: Replaced trivial Phi node: let arrays.1%is_original#7: bool = φ(arrays.1%is_original#8 <- block@20, arrays.1%is_original#8 <- block@21) (arrays.1%is_original#7) with arrays.1%is_original#8 in current definition for 1 blocks +debug: Terminated block@22: // after_if_else_L1 +debug: Sealing block@23: // if_body_L1 +debug: Terminated block@23: // if_body_L1 +debug: Sealing block@24: // after_if_else_L1 +debug: Created Phi assignment: let start#12: uint64 = undefined while trying to resolve 'start' in block@24: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#12: uint64 = φ(start#0 <- block@22) in block@22: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#12: uint64 = φ(start#0 <- block@22, start#0 <- block@23) in block@23: // if_body_L1 +debug: Replacing trivial Phi node: let start#12: uint64 = φ(start#0 <- block@22, start#0 <- block@23) (start#12) with start#0 +debug: Deleting Phi assignment: let start#12: uint64 = φ(start#0 <- block@22, start#0 <- block@23) +debug: Replaced trivial Phi node: let start#12: uint64 = φ(start#0 <- block@22, start#0 <- block@23) (start#12) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0#16: bytes = undefined while trying to resolve 'arrays.0' in block@24: // after_if_else_L1 +debug: Added arrays.0#14 to Phi node: let arrays.0#16: bytes = φ(arrays.0#14 <- block@22) in block@22: // after_if_else_L1 +debug: Added arrays.0#14 to Phi node: let arrays.0#16: bytes = φ(arrays.0#14 <- block@22, arrays.0#14 <- block@23) in block@23: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#16: bytes = φ(arrays.0#14 <- block@22, arrays.0#14 <- block@23) (arrays.0#16) with arrays.0#14 +debug: Deleting Phi assignment: let arrays.0#16: bytes = φ(arrays.0#14 <- block@22, arrays.0#14 <- block@23) +debug: Replaced trivial Phi node: let arrays.0#16: bytes = φ(arrays.0#14 <- block@22, arrays.0#14 <- block@23) (arrays.0#16) with arrays.0#14 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#16: bytes = undefined while trying to resolve 'arrays.1' in block@24: // after_if_else_L1 +debug: Added arrays.1#15 to Phi node: let arrays.1#16: bytes = φ(arrays.1#15 <- block@22) in block@22: // after_if_else_L1 +debug: Added arrays.1#15 to Phi node: let arrays.1#16: bytes = φ(arrays.1#15 <- block@22, arrays.1#15 <- block@23) in block@23: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#16: bytes = φ(arrays.1#15 <- block@22, arrays.1#15 <- block@23) (arrays.1#16) with arrays.1#15 +debug: Deleting Phi assignment: let arrays.1#16: bytes = φ(arrays.1#15 <- block@22, arrays.1#15 <- block@23) +debug: Replaced trivial Phi node: let arrays.1#16: bytes = φ(arrays.1#15 <- block@22, arrays.1#15 <- block@23) (arrays.1#16) with arrays.1#15 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#15: bytes = undefined while trying to resolve 'arrays.2' in block@24: // after_if_else_L1 +debug: Added arrays.2#12 to Phi node: let arrays.2#15: bytes = φ(arrays.2#12 <- block@22) in block@22: // after_if_else_L1 +debug: Added arrays.2#12 to Phi node: let arrays.2#15: bytes = φ(arrays.2#12 <- block@22, arrays.2#12 <- block@23) in block@23: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#15: bytes = φ(arrays.2#12 <- block@22, arrays.2#12 <- block@23) (arrays.2#15) with arrays.2#12 +debug: Deleting Phi assignment: let arrays.2#15: bytes = φ(arrays.2#12 <- block@22, arrays.2#12 <- block@23) +debug: Replaced trivial Phi node: let arrays.2#15: bytes = φ(arrays.2#12 <- block@22, arrays.2#12 <- block@23) (arrays.2#15) with arrays.2#12 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2%is_original#9: bool = undefined while trying to resolve 'arrays.2%is_original' in block@24: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#10: bool = undefined while trying to resolve 'arrays.2%is_original' in block@22: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#11: bool = undefined while trying to resolve 'arrays.2%is_original' in block@20: // after_if_else_L147 +debug: Created Phi assignment: let arrays.2%is_original#12: bool = undefined while trying to resolve 'arrays.2%is_original' in block@12: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#12: bool = φ(arrays.2%is_original#0 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#12: bool = φ(arrays.2%is_original#0 <- block@10, arrays.2%is_original#0 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#12: bool = φ(arrays.2%is_original#0 <- block@10, arrays.2%is_original#0 <- block@11) (arrays.2%is_original#12) with arrays.2%is_original#0 +debug: Deleting Phi assignment: let arrays.2%is_original#12: bool = φ(arrays.2%is_original#0 <- block@10, arrays.2%is_original#0 <- block@11) +debug: Replaced trivial Phi node: let arrays.2%is_original#12: bool = φ(arrays.2%is_original#0 <- block@10, arrays.2%is_original#0 <- block@11) (arrays.2%is_original#12) with arrays.2%is_original#0 in current definition for 1 blocks +debug: Added arrays.2%is_original#0 to Phi node: let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%is_original#13: bool = undefined while trying to resolve 'arrays.2%is_original' in block@19: // after_if_else_L1 +debug: Added arrays.2%is_original#6 to Phi node: let arrays.2%is_original#13: bool = φ(arrays.2%is_original#6 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.2%is_original#6 to Phi node: let arrays.2%is_original#13: bool = φ(arrays.2%is_original#6 <- block@17, arrays.2%is_original#6 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#13: bool = φ(arrays.2%is_original#6 <- block@17, arrays.2%is_original#6 <- block@18) (arrays.2%is_original#13) with arrays.2%is_original#6 +debug: Deleting Phi assignment: let arrays.2%is_original#13: bool = φ(arrays.2%is_original#6 <- block@17, arrays.2%is_original#6 <- block@18) +debug: Replaced trivial Phi node: let arrays.2%is_original#13: bool = φ(arrays.2%is_original#6 <- block@17, arrays.2%is_original#6 <- block@18) (arrays.2%is_original#13) with arrays.2%is_original#6 in current definition for 1 blocks +debug: Added arrays.2%is_original#6 to Phi node: let arrays.2%is_original#11: bool = φ(arrays.2%is_original#0 <- block@12, arrays.2%is_original#6 <- block@19) in block@19: // after_if_else_L1 +debug: Added arrays.2%is_original#11 to Phi node: let arrays.2%is_original#10: bool = φ(arrays.2%is_original#11 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.2%is_original#11 to Phi node: let arrays.2%is_original#10: bool = φ(arrays.2%is_original#11 <- block@20, arrays.2%is_original#11 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#10: bool = φ(arrays.2%is_original#11 <- block@20, arrays.2%is_original#11 <- block@21) (arrays.2%is_original#10) with arrays.2%is_original#11 +debug: Deleting Phi assignment: let arrays.2%is_original#10: bool = φ(arrays.2%is_original#11 <- block@20, arrays.2%is_original#11 <- block@21) +debug: Replaced trivial Phi node: let arrays.2%is_original#10: bool = φ(arrays.2%is_original#11 <- block@20, arrays.2%is_original#11 <- block@21) (arrays.2%is_original#10) with arrays.2%is_original#11 in current definition for 1 blocks +debug: Added arrays.2%is_original#11 to Phi node: let arrays.2%is_original#9: bool = φ(arrays.2%is_original#11 <- block@22) in block@22: // after_if_else_L1 +debug: Added arrays.2%is_original#11 to Phi node: let arrays.2%is_original#9: bool = φ(arrays.2%is_original#11 <- block@22, arrays.2%is_original#11 <- block@23) in block@23: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%is_original#9: bool = φ(arrays.2%is_original#11 <- block@22, arrays.2%is_original#11 <- block@23) (arrays.2%is_original#9) with arrays.2%is_original#11 +debug: Deleting Phi assignment: let arrays.2%is_original#9: bool = φ(arrays.2%is_original#11 <- block@22, arrays.2%is_original#11 <- block@23) +debug: Replaced trivial Phi node: let arrays.2%is_original#9: bool = φ(arrays.2%is_original#11 <- block@22, arrays.2%is_original#11 <- block@23) (arrays.2%is_original#9) with arrays.2%is_original#11 in current definition for 1 blocks +debug: Terminated block@24: // after_if_else_L1 +debug: Sealing block@25: // if_body_L1 +debug: Terminated block@25: // if_body_L1 +debug: Sealing block@26: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0#17: bytes = undefined while trying to resolve 'arrays.0' in block@26: // after_if_else_L1 +debug: Added arrays.0#14 to Phi node: let arrays.0#17: bytes = φ(arrays.0#14 <- block@24) in block@24: // after_if_else_L1 +debug: Added arrays.0#14 to Phi node: let arrays.0#17: bytes = φ(arrays.0#14 <- block@24, arrays.0#14 <- block@25) in block@25: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0#17: bytes = φ(arrays.0#14 <- block@24, arrays.0#14 <- block@25) (arrays.0#17) with arrays.0#14 +debug: Deleting Phi assignment: let arrays.0#17: bytes = φ(arrays.0#14 <- block@24, arrays.0#14 <- block@25) +debug: Replaced trivial Phi node: let arrays.0#17: bytes = φ(arrays.0#14 <- block@24, arrays.0#14 <- block@25) (arrays.0#17) with arrays.0#14 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1#17: bytes = undefined while trying to resolve 'arrays.1' in block@26: // after_if_else_L1 +debug: Added arrays.1#15 to Phi node: let arrays.1#17: bytes = φ(arrays.1#15 <- block@24) in block@24: // after_if_else_L1 +debug: Added arrays.1#15 to Phi node: let arrays.1#17: bytes = φ(arrays.1#15 <- block@24, arrays.1#15 <- block@25) in block@25: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1#17: bytes = φ(arrays.1#15 <- block@24, arrays.1#15 <- block@25) (arrays.1#17) with arrays.1#15 +debug: Deleting Phi assignment: let arrays.1#17: bytes = φ(arrays.1#15 <- block@24, arrays.1#15 <- block@25) +debug: Replaced trivial Phi node: let arrays.1#17: bytes = φ(arrays.1#15 <- block@24, arrays.1#15 <- block@25) (arrays.1#17) with arrays.1#15 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2#17: bytes = undefined while trying to resolve 'arrays.2' in block@26: // after_if_else_L1 +debug: Added arrays.2#16 to Phi node: let arrays.2#17: bytes = φ(arrays.2#16 <- block@24) in block@24: // after_if_else_L1 +debug: Added arrays.2#16 to Phi node: let arrays.2#17: bytes = φ(arrays.2#16 <- block@24, arrays.2#16 <- block@25) in block@25: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2#17: bytes = φ(arrays.2#16 <- block@24, arrays.2#16 <- block@25) (arrays.2#17) with arrays.2#16 +debug: Deleting Phi assignment: let arrays.2#17: bytes = φ(arrays.2#16 <- block@24, arrays.2#16 <- block@25) +debug: Replaced trivial Phi node: let arrays.2#17: bytes = φ(arrays.2#16 <- block@24, arrays.2#16 <- block@25) (arrays.2#17) with arrays.2#16 in current definition for 1 blocks +debug: Created Phi assignment: let start#13: uint64 = undefined while trying to resolve 'start' in block@26: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#13: uint64 = φ(start#0 <- block@24) in block@24: // after_if_else_L1 +debug: Added start#0 to Phi node: let start#13: uint64 = φ(start#0 <- block@24, start#0 <- block@25) in block@25: // if_body_L1 +debug: Replacing trivial Phi node: let start#13: uint64 = φ(start#0 <- block@24, start#0 <- block@25) (start#13) with start#0 +debug: Deleting Phi assignment: let start#13: uint64 = φ(start#0 <- block@24, start#0 <- block@25) +debug: Replaced trivial Phi node: let start#13: uint64 = φ(start#0 <- block@24, start#0 <- block@25) (start#13) with start#0 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.0%out#5: bytes = undefined while trying to resolve 'arrays.0%out' in block@26: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#6: bytes = undefined while trying to resolve 'arrays.0%out' in block@24: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#7: bytes = undefined while trying to resolve 'arrays.0%out' in block@22: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#8: bytes = undefined while trying to resolve 'arrays.0%out' in block@20: // after_if_else_L147 +debug: Created Phi assignment: let arrays.0%out#9: bytes = undefined while trying to resolve 'arrays.0%out' in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#10: bytes = undefined while trying to resolve 'arrays.0%out' in block@10: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#11: bytes = undefined while trying to resolve 'arrays.0%out' in block@8: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#12: bytes = undefined while trying to resolve 'arrays.0%out' in block@6: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#13: bytes = undefined while trying to resolve 'arrays.0%out' in block@4: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#14: bytes = undefined while trying to resolve 'arrays.0%out' in block@2: // after_if_else_L1 +debug: Added arrays.0%out#0 to Phi node: let arrays.0%out#14: bytes = φ(arrays.0%out#0 <- block@0) in block@0: // L130 +debug: Added arrays.0%out#1 to Phi node: let arrays.0%out#14: bytes = φ(arrays.0%out#0 <- block@0, arrays.0%out#1 <- block@1) in block@1: // if_body_L1 +debug: Added arrays.0%out#14 to Phi node: let arrays.0%out#13: bytes = φ(arrays.0%out#14 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.0%out#14 to Phi node: let arrays.0%out#13: bytes = φ(arrays.0%out#14 <- block@2, arrays.0%out#14 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#13: bytes = φ(arrays.0%out#14 <- block@2, arrays.0%out#14 <- block@3) (arrays.0%out#13) with arrays.0%out#14 +debug: Deleting Phi assignment: let arrays.0%out#13: bytes = φ(arrays.0%out#14 <- block@2, arrays.0%out#14 <- block@3) +debug: Replaced trivial Phi node: let arrays.0%out#13: bytes = φ(arrays.0%out#14 <- block@2, arrays.0%out#14 <- block@3) (arrays.0%out#13) with arrays.0%out#14 in current definition for 1 blocks +debug: Added arrays.0%out#14 to Phi node: let arrays.0%out#12: bytes = φ(arrays.0%out#14 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.0%out#14 to Phi node: let arrays.0%out#12: bytes = φ(arrays.0%out#14 <- block@4, arrays.0%out#14 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#12: bytes = φ(arrays.0%out#14 <- block@4, arrays.0%out#14 <- block@5) (arrays.0%out#12) with arrays.0%out#14 +debug: Deleting Phi assignment: let arrays.0%out#12: bytes = φ(arrays.0%out#14 <- block@4, arrays.0%out#14 <- block@5) +debug: Replaced trivial Phi node: let arrays.0%out#12: bytes = φ(arrays.0%out#14 <- block@4, arrays.0%out#14 <- block@5) (arrays.0%out#12) with arrays.0%out#14 in current definition for 1 blocks +debug: Added arrays.0%out#14 to Phi node: let arrays.0%out#11: bytes = φ(arrays.0%out#14 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.0%out#2 to Phi node: let arrays.0%out#11: bytes = φ(arrays.0%out#14 <- block@6, arrays.0%out#2 <- block@7) in block@7: // if_body_L1 +debug: Added arrays.0%out#11 to Phi node: let arrays.0%out#10: bytes = φ(arrays.0%out#11 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.0%out#11 to Phi node: let arrays.0%out#10: bytes = φ(arrays.0%out#11 <- block@8, arrays.0%out#11 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#10: bytes = φ(arrays.0%out#11 <- block@8, arrays.0%out#11 <- block@9) (arrays.0%out#10) with arrays.0%out#11 +debug: Deleting Phi assignment: let arrays.0%out#10: bytes = φ(arrays.0%out#11 <- block@8, arrays.0%out#11 <- block@9) +debug: Replaced trivial Phi node: let arrays.0%out#10: bytes = φ(arrays.0%out#11 <- block@8, arrays.0%out#11 <- block@9) (arrays.0%out#10) with arrays.0%out#11 in current definition for 1 blocks +debug: Added arrays.0%out#11 to Phi node: let arrays.0%out#9: bytes = φ(arrays.0%out#11 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.0%out#11 to Phi node: let arrays.0%out#9: bytes = φ(arrays.0%out#11 <- block@10, arrays.0%out#11 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#9: bytes = φ(arrays.0%out#11 <- block@10, arrays.0%out#11 <- block@11) (arrays.0%out#9) with arrays.0%out#11 +debug: Deleting Phi assignment: let arrays.0%out#9: bytes = φ(arrays.0%out#11 <- block@10, arrays.0%out#11 <- block@11) +debug: Replaced trivial Phi node: let arrays.0%out#9: bytes = φ(arrays.0%out#11 <- block@10, arrays.0%out#11 <- block@11) (arrays.0%out#9) with arrays.0%out#11 in current definition for 1 blocks +debug: Added arrays.0%out#11 to Phi node: let arrays.0%out#8: bytes = φ(arrays.0%out#11 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#15: bytes = undefined while trying to resolve 'arrays.0%out' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#16: bytes = undefined while trying to resolve 'arrays.0%out' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.0%out#17: bytes = undefined while trying to resolve 'arrays.0%out' in block@15: // after_if_else_L1 +debug: Added arrays.0%out#11 to Phi node: let arrays.0%out#17: bytes = φ(arrays.0%out#11 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.0%out#3 to Phi node: let arrays.0%out#17: bytes = φ(arrays.0%out#11 <- block@13, arrays.0%out#3 <- block@14) in block@14: // if_body_L1 +debug: Added arrays.0%out#17 to Phi node: let arrays.0%out#16: bytes = φ(arrays.0%out#17 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.0%out#17 to Phi node: let arrays.0%out#16: bytes = φ(arrays.0%out#17 <- block@15, arrays.0%out#17 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#16: bytes = φ(arrays.0%out#17 <- block@15, arrays.0%out#17 <- block@16) (arrays.0%out#16) with arrays.0%out#17 +debug: Deleting Phi assignment: let arrays.0%out#16: bytes = φ(arrays.0%out#17 <- block@15, arrays.0%out#17 <- block@16) +debug: Replaced trivial Phi node: let arrays.0%out#16: bytes = φ(arrays.0%out#17 <- block@15, arrays.0%out#17 <- block@16) (arrays.0%out#16) with arrays.0%out#17 in current definition for 1 blocks +debug: Added arrays.0%out#17 to Phi node: let arrays.0%out#15: bytes = φ(arrays.0%out#17 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.0%out#17 to Phi node: let arrays.0%out#15: bytes = φ(arrays.0%out#17 <- block@17, arrays.0%out#17 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#15: bytes = φ(arrays.0%out#17 <- block@17, arrays.0%out#17 <- block@18) (arrays.0%out#15) with arrays.0%out#17 +debug: Deleting Phi assignment: let arrays.0%out#15: bytes = φ(arrays.0%out#17 <- block@17, arrays.0%out#17 <- block@18) +debug: Replaced trivial Phi node: let arrays.0%out#15: bytes = φ(arrays.0%out#17 <- block@17, arrays.0%out#17 <- block@18) (arrays.0%out#15) with arrays.0%out#17 in current definition for 1 blocks +debug: Added arrays.0%out#17 to Phi node: let arrays.0%out#8: bytes = φ(arrays.0%out#11 <- block@12, arrays.0%out#17 <- block@19) in block@19: // after_if_else_L1 +debug: Added arrays.0%out#8 to Phi node: let arrays.0%out#7: bytes = φ(arrays.0%out#8 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.0%out#4 to Phi node: let arrays.0%out#7: bytes = φ(arrays.0%out#8 <- block@20, arrays.0%out#4 <- block@21) in block@21: // if_body_L1 +debug: Added arrays.0%out#7 to Phi node: let arrays.0%out#6: bytes = φ(arrays.0%out#7 <- block@22) in block@22: // after_if_else_L1 +debug: Added arrays.0%out#7 to Phi node: let arrays.0%out#6: bytes = φ(arrays.0%out#7 <- block@22, arrays.0%out#7 <- block@23) in block@23: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#6: bytes = φ(arrays.0%out#7 <- block@22, arrays.0%out#7 <- block@23) (arrays.0%out#6) with arrays.0%out#7 +debug: Deleting Phi assignment: let arrays.0%out#6: bytes = φ(arrays.0%out#7 <- block@22, arrays.0%out#7 <- block@23) +debug: Replaced trivial Phi node: let arrays.0%out#6: bytes = φ(arrays.0%out#7 <- block@22, arrays.0%out#7 <- block@23) (arrays.0%out#6) with arrays.0%out#7 in current definition for 1 blocks +debug: Added arrays.0%out#7 to Phi node: let arrays.0%out#5: bytes = φ(arrays.0%out#7 <- block@24) in block@24: // after_if_else_L1 +debug: Added arrays.0%out#7 to Phi node: let arrays.0%out#5: bytes = φ(arrays.0%out#7 <- block@24, arrays.0%out#7 <- block@25) in block@25: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.0%out#5: bytes = φ(arrays.0%out#7 <- block@24, arrays.0%out#7 <- block@25) (arrays.0%out#5) with arrays.0%out#7 +debug: Deleting Phi assignment: let arrays.0%out#5: bytes = φ(arrays.0%out#7 <- block@24, arrays.0%out#7 <- block@25) +debug: Replaced trivial Phi node: let arrays.0%out#5: bytes = φ(arrays.0%out#7 <- block@24, arrays.0%out#7 <- block@25) (arrays.0%out#5) with arrays.0%out#7 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.1%out#5: bytes = undefined while trying to resolve 'arrays.1%out' in block@26: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#6: bytes = undefined while trying to resolve 'arrays.1%out' in block@24: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#7: bytes = undefined while trying to resolve 'arrays.1%out' in block@22: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#8: bytes = undefined while trying to resolve 'arrays.1%out' in block@20: // after_if_else_L147 +debug: Created Phi assignment: let arrays.1%out#9: bytes = undefined while trying to resolve 'arrays.1%out' in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#10: bytes = undefined while trying to resolve 'arrays.1%out' in block@10: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#11: bytes = undefined while trying to resolve 'arrays.1%out' in block@8: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#12: bytes = undefined while trying to resolve 'arrays.1%out' in block@6: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#13: bytes = undefined while trying to resolve 'arrays.1%out' in block@4: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#14: bytes = undefined while trying to resolve 'arrays.1%out' in block@2: // after_if_else_L1 +debug: Added arrays.1%out#0 to Phi node: let arrays.1%out#14: bytes = φ(arrays.1%out#0 <- block@0) in block@0: // L130 +debug: Added arrays.1%out#0 to Phi node: let arrays.1%out#14: bytes = φ(arrays.1%out#0 <- block@0, arrays.1%out#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#14: bytes = φ(arrays.1%out#0 <- block@0, arrays.1%out#0 <- block@1) (arrays.1%out#14) with arrays.1%out#0 +debug: Deleting Phi assignment: let arrays.1%out#14: bytes = φ(arrays.1%out#0 <- block@0, arrays.1%out#0 <- block@1) +debug: Replaced trivial Phi node: let arrays.1%out#14: bytes = φ(arrays.1%out#0 <- block@0, arrays.1%out#0 <- block@1) (arrays.1%out#14) with arrays.1%out#0 in current definition for 1 blocks +debug: Added arrays.1%out#0 to Phi node: let arrays.1%out#13: bytes = φ(arrays.1%out#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.1%out#1 to Phi node: let arrays.1%out#13: bytes = φ(arrays.1%out#0 <- block@2, arrays.1%out#1 <- block@3) in block@3: // if_body_L1 +debug: Added arrays.1%out#13 to Phi node: let arrays.1%out#12: bytes = φ(arrays.1%out#13 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.1%out#13 to Phi node: let arrays.1%out#12: bytes = φ(arrays.1%out#13 <- block@4, arrays.1%out#13 <- block@5) in block@5: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#12: bytes = φ(arrays.1%out#13 <- block@4, arrays.1%out#13 <- block@5) (arrays.1%out#12) with arrays.1%out#13 +debug: Deleting Phi assignment: let arrays.1%out#12: bytes = φ(arrays.1%out#13 <- block@4, arrays.1%out#13 <- block@5) +debug: Replaced trivial Phi node: let arrays.1%out#12: bytes = φ(arrays.1%out#13 <- block@4, arrays.1%out#13 <- block@5) (arrays.1%out#12) with arrays.1%out#13 in current definition for 1 blocks +debug: Added arrays.1%out#13 to Phi node: let arrays.1%out#11: bytes = φ(arrays.1%out#13 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.1%out#13 to Phi node: let arrays.1%out#11: bytes = φ(arrays.1%out#13 <- block@6, arrays.1%out#13 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#11: bytes = φ(arrays.1%out#13 <- block@6, arrays.1%out#13 <- block@7) (arrays.1%out#11) with arrays.1%out#13 +debug: Deleting Phi assignment: let arrays.1%out#11: bytes = φ(arrays.1%out#13 <- block@6, arrays.1%out#13 <- block@7) +debug: Replaced trivial Phi node: let arrays.1%out#11: bytes = φ(arrays.1%out#13 <- block@6, arrays.1%out#13 <- block@7) (arrays.1%out#11) with arrays.1%out#13 in current definition for 1 blocks +debug: Added arrays.1%out#13 to Phi node: let arrays.1%out#10: bytes = φ(arrays.1%out#13 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.1%out#2 to Phi node: let arrays.1%out#10: bytes = φ(arrays.1%out#13 <- block@8, arrays.1%out#2 <- block@9) in block@9: // if_body_L1 +debug: Added arrays.1%out#10 to Phi node: let arrays.1%out#9: bytes = φ(arrays.1%out#10 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.1%out#10 to Phi node: let arrays.1%out#9: bytes = φ(arrays.1%out#10 <- block@10, arrays.1%out#10 <- block@11) in block@11: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#9: bytes = φ(arrays.1%out#10 <- block@10, arrays.1%out#10 <- block@11) (arrays.1%out#9) with arrays.1%out#10 +debug: Deleting Phi assignment: let arrays.1%out#9: bytes = φ(arrays.1%out#10 <- block@10, arrays.1%out#10 <- block@11) +debug: Replaced trivial Phi node: let arrays.1%out#9: bytes = φ(arrays.1%out#10 <- block@10, arrays.1%out#10 <- block@11) (arrays.1%out#9) with arrays.1%out#10 in current definition for 1 blocks +debug: Added arrays.1%out#10 to Phi node: let arrays.1%out#8: bytes = φ(arrays.1%out#10 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#15: bytes = undefined while trying to resolve 'arrays.1%out' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#16: bytes = undefined while trying to resolve 'arrays.1%out' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.1%out#17: bytes = undefined while trying to resolve 'arrays.1%out' in block@15: // after_if_else_L1 +debug: Added arrays.1%out#10 to Phi node: let arrays.1%out#17: bytes = φ(arrays.1%out#10 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.1%out#10 to Phi node: let arrays.1%out#17: bytes = φ(arrays.1%out#10 <- block@13, arrays.1%out#10 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#17: bytes = φ(arrays.1%out#10 <- block@13, arrays.1%out#10 <- block@14) (arrays.1%out#17) with arrays.1%out#10 +debug: Deleting Phi assignment: let arrays.1%out#17: bytes = φ(arrays.1%out#10 <- block@13, arrays.1%out#10 <- block@14) +debug: Replaced trivial Phi node: let arrays.1%out#17: bytes = φ(arrays.1%out#10 <- block@13, arrays.1%out#10 <- block@14) (arrays.1%out#17) with arrays.1%out#10 in current definition for 1 blocks +debug: Added arrays.1%out#10 to Phi node: let arrays.1%out#16: bytes = φ(arrays.1%out#10 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.1%out#3 to Phi node: let arrays.1%out#16: bytes = φ(arrays.1%out#10 <- block@15, arrays.1%out#3 <- block@16) in block@16: // if_body_L1 +debug: Added arrays.1%out#16 to Phi node: let arrays.1%out#15: bytes = φ(arrays.1%out#16 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.1%out#16 to Phi node: let arrays.1%out#15: bytes = φ(arrays.1%out#16 <- block@17, arrays.1%out#16 <- block@18) in block@18: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#15: bytes = φ(arrays.1%out#16 <- block@17, arrays.1%out#16 <- block@18) (arrays.1%out#15) with arrays.1%out#16 +debug: Deleting Phi assignment: let arrays.1%out#15: bytes = φ(arrays.1%out#16 <- block@17, arrays.1%out#16 <- block@18) +debug: Replaced trivial Phi node: let arrays.1%out#15: bytes = φ(arrays.1%out#16 <- block@17, arrays.1%out#16 <- block@18) (arrays.1%out#15) with arrays.1%out#16 in current definition for 1 blocks +debug: Added arrays.1%out#16 to Phi node: let arrays.1%out#8: bytes = φ(arrays.1%out#10 <- block@12, arrays.1%out#16 <- block@19) in block@19: // after_if_else_L1 +debug: Added arrays.1%out#8 to Phi node: let arrays.1%out#7: bytes = φ(arrays.1%out#8 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.1%out#8 to Phi node: let arrays.1%out#7: bytes = φ(arrays.1%out#8 <- block@20, arrays.1%out#8 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#7: bytes = φ(arrays.1%out#8 <- block@20, arrays.1%out#8 <- block@21) (arrays.1%out#7) with arrays.1%out#8 +debug: Deleting Phi assignment: let arrays.1%out#7: bytes = φ(arrays.1%out#8 <- block@20, arrays.1%out#8 <- block@21) +debug: Replaced trivial Phi node: let arrays.1%out#7: bytes = φ(arrays.1%out#8 <- block@20, arrays.1%out#8 <- block@21) (arrays.1%out#7) with arrays.1%out#8 in current definition for 1 blocks +debug: Added arrays.1%out#8 to Phi node: let arrays.1%out#6: bytes = φ(arrays.1%out#8 <- block@22) in block@22: // after_if_else_L1 +debug: Added arrays.1%out#4 to Phi node: let arrays.1%out#6: bytes = φ(arrays.1%out#8 <- block@22, arrays.1%out#4 <- block@23) in block@23: // if_body_L1 +debug: Added arrays.1%out#6 to Phi node: let arrays.1%out#5: bytes = φ(arrays.1%out#6 <- block@24) in block@24: // after_if_else_L1 +debug: Added arrays.1%out#6 to Phi node: let arrays.1%out#5: bytes = φ(arrays.1%out#6 <- block@24, arrays.1%out#6 <- block@25) in block@25: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.1%out#5: bytes = φ(arrays.1%out#6 <- block@24, arrays.1%out#6 <- block@25) (arrays.1%out#5) with arrays.1%out#6 +debug: Deleting Phi assignment: let arrays.1%out#5: bytes = φ(arrays.1%out#6 <- block@24, arrays.1%out#6 <- block@25) +debug: Replaced trivial Phi node: let arrays.1%out#5: bytes = φ(arrays.1%out#6 <- block@24, arrays.1%out#6 <- block@25) (arrays.1%out#5) with arrays.1%out#6 in current definition for 1 blocks +debug: Created Phi assignment: let arrays.2%out#5: bytes = undefined while trying to resolve 'arrays.2%out' in block@26: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#6: bytes = undefined while trying to resolve 'arrays.2%out' in block@24: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#7: bytes = undefined while trying to resolve 'arrays.2%out' in block@22: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#8: bytes = undefined while trying to resolve 'arrays.2%out' in block@20: // after_if_else_L147 +debug: Created Phi assignment: let arrays.2%out#9: bytes = undefined while trying to resolve 'arrays.2%out' in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#10: bytes = undefined while trying to resolve 'arrays.2%out' in block@10: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#11: bytes = undefined while trying to resolve 'arrays.2%out' in block@8: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#12: bytes = undefined while trying to resolve 'arrays.2%out' in block@6: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#13: bytes = undefined while trying to resolve 'arrays.2%out' in block@4: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#14: bytes = undefined while trying to resolve 'arrays.2%out' in block@2: // after_if_else_L1 +debug: Added arrays.2%out#0 to Phi node: let arrays.2%out#14: bytes = φ(arrays.2%out#0 <- block@0) in block@0: // L130 +debug: Added arrays.2%out#0 to Phi node: let arrays.2%out#14: bytes = φ(arrays.2%out#0 <- block@0, arrays.2%out#0 <- block@1) in block@1: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#14: bytes = φ(arrays.2%out#0 <- block@0, arrays.2%out#0 <- block@1) (arrays.2%out#14) with arrays.2%out#0 +debug: Deleting Phi assignment: let arrays.2%out#14: bytes = φ(arrays.2%out#0 <- block@0, arrays.2%out#0 <- block@1) +debug: Replaced trivial Phi node: let arrays.2%out#14: bytes = φ(arrays.2%out#0 <- block@0, arrays.2%out#0 <- block@1) (arrays.2%out#14) with arrays.2%out#0 in current definition for 1 blocks +debug: Added arrays.2%out#0 to Phi node: let arrays.2%out#13: bytes = φ(arrays.2%out#0 <- block@2) in block@2: // after_if_else_L1 +debug: Added arrays.2%out#0 to Phi node: let arrays.2%out#13: bytes = φ(arrays.2%out#0 <- block@2, arrays.2%out#0 <- block@3) in block@3: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#13: bytes = φ(arrays.2%out#0 <- block@2, arrays.2%out#0 <- block@3) (arrays.2%out#13) with arrays.2%out#0 +debug: Deleting Phi assignment: let arrays.2%out#13: bytes = φ(arrays.2%out#0 <- block@2, arrays.2%out#0 <- block@3) +debug: Replaced trivial Phi node: let arrays.2%out#13: bytes = φ(arrays.2%out#0 <- block@2, arrays.2%out#0 <- block@3) (arrays.2%out#13) with arrays.2%out#0 in current definition for 1 blocks +debug: Added arrays.2%out#0 to Phi node: let arrays.2%out#12: bytes = φ(arrays.2%out#0 <- block@4) in block@4: // after_if_else_L1 +debug: Added arrays.2%out#1 to Phi node: let arrays.2%out#12: bytes = φ(arrays.2%out#0 <- block@4, arrays.2%out#1 <- block@5) in block@5: // if_body_L1 +debug: Added arrays.2%out#12 to Phi node: let arrays.2%out#11: bytes = φ(arrays.2%out#12 <- block@6) in block@6: // after_if_else_L1 +debug: Added arrays.2%out#12 to Phi node: let arrays.2%out#11: bytes = φ(arrays.2%out#12 <- block@6, arrays.2%out#12 <- block@7) in block@7: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#11: bytes = φ(arrays.2%out#12 <- block@6, arrays.2%out#12 <- block@7) (arrays.2%out#11) with arrays.2%out#12 +debug: Deleting Phi assignment: let arrays.2%out#11: bytes = φ(arrays.2%out#12 <- block@6, arrays.2%out#12 <- block@7) +debug: Replaced trivial Phi node: let arrays.2%out#11: bytes = φ(arrays.2%out#12 <- block@6, arrays.2%out#12 <- block@7) (arrays.2%out#11) with arrays.2%out#12 in current definition for 1 blocks +debug: Added arrays.2%out#12 to Phi node: let arrays.2%out#10: bytes = φ(arrays.2%out#12 <- block@8) in block@8: // after_if_else_L1 +debug: Added arrays.2%out#12 to Phi node: let arrays.2%out#10: bytes = φ(arrays.2%out#12 <- block@8, arrays.2%out#12 <- block@9) in block@9: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#10: bytes = φ(arrays.2%out#12 <- block@8, arrays.2%out#12 <- block@9) (arrays.2%out#10) with arrays.2%out#12 +debug: Deleting Phi assignment: let arrays.2%out#10: bytes = φ(arrays.2%out#12 <- block@8, arrays.2%out#12 <- block@9) +debug: Replaced trivial Phi node: let arrays.2%out#10: bytes = φ(arrays.2%out#12 <- block@8, arrays.2%out#12 <- block@9) (arrays.2%out#10) with arrays.2%out#12 in current definition for 1 blocks +debug: Added arrays.2%out#12 to Phi node: let arrays.2%out#9: bytes = φ(arrays.2%out#12 <- block@10) in block@10: // after_if_else_L1 +debug: Added arrays.2%out#2 to Phi node: let arrays.2%out#9: bytes = φ(arrays.2%out#12 <- block@10, arrays.2%out#2 <- block@11) in block@11: // if_body_L1 +debug: Added arrays.2%out#9 to Phi node: let arrays.2%out#8: bytes = φ(arrays.2%out#9 <- block@12) in block@12: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#15: bytes = undefined while trying to resolve 'arrays.2%out' in block@19: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#16: bytes = undefined while trying to resolve 'arrays.2%out' in block@17: // after_if_else_L1 +debug: Created Phi assignment: let arrays.2%out#17: bytes = undefined while trying to resolve 'arrays.2%out' in block@15: // after_if_else_L1 +debug: Added arrays.2%out#9 to Phi node: let arrays.2%out#17: bytes = φ(arrays.2%out#9 <- block@13) in block@13: // if_body_L148 +debug: Added arrays.2%out#9 to Phi node: let arrays.2%out#17: bytes = φ(arrays.2%out#9 <- block@13, arrays.2%out#9 <- block@14) in block@14: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#17: bytes = φ(arrays.2%out#9 <- block@13, arrays.2%out#9 <- block@14) (arrays.2%out#17) with arrays.2%out#9 +debug: Deleting Phi assignment: let arrays.2%out#17: bytes = φ(arrays.2%out#9 <- block@13, arrays.2%out#9 <- block@14) +debug: Replaced trivial Phi node: let arrays.2%out#17: bytes = φ(arrays.2%out#9 <- block@13, arrays.2%out#9 <- block@14) (arrays.2%out#17) with arrays.2%out#9 in current definition for 1 blocks +debug: Added arrays.2%out#9 to Phi node: let arrays.2%out#16: bytes = φ(arrays.2%out#9 <- block@15) in block@15: // after_if_else_L1 +debug: Added arrays.2%out#9 to Phi node: let arrays.2%out#16: bytes = φ(arrays.2%out#9 <- block@15, arrays.2%out#9 <- block@16) in block@16: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#16: bytes = φ(arrays.2%out#9 <- block@15, arrays.2%out#9 <- block@16) (arrays.2%out#16) with arrays.2%out#9 +debug: Deleting Phi assignment: let arrays.2%out#16: bytes = φ(arrays.2%out#9 <- block@15, arrays.2%out#9 <- block@16) +debug: Replaced trivial Phi node: let arrays.2%out#16: bytes = φ(arrays.2%out#9 <- block@15, arrays.2%out#9 <- block@16) (arrays.2%out#16) with arrays.2%out#9 in current definition for 1 blocks +debug: Added arrays.2%out#9 to Phi node: let arrays.2%out#15: bytes = φ(arrays.2%out#9 <- block@17) in block@17: // after_if_else_L1 +debug: Added arrays.2%out#3 to Phi node: let arrays.2%out#15: bytes = φ(arrays.2%out#9 <- block@17, arrays.2%out#3 <- block@18) in block@18: // if_body_L1 +debug: Added arrays.2%out#15 to Phi node: let arrays.2%out#8: bytes = φ(arrays.2%out#9 <- block@12, arrays.2%out#15 <- block@19) in block@19: // after_if_else_L1 +debug: Added arrays.2%out#8 to Phi node: let arrays.2%out#7: bytes = φ(arrays.2%out#8 <- block@20) in block@20: // after_if_else_L147 +debug: Added arrays.2%out#8 to Phi node: let arrays.2%out#7: bytes = φ(arrays.2%out#8 <- block@20, arrays.2%out#8 <- block@21) in block@21: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#7: bytes = φ(arrays.2%out#8 <- block@20, arrays.2%out#8 <- block@21) (arrays.2%out#7) with arrays.2%out#8 +debug: Deleting Phi assignment: let arrays.2%out#7: bytes = φ(arrays.2%out#8 <- block@20, arrays.2%out#8 <- block@21) +debug: Replaced trivial Phi node: let arrays.2%out#7: bytes = φ(arrays.2%out#8 <- block@20, arrays.2%out#8 <- block@21) (arrays.2%out#7) with arrays.2%out#8 in current definition for 1 blocks +debug: Added arrays.2%out#8 to Phi node: let arrays.2%out#6: bytes = φ(arrays.2%out#8 <- block@22) in block@22: // after_if_else_L1 +debug: Added arrays.2%out#8 to Phi node: let arrays.2%out#6: bytes = φ(arrays.2%out#8 <- block@22, arrays.2%out#8 <- block@23) in block@23: // if_body_L1 +debug: Replacing trivial Phi node: let arrays.2%out#6: bytes = φ(arrays.2%out#8 <- block@22, arrays.2%out#8 <- block@23) (arrays.2%out#6) with arrays.2%out#8 +debug: Deleting Phi assignment: let arrays.2%out#6: bytes = φ(arrays.2%out#8 <- block@22, arrays.2%out#8 <- block@23) +debug: Replaced trivial Phi node: let arrays.2%out#6: bytes = φ(arrays.2%out#8 <- block@22, arrays.2%out#8 <- block@23) (arrays.2%out#6) with arrays.2%out#8 in current definition for 1 blocks +debug: Added arrays.2%out#8 to Phi node: let arrays.2%out#5: bytes = φ(arrays.2%out#8 <- block@24) in block@24: // after_if_else_L1 +debug: Added arrays.2%out#4 to Phi node: let arrays.2%out#5: bytes = φ(arrays.2%out#8 <- block@24, arrays.2%out#4 <- block@25) in block@25: // if_body_L1 +debug: Terminated block@26: // after_if_else_L1 debug: Sealing block@0: // L28 debug: Terminated block@0: // L28 -debug: Sealing block@0: // L111 -debug: Terminated block@0: // L111 +debug: Sealing block@0: // L158 +debug: Terminated block@0: // L158 debug: Sealing block@0: // L4 debug: Terminated block@0: // L4 debug: Sealing block@1: // abi_routing_L4 @@ -2645,6 +3550,8 @@ debug: Optimizing subroutine test_cases.arc4_types.structs.add debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation +debug: Found equivalence set: v1#0, v1%out#0 +debug: Found equivalence set: v2#0, v2%out#0 debug: Optimizer: Intrinsic Simplifier debug: Simplified (extract3 v1#0 0u 8u) // on error: Index access is out of bounds to ((extract 0 8) v1#0) // on error: Index access is out of bounds debug: Simplified (extract3 v2#0 0u 8u) // on error: Index access is out of bounds to ((extract 0 8) v2#0) // on error: Index access is out of bounds @@ -2652,6 +3559,8 @@ debug: Simplified (extract3 v1#0 8u 8u) // on error: Index access is out of boun debug: Simplified (extract3 v2#0 8u 8u) // on error: Index access is out of bounds to ((extract 8 8) v2#0) // on error: Index access is out of bounds debug: Simplified (concat 0x tmp%2#0) to tmp%2#0 debug: Optimizer: Remove Unused Variables +debug: Removing unused variable v1%is_original#0 +debug: Removing unused variable v2%is_original#0 debug: Removing unused variable current_tail_offset%0#0 debug: Removing unused variable encoded_tuple_buffer%0#0 debug: Optimizer: Inner Txn Field Replacer @@ -2680,8 +3589,11 @@ debug: Optimizing subroutine test_cases.arc4_types.structs.check debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation +debug: Found equivalence set: flags#0, flags%out#0 +debug: Replacing {flags%out#0} with flags#0 made 1 modifications debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables +debug: Removing unused variable flags%is_original#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -2694,11 +3606,14 @@ debug: Optimizing subroutine test_cases.arc4_types.structs.nested_decode debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation +debug: Found equivalence set: vector_flags#0, vector_flags%out#0 +debug: Replacing {vector_flags%out#0} with vector_flags#0 made 1 modifications debug: Optimizer: Intrinsic Simplifier debug: Simplified (extract3 vector_flags#0 0u 16u) // on error: Index access is out of bounds to ((extract 0 16) vector_flags#0) // on error: Index access is out of bounds debug: Simplified (extract3 tmp%0#0 0u 8u) // on error: Index access is out of bounds to ((extract 0 8) tmp%0#0) // on error: Index access is out of bounds debug: Simplified (extract3 vector_flags#0 16u 1u) // on error: Index access is out of bounds to ((extract 16 1) vector_flags#0) // on error: Index access is out of bounds debug: Optimizer: Remove Unused Variables +debug: Removing unused variable vector_flags%is_original#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13345,10 +14260,10 @@ debug: _puya_lib.arc4.dynamic_array_concat_bits f-stack entry: ['i#0', 'tmp%6#0' debug: _puya_lib.arc4.dynamic_array_concat_bits f-stack on first store: ['array_length#0', 'result#0', 'current_bytes#0', 'required_bytes#0', 'result#7'] debug: _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head f-stack entry: [] debug: _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head f-stack on first store: ['tmp%0#0', 'head_offset#0', 'tail_offset#0'] -debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.ir -info: optimizing test_cases.arc4_types.mutable_params.Arc4MutableParamsContract at level 1 +debug: Output IR to arc4_types/out/MutableParams2.ssa.ir +info: optimizing test_cases.arc4_types.mutable_params2.MutableParams2 at level 1 debug: Begin optimization pass 1/100 -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -13362,100 +14277,60 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation -debug: Found equivalence set: array_data%0#0, my_array#0, copy%0#0, my_array_copy#0, array_head_and_tail%0#0, copy%2#0, array_head_and_tail%3#0, copy%4#0, my_array_copy_2#0 -debug: Replacing {array_data%0#0, copy%0#0, my_array_copy#0, array_head_and_tail%0#0, copy%2#0, array_head_and_tail%3#0, copy%4#0, my_array_copy_2#0} with my_array#0 made 5 modifications -debug: Found equivalence set: encoded_tuple_buffer%6#0, my_struct#0, copy%1#0, my_struct_copy#0, copy%3#0 -debug: Replacing {encoded_tuple_buffer%6#0, copy%1#0, my_struct_copy#0, copy%3#0} with my_struct#0 made 5 modifications -debug: Found equivalence set: updated_target%0#0, my_array#1, array_head_and_tail%1#0 -debug: Replacing {updated_target%0#0, array_head_and_tail%1#0} with my_array#1 made 2 modifications -debug: Found equivalence set: other_routine%3#0, my_struct#1 -debug: Replacing {other_routine%3#0} with my_struct#1 made 1 modifications -debug: Found equivalence set: other_routine%2#0, my_array#2, array_head_and_tail%2#0, copy%5#0, copy%8#0 -debug: Replacing {other_routine%2#0, array_head_and_tail%2#0, copy%5#0, copy%8#0} with my_array#2 made 4 modifications -debug: Found equivalence set: other_routine%0#0, t#0 -debug: Replacing {other_routine%0#0} with t#0 made 1 modifications -debug: Found equivalence set: other_routine%1#0, f#0 -debug: Replacing {other_routine%1#0} with f#0 made 1 modifications -debug: Found equivalence set: other_routine%7#0, copy%3#1 -debug: Found equivalence set: other_routine%6#0, copy%2#1 -debug: Found equivalence set: other_routine_2%1#0, my_array_copy_2#1 -debug: Replacing {other_routine_2%1#0} with my_array_copy_2#1 made 1 modifications -debug: Found equivalence set: other_routine_2%0#0, my_array_copy_2#2, array_head_and_tail%4#0 -debug: Replacing {other_routine_2%0#0, array_head_and_tail%4#0} with my_array_copy_2#2 made 2 modifications -debug: Found equivalence set: other_routine_2%3#0, my_array_copy_2#3, array_head_and_tail%5#0, copy%6#0, copy%7#0 -debug: Replacing {other_routine_2%3#0, array_head_and_tail%5#0, copy%6#0, copy%7#0} with my_array_copy_2#3 made 4 modifications -debug: Found equivalence set: other_routine_3%2#0, copy%7#1 -debug: Found equivalence set: other_routine_3%1#0, copy%6#1 -debug: Found equivalence set: other_routine_3%0#0, copy%5#1 -debug: Found equivalence set: encoded_tuple_buffer%8#0, nested#0 -debug: Replacing {encoded_tuple_buffer%8#0} with nested#0 made 1 modifications -debug: Found equivalence set: tmp%11#0, copy%9#0 -debug: Replacing {copy%9#0} with tmp%11#0 made 1 modifications -debug: Found equivalence set: other_routine_2%5#0, copy%9#1 debug: Optimizer: Intrinsic Simplifier -debug: Simplified (concat 0x 0x01) to 0x01 -debug: Simplified (concat 0x result%3#0) to result%3#0 -debug: Simplified (setbit 0x00 0u 1u) to 0x80 -debug: Simplified (len "Happy") to 5u -debug: Simplified (len "Days") to 4u -debug: Simplified (concat 0x encoded_bool%0#0) to encoded_bool%0#0 -debug: Simplified ((extract 6 2) as_bytes%2#0) to 0x0006 -debug: Simplified (replace3 my_array#0 2u 0x05) to ((replace2 2) my_array#0 0x05) -debug: Simplified (* 2u 1u) to 2u -debug: Simplified (* 2u 1u) to 2u -debug: Simplified (* 1u 1u) to 1u -debug: Simplified (len "AARRGH!") to 7u -debug: Simplified (* 1u 1u) to 1u -debug: Simplified (len "Happy") to 5u -debug: Simplified (* 0u 1u) to 0u -debug: Simplified (* 0u 1u) to 0u -debug: Simplified (concat 0x my_array#2) to my_array#2 -debug: Simplified (extract3 nested#0 0u 4u) // on error: Index access is out of bounds to ((extract 0 4) nested#0) // on error: Index access is out of bounds +debug: Simplified (== tmp%3#0 NoOp) to (! tmp%3#0) +debug: Simplified (== tmp%8#0 0u) to (! tmp%8#0) debug: Optimizer: Remove Unused Variables -debug: Removing unused variable current_tail_offset%0#0 -debug: Removing unused variable encoded_tuple_buffer%0#0 -debug: Removing unused variable as_bytes%2#0 -debug: Removing unused variable current_tail_offset%2#0 -debug: Removing unused variable assigned_value%0#0 -debug: Removing unused variable reinterpret_biguint%1#0 -debug: Removing unused variable reinterpret_biguint%3#0 -debug: Removing unused variable reinterpret_biguint%5#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) -debug: Removing unused variable reinterpret_biguint%7#0 -debug: Removing unused variable reinterpret_biguint%9#0 -debug: Removing unused variable reinterpret_biguint%11#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Removing unused variable current_tail_offset%3#0 -debug: Removing unused variable encoded_tuple_buffer%7#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%6#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops +debug: inlining the default target of a switch/goto nth +debug: adding block@1: // abi_routing_L4 as a predecessor of block@4: // switch_case_next_L4 due to inlining of block@3: // switch_case_default_L4 +debug: simplified terminator of block@1: // abi_routing_L4 from switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => block@3} to switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => block@4} +debug: simplifying a switch with constants into goto nth +debug: simplified terminator of block@5: // bare_routing_L4 from switch tmp%7#0 {0u => block@6, * => block@7} to goto_nth [block@6][tmp%7#0] else goto block@7 +debug: inlining the default target of a switch/goto nth +debug: adding block@1: // abi_routing_L4 as a predecessor of block@9: // after_if_else_L4 due to inlining of block@4: // switch_case_next_L4 +debug: simplified terminator of block@1: // abi_routing_L4 from switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => block@4} to switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => block@9} +debug: simplifying a goto nth with two targets into a conditional branch +debug: simplified terminator of block@5: // bare_routing_L4 from goto_nth [block@6][tmp%7#0] else goto block@7 to goto tmp%7#0 ? block@7 : block@6 +debug: inlining the default target of a switch/goto nth +debug: simplified terminator of block@1: // abi_routing_L4 from switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => block@9} to switch tmp%2#0 {method "test_array_rebinding()void" => block@2, * => return 0u} debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@4: // switch_case_next_L4 with block@3: // switch_case_default_L4 in block@9: // after_if_else_L4 +debug: Merged linear block@4: // switch_case_next_L4 into block@3: // switch_case_default_L4 +debug: Replaced predecessor block@8: // switch_case_next_L4 with block@7: // switch_case_default_L4 in block@9: // after_if_else_L4 +debug: Merged linear block@8: // switch_case_next_L4 into block@7: // switch_case_default_L4 debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@3: // switch_case_default_L4 +debug: Removed empty block: block@7: // switch_case_default_L4 debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation -debug: Found equivalence set: updated_target%0#0, array#1 -debug: Replacing {updated_target%0#0} with array#1 made 1 modifications -debug: Found equivalence set: encoded_value%0#0, assigned_value%1#0 -debug: Replacing {assigned_value%1#0} with encoded_value%0#0 made 2 modifications -debug: Found equivalence set: updated_data%2#0, struct#1 -debug: Replacing {updated_data%2#0} with struct#1 made 1 modifications +debug: Found equivalence set: array_data%0#0, a#0 +debug: Replacing {array_data%0#0} with a#0 made 1 modifications +debug: Found equivalence set: maybe_modify_array%0#0, a#1 +debug: Replacing {maybe_modify_array%0#0} with a#1 made 1 modifications +debug: Found equivalence set: array_data%2#0, a#2 +debug: Replacing {array_data%2#0} with a#2 made 1 modifications +debug: Found equivalence set: maybe_modify_array%1#0, a#3 +debug: Replacing {maybe_modify_array%1#0} with a#3 made 1 modifications debug: Optimizer: Intrinsic Simplifier -debug: Simplified (replace3 array#0 1u 0x05) to ((replace2 1) array#0 0x05) -debug: Simplified (len "AARRGH!") to 7u -debug: Simplified (replace3 updated_data%1#0 4u tail_offset_bytes%0#0) to ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified (concat 0x 0x01) to 0x01 +debug: Simplified (concat 0x 0x01) to 0x01 debug: Optimizer: Remove Unused Variables -debug: Removing unused variable assigned_value%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13464,18 +14339,86 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: a#0, a%out#0 +debug: Replacing {a%out#0} with a#0 made 2 modifications +debug: Found equivalence set: concat_result%2#0, a#6, a%out#5 +debug: Replacing {concat_result%2#0, a%out#5} with a#6 made 2 modifications +debug: Found equivalence set: concat_result%0#0, a#1, a%out#1 +debug: Replacing {concat_result%0#0, a%out#1} with a#1 made 2 modifications +debug: Found equivalence set: array_data%0#0, a#2, a%out#2 +debug: Replacing {array_data%0#0, a%out#2} with a#2 made 2 modifications +debug: Found equivalence set: concat_result%3#0, a#10, a%out#6 +debug: Replacing {concat_result%3#0, a%out#6} with a#10 made 2 modifications +debug: Found equivalence set: concat_result%1#0, a#4, a%out#3 +debug: Replacing {concat_result%1#0, a%out#3} with a#4 made 2 modifications +debug: Found equivalence set: array_data%1#0, a#5, a%out#4 +debug: Replacing {array_data%1#0, a%out#4} with a#5 made 2 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x 0x01) to 0x01 +debug: Simplified (concat 0x 0x01) to 0x01 +debug: Simplified (concat 0x 0x04) to 0x04 +debug: Simplified (concat 0x 0x01) to 0x01 +debug: Simplified (concat 0x 0x2a) to 0x2a +debug: Simplified (concat 0x 0x04) to 0x04 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable a%is_original#1 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@1: // if_body_L18 from goto 1u ? block@2 : block@3 to goto block@2 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@3: // after_if_else_L1 from goto 0u ? block@4 : block@5 to goto block@5 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@5: // after_if_else_L1 from goto 0u ? block@6 : block@7 to goto block@7 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@7: // after_if_else_L1 from goto 0u ? block@8 : block@9 to goto block@9 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@10: // else_body_L23 from goto 1u ? block@11 : block@12 to goto block@11 +debug: Replacing trivial Phi node: let a%out#12: bytes = φ(a#1 <- block@2) (a%out#12) with a#1 +debug: Deleting Phi assignment: let a%out#12: bytes = φ(a#1 <- block@2) +debug: Replacing trivial Phi node: let a%out#13: bytes = φ(a#6 <- block@11) (a%out#13) with a#6 +debug: Deleting Phi assignment: let a%out#13: bytes = φ(a#6 <- block@11) +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@2: // if_body_L1 with block@1: // if_body_L18 in block@3: // after_if_else_L1 +debug: Merged linear block@2: // if_body_L1 into block@1: // if_body_L18 +debug: Replaced predecessor block@3: // after_if_else_L1 with block@1: // if_body_L18 in block@5: // after_if_else_L1 +debug: Merged linear block@3: // after_if_else_L1 into block@1: // if_body_L18 +debug: Replaced predecessor block@11: // if_body_L1 with block@10: // else_body_L23 in block@12: // after_if_else_L1 +debug: Merged linear block@11: // if_body_L1 into block@10: // else_body_L23 +debug: Replaced predecessor block@12: // after_if_else_L1 with block@10: // else_body_L23 in block@13: // after_if_else_L17 +debug: Merged linear block@12: // after_if_else_L1 into block@10: // else_body_L23 +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@4: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@6: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@8: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@14: // if_body_L1 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Removing unreachable blocks: block@4: // if_body_L1, block@6: // if_body_L1, block@8: // if_body_L1 +debug: Removed unreachable predecessors from block@5: // after_if_else_L1 +debug: Removed unreachable predecessors from block@7: // after_if_else_L1 +debug: Removed unreachable predecessors from block@9: // after_if_else_L1 +debug: Removing unreachable phi arguments: a#2 <- block@4 +debug: Replacing trivial Phi node: let a%out#11: bytes = φ(a#1 <- block@1) (a%out#11) with a#1 +debug: Deleting Phi assignment: let a%out#11: bytes = φ(a#1 <- block@1) +debug: Removing unreachable phi arguments: a#4 <- block@6 +debug: Replacing trivial Phi node: let a%out#10: bytes = φ(a#1 <- block@5) (a%out#10) with a#1 +debug: Deleting Phi assignment: let a%out#10: bytes = φ(a#1 <- block@5) +debug: Removing unreachable phi arguments: a#5 <- block@8 +debug: Replacing trivial Phi node: let a%out#9: bytes = φ(a#1 <- block@7) (a%out#9) with a#1 +debug: Deleting Phi assignment: let a%out#9: bytes = φ(a#1 <- block@7) +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__algopy_default_create debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation -debug: Found equivalence set: array#0, copy%0#0, copy#0 -debug: Replacing {copy%0#0, copy#0} with array#0 made 1 modifications -debug: Found equivalence set: updated_target%0#0, array#1 -debug: Replacing {updated_target%0#0} with array#1 made 1 modifications debug: Optimizer: Intrinsic Simplifier -debug: Simplified (replace3 array#0 0u 0x0a) to ((replace2 0) array#0 0x0a) debug: Optimizer: Remove Unused Variables -debug: Removing unused variable assigned_value%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13484,49 +14427,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation -debug: Found equivalence set: arrays.0#0, array#0 -debug: Replacing {array#0} with arrays.0#0 made 1 modifications -debug: Found equivalence set: updated_target%0#0, array#2 -debug: Replacing {updated_target%0#0} with array#2 made 1 modifications -debug: Found equivalence set: arrays.1#0, array#3 -debug: Replacing {array#3} with arrays.1#0 made 1 modifications -debug: Found equivalence set: arrays.2#0, array#4 -debug: Replacing {array#4} with arrays.2#0 made 1 modifications -debug: Found equivalence set: updated_target%1#0, arrays.0#2 -debug: Replacing {updated_target%1#0} with arrays.0#2 made 1 modifications -debug: Found equivalence set: updated_target%2#0, arrays.1#2 -debug: Replacing {updated_target%2#0} with arrays.1#2 made 1 modifications -debug: Found equivalence set: updated_target%3#0, arrays.2#2 -debug: Replacing {updated_target%3#0} with arrays.2#2 made 1 modifications -debug: Optimizer: Intrinsic Simplifier -debug: Simplified (replace3 array#1 0u 0x63) to ((replace2 0) array#1 0x63) -debug: Simplified (replace3 arrays.0#0 0u 0x63) to ((replace2 0) arrays.0#0 0x63) -debug: Simplified (replace3 arrays.1#0 0u 0x63) to ((replace2 0) arrays.1#0 0x63) -debug: Simplified (replace3 arrays.2#0 0u 0x63) to ((replace2 0) arrays.2#0 0x63) +debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables -debug: Removing unused variable assigned_value%0#0 -debug: Removing unused variable array#2 -debug: Removing unused variable assigned_value%1#0 -debug: Removing unused variable assigned_value%2#0 -debug: Removing unused variable assigned_value%3#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump -debug: Replaced predecessor block@2: // for_footer_L104 with block@1: // for_body_L105 in block@3: // for_header_1_L104 -debug: Replaced predecessor block@2: // for_footer_L104 with block@1: // for_body_L105 in block@4: // for_header_2_L104 -debug: Replaced predecessor block@2: // for_footer_L104 with block@1: // for_body_L105 in block@5: // after_for_L104 -debug: Merged linear block@2: // for_footer_L104 into block@1: // for_body_L105 debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program -debug: Splitting parallel copies prior to optimization +debug: Output IR to arc4_types/out/MutableParams2.ssa.opt_pass_1.ir +debug: Begin optimization pass 2/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13539,9 +14456,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir -debug: Begin optimization pass 2/100 -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13554,49 +14469,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation -debug: Found equivalence set: result%3#0, my_array#0 -debug: Replacing {result%3#0} with my_array#0 made 1 modifications -debug: Found equivalence set: my_array#2, nested#0 -debug: Replacing {nested#0} with my_array#2 made 1 modifications debug: Optimizer: Intrinsic Simplifier -debug: Simplified (concat 0x01 0x02) to 0x0102 -debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0005 -debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x0004 -debug: Simplified (concat 0x80 0x32) to 0x8032 -debug: Simplified (extract3 my_array#0 2u 1u) // on error: Index access is out of bounds to ((extract 2 1) my_array#0) // on error: Index access is out of bounds -debug: Simplified (extract3 my_array#1 2u 1u) // on error: Index access is out of bounds to ((extract 2 1) my_array#1) // on error: Index access is out of bounds -debug: Simplified (extract3 my_array#2 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array#2) // on error: Index access is out of bounds -debug: Simplified ((extract 6 2) as_bytes%4#0) to 0x0007 -debug: Simplified (extract3 my_array#0 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array#0) // on error: Index access is out of bounds -debug: Simplified ((extract 6 2) as_bytes%5#0) to 0x0005 -debug: Simplified (extract3 my_array_copy_2#2 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds -debug: Simplified (extract3 my_array_copy_2#3 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds +debug: Simplified (concat 0x0001 0x00) to 0x000100 +debug: Simplified (concat 0x00 0x01) to 0x0001 +debug: Simplified (concat 0x0001 0x01) to 0x000101 +debug: Simplified (concat 0x01 0x2a) to 0x012a debug: Optimizer: Remove Unused Variables debug: Removing unused variable result%0#0 -debug: Removing unused variable encoded_bool%0#0 -debug: Removing unused variable length%0#0 -debug: Removing unused variable as_bytes%0#0 -debug: Removing unused variable length%1#0 -debug: Removing unused variable as_bytes%1#0 -debug: Removing unused variable encoded_tuple_buffer%1#0 -debug: Removing unused variable offset_as_uint16%0#0 -debug: Removing unused variable data_length%1#0 -debug: Removing unused variable item_offset%0#0 -debug: Removing unused variable item_offset%1#0 -debug: Removing unused variable item_offset%2#0 -debug: Removing unused variable length%2#0 -debug: Removing unused variable as_bytes%4#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) -debug: Removing unused variable item_offset%3#0 -debug: Removing unused variable length%3#0 -debug: Removing unused variable as_bytes%5#0 -debug: Removing unused variable item_offset%4#0 -debug: Removing unused variable item_offset%5#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Removing unused variable result%1#0 +debug: Removing unused variable result%3#0 +debug: Removing unused variable result%4#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13605,23 +14490,36 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0007 +debug: Simplified (concat 0x01 0x02) to 0x0102 +debug: Simplified (concat 0x01 0x02) to 0x0102 debug: Optimizer: Remove Unused Variables -debug: Removing unused variable length%0#0 -debug: Removing unused variable as_bytes%0#0 +debug: Removing unused variable data%0#0 +debug: Removing unused variable result%0#0 +debug: Removing unused variable data%1#0 +debug: Removing unused variable a#4 +debug: Removing unused variable result%3#0 +debug: Removing unused variable data%2#0 +debug: Removing unused variable data%3#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@5: // after_if_else_L1 with block@1: // if_body_L18 in block@7: // after_if_else_L1 +debug: Merged linear block@5: // after_if_else_L1 into block@1: // if_body_L18 +debug: Replaced predecessor block@7: // after_if_else_L1 with block@1: // if_body_L18 in block@9: // after_if_else_L1 +debug: Merged linear block@7: // after_if_else_L1 into block@1: // if_body_L18 +debug: Replaced predecessor block@9: // after_if_else_L1 with block@1: // if_body_L18 in block@13: // after_if_else_L17 +debug: Merged linear block@9: // after_if_else_L1 into block@1: // if_body_L18 debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@14: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13634,12 +14532,13 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Output IR to arc4_types/out/MutableParams2.ssa.opt_pass_2.ir +debug: Begin optimization pass 3/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables -debug: Removing unused variable array#1 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13648,7 +14547,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13661,13 +14560,17 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir -debug: Begin optimization pass 3/100 -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0002 0x0001) to 0x00020001 +debug: Simplified (concat 0x012a 0x04) to 0x012a04 debug: Optimizer: Remove Unused Variables +debug: Removing unused variable a#0 +debug: Removing unused variable result%2#0 +debug: Removing unused variable a#2 +debug: Removing unused variable result%5#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13676,41 +14579,30 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Simplified (concat 0x0102 0x03) to 0x010203 -debug: Simplified (concat 0x0005 "Happy") to 0x00054861707079 -debug: Simplified (concat 0x0004 "Days") to 0x000444617973 -debug: Simplified (concat 0x8032 0x0006) to 0x80320006 -debug: Simplified (concat 0x0007 "AARRGH!") to 0x000741415252474821 -debug: Simplified (concat 0x0005 "Happy") to 0x00054861707079 +debug: Simplified (concat 0x0102 0x04) to 0x010204 debug: Optimizer: Remove Unused Variables debug: Removing unused variable result%1#0 -debug: Removing unused variable length_uint16%0#0 -debug: Removing unused variable length_uint16%1#0 -debug: Removing unused variable encoded_tuple_buffer%2#0 -debug: Removing unused variable length_uint16%2#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) -debug: Removing unused variable length_uint16%3#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Removing unused variable len_16_bit%1#0 +debug: Removing unused variable result%4#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@14: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Simplified (concat 0x0007 "AARRGH!") to 0x000741415252474821 debug: Optimizer: Remove Unused Variables -debug: Removing unused variable length_uint16%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13719,7 +14611,9 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Output IR to arc4_types/out/MutableParams2.ssa.opt_pass_3.ir +debug: Begin optimization pass 4/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13732,7 +14626,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13745,11 +14639,14 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0003 0x012a04) to 0x0003012a04 debug: Optimizer: Remove Unused Variables +debug: Removing unused variable array_data%1#0 +debug: Removing unused variable result%6#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13758,37 +14655,30 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir -debug: Begin optimization pass 4/100 -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0003 0x010203) to 0x0003010203 +debug: Simplified (concat 0x0003 0x010204) to 0x0003010204 debug: Optimizer: Remove Unused Variables +debug: Removing unused variable result%2#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable result%5#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@14: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Simplified (concat 0x010203 0x04) to 0x01020304 -debug: Simplified (len 0x00054861707079) to 7u debug: Optimizer: Remove Unused Variables -debug: Removing unused variable result%2#0 -debug: Removing unused variable encoded_value%0#0 -debug: Removing unused variable encoded_value%1#0 -debug: Removing unused variable encoded_tuple_buffer%3#0 -debug: Removing unused variable encoded_value%2#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) -debug: Removing unused variable encoded_value%3#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13797,13 +14687,13 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Output IR to arc4_types/out/MutableParams2.ssa.opt_pass_4.ir +debug: Begin optimization pass 5/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Simplified (len 0x000741415252474821) to 9u debug: Optimizer: Remove Unused Variables -debug: Removing unused variable encoded_value%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13812,7 +14702,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13825,11 +14715,12 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables +debug: Removing unused variable array_data%3#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13838,22 +14729,24 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 2 0) 0x0003010203) to 0x010203 debug: Optimizer: Remove Unused Variables +debug: Removing unused variable a#2 +debug: Removing unused variable len_%1#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@14: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir -debug: Begin optimization pass 5/100 -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13866,19 +14759,13 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Output IR to arc4_types/out/MutableParams2.ssa.opt_pass_5.ir +debug: Begin optimization pass 6/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Simplified (+ 6u 7u) to 13u -debug: Simplified ((extract 2 1) 0x01020304) // on error: Index access is out of bounds to 0x03 -debug: Simplified ((extract 1 1) 0x01020304) // on error: Index access is out of bounds to 0x02 debug: Optimizer: Remove Unused Variables -debug: Removing unused variable my_array#0 -debug: Removing unused variable data_length%0#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13887,12 +14774,11 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables -debug: Removing unused variable new_value_length%0#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -13901,7 +14787,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13914,20 +14800,24 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x010203 0x04) to 0x01020304 debug: Optimizer: Remove Unused Variables +debug: Removing unused variable expr_value_trimmed%1#0 +debug: Removing unused variable concatenated%1#0 debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@14: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13940,9 +14830,9 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir -debug: Begin optimization pass 6/100 -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Output IR to arc4_types/out/MutableParams2.ssa.opt_pass_6.ir +debug: Begin optimization pass 7/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -13955,11 +14845,1034 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Simplified ((extract 6 2) as_bytes%3#0) to 0x000d +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@14: // if_body_L1 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: No optimizations performed in pass 7, ending loop +debug: Removing Phis from algopy.arc4.ARC4Contract.approval_program +debug: Removing Phis from test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ +debug: Removing Phis from test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding +debug: Removing Phis from test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array +debug: Removing Phis from algopy.arc4.ARC4Contract.clear_state_program +debug: Coalescing local variables in algopy.arc4.ARC4Contract.approval_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding using strategy RootOperandGrouping +debug: Coalescing a#1 with [a#3] +debug: Coalescing resulted in 2 replacement/s +debug: Coalescing local variables in test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array using strategy RootOperandGrouping +debug: Coalescing a#0 with [a#1, a#13, a#6, a#7, a#10] +debug: Coalescing a%is_original#0 with [a%is_original#3, a%is_original#7, a%is_original#4] +debug: Coalescing a%out#7 with [a%out#9, a%out#8, a%out#11] +debug: Coalescing resulted in 27 replacement/s +debug: Coalescing local variables in algopy.arc4.ARC4Contract.clear_state_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.approval_program +debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ +debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params2.MutableParams2.test_array_rebinding +debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array +debug: loc: {a#0=a#0, a%is_original#0=a%is_original#0, a%out#7=None, a#5=a#5} +debug: pred: {a#0=a#5, a%is_original#0=a%is_original#0, a%out#7=a#0} +debug: ready: a%out#7 +debug: to_do: a#0, a%is_original#0, a%out#7 +debug: * avail a%out#7 +debug: * avail a#0 +debug: * avail a#5 +debug: * to_do a%out#7 +debug: * to_do a%is_original#0 +debug: loc: {a#0=a#0, a%is_original#0=a%is_original#0, a%out#7=None} +debug: pred: {a#0=a#0, a%is_original#0=a%is_original#0, a%out#7=a#0} +debug: ready: a%out#7 +debug: to_do: a#0, a%is_original#0, a%out#7 +debug: * avail a%out#7 +debug: * avail a#0 +debug: * to_do a%is_original#0 +debug: loc: {a#0=a#0, a%is_original#0=a%is_original#0, a%out#7=a%out#7} +debug: pred: {a#0=a#0, a%is_original#0=a%is_original#0, a%out#7=a%out#7} +debug: ready: +debug: to_do: a#0, a%is_original#0, a%out#7 +debug: * to_do a%out#7 +debug: * to_do a%is_original#0 +debug: * to_do a#0 +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.clear_state_program +debug: Performing post-SSA optimizations +debug: Output IR to arc4_types/out/MutableParams2.destructured.ir +debug: Inserted main_block@0.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced main_block@0.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted __puya_arc4_router___block@0.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced __puya_arc4_router___block@0.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted __puya_arc4_router___abi_routing@1.ops[1]: 'l-store-copy tmp%2#0 0' +debug: Replaced __puya_arc4_router___abi_routing@1.ops[4]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted __puya_arc4_router___test_array_rebinding_route@2.ops[1]: 'l-store-copy tmp%3#0 0' +debug: Replaced __puya_arc4_router___test_array_rebinding_route@2.ops[3]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted __puya_arc4_router___test_array_rebinding_route@2.ops[5]: 'l-store-copy tmp%4#0 0' +debug: Replaced __puya_arc4_router___test_array_rebinding_route@2.ops[7]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted __puya_arc4_router___test_array_rebinding_route@2.ops[10]: 'l-store-copy tmp%5#0 0' +debug: Replaced __puya_arc4_router___test_array_rebinding_route@2.ops[12]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted __puya_arc4_router___bare_routing@5.ops[1]: 'l-store-copy tmp%7#0 0' +debug: Replaced __puya_arc4_router___bare_routing@5.ops[3]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted __puya_arc4_router_____algopy_default_create@6.ops[1]: 'l-store-copy tmp%8#0 0' +debug: Replaced __puya_arc4_router_____algopy_default_create@6.ops[3]: 'v-load tmp%8#0' with 'l-load tmp%8#0' +debug: Inserted __puya_arc4_router_____algopy_default_create@6.ops[5]: 'l-store-copy tmp%9#0 0' +debug: Replaced __puya_arc4_router_____algopy_default_create@6.ops[7]: 'v-load tmp%9#0' with 'l-load tmp%9#0' +debug: Inserted test_array_rebinding_block@0.ops[3]: 'l-store-copy a#1 0' +debug: Replaced test_array_rebinding_block@0.ops[5]: 'v-load a#1' with 'l-load a#1' +debug: Inserted test_array_rebinding_block@0.ops[8]: 'l-store-copy tmp%0#0 0' +debug: Replaced test_array_rebinding_block@0.ops[10]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted test_array_rebinding_block@0.ops[15]: 'l-store-copy a#1 0' +debug: Replaced test_array_rebinding_block@0.ops[17]: 'v-load a#1' with 'l-load a#1' +debug: Inserted test_array_rebinding_block@0.ops[20]: 'l-store-copy tmp%1#0 0' +debug: Replaced test_array_rebinding_block@0.ops[22]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted maybe_modify_array_if_body@1.ops[2]: 'l-store-copy expr_value_trimmed%0#0 0' +debug: Replaced maybe_modify_array_if_body@1.ops[4]: 'v-load expr_value_trimmed%0#0' with 'l-load expr_value_trimmed%0#0' +debug: Inserted maybe_modify_array_if_body@1.ops[7]: 'l-store-copy concatenated%0#0 0' +debug: Replaced maybe_modify_array_if_body@1.ops[9]: 'v-load concatenated%0#0' with 'l-load concatenated%0#0' +debug: Inserted maybe_modify_array_if_body@1.ops[11]: 'l-store-copy len_%0#0 0' +debug: Replaced maybe_modify_array_if_body@1.ops[13]: 'v-load len_%0#0' with 'l-load len_%0#0' +debug: Inserted maybe_modify_array_if_body@1.ops[15]: 'l-store-copy as_bytes%0#0 0' +debug: Replaced maybe_modify_array_if_body@1.ops[17]: 'v-load as_bytes%0#0' with 'l-load as_bytes%0#0' +debug: Inserted maybe_modify_array_if_body@1.ops[19]: 'l-store-copy len_16_bit%0#0 0' +debug: Replaced maybe_modify_array_if_body@1.ops[21]: 'v-load len_16_bit%0#0' with 'l-load len_16_bit%0#0' +debug: Inserted maybe_modify_array_if_body@1.ops[26]: 'l-store-copy a#5 0' +debug: Replaced maybe_modify_array_if_body@1.ops[32]: 'v-load a#5' with 'l-load a#5' +debug: Inserted maybe_modify_array_if_body@1.ops[10]: 'l-store-copy concatenated%0#0 0' +debug: Replaced maybe_modify_array_if_body@1.ops[23]: 'v-load concatenated%0#0' with 'l-load concatenated%0#0' +debug: Inserted maybe_modify_array_else_body@10.ops[2]: 'l-store-copy expr_value_trimmed%2#0 0' +debug: Replaced maybe_modify_array_else_body@10.ops[4]: 'v-load expr_value_trimmed%2#0' with 'l-load expr_value_trimmed%2#0' +debug: Inserted maybe_modify_array_else_body@10.ops[7]: 'l-store-copy concatenated%2#0 0' +debug: Replaced maybe_modify_array_else_body@10.ops[9]: 'v-load concatenated%2#0' with 'l-load concatenated%2#0' +debug: Inserted maybe_modify_array_else_body@10.ops[11]: 'l-store-copy len_%2#0 0' +debug: Replaced maybe_modify_array_else_body@10.ops[13]: 'v-load len_%2#0' with 'l-load len_%2#0' +debug: Inserted maybe_modify_array_else_body@10.ops[15]: 'l-store-copy as_bytes%2#0 0' +debug: Replaced maybe_modify_array_else_body@10.ops[17]: 'v-load as_bytes%2#0' with 'l-load as_bytes%2#0' +debug: Inserted maybe_modify_array_else_body@10.ops[19]: 'l-store-copy len_16_bit%2#0 0' +debug: Replaced maybe_modify_array_else_body@10.ops[21]: 'v-load len_16_bit%2#0' with 'l-load len_16_bit%2#0' +debug: Inserted maybe_modify_array_else_body@10.ops[26]: 'l-store-copy a%out#7 0' +debug: Replaced maybe_modify_array_else_body@10.ops[28]: 'v-load a%out#7' with 'l-load a%out#7' +debug: Inserted maybe_modify_array_else_body@10.ops[10]: 'l-store-copy concatenated%2#0 0' +debug: Replaced maybe_modify_array_else_body@10.ops[23]: 'v-load concatenated%2#0' with 'l-load concatenated%2#0' +debug: Inserted maybe_modify_array_after_if_else@13.ops[2]: 'l-store-copy expr_value_trimmed%3#0 0' +debug: Replaced maybe_modify_array_after_if_else@13.ops[4]: 'v-load expr_value_trimmed%3#0' with 'l-load expr_value_trimmed%3#0' +debug: Inserted maybe_modify_array_after_if_else@13.ops[7]: 'l-store-copy concatenated%3#0 0' +debug: Replaced maybe_modify_array_after_if_else@13.ops[9]: 'v-load concatenated%3#0' with 'l-load concatenated%3#0' +debug: Inserted maybe_modify_array_after_if_else@13.ops[11]: 'l-store-copy len_%3#0 0' +debug: Replaced maybe_modify_array_after_if_else@13.ops[13]: 'v-load len_%3#0' with 'l-load len_%3#0' +debug: Inserted maybe_modify_array_after_if_else@13.ops[15]: 'l-store-copy as_bytes%3#0 0' +debug: Replaced maybe_modify_array_after_if_else@13.ops[17]: 'v-load as_bytes%3#0' with 'l-load as_bytes%3#0' +debug: Inserted maybe_modify_array_after_if_else@13.ops[19]: 'l-store-copy len_16_bit%3#0 0' +debug: Replaced maybe_modify_array_after_if_else@13.ops[21]: 'v-load len_16_bit%3#0' with 'l-load len_16_bit%3#0' +debug: Inserted maybe_modify_array_after_if_else@13.ops[10]: 'l-store-copy concatenated%3#0 0' +debug: Replaced maybe_modify_array_after_if_else@13.ops[23]: 'v-load concatenated%3#0' with 'l-load concatenated%3#0' +debug: Found 3 edge set/s for test_cases.arc4_types.mutable_params2.MutableParams2.__puya_arc4_router__ +debug: Found 3 edge set/s for test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array +debug: test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array f-stack entry: ['a%out#7'] +debug: test_cases.arc4_types.mutable_params2.MutableParams2.maybe_modify_array f-stack on first store: ['a%is_original#0'] +debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.ir +info: optimizing test_cases.arc4_types.mutable_params.Arc4MutableParamsContract at level 1 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: array_data%0#0, my_array#0, copy%0#0, my_array_copy#0, array_head_and_tail%0#0, copy%2#0, array_head_and_tail%3#0, copy%4#0, my_array_copy_2#0, copy%5#0, my_array_copy_3#0, copy%8#0, originals.2#0, copy%11#0 +debug: Replacing {array_data%0#0, copy%0#0, my_array_copy#0, array_head_and_tail%0#0, copy%2#0, array_head_and_tail%3#0, copy%4#0, my_array_copy_2#0, copy%5#0, my_array_copy_3#0, copy%8#0, originals.2#0, copy%11#0} with my_array#0 made 9 modifications +debug: Found equivalence set: encoded_tuple_buffer%6#0, my_struct#0, copy%1#0, my_struct_copy#0, copy%3#0 +debug: Replacing {encoded_tuple_buffer%6#0, copy%1#0, my_struct_copy#0, copy%3#0} with my_struct#0 made 5 modifications +debug: Found equivalence set: updated_target%0#0, my_array#1, array_head_and_tail%1#0 +debug: Replacing {updated_target%0#0, array_head_and_tail%1#0} with my_array#1 made 2 modifications +debug: Found equivalence set: other_routine%3#0, my_struct#1 +debug: Replacing {other_routine%3#0} with my_struct#1 made 1 modifications +debug: Found equivalence set: other_routine%2#0, my_array#2, array_head_and_tail%2#0, copy%6#0, originals.0#0, copy%9#0 +debug: Replacing {other_routine%2#0, array_head_and_tail%2#0, copy%6#0, originals.0#0, copy%9#0} with my_array#2 made 4 modifications +debug: Found equivalence set: other_routine%0#0, t#0 +debug: Replacing {other_routine%0#0} with t#0 made 1 modifications +debug: Found equivalence set: other_routine%1#0, f#0 +debug: Replacing {other_routine%1#0} with f#0 made 1 modifications +debug: Found equivalence set: other_routine%7#0, copy%3#1 +debug: Found equivalence set: other_routine%6#0, copy%2#1 +debug: Found equivalence set: other_routine_2%1#0, my_array_copy_2#1 +debug: Replacing {other_routine_2%1#0} with my_array_copy_2#1 made 1 modifications +debug: Found equivalence set: other_routine_2%0#0, my_array_copy_2#2, array_head_and_tail%4#0 +debug: Replacing {other_routine_2%0#0, array_head_and_tail%4#0} with my_array_copy_2#2 made 2 modifications +debug: Found equivalence set: other_routine_2%3#0, my_array_copy_2#3, array_head_and_tail%5#0, copy%7#0, originals.1#0, copy%10#0 +debug: Replacing {other_routine_2%3#0, array_head_and_tail%5#0, copy%7#0, originals.1#0, copy%10#0} with my_array_copy_2#3 made 4 modifications +debug: Found equivalence set: mutate_tuple_items_and_reassign%2#0, copy%11#1 +debug: Found equivalence set: mutate_tuple_items_and_reassign%1#0, copy%10#1 +debug: Found equivalence set: mutate_tuple_items_and_reassign%0#0, copy%9#1 +debug: Found equivalence set: mutate_tuple_items_and_reassign%5#0, my_array_copy_3#1, array_head_and_tail%8#0, array_head_and_tail%11#0 +debug: Replacing {mutate_tuple_items_and_reassign%5#0, array_head_and_tail%8#0, array_head_and_tail%11#0} with my_array_copy_3#1 made 3 modifications +debug: Found equivalence set: mutate_tuple_items_and_reassign%4#0, my_array_copy_2#4, array_head_and_tail%7#0, array_head_and_tail%10#0 +debug: Replacing {mutate_tuple_items_and_reassign%4#0, array_head_and_tail%7#0, array_head_and_tail%10#0} with my_array_copy_2#4 made 3 modifications +debug: Found equivalence set: mutate_tuple_items_and_reassign%3#0, my_array#3, array_head_and_tail%6#0, array_head_and_tail%9#0 +debug: Replacing {mutate_tuple_items_and_reassign%3#0, array_head_and_tail%6#0, array_head_and_tail%9#0} with my_array#3 made 3 modifications +debug: Found equivalence set: mutate_tuple_items_and_reassign%8#0, my_array_copy_3#2, array_head_and_tail%14#0, array_head_and_tail%17#0 +debug: Replacing {mutate_tuple_items_and_reassign%8#0, array_head_and_tail%14#0, array_head_and_tail%17#0} with my_array_copy_3#2 made 3 modifications +debug: Found equivalence set: mutate_tuple_items_and_reassign%7#0, my_array_copy_2#5, array_head_and_tail%13#0, array_head_and_tail%16#0 +debug: Replacing {mutate_tuple_items_and_reassign%7#0, array_head_and_tail%13#0, array_head_and_tail%16#0} with my_array_copy_2#5 made 3 modifications +debug: Found equivalence set: mutate_tuple_items_and_reassign%6#0, my_array#4, array_head_and_tail%12#0, array_head_and_tail%15#0, copy%12#0 +debug: Replacing {mutate_tuple_items_and_reassign%6#0, array_head_and_tail%12#0, array_head_and_tail%15#0, copy%12#0} with my_array#4 made 4 modifications +debug: Found equivalence set: encoded_tuple_buffer%8#0, nested#0 +debug: Replacing {encoded_tuple_buffer%8#0} with nested#0 made 1 modifications +debug: Found equivalence set: tmp%28#0, copy%13#0 +debug: Replacing {copy%13#0} with tmp%28#0 made 1 modifications +debug: Found equivalence set: other_routine_2%5#0, copy%13#1 +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x 0x01) to 0x01 +debug: Simplified (concat 0x result%3#0) to result%3#0 +debug: Simplified (setbit 0x00 0u 1u) to 0x80 +debug: Simplified (len "Happy") to 5u +debug: Simplified (len "Days") to 4u +debug: Simplified (concat 0x encoded_bool%0#0) to encoded_bool%0#0 +debug: Simplified ((extract 6 2) as_bytes%2#0) to 0x0006 +debug: Simplified (replace3 my_array#0 2u 0x05) to ((replace2 2) my_array#0 0x05) +debug: Simplified (* 2u 1u) to 2u +debug: Simplified (* 2u 1u) to 2u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (len "AARRGH!") to 7u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (len "Happy") to 5u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (== my_array#2 my_array#2) to 1u +debug: Simplified (== my_array_copy_2#3 my_array_copy_2#3) to 1u +debug: Simplified (== my_array#0 my_array#0) to 1u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (concat 0x my_array#4) to my_array#4 +debug: Simplified (extract3 nested#0 0u 4u) // on error: Index access is out of bounds to ((extract 0 4) nested#0) // on error: Index access is out of bounds +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable current_tail_offset%0#0 +debug: Removing unused variable encoded_tuple_buffer%0#0 +debug: Removing unused variable as_bytes%2#0 +debug: Removing unused variable current_tail_offset%2#0 +debug: Removing unused variable assigned_value%0#0 +debug: Removing unused variable reinterpret_biguint%1#0 +debug: Removing unused variable reinterpret_biguint%3#0 +debug: Removing unused variable reinterpret_biguint%5#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) +debug: Removing unused variable reinterpret_biguint%7#0 +debug: Removing unused variable reinterpret_biguint%9#0 +debug: Removing unused variable reinterpret_biguint%11#0 +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) +debug: Removing unused variable reinterpret_biguint%13#0 +debug: Removing unused variable reinterpret_biguint%15#0 +debug: Removing unused variable reinterpret_biguint%17#0 +debug: Removing unused variable reinterpret_biguint%19#0 +debug: Removing unused variable reinterpret_biguint%21#0 +debug: Removing unused variable reinterpret_biguint%23#0 +debug: Removing unused variable reinterpret_biguint%25#0 +debug: Removing unused variable reinterpret_biguint%27#0 +debug: Removing unused variable reinterpret_biguint%29#0 +debug: Removing unused variable reinterpret_biguint%31#0 +debug: Removing unused variable reinterpret_biguint%33#0 +debug: Removing unused variable reinterpret_biguint%35#0 +debug: Removing unused variable current_tail_offset%3#0 +debug: Removing unused variable encoded_tuple_buffer%7#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: array#0, array%out#0 +debug: Found equivalence set: struct#0, struct%out#0 +debug: Found equivalence set: updated_target%0#0, array#1, array%out#1 +debug: Replacing {updated_target%0#0, array%out#1} with array#1 made 1 modifications +debug: Found equivalence set: encoded_value%0#0, assigned_value%1#0 +debug: Replacing {assigned_value%1#0} with encoded_value%0#0 made 2 modifications +debug: Found equivalence set: updated_data%2#0, struct#2, struct%out#1 +debug: Replacing {updated_data%2#0, struct%out#1} with struct#2 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (replace3 array#0 1u 0x05) to ((replace2 1) array#0 0x05) +debug: Simplified (len "AARRGH!") to 7u +debug: Simplified (replace3 updated_data%1#0 4u tail_offset_bytes%0#0) to ((replace2 4) updated_data%1#0 tail_offset_bytes%0#0) +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable array%is_original#0 +debug: Removing unused variable struct%is_original#0 +debug: Removing unused variable assigned_value%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@0: // L118 from goto 1u ? block@1 : block@2 to goto block@1 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@2: // after_if_else_L1 from goto 1u ? block@3 : block@4 to goto block@3 +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@1: // if_body_L1 with block@0: // L118 in block@2: // after_if_else_L1 +debug: Merged linear block@1: // if_body_L1 into block@0: // L118 +debug: Replaced predecessor block@2: // after_if_else_L1 with block@0: // L118 in block@3: // if_body_L1 +debug: Merged linear block@2: // after_if_else_L1 into block@0: // L118 +debug: Replaced predecessor block@3: // if_body_L1 with block@0: // L118 in block@4: // after_if_else_L1 +debug: Merged linear block@3: // if_body_L1 into block@0: // L118 +debug: Merged linear block@4: // after_if_else_L1 into block@0: // L118 +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: array#0, array%out#0, copy%0#0, copy#0 +debug: Replacing {array%out#0, copy%0#0, copy#0} with array#0 made 1 modifications +debug: Found equivalence set: updated_target%0#0, array#1, array%out#1 +debug: Replacing {updated_target%0#0, array%out#1} with array#1 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (replace3 array#0 0u 0x0a) to ((replace2 0) array#0 0x0a) +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable array%is_original#0 +debug: Removing unused variable assigned_value%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@0: // L124 from goto 1u ? block@1 : block@2 to goto block@1 +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@1: // if_body_L1 with block@0: // L124 in block@2: // after_if_else_L1 +debug: Merged linear block@1: // if_body_L1 into block@0: // L124 +debug: Merged linear block@2: // after_if_else_L1 into block@0: // L124 +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: arrays.0#0, arrays.0%out#0 +debug: Replacing {arrays.0%out#0} with arrays.0#0 made 1 modifications +debug: Found equivalence set: arrays.1#0, arrays.1%out#0 +debug: Replacing {arrays.1%out#0} with arrays.1#0 made 1 modifications +debug: Found equivalence set: arrays.2#0, arrays.2%out#0 +debug: Replacing {arrays.2%out#0} with arrays.2#0 made 1 modifications +debug: Found equivalence set: updated_target%0#0, arrays.0#1, arrays.0%out#1, array_head_and_tail%0#0 +debug: Replacing {updated_target%0#0, arrays.0%out#1, array_head_and_tail%0#0} with arrays.0#1 made 3 modifications +debug: Found equivalence set: updated_target%1#0, arrays.1#2, arrays.1%out#1, array_head_and_tail%1#0 +debug: Replacing {updated_target%1#0, arrays.1%out#1, array_head_and_tail%1#0} with arrays.1#2 made 3 modifications +debug: Found equivalence set: updated_target%2#0, arrays.2#3, array_head_and_tail%2#0, arrays.2%out#1 +debug: Replacing {updated_target%2#0, array_head_and_tail%2#0, arrays.2%out#1} with arrays.2#3 made 3 modifications +debug: Found equivalence set: updated_target%3#0, arrays.0#5, arrays.0%out#2, copy%0#0, arrays.0#9, arrays.0%out#3 +debug: Replacing {updated_target%3#0, arrays.0%out#2, copy%0#0, arrays.0#9, arrays.0%out#3} with arrays.0#5 made 4 modifications +debug: Found equivalence set: updated_target%4#0, arrays.1#6, arrays.1%out#2, copy%1#0, arrays.1#9, arrays.1%out#3 +debug: Replacing {updated_target%4#0, arrays.1%out#2, copy%1#0, arrays.1#9, arrays.1%out#3} with arrays.1#6 made 4 modifications +debug: Found equivalence set: updated_target%5#0, arrays.2#7, arrays.2%out#2, copy%2#0, arrays.2#9, arrays.2%out#3 +debug: Replacing {updated_target%5#0, arrays.2%out#2, copy%2#0, arrays.2#9, arrays.2%out#3} with arrays.2#7 made 4 modifications +debug: Found equivalence set: updated_target%6#0, arrays.0#14, arrays.0%out#4, array_head_and_tail%3#0 +debug: Replacing {updated_target%6#0, arrays.0%out#4, array_head_and_tail%3#0} with arrays.0#14 made 3 modifications +debug: Found equivalence set: updated_target%7#0, arrays.1#15, arrays.1%out#4, array_head_and_tail%4#0 +debug: Replacing {updated_target%7#0, arrays.1%out#4, array_head_and_tail%4#0} with arrays.1#15 made 3 modifications +debug: Found equivalence set: updated_target%8#0, arrays.2#16, array_head_and_tail%5#0, arrays.2%out#4 +debug: Replacing {updated_target%8#0, array_head_and_tail%5#0, arrays.2%out#4} with arrays.2#16 made 3 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (replace3 arrays.0#0 0u assigned_value%0#0) to ((replace2 0) arrays.0#0 assigned_value%0#0) +debug: Simplified (replace3 arrays.1#0 0u assigned_value%1#0) to ((replace2 0) arrays.1#0 assigned_value%1#0) +debug: Simplified (replace3 arrays.2#0 0u assigned_value%2#0) to ((replace2 0) arrays.2#0 assigned_value%2#0) +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (* 0u 1u) to 0u +debug: Simplified (replace3 arrays.0#1 1u assigned_value%3#0) to ((replace2 1) arrays.0#1 assigned_value%3#0) +debug: Simplified (replace3 arrays.1#2 1u assigned_value%4#0) to ((replace2 1) arrays.1#2 assigned_value%4#0) +debug: Simplified (replace3 arrays.2#3 1u assigned_value%5#0) to ((replace2 1) arrays.2#3 assigned_value%5#0) +debug: Simplified (replace3 arrays.0#10 1u assigned_value%6#0) to ((replace2 1) arrays.0#10 assigned_value%6#0) +debug: Simplified (replace3 arrays.1#11 1u assigned_value%7#0) to ((replace2 1) arrays.1#11 assigned_value%7#0) +debug: Simplified (replace3 arrays.2#12 1u assigned_value%8#0) to ((replace2 1) arrays.2#12 assigned_value%8#0) +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (* 1u 1u) to 1u +debug: Simplified (* 1u 1u) to 1u +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@0: // L130 from goto 1u ? block@1 : block@2 to goto block@1 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@2: // after_if_else_L1 from goto 1u ? block@3 : block@4 to goto block@3 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@4: // after_if_else_L1 from goto 1u ? block@5 : block@6 to goto block@5 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@6: // after_if_else_L1 from goto 1u ? block@7 : block@8 to goto block@7 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@8: // after_if_else_L1 from goto 1u ? block@9 : block@10 to goto block@9 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@10: // after_if_else_L1 from goto 1u ? block@11 : block@12 to goto block@11 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@13: // if_body_L148 from goto 0u ? block@14 : block@15 to goto block@15 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@15: // after_if_else_L1 from goto 0u ? block@16 : block@17 to goto block@17 +debug: simplifying conditional branch with a constant into a goto +debug: simplified terminator of block@17: // after_if_else_L1 from goto 0u ? block@18 : block@19 to goto block@19 +debug: Replacing trivial Phi node: let arrays.0%out#14: bytes = φ(arrays.0#1 <- block@1) (arrays.0%out#14) with arrays.0#1 +debug: Deleting Phi assignment: let arrays.0%out#14: bytes = φ(arrays.0#1 <- block@1) +debug: Replacing trivial Phi node: let arrays.1%out#13: bytes = φ(arrays.1#2 <- block@3) (arrays.1%out#13) with arrays.1#2 +debug: Deleting Phi assignment: let arrays.1%out#13: bytes = φ(arrays.1#2 <- block@3) +debug: Replacing trivial Phi node: let arrays.2%out#12: bytes = φ(arrays.2#3 <- block@5) (arrays.2%out#12) with arrays.2#3 +debug: Deleting Phi assignment: let arrays.2%out#12: bytes = φ(arrays.2#3 <- block@5) +debug: Replacing trivial Phi node: let arrays.0%out#11: bytes = φ(arrays.0#5 <- block@7) (arrays.0%out#11) with arrays.0#5 +debug: Deleting Phi assignment: let arrays.0%out#11: bytes = φ(arrays.0#5 <- block@7) +debug: Replacing trivial Phi node: let arrays.0%out#17: bytes = φ(arrays.0#5 <- block@13, arrays.0#5 <- block@14) (arrays.0%out#17) with arrays.0#5 +debug: Deleting Phi assignment: let arrays.0%out#17: bytes = φ(arrays.0#5 <- block@13, arrays.0#5 <- block@14) +debug: Replacing trivial Phi node: let arrays.0%out#8: bytes = φ(arrays.0#5 <- block@12, arrays.0#5 <- block@19) (arrays.0%out#8) with arrays.0#5 +debug: Deleting Phi assignment: let arrays.0%out#8: bytes = φ(arrays.0#5 <- block@12, arrays.0#5 <- block@19) +debug: Replacing trivial Phi node: let arrays.0%out#8: bytes = φ(arrays.0#5 <- block@12, arrays.0#5 <- block@19) (arrays.0%out#8) with arrays.0#5 +debug: Replacing trivial Phi node: let arrays.1%out#10: bytes = φ(arrays.1#6 <- block@9) (arrays.1%out#10) with arrays.1#6 +debug: Deleting Phi assignment: let arrays.1%out#10: bytes = φ(arrays.1#6 <- block@9) +debug: Replacing trivial Phi node: let arrays.1%out#16: bytes = φ(arrays.1#6 <- block@15, arrays.1#6 <- block@16) (arrays.1%out#16) with arrays.1#6 +debug: Deleting Phi assignment: let arrays.1%out#16: bytes = φ(arrays.1#6 <- block@15, arrays.1#6 <- block@16) +debug: Replacing trivial Phi node: let arrays.1%out#8: bytes = φ(arrays.1#6 <- block@12, arrays.1#6 <- block@19) (arrays.1%out#8) with arrays.1#6 +debug: Deleting Phi assignment: let arrays.1%out#8: bytes = φ(arrays.1#6 <- block@12, arrays.1#6 <- block@19) +debug: Replacing trivial Phi node: let arrays.1%out#8: bytes = φ(arrays.1#6 <- block@12, arrays.1#6 <- block@19) (arrays.1%out#8) with arrays.1#6 +debug: Replacing trivial Phi node: let arrays.2%out#9: bytes = φ(arrays.2#7 <- block@11) (arrays.2%out#9) with arrays.2#7 +debug: Deleting Phi assignment: let arrays.2%out#9: bytes = φ(arrays.2#7 <- block@11) +debug: Replacing trivial Phi node: let arrays.2%out#15: bytes = φ(arrays.2#7 <- block@17, arrays.2#7 <- block@18) (arrays.2%out#15) with arrays.2#7 +debug: Deleting Phi assignment: let arrays.2%out#15: bytes = φ(arrays.2#7 <- block@17, arrays.2#7 <- block@18) +debug: Replacing trivial Phi node: let arrays.2%out#8: bytes = φ(arrays.2#7 <- block@12, arrays.2#7 <- block@19) (arrays.2%out#8) with arrays.2#7 +debug: Deleting Phi assignment: let arrays.2%out#8: bytes = φ(arrays.2#7 <- block@12, arrays.2#7 <- block@19) +debug: Replacing trivial Phi node: let arrays.2%out#8: bytes = φ(arrays.2#7 <- block@12, arrays.2#7 <- block@19) (arrays.2%out#8) with arrays.2#7 +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@1: // if_body_L1 with block@0: // L130 in block@2: // after_if_else_L1 +debug: Merged linear block@1: // if_body_L1 into block@0: // L130 +debug: Replaced predecessor block@2: // after_if_else_L1 with block@0: // L130 in block@3: // if_body_L1 +debug: Merged linear block@2: // after_if_else_L1 into block@0: // L130 +debug: Replaced predecessor block@3: // if_body_L1 with block@0: // L130 in block@4: // after_if_else_L1 +debug: Merged linear block@3: // if_body_L1 into block@0: // L130 +debug: Replaced predecessor block@4: // after_if_else_L1 with block@0: // L130 in block@5: // if_body_L1 +debug: Merged linear block@4: // after_if_else_L1 into block@0: // L130 +debug: Replaced predecessor block@5: // if_body_L1 with block@0: // L130 in block@6: // after_if_else_L1 +debug: Merged linear block@5: // if_body_L1 into block@0: // L130 +debug: Replaced predecessor block@6: // after_if_else_L1 with block@0: // L130 in block@7: // if_body_L1 +debug: Merged linear block@6: // after_if_else_L1 into block@0: // L130 +debug: Replaced predecessor block@7: // if_body_L1 with block@0: // L130 in block@8: // after_if_else_L1 +debug: Merged linear block@7: // if_body_L1 into block@0: // L130 +debug: Replaced predecessor block@8: // after_if_else_L1 with block@0: // L130 in block@9: // if_body_L1 +debug: Merged linear block@8: // after_if_else_L1 into block@0: // L130 +debug: Replaced predecessor block@9: // if_body_L1 with block@0: // L130 in block@10: // after_if_else_L1 +debug: Merged linear block@9: // if_body_L1 into block@0: // L130 +debug: Replaced predecessor block@10: // after_if_else_L1 with block@0: // L130 in block@11: // if_body_L1 +debug: Merged linear block@10: // after_if_else_L1 into block@0: // L130 +debug: Replaced predecessor block@11: // if_body_L1 with block@0: // L130 in block@12: // after_if_else_L1 +debug: Merged linear block@11: // if_body_L1 into block@0: // L130 +debug: Replaced predecessor block@12: // after_if_else_L1 with block@0: // L130 in block@20: // after_if_else_L147 +debug: Replaced predecessor block@12: // after_if_else_L1 with block@0: // L130 in block@13: // if_body_L148 +debug: Merged linear block@12: // after_if_else_L1 into block@0: // L130 +debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@14: // if_body_L1 +debug: Removed empty block: block@15: // after_if_else_L1 +debug: Removed empty block: block@16: // if_body_L1 +debug: Removed empty block: block@17: // after_if_else_L1 +debug: Removed empty block: block@18: // if_body_L1 +debug: Not removing empty block block@19: // after_if_else_L1 because it's used by phi nodes +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Replacing redundant declaration let tmp%0#0: biguint = (itob start#0) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:134:23-35, ir_type=bytes, name='val_as_bytes%0', version=0),) +debug: Replacing redundant declaration let tmp%2#0: uint64 = (+ start#0 1u) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:135:29-38, ir_type=uint64, name='to_encode%0', version=0),) +debug: Replacing redundant declaration let tmp%5#0: uint64 = (+ start#0 2u) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:136:29-38, ir_type=uint64, name='to_encode%1', version=0),) +debug: Replacing redundant declaration let tmp%8#0: uint64 = (+ start#0 6u) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:150:29-38, ir_type=uint64, name='to_encode%5', version=0),) +debug: Replacing redundant declaration let tmp%11#0: uint64 = (+ start#0 7u) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:151:29-38, ir_type=uint64, name='to_encode%6', version=0),) +debug: Replacing redundant declaration let tmp%14#0: uint64 = (+ start#0 8u) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:152:29-38, ir_type=uint64, name='to_encode%7', version=0),) +debug: Found equivalence set: val_as_bytes%0#0, tmp%0#0 +debug: Replacing {tmp%0#0} with val_as_bytes%0#0 made 1 modifications +debug: Found equivalence set: to_encode%0#0, tmp%2#0 +debug: Replacing {tmp%2#0} with to_encode%0#0 made 1 modifications +debug: Found equivalence set: to_encode%1#0, tmp%5#0 +debug: Replacing {tmp%5#0} with to_encode%1#0 made 1 modifications +debug: Found equivalence set: to_encode%5#0, tmp%8#0 +debug: Replacing {tmp%8#0} with to_encode%5#0 made 1 modifications +debug: Found equivalence set: to_encode%6#0, tmp%11#0 +debug: Replacing {tmp%11#0} with to_encode%6#0 made 1 modifications +debug: Found equivalence set: to_encode%7#0, tmp%14#0 +debug: Replacing {tmp%14#0} with to_encode%7#0 made 1 modifications +debug: Replacing redundant declaration let tmp%3#0: biguint = (itob to_encode%0#0) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:135:23-39, ir_type=bytes, name='val_as_bytes%1', version=0),) +debug: Replacing redundant declaration let tmp%6#0: biguint = (itob to_encode%1#0) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:136:23-39, ir_type=bytes, name='val_as_bytes%2', version=0),) +debug: Replacing redundant declaration let tmp%9#0: biguint = (itob to_encode%5#0) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:150:23-39, ir_type=bytes, name='val_as_bytes%6', version=0),) +debug: Replacing redundant declaration let tmp%12#0: biguint = (itob to_encode%6#0) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:151:23-39, ir_type=bytes, name='val_as_bytes%7', version=0),) +debug: Replacing redundant declaration let tmp%15#0: biguint = (itob to_encode%7#0) with copy of existing registers (Register(source_location=arc4_types/mutable_params.py:152:23-39, ir_type=bytes, name='val_as_bytes%8', version=0),) +debug: Found equivalence set: val_as_bytes%1#0, tmp%3#0 +debug: Replacing {tmp%3#0} with val_as_bytes%1#0 made 1 modifications +debug: Found equivalence set: val_as_bytes%2#0, tmp%6#0 +debug: Replacing {tmp%6#0} with val_as_bytes%2#0 made 1 modifications +debug: Found equivalence set: val_as_bytes%6#0, tmp%9#0 +debug: Replacing {tmp%9#0} with val_as_bytes%6#0 made 1 modifications +debug: Found equivalence set: val_as_bytes%7#0, tmp%12#0 +debug: Replacing {tmp%12#0} with val_as_bytes%7#0 made 1 modifications +debug: Found equivalence set: val_as_bytes%8#0, tmp%15#0 +debug: Replacing {tmp%15#0} with val_as_bytes%8#0 made 1 modifications +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir +debug: Begin optimization pass 2/100 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: result%3#0, my_array#0 +debug: Replacing {result%3#0} with my_array#0 made 1 modifications +debug: Found equivalence set: my_array#4, nested#0 +debug: Replacing {nested#0} with my_array#4 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x01 0x02) to 0x0102 +debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0005 +debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x0004 +debug: Simplified (concat 0x80 0x32) to 0x8032 +debug: Simplified (extract3 my_array#0 2u 1u) // on error: Index access is out of bounds to ((extract 2 1) my_array#0) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array#1 2u 1u) // on error: Index access is out of bounds to ((extract 2 1) my_array#1) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array#2 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array#2) // on error: Index access is out of bounds +debug: Simplified ((extract 6 2) as_bytes%4#0) to 0x0007 +debug: Simplified (extract3 my_array#0 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array#0) // on error: Index access is out of bounds +debug: Simplified ((extract 6 2) as_bytes%5#0) to 0x0005 +debug: Simplified (extract3 my_array_copy_2#2 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_2#3 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds +debug: Simplified (&& 1u 1u) to 1u +debug: Simplified (extract3 my_array#3 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array#3) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_2#4 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_2#4) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_3#1 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_3#1) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array#3 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array#3) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_2#4 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array_copy_2#4) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_3#1 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array_copy_3#1) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array#4 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array#4) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_2#5 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_2#5) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_3#2 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) my_array_copy_3#2) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array#4 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array#4) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_2#5 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array_copy_2#5) // on error: Index access is out of bounds +debug: Simplified (extract3 my_array_copy_3#2 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) my_array_copy_3#2) // on error: Index access is out of bounds +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable result%0#0 +debug: Removing unused variable encoded_bool%0#0 +debug: Removing unused variable length%0#0 +debug: Removing unused variable as_bytes%0#0 +debug: Removing unused variable length%1#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable encoded_tuple_buffer%1#0 +debug: Removing unused variable offset_as_uint16%0#0 +debug: Removing unused variable data_length%1#0 +debug: Removing unused variable item_offset%0#0 +debug: Removing unused variable item_offset%1#0 +debug: Removing unused variable item_offset%2#0 +debug: Removing unused variable length%2#0 +debug: Removing unused variable as_bytes%4#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) +debug: Removing unused variable item_offset%3#0 +debug: Removing unused variable length%3#0 +debug: Removing unused variable as_bytes%5#0 +debug: Removing unused variable item_offset%4#0 +debug: Removing unused variable item_offset%5#0 +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) +debug: Removing unused variable tmp%11#0 +debug: Removing unused variable tmp%12#0 +debug: Removing unused variable tmp%14#0 +debug: Removing unused variable item_offset%6#0 +debug: Removing unused variable item_offset%7#0 +debug: Removing unused variable item_offset%8#0 +debug: Removing unused variable item_offset%9#0 +debug: Removing unused variable item_offset%10#0 +debug: Removing unused variable item_offset%11#0 +debug: Removing unused variable item_offset%12#0 +debug: Removing unused variable item_offset%13#0 +debug: Removing unused variable item_offset%14#0 +debug: Removing unused variable item_offset%15#0 +debug: Removing unused variable item_offset%16#0 +debug: Removing unused variable item_offset%17#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0007 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length%0#0 +debug: Removing unused variable as_bytes%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (extract3 arrays.0#1 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) arrays.0#1) // on error: Index access is out of bounds +debug: Simplified (extract3 arrays.1#2 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) arrays.1#2) // on error: Index access is out of bounds +debug: Simplified (extract3 arrays.2#3 0u 1u) // on error: Index access is out of bounds to ((extract 0 1) arrays.2#3) // on error: Index access is out of bounds +debug: Simplified (extract3 arrays.0#14 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) arrays.0#14) // on error: Index access is out of bounds +debug: Simplified (extract3 arrays.1#15 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) arrays.1#15) // on error: Index access is out of bounds +debug: Simplified (extract3 arrays.2#16 1u 1u) // on error: Index access is out of bounds to ((extract 1 1) arrays.2#16) // on error: Index access is out of bounds +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable item_offset%0#0 +debug: Removing unused variable item_offset%1#0 +debug: Removing unused variable item_offset%2#0 +debug: Removing unused variable item_offset%3#0 +debug: Removing unused variable item_offset%4#0 +debug: Removing unused variable item_offset%5#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@19: // after_if_else_L1 with block@13: // if_body_L148 in block@20: // after_if_else_L147 +debug: Merged linear block@19: // after_if_else_L1 into block@13: // if_body_L148 +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir +debug: Begin optimization pass 3/100 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0102 0x03) to 0x010203 +debug: Simplified (concat 0x0005 "Happy") to 0x00054861707079 +debug: Simplified (concat 0x0004 "Days") to 0x000444617973 +debug: Simplified (concat 0x8032 0x0006) to 0x80320006 +debug: Simplified (concat 0x0007 "AARRGH!") to 0x000741415252474821 +debug: Simplified (concat 0x0005 "Happy") to 0x00054861707079 +debug: Simplified (&& 1u 1u) to 1u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable result%1#0 +debug: Removing unused variable length_uint16%0#0 +debug: Removing unused variable length_uint16%1#0 +debug: Removing unused variable encoded_tuple_buffer%2#0 +debug: Removing unused variable length_uint16%2#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) +debug: Removing unused variable length_uint16%3#0 +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) +debug: Removing unused variable tmp%13#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0007 "AARRGH!") to 0x000741415252474821 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length_uint16%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir +debug: Begin optimization pass 4/100 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x010203 0x04) to 0x01020304 +debug: Simplified (len 0x00054861707079) to 7u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable result%2#0 +debug: Removing unused variable encoded_value%0#0 +debug: Removing unused variable encoded_value%1#0 +debug: Removing unused variable encoded_tuple_buffer%3#0 +debug: Removing unused variable encoded_value%2#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) +debug: Removing unused variable encoded_value%3#0 +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, my_array#0, 0u, 1u) +debug: Removing unused variable tmp%15#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (len 0x000741415252474821) to 9u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_value%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir +debug: Begin optimization pass 5/100 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (+ 6u 7u) to 13u +debug: Simplified ((extract 2 1) 0x01020304) // on error: Index access is out of bounds to 0x03 +debug: Simplified ((extract 1 1) 0x01020304) // on error: Index access is out of bounds to 0x02 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable my_array#0 +debug: Removing unused variable data_length%0#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable new_value_length%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir +debug: Begin optimization pass 6/100 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%3#0) to 0x000d debug: Simplified (b== 0x03 0x03) to 1u debug: Simplified (b== 0x02 0x02) to 1u debug: Optimizer: Remove Unused Variables @@ -13968,8 +15881,8 @@ debug: Removing unused variable as_bytes%3#0 debug: Removing unused variable reinterpret_biguint%0#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) debug: Removing unused variable reinterpret_biguint%6#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14004,7 +15917,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14014,6 +15927,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14055,8 +15971,8 @@ debug: Removing unused variable offset_as_uint16%1#0 debug: Removing unused variable tmp%0#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) debug: Removing unused variable tmp%6#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14091,7 +16007,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14101,6 +16017,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14140,8 +16059,8 @@ debug: Simplified (concat 0x80320006000d 0x00054861707079) to 0x80320006000d0005 debug: Optimizer: Remove Unused Variables debug: Removing unused variable encoded_tuple_buffer%4#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14176,7 +16095,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14186,6 +16105,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14225,8 +16147,8 @@ debug: Simplified (concat 0x80320006000d00054861707079 0x000444617973) to 0x8032 debug: Optimizer: Remove Unused Variables debug: Removing unused variable encoded_tuple_buffer%5#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14261,7 +16183,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14271,6 +16193,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14311,8 +16236,8 @@ debug: Simplified (extract_uint16 0x80320006000d00054861707079000444617973 4u) t debug: Optimizer: Remove Unused Variables debug: Removing unused variable my_struct#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14347,7 +16272,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14357,6 +16282,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14397,8 +16325,8 @@ debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) debug: Removing unused variable item_start_offset%1#0 debug: Removing unused variable item_end_offset%1#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14433,7 +16361,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14443,6 +16371,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14482,8 +16413,8 @@ debug: Simplified (== 0x00054861707079 0x00054861707079) to 1u debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) debug: Removing unused variable tmp%7#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14518,7 +16449,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14528,6 +16459,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14566,8 +16500,8 @@ debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) debug: Removing unused variable tmp%8#0 -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14602,7 +16536,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14612,6 +16546,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14649,8 +16586,8 @@ debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) -debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) +debug: Not removing unused assignment since source is not marked as pure: let (mutate_tuple_items_and_reassign%0#0: bytes, mutate_tuple_items_and_reassign%1#0: bytes, mutate_tuple_items_and_reassign%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign(my_array#2, my_array_copy_2#3, 0x01020304, 0u, 1u) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%28#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops @@ -14685,7 +16622,7 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines -debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier @@ -14695,6 +16632,9 @@ debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@21: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@23: // if_body_L1 because it's used by phi nodes +debug: Not removing empty block block@25: // if_body_L1 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines @@ -14716,33 +16656,84 @@ debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParams debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 -debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies using strategy RootOperandGrouping -debug: Coalescing my_array#1 with [my_array#2] -debug: Coalescing my_array_copy_2#2 with [my_array_copy_2#3] -debug: Coalescing resulted in 8 replacement/s +debug: Coalescing my_array#1 with [my_array#2, my_array#3, my_array#4] +debug: Coalescing my_array_copy_2#2 with [my_array_copy_2#3, my_array_copy_2#4, my_array_copy_2#5] +debug: Coalescing my_array_copy_3#1 with [my_array_copy_3#2] +debug: Coalescing resulted in 26 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine using strategy RootOperandGrouping debug: Coalescing array#0 with [array#1] -debug: Coalescing struct#0 with [struct#1] +debug: Coalescing struct#0 with [struct#2] debug: Coalescing resulted in 4 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s -debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 using strategy RootOperandGrouping -debug: Coalescing arrays.0#0 with [arrays.0#2] -debug: Coalescing arrays.1#0 with [arrays.1#2] -debug: Coalescing arrays.2#0 with [arrays.2#2] -debug: Coalescing loop_counter%0#0 with [loop_counter%0#7, loop_counter%0#1, loop_counter%0#2, loop_counter%0#3] -debug: Coalescing resulted in 16 replacement/s +debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign using strategy RootOperandGrouping +debug: Coalescing arrays.0#0 with [arrays.0#1, arrays.0#5] +debug: Coalescing arrays.0#10 with [arrays.0#17, arrays.0#14] +debug: Coalescing arrays.1#0 with [arrays.1#2, arrays.1#6] +debug: Coalescing arrays.1#11 with [arrays.1#18, arrays.1#15] +debug: Coalescing arrays.2#0 with [arrays.2#3, arrays.2#7] +debug: Coalescing arrays.2#12 with [arrays.2#19, arrays.2#16] +debug: Coalescing arrays.0%is_original#0 with [arrays.0%is_original#8, arrays.0%is_original#4, arrays.0%is_original#5] +debug: Coalescing arrays.1%is_original#0 with [arrays.1%is_original#11, arrays.1%is_original#5, arrays.1%is_original#8] +debug: Coalescing arrays.2%is_original#0 with [arrays.2%is_original#14, arrays.2%is_original#6, arrays.2%is_original#11] +debug: Coalescing arrays.0%out#7 with [arrays.0%out#8] +debug: Coalescing arrays.1%out#6 with [arrays.1%out#7] +debug: Coalescing arrays.2%out#5 with [arrays.2%out#6] +debug: Coalescing resulted in 69 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 -debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign +debug: loc: {arrays.0#10=None, arrays.1#11=None, arrays.2#12=None, arrays.0%is_original#0=arrays.0%is_original#0, arrays.1%is_original#0=arrays.1%is_original#0, arrays.2%is_original#0=arrays.2%is_original#0, arrays.0#0=arrays.0#0, arrays.1#0=arrays.1#0, arrays.2#0=arrays.2#0} +debug: pred: {arrays.0#10=arrays.0#0, arrays.1#11=arrays.1#0, arrays.2#12=arrays.2#0, arrays.0%is_original#0=arrays.0%is_original#0, arrays.1%is_original#0=arrays.1%is_original#0, arrays.2%is_original#0=arrays.2%is_original#0} +debug: ready: arrays.0#10, arrays.1#11, arrays.2#12 +debug: to_do: arrays.0#10, arrays.1#11, arrays.2#12, arrays.0%is_original#0, arrays.1%is_original#0, arrays.2%is_original#0 +debug: * avail arrays.2#12 +debug: * avail arrays.2#0 +debug: * avail arrays.1#11 +debug: * avail arrays.1#0 +debug: * avail arrays.0#10 +debug: * avail arrays.0#0 +debug: * to_do arrays.2%is_original#0 +debug: * to_do arrays.1%is_original#0 +debug: * to_do arrays.0%is_original#0 +debug: * to_do arrays.2#12 +debug: * to_do arrays.1#11 +debug: * to_do arrays.0#10 +debug: loc: {arrays.0#10=None, arrays.1#11=None, arrays.2#12=None, arrays.0%is_original#0=arrays.0%is_original#0, arrays.1%is_original#0=arrays.1%is_original#0, arrays.2%is_original#0=arrays.2%is_original#0, arrays.0#0=arrays.0#0, arrays.1#0=arrays.1#0, arrays.2#0=arrays.2#0} +debug: pred: {arrays.0#10=arrays.0#0, arrays.1#11=arrays.1#0, arrays.2#12=arrays.2#0, arrays.0%is_original#0=arrays.0%is_original#0, arrays.1%is_original#0=arrays.1%is_original#0, arrays.2%is_original#0=arrays.2%is_original#0} +debug: ready: arrays.0#10, arrays.1#11, arrays.2#12 +debug: to_do: arrays.0#10, arrays.1#11, arrays.2#12, arrays.0%is_original#0, arrays.1%is_original#0, arrays.2%is_original#0 +debug: * avail arrays.2#12 +debug: * avail arrays.2#0 +debug: * avail arrays.1#11 +debug: * avail arrays.1#0 +debug: * avail arrays.0#10 +debug: * avail arrays.0#0 +debug: * to_do arrays.2%is_original#0 +debug: * to_do arrays.1%is_original#0 +debug: * to_do arrays.0%is_original#0 +debug: * to_do arrays.2#12 +debug: * to_do arrays.1#11 +debug: * to_do arrays.0#10 +debug: loc: {arrays.0#10=arrays.0#10, arrays.1#11=arrays.1#11, arrays.2#12=arrays.2#12, arrays.0%is_original#0=arrays.0%is_original#0, arrays.1%is_original#0=arrays.1%is_original#0, arrays.2%is_original#0=arrays.2%is_original#0} +debug: pred: {arrays.0#10=arrays.0#10, arrays.1#11=arrays.1#11, arrays.2#12=arrays.2#12, arrays.0%is_original#0=arrays.0%is_original#0, arrays.1%is_original#0=arrays.1%is_original#0, arrays.2%is_original#0=arrays.2%is_original#0} +debug: ready: +debug: to_do: arrays.0#10, arrays.1#11, arrays.2#12, arrays.0%is_original#0, arrays.1%is_original#0, arrays.2%is_original#0 +debug: * to_do arrays.2%is_original#0 +debug: * to_do arrays.1%is_original#0 +debug: * to_do arrays.0%is_original#0 +debug: * to_do arrays.2#12 +debug: * to_do arrays.1#11 +debug: * to_do arrays.0#10 debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Performing post-SSA optimizations debug: Output IR to arc4_types/out/Arc4MutableParamsContract.destructured.ir @@ -14774,10 +16765,60 @@ debug: Inserted mutating_copies_block@0.ops[93]: 'l-store-copy reinterpret_bigui debug: Replaced mutating_copies_block@0.ops[95]: 'v-load reinterpret_biguint%10#0' with 'l-load reinterpret_biguint%10#0' debug: Inserted mutating_copies_block@0.ops[98]: 'l-store-copy tmp%10#0 0' debug: Replaced mutating_copies_block@0.ops[100]: 'v-load tmp%10#0' with 'l-load tmp%10#0' -debug: Inserted mutating_copies_block@0.ops[104]: 'l-store-copy my_array_copy_2#2 1' -debug: Replaced mutating_copies_block@0.ops[105]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' -debug: Inserted mutating_copies_block@0.ops[112]: 'l-store-copy tmp%11#0 0' -debug: Replaced mutating_copies_block@0.ops[114]: 'v-load tmp%11#0' with 'l-load tmp%11#0' +debug: Inserted mutating_copies_block@0.ops[119]: 'l-store-copy my_array#1 0' +debug: Replaced mutating_copies_block@0.ops[121]: 'v-load my_array#1' with 'l-load my_array#1' +debug: Inserted mutating_copies_block@0.ops[123]: 'l-store-copy reinterpret_biguint%12#0 0' +debug: Replaced mutating_copies_block@0.ops[125]: 'v-load reinterpret_biguint%12#0' with 'l-load reinterpret_biguint%12#0' +debug: Inserted mutating_copies_block@0.ops[128]: 'l-store-copy tmp%16#0 0' +debug: Replaced mutating_copies_block@0.ops[130]: 'v-load tmp%16#0' with 'l-load tmp%16#0' +debug: Inserted mutating_copies_block@0.ops[134]: 'l-store-copy reinterpret_biguint%14#0 0' +debug: Replaced mutating_copies_block@0.ops[136]: 'v-load reinterpret_biguint%14#0' with 'l-load reinterpret_biguint%14#0' +debug: Inserted mutating_copies_block@0.ops[139]: 'l-store-copy tmp%17#0 0' +debug: Replaced mutating_copies_block@0.ops[141]: 'v-load tmp%17#0' with 'l-load tmp%17#0' +debug: Inserted mutating_copies_block@0.ops[145]: 'l-store-copy reinterpret_biguint%16#0 0' +debug: Replaced mutating_copies_block@0.ops[147]: 'v-load reinterpret_biguint%16#0' with 'l-load reinterpret_biguint%16#0' +debug: Inserted mutating_copies_block@0.ops[150]: 'l-store-copy tmp%18#0 0' +debug: Replaced mutating_copies_block@0.ops[152]: 'v-load tmp%18#0' with 'l-load tmp%18#0' +debug: Inserted mutating_copies_block@0.ops[156]: 'l-store-copy reinterpret_biguint%18#0 0' +debug: Replaced mutating_copies_block@0.ops[158]: 'v-load reinterpret_biguint%18#0' with 'l-load reinterpret_biguint%18#0' +debug: Inserted mutating_copies_block@0.ops[161]: 'l-store-copy tmp%19#0 0' +debug: Replaced mutating_copies_block@0.ops[163]: 'v-load tmp%19#0' with 'l-load tmp%19#0' +debug: Inserted mutating_copies_block@0.ops[167]: 'l-store-copy reinterpret_biguint%20#0 0' +debug: Replaced mutating_copies_block@0.ops[169]: 'v-load reinterpret_biguint%20#0' with 'l-load reinterpret_biguint%20#0' +debug: Inserted mutating_copies_block@0.ops[172]: 'l-store-copy tmp%20#0 0' +debug: Replaced mutating_copies_block@0.ops[174]: 'v-load tmp%20#0' with 'l-load tmp%20#0' +debug: Inserted mutating_copies_block@0.ops[178]: 'l-store-copy reinterpret_biguint%22#0 0' +debug: Replaced mutating_copies_block@0.ops[180]: 'v-load reinterpret_biguint%22#0' with 'l-load reinterpret_biguint%22#0' +debug: Inserted mutating_copies_block@0.ops[183]: 'l-store-copy tmp%21#0 0' +debug: Replaced mutating_copies_block@0.ops[185]: 'v-load tmp%21#0' with 'l-load tmp%21#0' +debug: Inserted mutating_copies_block@0.ops[195]: 'l-store-copy my_array#1 0' +debug: Replaced mutating_copies_block@0.ops[197]: 'v-load my_array#1' with 'l-load my_array#1' +debug: Inserted mutating_copies_block@0.ops[199]: 'l-store-copy reinterpret_biguint%24#0 0' +debug: Replaced mutating_copies_block@0.ops[201]: 'v-load reinterpret_biguint%24#0' with 'l-load reinterpret_biguint%24#0' +debug: Inserted mutating_copies_block@0.ops[204]: 'l-store-copy tmp%22#0 0' +debug: Replaced mutating_copies_block@0.ops[206]: 'v-load tmp%22#0' with 'l-load tmp%22#0' +debug: Inserted mutating_copies_block@0.ops[210]: 'l-store-copy reinterpret_biguint%26#0 0' +debug: Replaced mutating_copies_block@0.ops[212]: 'v-load reinterpret_biguint%26#0' with 'l-load reinterpret_biguint%26#0' +debug: Inserted mutating_copies_block@0.ops[215]: 'l-store-copy tmp%23#0 0' +debug: Replaced mutating_copies_block@0.ops[217]: 'v-load tmp%23#0' with 'l-load tmp%23#0' +debug: Inserted mutating_copies_block@0.ops[221]: 'l-store-copy reinterpret_biguint%28#0 0' +debug: Replaced mutating_copies_block@0.ops[223]: 'v-load reinterpret_biguint%28#0' with 'l-load reinterpret_biguint%28#0' +debug: Inserted mutating_copies_block@0.ops[226]: 'l-store-copy tmp%24#0 0' +debug: Replaced mutating_copies_block@0.ops[228]: 'v-load tmp%24#0' with 'l-load tmp%24#0' +debug: Inserted mutating_copies_block@0.ops[232]: 'l-store-copy reinterpret_biguint%30#0 0' +debug: Replaced mutating_copies_block@0.ops[234]: 'v-load reinterpret_biguint%30#0' with 'l-load reinterpret_biguint%30#0' +debug: Inserted mutating_copies_block@0.ops[237]: 'l-store-copy tmp%25#0 0' +debug: Replaced mutating_copies_block@0.ops[239]: 'v-load tmp%25#0' with 'l-load tmp%25#0' +debug: Inserted mutating_copies_block@0.ops[243]: 'l-store-copy reinterpret_biguint%32#0 0' +debug: Replaced mutating_copies_block@0.ops[245]: 'v-load reinterpret_biguint%32#0' with 'l-load reinterpret_biguint%32#0' +debug: Inserted mutating_copies_block@0.ops[248]: 'l-store-copy tmp%26#0 0' +debug: Replaced mutating_copies_block@0.ops[250]: 'v-load tmp%26#0' with 'l-load tmp%26#0' +debug: Inserted mutating_copies_block@0.ops[254]: 'l-store-copy reinterpret_biguint%34#0 0' +debug: Replaced mutating_copies_block@0.ops[256]: 'v-load reinterpret_biguint%34#0' with 'l-load reinterpret_biguint%34#0' +debug: Inserted mutating_copies_block@0.ops[259]: 'l-store-copy tmp%27#0 0' +debug: Replaced mutating_copies_block@0.ops[261]: 'v-load tmp%27#0' with 'l-load tmp%27#0' +debug: Inserted mutating_copies_block@0.ops[265]: 'l-store-copy tmp%28#0 0' +debug: Replaced mutating_copies_block@0.ops[267]: 'v-load tmp%28#0' with 'l-load tmp%28#0' debug: Inserted mutating_copies_block@0.ops[89]: 'l-store-copy my_array_copy_2#2 1' debug: Replaced mutating_copies_block@0.ops[92]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' debug: Inserted mutating_copies_block@0.ops[50]: 'l-store-copy item_end_offset%0#0 0' @@ -14790,18 +16831,48 @@ debug: Inserted mutating_copies_block@0.ops[50]: 'l-store-copy my_struct#1 0' debug: Replaced mutating_copies_block@0.ops[55]: 'v-load my_struct#1' with 'l-load my_struct#1' debug: Inserted mutating_copies_block@0.ops[48]: 'l-store-copy item_start_offset%0#0 1' debug: Replaced mutating_copies_block@0.ops[57]: 'v-load item_start_offset%0#0' with 'l-load item_start_offset%0#0' -debug: Inserted mutating_copies_block@0.ops[109]: 'l-store-copy my_array#1 0' -debug: Replaced mutating_copies_block@0.ops[117]: 'v-load my_array#1' with 'l-load my_array#1' debug: Inserted mutating_copies_block@0.ops[6]: 'l-store-copy my_array#1 0' debug: Replaced mutating_copies_block@0.ops[17]: 'v-load my_array#1' with 'l-load my_array#1' debug: Inserted mutating_copies_block@0.ops[83]: 'l-store-copy my_array_copy_2#2 0' debug: Replaced mutating_copies_block@0.ops[94]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' +debug: Inserted mutating_copies_block@0.ops[111]: 'l-store-copy my_array#1 0' +debug: Replaced mutating_copies_block@0.ops[120]: 'v-load my_array#1' with 'l-load my_array#1' +debug: Inserted mutating_copies_block@0.ops[113]: 'l-store-copy my_array_copy_2#2 2' +debug: Replaced mutating_copies_block@0.ops[122]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' debug: Inserted mutating_copies_block@0.ops[21]: 'l-store-copy my_array#1 2' debug: Replaced mutating_copies_block@0.ops[35]: 'v-load my_array#1' with 'l-load my_array#1' debug: Inserted mutating_copies_block@0.ops[101]: 'l-store-copy my_array_copy_2#2 0' debug: Replaced mutating_copies_block@0.ops[114]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' +debug: Inserted mutating_copies_block@0.ops[130]: 'l-store-copy my_array_copy_2#2 1' +debug: Replaced mutating_copies_block@0.ops[145]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' +debug: Inserted mutating_copies_block@0.ops[190]: 'l-store-copy my_array_copy_3#1 0' +debug: Replaced mutating_copies_block@0.ops[203]: 'v-load my_array_copy_3#1' with 'l-load my_array_copy_3#1' +debug: Inserted mutating_copies_block@0.ops[208]: 'l-store-copy my_array_copy_2#2 1' +debug: Replaced mutating_copies_block@0.ops[223]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' +debug: Inserted mutating_copies_block@0.ops[179]: 'l-store-copy my_array_copy_2#2 0' +debug: Replaced mutating_copies_block@0.ops[203]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' debug: Inserted mutating_copies_block@0.ops[20]: 'l-store-copy my_struct#1 3' debug: Replaced mutating_copies_block@0.ops[47]: 'v-load my_struct#1' with 'l-load my_struct#1' +debug: Inserted mutating_copies_block@0.ops[130]: 'l-store-copy my_array_copy_3#1 2' +debug: Replaced mutating_copies_block@0.ops[158]: 'v-load my_array_copy_3#1' with 'l-load my_array_copy_3#1' +debug: Inserted mutating_copies_block@0.ops[210]: 'l-store-copy my_array_copy_3#1 2' +debug: Replaced mutating_copies_block@0.ops[238]: 'v-load my_array_copy_3#1' with 'l-load my_array_copy_3#1' +debug: Inserted mutating_copies_block@0.ops[137]: 'l-store-copy my_array#1 2' +debug: Replaced mutating_copies_block@0.ops[170]: 'v-load my_array#1' with 'l-load my_array#1' +debug: Inserted mutating_copies_block@0.ops[149]: 'l-store-copy my_array_copy_2#2 2' +debug: Replaced mutating_copies_block@0.ops[182]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' +debug: Inserted mutating_copies_block@0.ops[161]: 'l-store-copy my_array_copy_3#1 2' +debug: Replaced mutating_copies_block@0.ops[195]: 'v-load my_array_copy_3#1' with 'l-load my_array_copy_3#1' +debug: Inserted mutating_copies_block@0.ops[173]: 'l-store-copy my_array#1 2' +debug: Replaced mutating_copies_block@0.ops[208]: 'v-load my_array#1' with 'l-load my_array#1' +debug: Inserted mutating_copies_block@0.ops[221]: 'l-store-copy my_array#1 2' +debug: Replaced mutating_copies_block@0.ops[254]: 'v-load my_array#1' with 'l-load my_array#1' +debug: Inserted mutating_copies_block@0.ops[233]: 'l-store-copy my_array_copy_2#2 2' +debug: Replaced mutating_copies_block@0.ops[266]: 'v-load my_array_copy_2#2' with 'l-load my_array_copy_2#2' +debug: Inserted mutating_copies_block@0.ops[245]: 'l-store-copy my_array_copy_3#1 2' +debug: Replaced mutating_copies_block@0.ops[278]: 'v-load my_array_copy_3#1' with 'l-load my_array_copy_3#1' +debug: Inserted mutating_copies_block@0.ops[257]: 'l-store-copy my_array#1 2' +debug: Replaced mutating_copies_block@0.ops[290]: 'v-load my_array#1' with 'l-load my_array#1' debug: Inserted mutating_copies_block@0.ops[37]: 'l-store-copy my_array#1 1' debug: Replaced mutating_copies_block@0.ops[114]: 'v-load my_array#1' with 'l-load my_array#1' debug: Inserted other_routine_block@0.ops[28]: 'l-store-copy updated_data%0#0 0' @@ -14838,11 +16909,91 @@ debug: Inserted other_routine_block@0.ops[12]: 'l-store-copy item_offset%0#0 2' debug: Replaced other_routine_block@0.ops[43]: 'v-load item_offset%0#0' with 'l-load item_offset%0#0' debug: Inserted other_routine_2_block@0.ops[3]: 'l-store-copy array#1 0' debug: Replaced other_routine_2_block@0.ops[6]: 'v-load array#1' with 'l-load array#1' -debug: Found 2 edge set/s for test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 -debug: Allocated 1 variable/s to x-stack: loop_counter%0#0 -debug: shared x-stack for other_routine_3_block@0 -> other_routine_3_for_body@1: loop_counter%0#0 -debug: shared x-stack for other_routine_3_for_header_1@3 -> other_routine_3_for_body@1: loop_counter%0#0 -debug: shared x-stack for other_routine_3_for_header_2@4 -> other_routine_3_for_body@1: loop_counter%0#0 +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[8]: 'l-store-copy val_as_bytes%0#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[10]: 'v-load val_as_bytes%0#0' with 'l-load val_as_bytes%0#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[20]: 'l-store-copy to_encode%0#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[22]: 'v-load to_encode%0#0' with 'l-load to_encode%0#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[24]: 'l-store-copy val_as_bytes%1#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[26]: 'v-load val_as_bytes%1#0' with 'l-load val_as_bytes%1#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[36]: 'l-store-copy to_encode%1#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[38]: 'v-load to_encode%1#0' with 'l-load to_encode%1#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[40]: 'l-store-copy val_as_bytes%2#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[42]: 'v-load val_as_bytes%2#0' with 'l-load val_as_bytes%2#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[51]: 'l-store-copy reinterpret_biguint%0#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[53]: 'v-load reinterpret_biguint%0#0' with 'l-load reinterpret_biguint%0#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[56]: 'l-store-copy tmp%1#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[58]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[62]: 'l-store-copy reinterpret_biguint%1#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[64]: 'v-load reinterpret_biguint%1#0' with 'l-load reinterpret_biguint%1#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[67]: 'l-store-copy tmp%4#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[69]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[73]: 'l-store-copy reinterpret_biguint%2#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[75]: 'v-load reinterpret_biguint%2#0' with 'l-load reinterpret_biguint%2#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[78]: 'l-store-copy tmp%7#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[80]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[85]: 'l-store-copy to_encode%2#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[87]: 'v-load to_encode%2#0' with 'l-load to_encode%2#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[89]: 'l-store-copy val_as_bytes%3#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[91]: 'v-load val_as_bytes%3#0' with 'l-load val_as_bytes%3#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[101]: 'l-store-copy to_encode%3#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[103]: 'v-load to_encode%3#0' with 'l-load to_encode%3#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[105]: 'l-store-copy val_as_bytes%4#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[107]: 'v-load val_as_bytes%4#0' with 'l-load val_as_bytes%4#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[117]: 'l-store-copy to_encode%4#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[119]: 'v-load to_encode%4#0' with 'l-load to_encode%4#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[121]: 'l-store-copy val_as_bytes%5#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[123]: 'v-load val_as_bytes%5#0' with 'l-load val_as_bytes%5#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[12]: 'l-store-copy assigned_value%0#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[15]: 'v-load assigned_value%0#0' with 'l-load assigned_value%0#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[29]: 'l-store-copy assigned_value%1#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[32]: 'v-load assigned_value%1#0' with 'l-load assigned_value%1#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[46]: 'l-store-copy assigned_value%2#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[49]: 'v-load assigned_value%2#0' with 'l-load assigned_value%2#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[96]: 'l-store-copy assigned_value%3#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[99]: 'v-load assigned_value%3#0' with 'l-load assigned_value%3#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[113]: 'l-store-copy assigned_value%4#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[116]: 'v-load assigned_value%4#0' with 'l-load assigned_value%4#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[130]: 'l-store-copy assigned_value%5#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[133]: 'v-load assigned_value%5#0' with 'l-load assigned_value%5#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[45]: 'l-store-copy val_as_bytes%2#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[80]: 'v-load val_as_bytes%2#0' with 'l-load val_as_bytes%2#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[28]: 'l-store-copy val_as_bytes%1#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[70]: 'v-load val_as_bytes%1#0' with 'l-load val_as_bytes%1#0' +debug: Inserted mutate_tuple_items_and_reassign_block@0.ops[11]: 'l-store-copy val_as_bytes%0#0 0' +debug: Replaced mutate_tuple_items_and_reassign_block@0.ops[60]: 'v-load val_as_bytes%0#0' with 'l-load val_as_bytes%0#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@20.ops[3]: 'l-store-copy to_encode%5#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@20.ops[5]: 'v-load to_encode%5#0' with 'l-load to_encode%5#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@20.ops[7]: 'l-store-copy val_as_bytes%6#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@20.ops[9]: 'v-load val_as_bytes%6#0' with 'l-load val_as_bytes%6#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@20.ops[11]: 'l-store-copy assigned_value%6#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@20.ops[14]: 'v-load assigned_value%6#0' with 'l-load assigned_value%6#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@22.ops[3]: 'l-store-copy to_encode%6#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@22.ops[5]: 'v-load to_encode%6#0' with 'l-load to_encode%6#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@22.ops[7]: 'l-store-copy val_as_bytes%7#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@22.ops[9]: 'v-load val_as_bytes%7#0' with 'l-load val_as_bytes%7#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@22.ops[11]: 'l-store-copy assigned_value%7#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@22.ops[14]: 'v-load assigned_value%7#0' with 'l-load assigned_value%7#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@24.ops[3]: 'l-store-copy to_encode%7#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@24.ops[5]: 'v-load to_encode%7#0' with 'l-load to_encode%7#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@24.ops[7]: 'l-store-copy val_as_bytes%8#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@24.ops[9]: 'v-load val_as_bytes%8#0' with 'l-load val_as_bytes%8#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@24.ops[11]: 'l-store-copy assigned_value%8#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@24.ops[14]: 'v-load assigned_value%8#0' with 'l-load assigned_value%8#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@26.ops[2]: 'l-store-copy reinterpret_biguint%3#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@26.ops[4]: 'v-load reinterpret_biguint%3#0' with 'l-load reinterpret_biguint%3#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@26.ops[7]: 'l-store-copy tmp%10#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@26.ops[9]: 'v-load tmp%10#0' with 'l-load tmp%10#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@26.ops[13]: 'l-store-copy reinterpret_biguint%4#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@26.ops[15]: 'v-load reinterpret_biguint%4#0' with 'l-load reinterpret_biguint%4#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@26.ops[18]: 'l-store-copy tmp%13#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@26.ops[20]: 'v-load tmp%13#0' with 'l-load tmp%13#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@26.ops[24]: 'l-store-copy reinterpret_biguint%5#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@26.ops[26]: 'v-load reinterpret_biguint%5#0' with 'l-load reinterpret_biguint%5#0' +debug: Inserted mutate_tuple_items_and_reassign_after_if_else@26.ops[29]: 'l-store-copy tmp%16#0 0' +debug: Replaced mutate_tuple_items_and_reassign_after_if_else@26.ops[31]: 'v-load tmp%16#0' with 'l-load tmp%16#0' +debug: Found 4 edge set/s for test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign +debug: test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign f-stack entry: ['arrays.0%out#7', 'arrays.1%out#6', 'arrays.2%out#5', 'val_as_bytes%6#0', 'val_as_bytes%7#0', 'val_as_bytes%8#0'] +debug: test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutate_tuple_items_and_reassign f-stack on first store: ['arrays.0%is_original#0', 'arrays.1%is_original#0', 'arrays.2%is_original#0', 'arrays.2#12', 'arrays.1#11', 'arrays.0#10'] debug: Output IR to arc4_types/out/Arc4DynamicStringArrayContract.ssa.ir info: optimizing test_cases.arc4_types.dynamic_string_array.Arc4DynamicStringArrayContract at level 1 debug: Begin optimization pass 1/100 @@ -19640,6 +21791,13 @@ info: Writing arc4_types/out/Arc4MutationContract.approval.bin info: Writing arc4_types/out/Arc4MutationContract.clear.bin info: Writing arc4_types/out/Arc4MutationContract.approval.puya.map info: Writing arc4_types/out/Arc4MutationContract.clear.puya.map +info: Writing arc4_types/out/MutableParams2.arc32.json +info: Writing arc4_types/out/MutableParams2.approval.teal +info: Writing arc4_types/out/MutableParams2.clear.teal +info: Writing arc4_types/out/MutableParams2.approval.bin +info: Writing arc4_types/out/MutableParams2.clear.bin +info: Writing arc4_types/out/MutableParams2.approval.puya.map +info: Writing arc4_types/out/MutableParams2.clear.puya.map info: Writing arc4_types/out/Arc4MutableParamsContract.approval.teal info: Writing arc4_types/out/Arc4MutableParamsContract.clear.teal info: Writing arc4_types/out/Arc4MutableParamsContract.approval.bin @@ -19689,4 +21847,5 @@ info: Writing arc4_types/out/Arc4StructsFromAnotherModule.approval.bin info: Writing arc4_types/out/Arc4StructsFromAnotherModule.clear.bin info: Writing arc4_types/out/Arc4StructsFromAnotherModule.approval.puya.map info: Writing arc4_types/out/Arc4StructsFromAnotherModule.clear.puya.map +info: writing arc4_types/out/client_MutableParams2.py info: writing arc4_types/out/client_Arc4DynamicStringArrayContract.py \ No newline at end of file diff --git a/tests/test_arc32.py b/tests/test_arc32.py index 48cfdd05ac..840d474130 100644 --- a/tests/test_arc32.py +++ b/tests/test_arc32.py @@ -617,6 +617,21 @@ def test_dynamic_array_of_string( assert xyz_raw_result.return_value == list("XYZ") +def test_array_rebinding( + algod_client: AlgodClient, + account: algokit_utils.Account, +) -> None: + app_spec = algokit_utils.ApplicationSpecification.from_json( + compile_arc32(TEST_CASES_DIR / "arc4_types/mutable_params2.py") + ) + app_client = algokit_utils.ApplicationClient(algod_client, app_spec, signer=account) + + create_response = app_client.create() + assert create_response.confirmed_round + + app_client.call("test_array_rebinding") + + def test_avm_types_in_abi(algod_client: AlgodClient, account: algokit_utils.Account) -> None: example = TEST_CASES_DIR / "avm_types_in_abi" / "contract.py" app_spec = algokit_utils.ApplicationSpecification.from_json(compile_arc32(example)) diff --git a/tests/test_expected_output/expected_errors.test b/tests/test_expected_output/expected_errors.test index 945651378c..2ba18e372b 100644 --- a/tests/test_expected_output/expected_errors.test +++ b/tests/test_expected_output/expected_errors.test @@ -101,22 +101,6 @@ def baddie2() -> None: tup[0].append(arc4.Byte(1)) - -## case: test_mutable_ref_param_reassignment_fails -from algopy import arc4 - -class Baddie(arc4.ARC4Contract): - @arc4.abimethod - def okay(self, arr: arc4.DynamicBytes) -> None: - # this is allowed because nothing calls okay except for the router - arr = arc4.DynamicBytes.from_bytes(arr.bytes) - self.not_okay(arr) - - @arc4.abimethod() - def not_okay(self, arr2: arc4.DynamicBytes) -> None: - arr2 = arc4.DynamicBytes.from_bytes(arr2.bytes) ## E: cannot reassign mutable parameter 'arr2' which is being passed by reference - arr2.append(arc4.Byte(1)) - ## case: test_mutable_ref_param_reassignment_in_tuple_fails from algopy import arc4 @@ -128,7 +112,7 @@ class Baddie(arc4.ARC4Contract): @arc4.abimethod() def not_okay(self, arr2: arc4.DynamicBytes) -> None: - (arr2, foo) = (arc4.DynamicBytes.from_bytes(arr2.bytes), arc4.UInt64(1)) ## E: cannot reassign mutable parameter 'arr2' which is being passed by reference + (arr2, foo) = (arc4.DynamicBytes.from_bytes(arr2.bytes), arc4.UInt64(1)) arr2.append(arc4.Byte(1)) assert foo From 43a364e0131e580565cbdfa3d8f44e9b78621252 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 1 Nov 2024 16:23:38 +0800 Subject: [PATCH 06/20] fix: raise an error when attempting to iterate a tuple of mutable values BREAKING CHANGE: iterating a tuple of mutable types will now raise an error as they cannot be copied --- src/puya/awst/validation/arc4_copy.py | 26 +++++++ src/puyapy/awst_build/eb/arc4/_base.py | 5 +- tests/test_expected_output/arc4.test | 3 +- .../test_expected_output/expected_errors.test | 70 ++++++++++++++++++- 4 files changed, 98 insertions(+), 6 deletions(-) diff --git a/src/puya/awst/validation/arc4_copy.py b/src/puya/awst/validation/arc4_copy.py index cc25a49771..a6ab9a9a63 100644 --- a/src/puya/awst/validation/arc4_copy.py +++ b/src/puya/awst/validation/arc4_copy.py @@ -44,10 +44,36 @@ def visit_tuple_expression(self, expr: awst_nodes.TupleExpression) -> None: _check_for_arc4_copy(item, "being passed to a tuple expression") def visit_for_in_loop(self, statement: awst_nodes.ForInLoop) -> None: + # statement.items is immediately checked before entering the for body + # so don't need to worry about preserving _for_items through multiple loops self._for_items = statement.items super().visit_for_in_loop(statement) self._for_items = None + # looping is essentially assigning so check sequence + sequence = statement.sequence + while isinstance(sequence, awst_nodes.Enumeration | awst_nodes.Reversed): + sequence = sequence.expr + if ( # mutable tuples cannot be iterated in a semantically correct way + isinstance(sequence.wtype, wtypes.WTuple) + and _is_referable_expression(sequence) + and _is_arc4_mutable(sequence.wtype) + ): + logger.error( + "tuple of mutable ARC4 values cannot be iterated", + location=sequence.source_location, + ) + elif ( # arrays of mutable types, must be modified and iterated by index + isinstance(sequence.wtype, wtypes.ARC4Array) + and _is_referable_expression(sequence) + and _is_arc4_mutable(sequence.wtype.element_type) + ): + logger.error( + "cannot directly iterate an ARC4 array of mutable objects," + " construct a for-loop over the indexes instead", + location=sequence.source_location, + ) + def visit_assignment_expression(self, expr: awst_nodes.AssignmentExpression) -> None: _check_assignment(expr.target, expr.value) expr.value.accept(self) diff --git a/src/puyapy/awst_build/eb/arc4/_base.py b/src/puyapy/awst_build/eb/arc4/_base.py index a779665c09..4a02657ddf 100644 --- a/src/puyapy/awst_build/eb/arc4/_base.py +++ b/src/puyapy/awst_build/eb/arc4/_base.py @@ -138,9 +138,8 @@ class _ARC4ArrayExpressionBuilder(BytesBackedInstanceExpressionBuilder[pytypes.A @typing.override def iterate(self) -> Expression: if not self.pytype.items.wtype.immutable: - logger.error( - "cannot directly iterate an ARC4 array of mutable objects," - " construct a for-loop over the indexes via urange(.length) instead", + logger.info( + "use `algopy.urange(.length)` to iterate by index", location=self.source_location, ) return self.resolve() diff --git a/tests/test_expected_output/arc4.test b/tests/test_expected_output/arc4.test index 0303692039..961a62b342 100644 --- a/tests/test_expected_output/arc4.test +++ b/tests/test_expected_output/arc4.test @@ -206,7 +206,8 @@ class Arc4CopyContract(arc4.ARC4Contract): # Can't create copies by iterating valid_array_of_arrays = arc4.DynamicArray(local_array.copy()) - for an_array in valid_array_of_arrays: ## E: cannot directly iterate an ARC4 array of mutable objects, construct a for-loop over the indexes via urange(.length) instead + for an_array in valid_array_of_arrays: ## N: use `algopy.urange(.length)` to iterate by index \ + ## E: cannot directly iterate an ARC4 array of mutable objects, construct a for-loop over the indexes instead assert an_array.length ## case: copy_arc4_struct diff --git a/tests/test_expected_output/expected_errors.test b/tests/test_expected_output/expected_errors.test index 2ba18e372b..d6781c09ee 100644 --- a/tests/test_expected_output/expected_errors.test +++ b/tests/test_expected_output/expected_errors.test @@ -83,7 +83,8 @@ def okay1() -> None: @subroutine def baddie1() -> None: arr_of_arr = arc4.DynamicArray[arc4.DynamicBytes]() - for arr in arr_of_arr: ## E: cannot directly iterate an ARC4 array of mutable objects, construct a for-loop over the indexes via urange(.length) instead + for arr in arr_of_arr: ## E: cannot directly iterate an ARC4 array of mutable objects, construct a for-loop over the indexes instead \ + ## N: use `algopy.urange(.length)` to iterate by index arr.append(arc4.Byte(1)) @@ -97,7 +98,8 @@ def okay2() -> None: @subroutine def baddie2() -> None: arr_of_tup_with_arr = arc4.DynamicArray[arc4.Tuple[arc4.DynamicBytes, arc4.UInt64]]() - for tup in arr_of_tup_with_arr: ## E: cannot directly iterate an ARC4 array of mutable objects, construct a for-loop over the indexes via urange(.length) instead + for tup in arr_of_tup_with_arr: ## E: cannot directly iterate an ARC4 array of mutable objects, construct a for-loop over the indexes instead \ + ## N: use `algopy.urange(.length)` to iterate by index tup[0].append(arc4.Byte(1)) @@ -366,3 +368,67 @@ def unresolveable() -> None: one = UInt64(1) assert bool(op.bitlen(empty or one)) ## E: type unions are unsupported at this location bad = empty or one ## E: expression would produce a union type, which isn't supported unless evaluating a boolean condition + + +## case: iterate_tuple_mutable_types + +from algopy import * + + +class TupleIterationMutation(ARC4Contract): + + @arc4.abimethod() + def test_iteration_mutation(self, param: tuple[arc4.DynamicBytes, arc4.DynamicBytes, arc4.DynamicBytes]) -> None: + items = get_dynamic_bytes() + a, b, c = get_dynamic_bytes() + + # not ok as both item and items[n] refer to the same values + for item in items: ## E: tuple of mutable ARC4 values cannot be iterated + item.append(arc4.Byte()) + + for item in param: ## E: tuple of mutable ARC4 values cannot be iterated + item.append(arc4.Byte()) + + for item in (a, b, c): ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being passed to a tuple expression + item.append(arc4.Byte()) + + for outer in Bytes(b" "): + for item in items: ## E: tuple of mutable ARC4 values cannot be iterated + item.append(arc4.Byte()) + + for item in items: ## E: tuple of mutable ARC4 values cannot be iterated + for inner in Bytes(b" "): + item.append(arc4.Byte()) + + for item in reversed(items): ## E: tuple of mutable ARC4 values cannot be iterated + item.append(arc4.Byte()) + + for idx, item in uenumerate(items): ## E: tuple of mutable ARC4 values cannot be iterated + item.append(arc4.Byte(idx + 1)) + + # scenarios that are ok as there is no other reference + for item in (a.copy(), b.copy(), c.copy()): + item.append(arc4.Byte()) + + for item in get_dynamic_bytes(): + item.append(arc4.Byte()) + + for outer in Bytes(b" "): + for item in get_dynamic_bytes(): + item.append(arc4.Byte()) + + for item in get_dynamic_bytes(): + for inner in Bytes(b" "): + item.append(arc4.Byte()) + + for item in reversed(get_dynamic_bytes()): + item.append(arc4.Byte()) + + for idx, item in uenumerate(get_dynamic_bytes()): + item.append(arc4.Byte(idx + 1)) + + + +@subroutine +def get_dynamic_bytes() -> tuple[arc4.DynamicBytes, arc4.DynamicBytes, arc4.DynamicBytes]: + return (arc4.DynamicBytes(), arc4.DynamicBytes(), arc4.DynamicBytes()) From 69339025e98cf29d92b5349ef359be7425ef8087 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Wed, 6 Nov 2024 15:36:12 +0800 Subject: [PATCH 07/20] refactor: address review feedback --- src/puyapy/awst_build/eb/arc4/_base.py | 3 +++ src/puyapy/awst_build/eb/arc4/string.py | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/puyapy/awst_build/eb/arc4/_base.py b/src/puyapy/awst_build/eb/arc4/_base.py index 4a02657ddf..722ca7d19e 100644 --- a/src/puyapy/awst_build/eb/arc4/_base.py +++ b/src/puyapy/awst_build/eb/arc4/_base.py @@ -138,6 +138,9 @@ class _ARC4ArrayExpressionBuilder(BytesBackedInstanceExpressionBuilder[pytypes.A @typing.override def iterate(self) -> Expression: if not self.pytype.items.wtype.immutable: + # this case is an error raised during AWST validation + # adding a front end specific message here to compliment the error message + # raise across all front ends logger.info( "use `algopy.urange(.length)` to iterate by index", location=self.source_location, diff --git a/src/puyapy/awst_build/eb/arc4/string.py b/src/puyapy/awst_build/eb/arc4/string.py index 53cec51ab0..de9bfac6e8 100644 --- a/src/puyapy/awst_build/eb/arc4/string.py +++ b/src/puyapy/awst_build/eb/arc4/string.py @@ -103,10 +103,13 @@ def augmented_assignment( else: value = expect.argument_of_type_else_dummy(rhs, self.pytype).resolve() + # TODO: does this actually need to be a AugmentedAssignment node to ensure LHS is only + # evaluated once + lhs = self.single_eval().resolve_lvalue() return AssignmentStatement( - target=self.resolve_lvalue(), + target=lhs, value=ArrayConcat( - left=self.resolve(), + left=lhs, right=value, wtype=wtypes.arc4_string_alias, source_location=location, From 94f2531848ebd93a11f8626b883e3a498e5bca63 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Thu, 7 Nov 2024 10:50:35 +0800 Subject: [PATCH 08/20] refactor: use BytesAugmentedAssignment for arc4.String --- src/puya/awst/nodes.py | 8 ++++++-- src/puya/ir/builder/main.py | 15 +++++++++++---- src/puyapy/awst_build/eb/arc4/string.py | 18 ++++++------------ test_cases/arc4_types/out/module.awst | 8 ++++---- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/puya/awst/nodes.py b/src/puya/awst/nodes.py index 32d421907f..004026f718 100644 --- a/src/puya/awst/nodes.py +++ b/src/puya/awst/nodes.py @@ -1337,11 +1337,15 @@ def accept(self, visitor: StatementVisitor[T]) -> T: @attrs.frozen class BytesAugmentedAssignment(Statement): target: Lvalue = attrs.field( - validator=[expression_has_wtype(wtypes.bytes_wtype, wtypes.string_wtype)] + validator=[ + expression_has_wtype(wtypes.bytes_wtype, wtypes.string_wtype, wtypes.arc4_string_alias) + ] ) op: BytesBinaryOperator value: Expression = attrs.field( - validator=[expression_has_wtype(wtypes.bytes_wtype, wtypes.string_wtype)] + validator=[ + expression_has_wtype(wtypes.bytes_wtype, wtypes.string_wtype, wtypes.arc4_string_alias) + ] ) @value.validator diff --git a/src/puya/ir/builder/main.py b/src/puya/ir/builder/main.py index 030251e0ec..e774089c66 100644 --- a/src/puya/ir/builder/main.py +++ b/src/puya/ir/builder/main.py @@ -1053,14 +1053,21 @@ def visit_biguint_augmented_assignment( def visit_bytes_augmented_assignment( self, statement: awst_nodes.BytesAugmentedAssignment ) -> TStatement: - target_value = self.visit_and_materialise_single(statement.target) - rhs = self.visit_and_materialise_single(statement.value) - expr = create_bytes_binary_op(statement.op, target_value, rhs, statement.source_location) + if statement.target.wtype == wtypes.arc4_string_alias: + value: ValueProvider = arc4.concat_values( + self.context, statement.target, statement.value, statement.source_location + ) + else: + target_value = self.visit_and_materialise_single(statement.target) + rhs = self.visit_and_materialise_single(statement.value) + value = create_bytes_binary_op( + statement.op, target_value, rhs, statement.source_location + ) handle_assignment( self.context, target=statement.target, - value=expr, + value=value, is_nested_update=False, assignment_location=statement.source_location, ) diff --git a/src/puyapy/awst_build/eb/arc4/string.py b/src/puyapy/awst_build/eb/arc4/string.py index de9bfac6e8..249a7fd8a3 100644 --- a/src/puyapy/awst_build/eb/arc4/string.py +++ b/src/puyapy/awst_build/eb/arc4/string.py @@ -8,7 +8,8 @@ ARC4Decode, ARC4Encode, ArrayConcat, - AssignmentStatement, + BytesAugmentedAssignment, + BytesBinaryOperator, Expression, Statement, StringConstant, @@ -103,17 +104,10 @@ def augmented_assignment( else: value = expect.argument_of_type_else_dummy(rhs, self.pytype).resolve() - # TODO: does this actually need to be a AugmentedAssignment node to ensure LHS is only - # evaluated once - lhs = self.single_eval().resolve_lvalue() - return AssignmentStatement( - target=lhs, - value=ArrayConcat( - left=lhs, - right=value, - wtype=wtypes.arc4_string_alias, - source_location=location, - ), + return BytesAugmentedAssignment( + target=self.resolve_lvalue(), + op=BytesBinaryOperator.add, + value=value, source_location=location, ) diff --git a/test_cases/arc4_types/out/module.awst b/test_cases/arc4_types/out/module.awst index 595ae56932..cf598578a9 100644 --- a/test_cases/arc4_types/out/module.awst +++ b/test_cases/arc4_types/out/module.awst @@ -114,12 +114,12 @@ contract Arc4StringTypesContract world: arc4.dynamic_array = arc4_encode('World!', arc4.dynamic_array) assert(arc4_encode('Hello World!', arc4.dynamic_array) == hello + space + world) thing: arc4.dynamic_array = arc4_encode('hi', arc4.dynamic_array) - thing: arc4.dynamic_array = thing + thing + thing += thing assert(thing == arc4_encode('hihi', arc4.dynamic_array)) value: arc4.dynamic_array = arc4_encode('a', arc4.dynamic_array) + arc4_encode('b', arc4.dynamic_array) + arc4_encode('cd', arc4.dynamic_array) - value: arc4.dynamic_array = value + arc4_encode('e', arc4.dynamic_array) - value: arc4.dynamic_array = value + arc4_encode('f', arc4.dynamic_array) - value: arc4.dynamic_array = value + arc4_encode('g', arc4.dynamic_array) + value += arc4_encode('e', arc4.dynamic_array) + value += arc4_encode('f', arc4.dynamic_array) + value += arc4_encode('g', arc4.dynamic_array) assert(arc4_encode('abcdefg', arc4.dynamic_array) == value) assert(arc4_decode(arc4_encode('', arc4.dynamic_array), string) == '') assert(arc4_decode(arc4_encode('hello', arc4.dynamic_array), string) == 'hello') From 8153cfbdb30aace1c34bd2e64b0418f1b4678a96 Mon Sep 17 00:00:00 2001 From: Adam Chidlow Date: Tue, 29 Oct 2024 13:33:39 +0800 Subject: [PATCH 09/20] fix: improve error message when a self parameter is missing from a method declaration --- src/puyapy/awst_build/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/puyapy/awst_build/context.py b/src/puyapy/awst_build/context.py index 5d9484393d..6696a51a24 100644 --- a/src/puyapy/awst_build/context.py +++ b/src/puyapy/awst_build/context.py @@ -276,7 +276,7 @@ def type_to_pytype( name = func_like.definition.fullname else: name = repr(func_like) - if "first_arg" in func_like.def_extras: + if func_like.def_extras.get("first_arg"): _self_arg, *func_args = func_args return pytypes.FuncType( name=name, From f6502b9510868eb221d399f5aa06af482c5b9121 Mon Sep 17 00:00:00 2001 From: Adam Chidlow Date: Tue, 29 Oct 2024 13:45:11 +0800 Subject: [PATCH 10/20] support empty tuples --- examples/sizes.txt | 4 ++-- src/puya/awst/wtypes.py | 2 -- src/puya/ir/builder/_utils.py | 2 ++ .../tuple_support/out/TupleSupport.ssa.ir | 5 +++++ test_cases/tuple_support/out/module.awst | 12 ++++++++++++ .../out_unoptimized/TupleSupport.approval.teal | 12 ++++++++++++ .../TupleSupport.destructured.ir | 5 +++++ test_cases/tuple_support/puya.log | 18 ++++++++++++++++++ test_cases/tuple_support/tuple_support.py | 12 +++++++++++- tests/test_expected_output/literals.test | 13 +++++++++---- tests/test_expected_output/module.test | 2 +- tests/test_expected_output/tuple.test | 4 ---- 12 files changed, 77 insertions(+), 14 deletions(-) diff --git a/examples/sizes.txt b/examples/sizes.txt index 26acec72c1..c7f78eb440 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -120,7 +120,7 @@ transaction/Transaction 1072 897 - | 654 512 - tuple_support/NestedTuples 1259 900 897 | 784 510 509 tuple_support/TupleComparisons 124 67 - | 81 35 - - tuple_support/TupleSupport 667 405 - | 375 175 - + tuple_support/TupleSupport 674 405 - | 378 175 - typed_abi_call/Greeter 5040 3977 3968 | 2727 1832 1829 typed_abi_call/Logger 1405 1144 1141 | 822 603 602 typed_abi_call_txn/Caller 580 514 - | 306 263 - @@ -131,4 +131,4 @@ unssa/UnSSA 432 368 - | 241 204 - voting/VotingRoundApp 1590 1483 - | 733 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 70250 54092 54033 | 33494 22056 22012 \ No newline at end of file + Total 70257 54092 54033 | 33497 22056 22012 \ No newline at end of file diff --git a/src/puya/awst/wtypes.py b/src/puya/awst/wtypes.py index 850dfe305d..cdb30caad5 100644 --- a/src/puya/awst/wtypes.py +++ b/src/puya/awst/wtypes.py @@ -224,8 +224,6 @@ def __hash__(self) -> int: @types.validator def _types_validator(self, _attribute: object, types: tuple[WType, ...]) -> None: - if not types: - raise CodeError("empty tuples are not supported", self.source_location) if void_wtype in types: raise CodeError("tuple should not contain void types", self.source_location) diff --git a/src/puya/ir/builder/_utils.py b/src/puya/ir/builder/_utils.py index 07a15e9f1d..80ba789063 100644 --- a/src/puya/ir/builder/_utils.py +++ b/src/puya/ir/builder/_utils.py @@ -74,6 +74,8 @@ def assign_targets( targets: list[Register], assignment_location: SourceLocation | None, ) -> None: + if not (source.types or targets): + return for target in targets: context.ssa.write_variable(target.name, context.block_builder.active_block, target) context.block_builder.add( diff --git a/test_cases/tuple_support/out/TupleSupport.ssa.ir b/test_cases/tuple_support/out/TupleSupport.ssa.ir index 15d0ae182c..b46ce1b39b 100644 --- a/test_cases/tuple_support/out/TupleSupport.ssa.ir +++ b/test_cases/tuple_support/out/TupleSupport.ssa.ir @@ -111,6 +111,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%29#0) let tmp%30#0: bool = (== x.1#0 0x) (assert tmp%30#0) + test_cases.tuple_support.tuple_support.test_empty() let tmp%31#0: uint64 = (+ a#0 b#0) return tmp%31#0 @@ -286,6 +287,10 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: let tmp%0#0: bool = (== tup.0#0 1u) (assert tmp%0#0) return + + subroutine test_cases.tuple_support.tuple_support.test_empty() -> void: + block@0: // L178 + return program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: diff --git a/test_cases/tuple_support/out/module.awst b/test_cases/tuple_support/out/module.awst index 4d0cfae760..8efee11326 100644 --- a/test_cases/tuple_support/out/module.awst +++ b/test_cases/tuple_support/out/module.awst @@ -54,6 +54,7 @@ contract TupleSupport x: tuple = (0u, hex<"">) assert(x[0] == 0u) assert(x[1] == hex<"">) + test_cases.tuple_support.tuple_support.test_empty() return a + b } @@ -112,6 +113,7 @@ contract TupleSupport x: tuple = (0u, hex<"">) assert(x[0] == 0u) assert(x[1] == hex<"">) + test_cases.tuple_support.tuple_support.test_empty() return a + b } } @@ -219,6 +221,16 @@ subroutine slicing(values: tuple = () + empty2: tuple<> = empty + (): tuple<> = empty + (): tuple<> = () + assert(true) + assert(true) +} + contract TupleComparisons { method_resolution_order: ( diff --git a/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal b/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal index 7722c6c926..710de94db6 100644 --- a/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal +++ b/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal @@ -317,6 +317,9 @@ main_after_if_else@12: dup == assert + // tuple_support/tuple_support.py:64 + // test_empty() + callsub test_empty // tuple_support/tuple_support.py:11 // (a, b) = (UInt64(1), UInt64(2)) intc_0 // 1 @@ -774,3 +777,12 @@ single_tuple: == assert retsub + + +// test_cases.tuple_support.tuple_support.test_empty() -> void: +test_empty: + // tuple_support/tuple_support.py:178-179 + // @subroutine + // def test_empty() -> None: + proto 0 0 + retsub diff --git a/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir b/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir index 0a4a94cdbf..6a81cfd420 100644 --- a/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir +++ b/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir @@ -99,6 +99,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%29#0) let tmp%30#0: bool = (== 0x 0x) (assert tmp%30#0) + test_cases.tuple_support.tuple_support.test_empty() let tmp%31#0: uint64 = (+ 1u 2u) return tmp%31#0 @@ -265,6 +266,10 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: let tmp%0#0: bool = (== 1u 1u) (assert tmp%0#0) return + + subroutine test_cases.tuple_support.tuple_support.test_empty() -> void: + block@0: // L178 + return program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: diff --git a/test_cases/tuple_support/puya.log b/test_cases/tuple_support/puya.log index 5997c746d5..106ef8ecb3 100644 --- a/test_cases/tuple_support/puya.log +++ b/test_cases/tuple_support/puya.log @@ -430,6 +430,10 @@ debug: Sealing block@0: // L82 debug: Terminated block@0: // L82 debug: Sealing block@0: // L76 debug: Terminated block@0: // L76 +debug: Sealing block@0: // L178 +tuple_support/tuple_support.py:184:5 warning: assertion is always true, ignoring +tuple_support/tuple_support.py:185:5 warning: assertion is always true, ignoring +debug: Terminated block@0: // L178 debug: Sealing block@0: // L1 debug: Terminated block@0: // L1 debug: Sealing block@1: // call __init___L1 @@ -1108,6 +1112,20 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.tuple_support.tuple_support.test_empty +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer diff --git a/test_cases/tuple_support/tuple_support.py b/test_cases/tuple_support/tuple_support.py index b4ce1b4c6a..427c419e21 100644 --- a/test_cases/tuple_support/tuple_support.py +++ b/test_cases/tuple_support/tuple_support.py @@ -61,7 +61,7 @@ def approval_program(self) -> UInt64: x = tuple[UInt64, Bytes]((UInt64(), Bytes())) assert x[0] == 0 assert x[1] == b"" - + test_empty() return a + b def clear_state_program(self) -> UInt64: @@ -173,3 +173,13 @@ def slicing(values: tuple[UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UInt64 assert one_to_three[-2:-1][0] == one_to_three[1] assert one_to_three == one_to_three[:] + + +@subroutine +def test_empty() -> None: + empty = () + empty2 = empty + () = empty + () = () + assert not empty + assert not empty2 diff --git a/tests/test_expected_output/literals.test b/tests/test_expected_output/literals.test index 8d72f39fae..a496e36ea1 100644 --- a/tests/test_expected_output/literals.test +++ b/tests/test_expected_output/literals.test @@ -227,7 +227,7 @@ def too_long() -> arc4.DynamicBytes: return arc4.DynamicBytes(b"a" * 4096) ## E: encoded bytes exceed max length -## case: test_tuple +## case: test_tuple1 import typing from algopy import * @@ -235,7 +235,12 @@ from algopy import * def wrong_type() -> None: a = tuple(arc4.DynamicBytes(b"as")) ## E: unhandled argument type +## case: test_tuple2 +import typing +from algopy import * -@subroutine -def empty_tuple() -> None: - a: tuple[typing.Never, ...] = tuple() ## E: empty tuples are not supported + +class MyContract(ARC4Contract): + @arc4.abimethod + def empty_tuple(self) -> None: + a: tuple[typing.Never, ...] = tuple() diff --git a/tests/test_expected_output/module.test b/tests/test_expected_output/module.test index 820d400c79..9c4f664f75 100644 --- a/tests/test_expected_output/module.test +++ b/tests/test_expected_output/module.test @@ -50,7 +50,7 @@ NotAllowed = collections.namedtuple("NotAllowed", ["x", "y"]) ## E: Unsupported import typing from algopy import * -class MyTuple(typing.NamedTuple): ## E: empty tuples are not supported +class MyTuple(typing.NamedTuple): pass @subroutine diff --git a/tests/test_expected_output/tuple.test b/tests/test_expected_output/tuple.test index da1e496193..9fa27de79f 100644 --- a/tests/test_expected_output/tuple.test +++ b/tests/test_expected_output/tuple.test @@ -92,10 +92,6 @@ def test_tuple6() -> None: UInt64(2), ) # type:ignore[assignment] -@subroutine -def test_tuple7() -> None: - tup = () ## E: empty tuples are not supported - @subroutine def test_tuple8() -> None: a, b = UInt64(), Bytes() From 0ec9fce3328b8c750e04019ea92bab425f9df448 Mon Sep 17 00:00:00 2001 From: Adam Chidlow Date: Mon, 28 Oct 2024 12:28:42 +0800 Subject: [PATCH 11/20] fix PyTypes handling of inheritance --- src/puyapy/awst_build/arc4_utils.py | 40 +- src/puyapy/awst_build/contract.py | 13 +- src/puyapy/awst_build/eb/_bytes_backed.py | 4 +- src/puyapy/awst_build/eb/_expect.py | 14 +- src/puyapy/awst_build/eb/_literals.py | 2 +- src/puyapy/awst_build/eb/_utils.py | 11 +- src/puyapy/awst_build/eb/arc4/_base.py | 19 +- src/puyapy/awst_build/eb/arc4/_utils.py | 38 +- src/puyapy/awst_build/eb/arc4/abi_call.py | 32 +- src/puyapy/awst_build/eb/arc4/address.py | 64 ++-- src/puyapy/awst_build/eb/arc4/bool.py | 2 +- .../awst_build/eb/arc4/dynamic_array.py | 40 +- .../awst_build/eb/arc4/dynamic_bytes.py | 4 +- src/puyapy/awst_build/eb/arc4/emit.py | 2 +- src/puyapy/awst_build/eb/arc4/static_array.py | 8 +- src/puyapy/awst_build/eb/arc4/string.py | 25 +- src/puyapy/awst_build/eb/arc4/struct.py | 4 +- src/puyapy/awst_build/eb/arc4/tuple.py | 9 +- src/puyapy/awst_build/eb/arc4/ufixed.py | 2 +- src/puyapy/awst_build/eb/arc4/uint.py | 27 +- src/puyapy/awst_build/eb/biguint.py | 15 +- src/puyapy/awst_build/eb/binary_bool_op.py | 4 +- src/puyapy/awst_build/eb/bool.py | 6 +- src/puyapy/awst_build/eb/bytes.py | 6 +- .../awst_build/eb/conditional_literal.py | 14 +- src/puyapy/awst_build/eb/contracts.py | 2 +- src/puyapy/awst_build/eb/intrinsics.py | 4 +- src/puyapy/awst_build/eb/log.py | 4 +- .../awst_build/eb/reference_types/_base.py | 8 +- .../awst_build/eb/reference_types/account.py | 51 ++- .../awst_build/eb/reference_types/asset.py | 2 +- src/puyapy/awst_build/eb/storage/_common.py | 10 +- src/puyapy/awst_build/eb/storage/_storage.py | 2 +- src/puyapy/awst_build/eb/storage/box.py | 2 +- src/puyapy/awst_build/eb/storage/box_map.py | 5 +- src/puyapy/awst_build/eb/storage/box_ref.py | 2 +- .../awst_build/eb/storage/global_state.py | 22 +- .../awst_build/eb/storage/local_state.py | 2 +- src/puyapy/awst_build/eb/string.py | 5 +- src/puyapy/awst_build/eb/struct.py | 2 +- src/puyapy/awst_build/eb/subroutine.py | 13 +- .../awst_build/eb/template_variables.py | 2 +- src/puyapy/awst_build/eb/transaction/base.py | 4 +- src/puyapy/awst_build/eb/transaction/group.py | 8 +- src/puyapy/awst_build/eb/transaction/inner.py | 15 +- .../awst_build/eb/transaction/itxn_args.py | 6 +- .../awst_build/eb/transaction/txn_fields.py | 2 +- src/puyapy/awst_build/eb/tuple.py | 3 +- src/puyapy/awst_build/eb/uint64.py | 26 +- src/puyapy/awst_build/intrinsic_models.py | 15 +- src/puyapy/awst_build/module.py | 75 ++-- src/puyapy/awst_build/pytypes.py | 357 +++++++++++------- src/puyapy/awst_build/subroutine.py | 113 +++--- src/puyapy/awst_build/utils.py | 31 +- stubs/algopy-stubs/_box.pyi | 3 + stubs/algopy-stubs/_compiled.pyi | 2 + stubs/algopy-stubs/_constants.pyi | 3 + stubs/algopy-stubs/_contract.pyi | 2 + stubs/algopy-stubs/_logic_sig.pyi | 1 + stubs/algopy-stubs/_reference.pyi | 4 + stubs/algopy-stubs/_state.pyi | 2 + stubs/algopy-stubs/_unsigned_builtins.pyi | 2 + stubs/algopy-stubs/_util.pyi | 2 + tests/test_expected_output/arc4.test | 34 +- tests/test_expected_output/tuple.test | 9 + 65 files changed, 672 insertions(+), 590 deletions(-) diff --git a/src/puyapy/awst_build/arc4_utils.py b/src/puyapy/awst_build/arc4_utils.py index 7cee4f749e..b501360604 100644 --- a/src/puyapy/awst_build/arc4_utils.py +++ b/src/puyapy/awst_build/arc4_utils.py @@ -50,7 +50,7 @@ def _allowed_oca(name: object) -> OnCompletionAction | None: def _is_arc4_struct(typ: pytypes.PyType) -> typing.TypeGuard[pytypes.StructType]: - if pytypes.ARC4StructBaseType not in typ.mro: + if not (pytypes.ARC4StructBaseType < typ): return False if not isinstance(typ, pytypes.StructType): raise InternalError( @@ -357,14 +357,6 @@ def pytype_to_arc4_pytype( match pytype: case pytypes.BoolType: return pytypes.ARC4BoolType - case pytypes.UInt64Type: - return pytypes.ARC4UIntN_Aliases[64] - case pytypes.BigUIntType: - return pytypes.ARC4UIntN_Aliases[512] - case pytypes.BytesType: - return pytypes.ARC4DynamicBytesType - case pytypes.StringType: - return pytypes.ARC4StringType case pytypes.NamedTupleType(): return pytypes.StructType( base=pytypes.ARC4StructBaseType, @@ -379,21 +371,23 @@ def pytype_to_arc4_pytype( return pytypes.GenericARC4TupleType.parameterise( [pytype_to_arc4_pytype(t, on_error) for t in pytype.items], pytype.source_location ) - - case ( - pytypes.NoneType - | pytypes.ApplicationType - | pytypes.AssetType - | pytypes.AccountType - | pytypes.GroupTransactionBaseType - ): - return pytype - case maybe_gtxn if maybe_gtxn in pytypes.GroupTransactionTypes.values(): + case pytypes.NoneType | pytypes.GroupTransactionType(): return pytype - case pytypes.PyType(wtype=wtypes.ARC4Type()): - return pytype - case unsupported: - return on_error(unsupported) + + if pytypes.UInt64Type <= pytype: + return pytypes.ARC4UIntN_Aliases[64] + elif pytypes.BigUIntType <= pytype: + return pytypes.ARC4UIntN_Aliases[512] + elif pytypes.BytesType <= pytype: + return pytypes.ARC4DynamicBytesType + elif pytypes.StringType <= pytype: + return pytypes.ARC4StringType + elif pytype.is_type_or_subtype( + pytypes.ApplicationType, pytypes.AssetType, pytypes.AccountType + ) or isinstance(pytype.wtype, wtypes.ARC4Type): + return pytype + else: + return on_error(pytype) _UINT_REGEX = re.compile(r"^uint(?P[0-9]+)$") diff --git a/src/puyapy/awst_build/contract.py b/src/puyapy/awst_build/contract.py index 3a0ce15ecd..7fe958053c 100644 --- a/src/puyapy/awst_build/contract.py +++ b/src/puyapy/awst_build/contract.py @@ -597,7 +597,7 @@ def add_program_method( name: str, body: Sequence[awst_nodes.Statement], *, - return_type: pytypes.PyType = pytypes.BoolType, + return_type: pytypes.RuntimeType = pytypes.BoolType, ) -> None: result.symbols[name] = pytypes.FuncType( name=".".join((_ARC4_CONTRACT_BASE_CREF, name)), @@ -670,7 +670,7 @@ def _build_symbols_and_state( if pytyp and not isinstance(pytyp, pytypes.FuncType): definition = None if isinstance(pytyp, pytypes.StorageProxyType): - wtypes.validate_persistable(pytyp.content.wtype, node_loc) + wtypes.validate_persistable(pytyp.content_wtype, node_loc) match pytyp.generic: case pytypes.GenericLocalStateType: kind = AppStorageKind.account_local @@ -683,13 +683,14 @@ def _build_symbols_and_state( case _: raise InternalError(f"unhandled StorageProxyType: {pytyp}", node_loc) elif isinstance(pytyp, pytypes.StorageMapProxyType): - wtypes.validate_persistable(pytyp.key.wtype, node_loc) - wtypes.validate_persistable(pytyp.content.wtype, node_loc) + wtypes.validate_persistable(pytyp.key_wtype, node_loc) + wtypes.validate_persistable(pytyp.content_wtype, node_loc) if pytyp.generic != pytypes.GenericBoxMapType: raise InternalError(f"unhandled StorageMapProxyType: {pytyp}", node_loc) kind = AppStorageKind.box else: # global state, direct - wtypes.validate_persistable(pytyp.wtype, node_loc) + wtype = pytyp.checked_wtype(node_loc) + wtypes.validate_persistable(wtype, node_loc) key = awst_nodes.BytesConstant( value=name.encode("utf8"), encoding=BytesEncoding.utf8, @@ -701,7 +702,7 @@ def _build_symbols_and_state( source_location=node_loc, member_name=name, kind=kind, - storage_wtype=pytyp.wtype, + storage_wtype=wtype, key_wtype=None, key=key, description=None, diff --git a/src/puyapy/awst_build/eb/_bytes_backed.py b/src/puyapy/awst_build/eb/_bytes_backed.py index 484427adb5..d7ebf46987 100644 --- a/src/puyapy/awst_build/eb/_bytes_backed.py +++ b/src/puyapy/awst_build/eb/_bytes_backed.py @@ -48,7 +48,9 @@ def call( args, pytypes.BytesType, location, resolve_literal=True ) result_expr = ReinterpretCast( - expr=arg.resolve(), wtype=self.result_type.wtype, source_location=location + expr=arg.resolve(), + wtype=self.result_type.checked_wtype(location), + source_location=location, ) return builder_for_instance(self.result_type, result_expr) diff --git a/src/puyapy/awst_build/eb/_expect.py b/src/puyapy/awst_build/eb/_expect.py index 6e75abed51..0cba652067 100644 --- a/src/puyapy/awst_build/eb/_expect.py +++ b/src/puyapy/awst_build/eb/_expect.py @@ -8,7 +8,7 @@ from puyapy.awst_build import pytypes from puyapy.awst_build.eb._utils import dummy_value from puyapy.awst_build.eb.interface import InstanceBuilder, NodeBuilder -from puyapy.awst_build.utils import is_type_or_subtype, maybe_resolve_literal +from puyapy.awst_build.utils import maybe_resolve_literal _T = typing.TypeVar("_T") _TBuilder = typing.TypeVar("_TBuilder", bound=NodeBuilder) @@ -35,7 +35,7 @@ def at_most_one_arg_of_type( first, *rest = args if rest: logger.error(f"expected at most 1 argument, got {len(args)}", location=location) - if isinstance(first, InstanceBuilder) and is_type_or_subtype(first.pytype, of_any=valid_types): + if isinstance(first, InstanceBuilder) and first.pytype.is_type_or_subtype(*valid_types): return first return not_this_type(first, default=default_none) @@ -111,7 +111,7 @@ def exactly_one_arg( def exactly_one_arg_of_type( args: Sequence[NodeBuilder], - pytype: pytypes.PyType, + expected: pytypes.PyType, location: SourceLocation, *, default: Callable[[str, SourceLocation], _T], @@ -126,8 +126,8 @@ def exactly_one_arg_of_type( if rest: logger.error(f"expected 1 argument, got {len(args)}", location=location) if resolve_literal: - first = maybe_resolve_literal(first, pytype) - if isinstance(first, InstanceBuilder) and is_type_or_subtype(first.pytype, of=pytype): + first = maybe_resolve_literal(first, expected) + if isinstance(first, InstanceBuilder) and expected <= first.pytype: return first return not_this_type(first, default=default) @@ -183,8 +183,8 @@ def argument_of_type( if resolve_literal: builder = maybe_resolve_literal(builder, target_type) - if isinstance(builder, InstanceBuilder) and is_type_or_subtype( - builder.pytype, of_any=(target_type, *additional_types) + if isinstance(builder, InstanceBuilder) and builder.pytype.is_type_or_subtype( + target_type, *additional_types ): return builder return not_this_type(builder, default=default) diff --git a/src/puyapy/awst_build/eb/_literals.py b/src/puyapy/awst_build/eb/_literals.py index d0261db37d..5a251f1bec 100644 --- a/src/puyapy/awst_build/eb/_literals.py +++ b/src/puyapy/awst_build/eb/_literals.py @@ -34,7 +34,7 @@ def __init__(self, value: ConstantValue, source_location: SourceLocation): self._value = value match value: case bool(): - typ = pytypes.BoolType + typ: pytypes.PyType = pytypes.BoolType case int(): typ = pytypes.IntLiteralType case str(): diff --git a/src/puyapy/awst_build/eb/_utils.py b/src/puyapy/awst_build/eb/_utils.py index e6006338f6..d8f2cb1cac 100644 --- a/src/puyapy/awst_build/eb/_utils.py +++ b/src/puyapy/awst_build/eb/_utils.py @@ -29,7 +29,7 @@ def dummy_value(pytype: pytypes.PyType, location: SourceLocation) -> InstanceBui from puyapy.awst_build.eb._literals import LiteralBuilderImpl return LiteralBuilderImpl(pytype.python_type(), location) - expr = VarExpression(name="", wtype=pytype.wtype, source_location=location) + expr = VarExpression(name="", wtype=pytype.checked_wtype(location), source_location=location) return builder_for_instance(pytype, expr) @@ -79,14 +79,15 @@ def constant_bool_and_error( def compare_bytes( *, - lhs: InstanceBuilder, + self: InstanceBuilder, op: BuilderComparisonOp, - rhs: InstanceBuilder, + other: InstanceBuilder, source_location: SourceLocation, ) -> InstanceBuilder: - if rhs.pytype != lhs.pytype: + # defer to most derived type if not equal + if not (other.pytype <= self.pytype): return NotImplemented - return _compare_expr_bytes_unchecked(lhs.resolve(), op, rhs.resolve(), source_location) + return _compare_expr_bytes_unchecked(self.resolve(), op, other.resolve(), source_location) def compare_expr_bytes( diff --git a/src/puyapy/awst_build/eb/arc4/_base.py b/src/puyapy/awst_build/eb/arc4/_base.py index 722ca7d19e..0cd6eb0fa6 100644 --- a/src/puyapy/awst_build/eb/arc4/_base.py +++ b/src/puyapy/awst_build/eb/arc4/_base.py @@ -31,11 +31,7 @@ resolve_negative_literal_index, ) from puyapy.awst_build.eb.factories import builder_for_instance -from puyapy.awst_build.eb.interface import ( - BuilderComparisonOp, - InstanceBuilder, - NodeBuilder, -) +from puyapy.awst_build.eb.interface import BuilderComparisonOp, InstanceBuilder, NodeBuilder logger = log.get_logger(__name__) @@ -65,7 +61,7 @@ def abi_expr_from_log( ) -> Expression: tmp_value = value.single_eval().resolve() arc4_value = intrinsic_factory.extract( - tmp_value, start=4, loc=location, result_type=typ.wtype + tmp_value, start=4, loc=location, result_type=typ.checked_wtype(location) ) arc4_prefix = intrinsic_factory.extract(tmp_value, start=0, length=4, loc=location) arc4_prefix_is_valid = compare_expr_bytes( @@ -120,15 +116,16 @@ def call( def arc4_bool_bytes( builder: InstanceBuilder, false_bytes: bytes, location: SourceLocation, *, negate: bool ) -> InstanceBuilder: + lhs = builder.resolve() false_value = BytesConstant( value=false_bytes, encoding=BytesEncoding.base16, - wtype=builder.pytype.wtype, + wtype=lhs.wtype, source_location=location, ) return compare_expr_bytes( op=BuilderComparisonOp.eq if negate else BuilderComparisonOp.ne, - lhs=builder.resolve(), + lhs=lhs, rhs=false_value, source_location=location, ) @@ -137,7 +134,7 @@ def arc4_bool_bytes( class _ARC4ArrayExpressionBuilder(BytesBackedInstanceExpressionBuilder[pytypes.ArrayType], ABC): @typing.override def iterate(self) -> Expression: - if not self.pytype.items.wtype.immutable: + if not self.pytype.items_wtype.immutable: # this case is an error raised during AWST validation # adding a front end specific message here to compliment the error message # raise across all front ends @@ -158,7 +155,7 @@ def index(self, index: InstanceBuilder, location: SourceLocation) -> InstanceBui result_expr = IndexExpression( base=self.resolve(), index=index.resolve(), - wtype=self.pytype.items.wtype, + wtype=self.pytype.items_wtype, source_location=location, ) return builder_for_instance(self.pytype.items, result_expr) @@ -180,7 +177,7 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: - return compare_bytes(lhs=self, op=op, rhs=other, source_location=location) + return compare_bytes(self=self, op=op, other=other, source_location=location) @typing.override @typing.final diff --git a/src/puyapy/awst_build/eb/arc4/_utils.py b/src/puyapy/awst_build/eb/arc4/_utils.py index 5d13dd2d6d..e81cd52717 100644 --- a/src/puyapy/awst_build/eb/arc4/_utils.py +++ b/src/puyapy/awst_build/eb/arc4/_utils.py @@ -15,7 +15,6 @@ from puyapy.awst_build.eb.factories import builder_for_type from puyapy.awst_build.eb.interface import ( InstanceBuilder, - LiteralBuilder, NodeBuilder, StaticSizedCollectionBuilder, ) @@ -83,25 +82,15 @@ def convert_args( def _gtxn_to_itxn(pytype: pytypes.PyType) -> pytypes.PyType: - if ( - isinstance(pytype, pytypes.TransactionRelatedType) - and pytypes.GroupTransactionBaseType in pytype.mro - ): - txn_type = pytype.transaction_type - return pytypes.InnerTransactionFieldsetTypes[txn_type] + if isinstance(pytype, pytypes.GroupTransactionType): + return pytypes.InnerTransactionFieldsetTypes[pytype.transaction_type] return pytype def get_arc4_signature( method: NodeBuilder, native_args: Sequence[NodeBuilder], loc: SourceLocation ) -> tuple[str, ARC4Signature]: - method = expect.argument_of_type(method, pytypes.StrLiteralType, default=expect.default_raise) - match method: - case LiteralBuilder(value=str(method_sig)): - pass - case _: - raise CodeError("method selector must be a simple str literal", method.source_location) - + method_sig = expect.simple_string_literal(method, default=expect.default_raise) method_name, maybe_args, maybe_returns = _split_signature(method_sig, method.source_location) if maybe_args is None: arg_types = [ @@ -145,16 +134,14 @@ def on_error(invalid_pytype: pytypes.PyType) -> typing.Never: def _inner_transaction_type_matches(instance: pytypes.PyType, target: pytypes.PyType) -> bool: - from puya.awst.wtypes import WInnerTransactionFields - - if not isinstance(instance.wtype, WInnerTransactionFields): + if not isinstance(instance, pytypes.InnerTransactionFieldsetType): return False - if not isinstance(target.wtype, WInnerTransactionFields): + if not isinstance(target, pytypes.InnerTransactionFieldsetType): return False return ( - instance.wtype == target.wtype - or instance.wtype.transaction_type is None - or target.wtype.transaction_type is None + instance.transaction_type == target.transaction_type + or instance.transaction_type is None + or target.transaction_type is None ) @@ -165,7 +152,7 @@ def _implicit_arc4_conversion( instance = expect.instance_builder(operand, default=expect.default_dummy_value(target_type)) instance = _maybe_resolve_arc4_literal(instance, target_type) - if instance.pytype == target_type: + if target_type <= instance.pytype: return instance target_wtype = target_type.wtype if isinstance(target_type, pytypes.TransactionRelatedType): @@ -189,7 +176,7 @@ def _implicit_arc4_conversion( location=instance.source_location, ) return dummy_value(target_type, instance.source_location) - if not target_wtype.can_encode_type(instance.pytype.wtype): + if not target_wtype.can_encode_type(instance.pytype.checked_wtype(instance.source_location)): logger.error( f"cannot encode {instance.pytype} to {target_type}", location=instance.source_location ) @@ -278,8 +265,3 @@ def _split_signature( if not name or not _VALID_NAME_PATTERN.match(name): logger.error(f"invalid signature: {name=}", location=location) return name, args, returns - - -def no_literal_items(array_type: pytypes.ArrayType, location: SourceLocation) -> None: - if isinstance(array_type.items, pytypes.LiteralOnlyType): - raise CodeError("arrays of literals are not supported", location) diff --git a/src/puyapy/awst_build/eb/arc4/abi_call.py b/src/puyapy/awst_build/eb/arc4/abi_call.py index 38feb09e8b..63a0d4416a 100644 --- a/src/puyapy/awst_build/eb/arc4/abi_call.py +++ b/src/puyapy/awst_build/eb/arc4/abi_call.py @@ -217,7 +217,7 @@ def call( method_call = _get_arc4_method_call(fmethod, abi_args, location) case ContractTypeExpressionBuilder( fragment=fragment, pytype=pytypes.TypeType(typ=typ) - ) if pytypes.ARC4ContractBaseType in typ.mro: + ) if pytypes.ARC4ContractBaseType < typ: contract_ref = fragment.id method_call = _get_lifecycle_method_call( fragment, @@ -503,17 +503,16 @@ def ref_to_arg(ref_field: TxnField, arg: InstanceBuilder) -> Expression: ) for arg_b in abi_args: + arg_expr = None match arg_b.pytype: - case pytypes.TransactionRelatedType() as txn_pytype: - if isinstance(txn_pytype.wtype, wtypes.WInnerTransactionFields): - group.append(arg_b.resolve()) - else: - logger.error( - "only inner transaction types can be used to call another contract", - location=arg_b.source_location, - ) - # continue to next arg as txn aren't part of the app args - continue + case pytypes.InnerTransactionFieldsetType(): + group.append(arg_b.resolve()) + # no arg_expr as txn aren't part of the app args + case pytypes.TransactionRelatedType(): + logger.error( + "only inner transaction types can be used to call another contract", + location=arg_b.source_location, + ) case pytypes.AssetType: arg_expr = ref_to_arg(TxnField.Assets, arg_b) case pytypes.AccountType: @@ -522,7 +521,8 @@ def ref_to_arg(ref_field: TxnField, arg: InstanceBuilder) -> Expression: arg_expr = ref_to_arg(TxnField.Applications, arg_b) case _: arg_expr = arg_b.resolve() - array_fields[TxnField.ApplicationArgs].append(arg_expr) + if arg_expr is not None: + array_fields[TxnField.ApplicationArgs].append(arg_expr) txn_type_appl = TransactionType.appl fields: dict[TxnField, Expression] = { @@ -552,7 +552,7 @@ def ref_to_arg(ref_field: TxnField, arg: InstanceBuilder) -> Expression: itxn_result_pytype = pytypes.InnerTransactionResultTypes[txn_type_appl] create_itxn = CreateInnerTransaction( fields=fields, - wtype=wtypes.WInnerTransactionFields.from_type(txn_type_appl), + wtype=pytypes.InnerTransactionFieldsetTypes[txn_type_appl].wtype, source_location=location, ) group.append(create_itxn) @@ -588,11 +588,13 @@ def ref_to_arg(ref_field: TxnField, arg: InstanceBuilder) -> Expression: assert isinstance(itxn_builder, InnerTransactionExpressionBuilder) last_log = itxn_builder.get_field_value(TxnField.LastLog, pytypes.BytesType, location) abi_result = ARC4FromLogBuilder.abi_expr_from_log(arc4_return_type, last_log, location) - # the declared result wtype may be different to the arc4 signature return wtype + # the declared result type may be different to the arc4 signature return type # due to automatic conversion of ARC4 -> native types if declared_result_type != arc4_return_type: abi_result = ARC4Decode( - value=abi_result, wtype=declared_result_type.wtype, source_location=location + value=abi_result, + wtype=declared_result_type.checked_wtype(location), + source_location=location, ) abi_result_builder = builder_for_instance(declared_result_type, abi_result) diff --git a/src/puyapy/awst_build/eb/arc4/address.py b/src/puyapy/awst_build/eb/arc4/address.py index eaa6c57efa..15fc42b04a 100644 --- a/src/puyapy/awst_build/eb/arc4/address.py +++ b/src/puyapy/awst_build/eb/arc4/address.py @@ -65,28 +65,27 @@ def call( location: SourceLocation, ) -> InstanceBuilder: arg = expect.at_most_one_arg(args, location) - match arg: - case InstanceBuilder(pytype=pytypes.StrLiteralType): - return arg.resolve_literal(converter=AddressTypeBuilder(location)) - case None: - result = _zero_address(location) - case InstanceBuilder(pytype=pytypes.AccountType): - result = _address_from_native(arg) - case _: - arg = expect.argument_of_type_else_dummy(arg, pytypes.BytesType) - arg = arg.single_eval() - is_correct_length = NumericComparisonExpression( - operator=NumericComparison.eq, - source_location=location, - lhs=UInt64Constant(value=32, source_location=location), - rhs=intrinsic_factory.bytes_len(arg.resolve(), location), - ) - result = CheckedMaybe.from_tuple_items( - expr=_address_from_native(arg), - check=is_correct_length, - source_location=location, - comment="Address length is 32 bytes", - ) + if arg is None: + result = _zero_address(location) + elif arg.pytype == pytypes.StrLiteralType: + return arg.resolve_literal(converter=AddressTypeBuilder(location)) + elif arg.pytype == pytypes.AccountType: # Account is a final type + result = _address_from_native(arg) + else: + arg = expect.argument_of_type_else_dummy(arg, pytypes.BytesType) + arg = arg.single_eval() + is_correct_length = NumericComparisonExpression( + operator=NumericComparison.eq, + source_location=location, + lhs=UInt64Constant(value=32, source_location=location), + rhs=intrinsic_factory.bytes_len(arg.resolve(), location), + ) + result = CheckedMaybe.from_tuple_items( + expr=_address_from_native(arg), + check=is_correct_length, + source_location=location, + comment="Address length is 32 bytes", + ) return AddressExpressionBuilder(result) @@ -107,15 +106,14 @@ def bool_eval(self, location: SourceLocation, *, negate: bool = False) -> Instan def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: - match other: - case InstanceBuilder(pytype=pytypes.StrLiteralType): - rhs = other.resolve_literal(AddressTypeBuilder(other.source_location)).resolve() - case InstanceBuilder(pytype=pytypes.AccountType): - rhs = _address_from_native(other) - case InstanceBuilder(pytype=pytypes.ARC4AddressType): - rhs = other.resolve() - case _: - return NotImplemented + if other.pytype == pytypes.StrLiteralType: + rhs = other.resolve_literal(AddressTypeBuilder(other.source_location)).resolve() + elif other.pytype == pytypes.AccountType: # Account is a final type + rhs = _address_from_native(other) + elif pytypes.ARC4AddressType <= other.pytype: + rhs = other.resolve() + else: + return NotImplemented return compare_expr_bytes(lhs=self.resolve(), op=op, rhs=rhs, source_location=location) @typing.override @@ -132,7 +130,7 @@ def _zero_address(location: SourceLocation) -> Expression: def _address_to_native(builder: InstanceBuilder) -> Expression: - assert builder.pytype == pytypes.ARC4AddressType + assert pytypes.ARC4AddressType <= builder.pytype return ReinterpretCast( expr=builder.resolve(), wtype=wtypes.account_wtype, @@ -141,7 +139,7 @@ def _address_to_native(builder: InstanceBuilder) -> Expression: def _address_from_native(builder: InstanceBuilder) -> Expression: - assert builder.pytype in (pytypes.AccountType, pytypes.BytesType) + assert builder.pytype.is_type_or_subtype(pytypes.AccountType, pytypes.BytesType) return ReinterpretCast( expr=builder.resolve(), wtype=wtypes.arc4_address_alias, diff --git a/src/puyapy/awst_build/eb/arc4/bool.py b/src/puyapy/awst_build/eb/arc4/bool.py index 125ee92817..f8012469c9 100644 --- a/src/puyapy/awst_build/eb/arc4/bool.py +++ b/src/puyapy/awst_build/eb/arc4/bool.py @@ -101,4 +101,4 @@ def compare( if other.pytype == pytypes.BoolType: lhs = self._native(self.source_location) return lhs.compare(other, op, location) - return compare_bytes(lhs=self, op=op, rhs=other, source_location=location) + return compare_bytes(self=self, op=op, other=other, source_location=location) diff --git a/src/puyapy/awst_build/eb/arc4/dynamic_array.py b/src/puyapy/awst_build/eb/arc4/dynamic_array.py index 5275b01fd7..6b44be9701 100644 --- a/src/puyapy/awst_build/eb/arc4/dynamic_array.py +++ b/src/puyapy/awst_build/eb/arc4/dynamic_array.py @@ -29,7 +29,6 @@ dummy_value, ) from puyapy.awst_build.eb.arc4._base import _ARC4ArrayExpressionBuilder, arc4_bool_bytes -from puyapy.awst_build.eb.arc4._utils import no_literal_items from puyapy.awst_build.eb.factories import builder_for_instance from puyapy.awst_build.eb.interface import BuilderBinaryOp, InstanceBuilder, NodeBuilder from puyapy.awst_build.eb.none import NoneExpressionBuilder @@ -57,7 +56,6 @@ def call( raise CodeError("empty arrays require a type annotation to be instantiated", location) element_type = expect.instance_builder(args[0], default=expect.default_raise).pytype typ = pytypes.GenericARC4DynamicArrayType.parameterise([element_type], location) - no_literal_items(typ, location) values = tuple(expect.argument_of_type_else_dummy(a, element_type).resolve() for a in args) wtype = typ.wtype assert isinstance(wtype, wtypes.ARC4DynamicArray) @@ -82,7 +80,6 @@ def call( location: SourceLocation, ) -> InstanceBuilder: typ = self.produces() - no_literal_items(typ, location) values = tuple(expect.argument_of_type_else_dummy(a, typ.items).resolve() for a in args) wtype = typ.wtype assert isinstance(wtype, wtypes.ARC4DynamicArray) @@ -143,19 +140,15 @@ def binary_op( *, reverse: bool, ) -> InstanceBuilder: - if op != BuilderBinaryOp.add: - return NotImplemented - if not _check_array_concat_arg(other, self.pytype): + # only __add__ is implemented, not __radd__ + if op != BuilderBinaryOp.add or reverse: return NotImplemented - lhs: InstanceBuilder = self - rhs = other - if reverse: - (lhs, rhs) = (rhs, lhs) + other = _match_array_concat_arg(other, self.pytype) return DynamicArrayExpressionBuilder( ArrayConcat( - left=lhs.resolve(), - right=rhs.resolve(), + left=self.resolve(), + right=other.resolve(), wtype=self.pytype.wtype, source_location=location, ), @@ -209,7 +202,7 @@ def call( ) -> InstanceBuilder: expect.no_args(args, location) result_expr = ArrayPop( - base=self.expr, wtype=self.typ.items.wtype, source_location=location + base=self.expr, wtype=self.typ.items_wtype, source_location=location ) return builder_for_instance(self.typ.items, result_expr) @@ -238,19 +231,16 @@ def call( ) -def _check_array_concat_arg(arg: InstanceBuilder, arr_type: pytypes.ArrayType) -> bool: - match arg: - case InstanceBuilder(pytype=pytypes.ArrayType(items=arr_type.items)): - return True - case InstanceBuilder(pytype=pytypes.TupleLikeType(items=tup_items)) if all( - ti == arr_type.items for ti in tup_items - ): - return True - return False - - def _match_array_concat_arg(arg: InstanceBuilder, arr_type: pytypes.ArrayType) -> InstanceBuilder: - if _check_array_concat_arg(arg, arr_type): + expected_item_type = arr_type.items + match arg.pytype: + case pytypes.SequenceType(items=array_items): + okay = expected_item_type <= array_items + case pytypes.TupleLikeType(items=tuple_items): + okay = all(expected_item_type <= ti for ti in tuple_items) + case _: + okay = False + if okay: return arg logger.error( "expected an array or tuple of the same element type", location=arg.source_location diff --git a/src/puyapy/awst_build/eb/arc4/dynamic_bytes.py b/src/puyapy/awst_build/eb/arc4/dynamic_bytes.py index d2a15ae221..42ce8ce62a 100644 --- a/src/puyapy/awst_build/eb/arc4/dynamic_bytes.py +++ b/src/puyapy/awst_build/eb/arc4/dynamic_bytes.py @@ -62,7 +62,9 @@ def call( bytes_expr: Expression = BytesConstant( value=b"", encoding=BytesEncoding.unknown, source_location=location ) - case [InstanceBuilder(pytype=pytypes.BytesType) as eb]: + case [ + InstanceBuilder(pytype=single_arg_pytype) as eb + ] if pytypes.BytesType <= single_arg_pytype: bytes_expr = eb.resolve() case _: non_literal_args = tuple(_coerce_to_byte(a).resolve() for a in args) diff --git a/src/puyapy/awst_build/eb/arc4/emit.py b/src/puyapy/awst_build/eb/arc4/emit.py index 82776e5226..47c725a94a 100644 --- a/src/puyapy/awst_build/eb/arc4/emit.py +++ b/src/puyapy/awst_build/eb/arc4/emit.py @@ -32,7 +32,7 @@ def call( match first: case InstanceBuilder( pytype=pytypes.StructType() as struct_type - ) as event_arg_eb if pytypes.ARC4StructBaseType in struct_type.mro: + ) as event_arg_eb if pytypes.ARC4StructBaseType < struct_type: event_name = struct_type.name.split(".")[-1] if rest: logger.error( diff --git a/src/puyapy/awst_build/eb/arc4/static_array.py b/src/puyapy/awst_build/eb/arc4/static_array.py index eb90750803..71449b8fbf 100644 --- a/src/puyapy/awst_build/eb/arc4/static_array.py +++ b/src/puyapy/awst_build/eb/arc4/static_array.py @@ -14,7 +14,6 @@ from puyapy.awst_build.eb._bytes_backed import BytesBackedTypeBuilder from puyapy.awst_build.eb._utils import constant_bool_and_error from puyapy.awst_build.eb.arc4._base import _ARC4ArrayExpressionBuilder -from puyapy.awst_build.eb.arc4._utils import no_literal_items from puyapy.awst_build.eb.factories import builder_for_instance from puyapy.awst_build.eb.interface import ( InstanceBuilder, @@ -49,7 +48,6 @@ def call( [element_type, pytypes.TypingLiteralType(value=array_size, source_location=None)], location, ) - no_literal_items(typ, location) values = tuple(expect.argument_of_type_else_dummy(a, element_type).resolve() for a in args) wtype = typ.wtype assert isinstance(wtype, wtypes.ARC4StaticArray) @@ -75,7 +73,6 @@ def call( location: SourceLocation, ) -> InstanceBuilder: typ = self.produces() - no_literal_items(typ, location) n_args = expect.exactly_n_args_of_type_else_dummy(args, typ.items, location, self._size) wtype = typ.wtype assert isinstance(wtype, wtypes.ARC4StaticArray) @@ -108,14 +105,13 @@ def bool_eval(self, location: SourceLocation, *, negate: bool = False) -> Instan @typing.override def iterate_static(self) -> Sequence[InstanceBuilder]: base = self.single_eval().resolve() - item_type = self.pytype.items return [ builder_for_instance( - item_type, + self.pytype.items, IndexExpression( base=base, index=UInt64Constant(value=idx, source_location=self.source_location), - wtype=item_type.wtype, + wtype=self.pytype.items_wtype, source_location=self.source_location, ), ) diff --git a/src/puyapy/awst_build/eb/arc4/string.py b/src/puyapy/awst_build/eb/arc4/string.py index 249a7fd8a3..6491f26123 100644 --- a/src/puyapy/awst_build/eb/arc4/string.py +++ b/src/puyapy/awst_build/eb/arc4/string.py @@ -99,7 +99,7 @@ def augmented_assignment( return dummy_statement(location) rhs = rhs.resolve_literal(ARC4StringTypeBuilder(rhs.source_location)) - if rhs.pytype == pytypes.StringType: + if pytypes.StringType <= rhs.pytype: value = _from_native(rhs, rhs.source_location).resolve() else: value = expect.argument_of_type_else_dummy(rhs, self.pytype).resolve() @@ -124,9 +124,9 @@ def binary_op( return NotImplemented other = other.resolve_literal(ARC4StringTypeBuilder(other.source_location)) - if other.pytype == self.pytype: + if pytypes.ARC4StringType <= other.pytype: other_expr = other.resolve() - elif other.pytype == pytypes.StringType: + elif pytypes.StringType <= other.pytype: other_expr = _from_native(other, other.source_location).resolve() else: return NotImplemented @@ -150,14 +150,13 @@ def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = other.resolve_literal(ARC4StringTypeBuilder(other.source_location)) - match other: - case InstanceBuilder(pytype=pytypes.ARC4StringType): - lhs: InstanceBuilder = self - case InstanceBuilder(pytype=pytypes.StringType): - # when comparing arc4 to native, easier to convert by stripping length prefix - lhs = _string_to_native(self, self.source_location) - case _: - return NotImplemented + if pytypes.ARC4StringType <= other.pytype: + lhs: InstanceBuilder = self + elif pytypes.StringType <= other.pytype: + # when comparing arc4 to native, easier to convert by stripping length prefix + lhs = _string_to_native(self, self.source_location) + else: + return NotImplemented return compare_expr_bytes( lhs=lhs.resolve(), op=op, @@ -186,7 +185,7 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: def _string_to_native( builder: InstanceBuilder, location: SourceLocation ) -> StringExpressionBuilder: - assert builder.pytype == pytypes.ARC4StringType + assert pytypes.ARC4StringType <= builder.pytype return StringExpressionBuilder( ARC4Decode( value=builder.resolve(), @@ -207,7 +206,7 @@ def _arc4_encode_str_literal(value: str, location: SourceLocation) -> InstanceBu def _from_native(eb: InstanceBuilder, location: SourceLocation) -> InstanceBuilder: - assert eb.pytype == pytypes.StringType + assert pytypes.StringType <= eb.pytype return ARC4StringExpressionBuilder( ARC4Encode( value=eb.resolve(), diff --git a/src/puyapy/awst_build/eb/arc4/struct.py b/src/puyapy/awst_build/eb/arc4/struct.py index f5615cfdab..3e02652755 100644 --- a/src/puyapy/awst_build/eb/arc4/struct.py +++ b/src/puyapy/awst_build/eb/arc4/struct.py @@ -26,7 +26,7 @@ class ARC4StructTypeBuilder(BytesBackedTypeBuilder[pytypes.StructType]): def __init__(self, typ: pytypes.PyType, location: SourceLocation): assert isinstance(typ, pytypes.StructType) - assert pytypes.ARC4StructBaseType in typ.mro + assert pytypes.ARC4StructBaseType < typ super().__init__(typ, location) @typing.override @@ -84,7 +84,7 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: - return compare_bytes(lhs=self, op=op, rhs=other, source_location=location) + return compare_bytes(self=self, op=op, other=other, source_location=location) def bool_eval(self, location: SourceLocation, *, negate: bool = False) -> InstanceBuilder: return constant_bool_and_error(value=True, location=location, negate=negate) diff --git a/src/puyapy/awst_build/eb/arc4/tuple.py b/src/puyapy/awst_build/eb/arc4/tuple.py index 8cc61f0b67..281c3147ac 100644 --- a/src/puyapy/awst_build/eb/arc4/tuple.py +++ b/src/puyapy/awst_build/eb/arc4/tuple.py @@ -3,7 +3,6 @@ import mypy.nodes from puya import log -from puya.awst import wtypes from puya.awst.nodes import ARC4Decode, ARC4Encode, Expression, TupleItemExpression from puya.errors import CodeError from puya.parse import SourceLocation @@ -67,8 +66,7 @@ def call( args, location, default=expect.default_dummy_value(native_type) ) wtype = typ.wtype - assert isinstance(wtype, wtypes.ARC4Tuple) - if not wtype.can_encode_type(arg.pytype.wtype): + if not wtype.can_encode_type(arg.pytype.checked_wtype(location)): arg = expect.not_this_type(arg, default=expect.default_dummy_value(native_type)) return ARC4TupleExpressionBuilder( ARC4Encode(value=arg.resolve(), wtype=wtype, source_location=location), typ @@ -113,9 +111,10 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: match name: case "native": native_pytype = pytypes.GenericTupleType.parameterise(self.pytype.items, location) + native_wtype = native_pytype.checked_wtype(location) result_expr: Expression = ARC4Decode( value=self.resolve(), - wtype=native_pytype.wtype, + wtype=native_wtype, source_location=location, ) return TupleExpressionBuilder(result_expr, native_pytype) @@ -126,7 +125,7 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: - return compare_bytes(lhs=self, op=op, rhs=other, source_location=location) + return compare_bytes(self=self, op=op, other=other, source_location=location) @typing.override def contains(self, item: InstanceBuilder, location: SourceLocation) -> InstanceBuilder: diff --git a/src/puyapy/awst_build/eb/arc4/ufixed.py b/src/puyapy/awst_build/eb/arc4/ufixed.py index 1ab63f6f4e..f4af96508d 100644 --- a/src/puyapy/awst_build/eb/arc4/ufixed.py +++ b/src/puyapy/awst_build/eb/arc4/ufixed.py @@ -135,4 +135,4 @@ def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = other.resolve_literal(UFixedNxMTypeBuilder(self.pytype, other.source_location)) - return compare_bytes(op=op, lhs=self, rhs=other, source_location=location) + return compare_bytes(op=op, self=self, other=other, source_location=location) diff --git a/src/puyapy/awst_build/eb/arc4/uint.py b/src/puyapy/awst_build/eb/arc4/uint.py index d40ce4a71f..32543b9c89 100644 --- a/src/puyapy/awst_build/eb/arc4/uint.py +++ b/src/puyapy/awst_build/eb/arc4/uint.py @@ -119,21 +119,18 @@ def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = other.resolve_literal(UIntNTypeBuilder(self.pytype, other.source_location)) - match other.pytype: - case pytypes.BigUIntType: - other_expr = other.resolve() - case pytypes.UInt64Type | pytypes.BoolType: - other_expr = intrinsic_factory.itob_as( - other.resolve(), wtypes.biguint_wtype, location - ) - case pytypes.ARC4UIntNType(): - other_expr = ReinterpretCast( - expr=other.resolve(), - wtype=wtypes.biguint_wtype, - source_location=other.source_location, - ) - case _: - return NotImplemented + if pytypes.BigUIntType <= other.pytype: + other_expr = other.resolve() + elif other.pytype.is_type_or_subtype(pytypes.BoolType, pytypes.UInt64Type): + other_expr = intrinsic_factory.itob_as(other.resolve(), wtypes.biguint_wtype, location) + elif isinstance(other.pytype, pytypes.ARC4UIntNType): + other_expr = ReinterpretCast( + expr=other.resolve(), + wtype=wtypes.biguint_wtype, + source_location=other.source_location, + ) + else: + return NotImplemented cmp_expr = NumericComparisonExpression( operator=NumericComparison(op.value), lhs=ReinterpretCast( diff --git a/src/puyapy/awst_build/eb/biguint.py b/src/puyapy/awst_build/eb/biguint.py index c557034766..5b7d628e38 100644 --- a/src/puyapy/awst_build/eb/biguint.py +++ b/src/puyapy/awst_build/eb/biguint.py @@ -81,6 +81,7 @@ class BigUIntExpressionBuilder( def __init__(self, expr: Expression): super().__init__(pytypes.BigUIntType, expr) + @typing.override def bool_eval(self, location: SourceLocation, *, negate: bool = False) -> InstanceBuilder: cmp_expr = NumericComparisonExpression( lhs=self.resolve(), @@ -90,6 +91,7 @@ def bool_eval(self, location: SourceLocation, *, negate: bool = False) -> Instan ) return BoolExpressionBuilder(cmp_expr) + @typing.override def unary_op(self, op: BuilderUnaryOp, location: SourceLocation) -> InstanceBuilder: if op == BuilderUnaryOp.positive: # unary + is allowed, but for the current types it has no real impact @@ -97,13 +99,14 @@ def unary_op(self, op: BuilderUnaryOp, location: SourceLocation) -> InstanceBuil return BigUIntExpressionBuilder(attrs.evolve(self.resolve(), source_location=location)) return super().unary_op(op, location) + @typing.override def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = other.resolve_literal(converter=BigUIntTypeBuilder(other.source_location)) - if other.pytype == self.pytype: + if pytypes.BigUIntType <= other.pytype: other_expr = other.resolve() - elif other.pytype == pytypes.UInt64Type: + elif pytypes.UInt64Type <= other.pytype: other_expr = _uint64_to_biguint(other, location) else: return NotImplemented @@ -115,6 +118,7 @@ def compare( ) return BoolExpressionBuilder(cmp_expr) + @typing.override def binary_op( self, other: InstanceBuilder, @@ -127,9 +131,9 @@ def binary_op( if biguint_op is None: return NotImplemented other = other.resolve_literal(converter=BigUIntTypeBuilder(other.source_location)) - if other.pytype == self.pytype: + if pytypes.BigUIntType <= other.pytype: other_expr = other.resolve() - elif other.pytype == pytypes.UInt64Type: + elif pytypes.UInt64Type <= other.pytype: other_expr = _uint64_to_biguint(other, location) else: return NotImplemented @@ -142,6 +146,7 @@ def binary_op( ) return BigUIntExpressionBuilder(bin_op_expr) + @typing.override def augmented_assignment( self, op: BuilderBinaryOp, rhs: InstanceBuilder, location: SourceLocation ) -> Statement: @@ -149,7 +154,7 @@ def augmented_assignment( if biguint_op is None: logger.error(f"unsupported operator for type: {op.value!r}", location=location) return dummy_statement(location) - if rhs.pytype == pytypes.UInt64Type: + if pytypes.UInt64Type <= rhs.pytype: value = _uint64_to_biguint(rhs, location) else: value = expect.argument_of_type_else_dummy( diff --git a/src/puyapy/awst_build/eb/binary_bool_op.py b/src/puyapy/awst_build/eb/binary_bool_op.py index 328ba4cb51..b55437183f 100644 --- a/src/puyapy/awst_build/eb/binary_bool_op.py +++ b/src/puyapy/awst_build/eb/binary_bool_op.py @@ -120,6 +120,8 @@ def resolve(self) -> Expression: " which isn't supported unless evaluating a boolean condition", self.source_location, ) + result_wtype = self.pytype.checked_wtype(self.source_location) + # (left:uint64 and right:uint64) => left_cache if not bool(left_cache := left) else right # (left:uint64 or right:uint64) => left_cache if bool(left_cache := left) else right left_cache = self._left.single_eval() @@ -130,7 +132,7 @@ def resolve(self) -> Expression: condition=condition.resolve(), true_expr=left_cache.resolve(), false_expr=self._right.resolve(), - wtype=self.pytype.wtype, + wtype=result_wtype, source_location=self.source_location, ) return expr_result diff --git a/src/puyapy/awst_build/eb/bool.py b/src/puyapy/awst_build/eb/bool.py index 580b135b6e..fbf87c2586 100644 --- a/src/puyapy/awst_build/eb/bool.py +++ b/src/puyapy/awst_build/eb/bool.py @@ -79,9 +79,7 @@ def bool_eval(self, location: SourceLocation, *, negate: bool = False) -> Instan def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: - if other.pytype == self.pytype: - pass - else: + if other.pytype != pytypes.BoolType: return NotImplemented cmp_expr = NumericComparisonExpression( source_location=location, @@ -95,7 +93,7 @@ def compare( def bool_binary_op( self, other: InstanceBuilder, op: BinaryBooleanOperator, location: SourceLocation ) -> InstanceBuilder: - if other.pytype != self.pytype: + if other.pytype != pytypes.BoolType: return super().bool_binary_op(other, op, location) result = BooleanBinaryOperation( left=self.resolve(), diff --git a/src/puyapy/awst_build/eb/bytes.py b/src/puyapy/awst_build/eb/bytes.py index c86f551d45..8483023f6f 100644 --- a/src/puyapy/awst_build/eb/bytes.py +++ b/src/puyapy/awst_build/eb/bytes.py @@ -156,7 +156,7 @@ def call( return dummy_value(pytypes.BytesType, location) -class BytesExpressionBuilder(InstanceExpressionBuilder): +class BytesExpressionBuilder(InstanceExpressionBuilder[pytypes.RuntimeType]): def __init__(self, expr: Expression): super().__init__(pytypes.BytesType, expr) @@ -250,7 +250,7 @@ def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = other.resolve_literal(converter=BytesTypeBuilder(other.source_location)) - return compare_bytes(lhs=self, op=op, rhs=other, source_location=location) + return compare_bytes(self=self, op=op, other=other, source_location=location) @typing.override def binary_op( @@ -266,7 +266,7 @@ def binary_op( return NotImplemented other = other.resolve_literal(converter=BytesTypeBuilder(other.source_location)) - if other.pytype != self.pytype: + if not (pytypes.BytesType <= other.pytype): return NotImplemented lhs = self.resolve() diff --git a/src/puyapy/awst_build/eb/conditional_literal.py b/src/puyapy/awst_build/eb/conditional_literal.py index 464a7d1e58..9ecab76bdd 100644 --- a/src/puyapy/awst_build/eb/conditional_literal.py +++ b/src/puyapy/awst_build/eb/conditional_literal.py @@ -34,8 +34,7 @@ def __init__( location: SourceLocation ): super().__init__(location) - assert true_literal.pytype == false_literal.pytype # TODO: fixme - self._pytype = true_literal.pytype + self._pytype = _common_base(true_literal.pytype, false_literal.pytype, location) self._true_literal = true_literal self._false_literal = false_literal self._condition = condition @@ -82,7 +81,7 @@ def try_resolve_literal(self, converter: TypeBuilder) -> InstanceBuilder | None: def _resolve_literals( self, true_b: InstanceBuilder, false_b: InstanceBuilder ) -> InstanceBuilder: - assert true_b.pytype == false_b.pytype # TODO: fixme + result_pytype = _common_base(true_b.pytype, false_b.pytype, self.source_location) result_pytype = true_b.pytype true_expr = true_b.resolve() false_expr = false_b.resolve() @@ -268,3 +267,12 @@ def single_eval(self) -> InstanceBuilder: condition=condition, location=self.source_location, ) + + +def _common_base(a: pytypes.PyType, b: pytypes.PyType, location: SourceLocation) -> pytypes.PyType: + if a <= b: + return a + elif b < a: + return b + else: + raise CodeError("type mismatch", location) diff --git a/src/puyapy/awst_build/eb/contracts.py b/src/puyapy/awst_build/eb/contracts.py index 09be186c6b..84632285dd 100644 --- a/src/puyapy/awst_build/eb/contracts.py +++ b/src/puyapy/awst_build/eb/contracts.py @@ -126,7 +126,7 @@ def _builder_for_storage_access( if not isinstance(typ, pytypes.StorageProxyType | pytypes.StorageMapProxyType): app_global_expr = AppStateExpression( key=key, - wtype=typ.wtype, + wtype=typ.checked_wtype(location), exists_assertion_message=f"check self.{member_name} exists", source_location=location, ) diff --git a/src/puyapy/awst_build/eb/intrinsics.py b/src/puyapy/awst_build/eb/intrinsics.py index 688be86982..f6fd1450ab 100644 --- a/src/puyapy/awst_build/eb/intrinsics.py +++ b/src/puyapy/awst_build/eb/intrinsics.py @@ -91,7 +91,7 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: intrinsic_expr = IntrinsicCall( op_code=mapping.op_code, immediates=[mapping.immediate], - wtype=mapping.typ.wtype, + wtype=mapping.wtype, source_location=location, ) return builder_for_instance(mapping.typ, intrinsic_expr) @@ -189,7 +189,7 @@ def _map_call( stack_args.append(expect.argument_of_type_else_dummy(arg_in, *allowed_pytypes)) return IntrinsicCall( op_code=op_mapping.op_code, - wtype=ast_mapper.result.wtype, + wtype=ast_mapper.result_wtype, immediates=typing.cast(list[str | int], immediates), stack_args=[a.resolve() for a in stack_args], source_location=location, diff --git a/src/puyapy/awst_build/eb/log.py b/src/puyapy/awst_build/eb/log.py index 8837f960e2..2b08581d62 100644 --- a/src/puyapy/awst_build/eb/log.py +++ b/src/puyapy/awst_build/eb/log.py @@ -35,7 +35,7 @@ def call( sep = empty_utf8 else: sep_arg = args.pop(sep_index) - if isinstance(sep_arg, InstanceBuilder) and sep_arg.pytype in ( + if isinstance(sep_arg, InstanceBuilder) and sep_arg.pytype.is_type_or_subtype( pytypes.StringType, pytypes.StrLiteralType, pytypes.BytesType, @@ -51,7 +51,7 @@ def call( if not isinstance(arg, InstanceBuilder): expect.not_this_type(arg, default=expect.default_none) else: - if arg.pytype == pytypes.IntLiteralType: + if arg.pytype == pytypes.IntLiteralType: # match int exactly, ie exclude bool arg = arg.resolve_literal(UInt64TypeBuilder(arg.source_location)) # TODO: make to_bytes non-throwing bytes_expr = arg.to_bytes(arg.source_location) diff --git a/src/puyapy/awst_build/eb/reference_types/_base.py b/src/puyapy/awst_build/eb/reference_types/_base.py index 5d3b172444..5695531b29 100644 --- a/src/puyapy/awst_build/eb/reference_types/_base.py +++ b/src/puyapy/awst_build/eb/reference_types/_base.py @@ -33,16 +33,16 @@ def __init__( expr: Expression, *, typ: pytypes.PyType, - native_type: pytypes.PyType, + native_type: pytypes.RuntimeType, native_access_member: str, - field_mapping: Mapping[str, tuple[str, pytypes.PyType]], + field_mapping: Mapping[str, tuple[str, pytypes.RuntimeType]], field_op_code: str, field_bool_comment: str, ): super().__init__(typ, expr) self.native_type = native_type self.native_access_member = native_access_member - self.field_mapping = immutabledict[str, tuple[str, pytypes.PyType]](field_mapping) + self.field_mapping = immutabledict[str, tuple[str, pytypes.RuntimeType]](field_mapping) self.field_op_code = field_op_code self.field_bool_comment = field_bool_comment @@ -75,7 +75,7 @@ def __init__( typ: pytypes.PyType, typ_literal_converter: Callable[[SourceLocation], TypeBuilder], native_access_member: str, - field_mapping: Mapping[str, tuple[str, pytypes.PyType]], + field_mapping: Mapping[str, tuple[str, pytypes.RuntimeType]], field_op_code: str, field_bool_comment: str, ): diff --git a/src/puyapy/awst_build/eb/reference_types/account.py b/src/puyapy/awst_build/eb/reference_types/account.py index 260787dd07..81af957181 100644 --- a/src/puyapy/awst_build/eb/reference_types/account.py +++ b/src/puyapy/awst_build/eb/reference_types/account.py @@ -154,7 +154,7 @@ def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = other.resolve_literal(converter=AccountTypeBuilder(other.source_location)) - return compare_bytes(lhs=self, op=op, rhs=other, source_location=location) + return compare_bytes(self=self, op=op, other=other, source_location=location) class _IsOptedIn(FunctionBuilder): @@ -171,32 +171,29 @@ def call( location: SourceLocation, ) -> InstanceBuilder: arg = expect.exactly_one_arg(args, location, default=expect.default_none) - match arg: - case None: - return dummy_value(pytypes.BoolType, location) - case InstanceBuilder(pytype=pytypes.AssetType): - return BoolExpressionBuilder( - TupleItemExpression( - base=IntrinsicCall( - op_code="asset_holding_get", - immediates=["AssetBalance"], - stack_args=[self.expr, arg.resolve()], - wtype=wtypes.WTuple( - (wtypes.uint64_wtype, wtypes.bool_wtype), location - ), - source_location=location, - ), - index=1, - source_location=location, - ) - ) - case _: - arg = expect.argument_of_type_else_dummy(arg, pytypes.ApplicationType) - return BoolExpressionBuilder( - IntrinsicCall( - op_code="app_opted_in", + if arg is None: + return dummy_value(pytypes.BoolType, location) + elif pytypes.AssetType <= arg.pytype: + return BoolExpressionBuilder( + TupleItemExpression( + base=IntrinsicCall( + op_code="asset_holding_get", + immediates=["AssetBalance"], stack_args=[self.expr, arg.resolve()], + wtype=wtypes.WTuple((wtypes.uint64_wtype, wtypes.bool_wtype), location), source_location=location, - wtype=wtypes.bool_wtype, - ) + ), + index=1, + source_location=location, + ) + ) + else: + arg = expect.argument_of_type_else_dummy(arg, pytypes.ApplicationType) + return BoolExpressionBuilder( + IntrinsicCall( + op_code="app_opted_in", + stack_args=[self.expr, arg.resolve()], + source_location=location, + wtype=wtypes.bool_wtype, ) + ) diff --git a/src/puyapy/awst_build/eb/reference_types/asset.py b/src/puyapy/awst_build/eb/reference_types/asset.py index 2807ba34d3..8b19408e4f 100644 --- a/src/puyapy/awst_build/eb/reference_types/asset.py +++ b/src/puyapy/awst_build/eb/reference_types/asset.py @@ -28,7 +28,7 @@ logger = log.get_logger(__name__) -class AssetTypeBuilder(TypeBuilder): +class AssetTypeBuilder(TypeBuilder[pytypes.RuntimeType]): def __init__(self, location: SourceLocation): super().__init__(pytypes.AssetType, location) diff --git a/src/puyapy/awst_build/eb/storage/_common.py b/src/puyapy/awst_build/eb/storage/_common.py index cf2a83742d..aaecde694c 100644 --- a/src/puyapy/awst_build/eb/storage/_common.py +++ b/src/puyapy/awst_build/eb/storage/_common.py @@ -90,10 +90,9 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: @typing.override def index(self, index: InstanceBuilder, location: SourceLocation) -> InstanceBuilder: - if self.pytype != pytypes.BytesType: - return super().index(index, location) - else: + if pytypes.BytesType <= self.pytype: return index_box_bytes(self.resolve(), index, location) + return super().index(index, location) @typing.override def slice_index( @@ -103,10 +102,9 @@ def slice_index( stride: InstanceBuilder | None, location: SourceLocation, ) -> InstanceBuilder: - if self.pytype != pytypes.BytesType: - return super().slice_index(begin_index, end_index, stride, location) - else: + if pytypes.BytesType <= self.pytype: return slice_box_bytes(self.resolve(), begin_index, end_index, stride, location) + return super().slice_index(begin_index, end_index, stride, location) class _ValueBytes(ValueProxyExpressionBuilder): diff --git a/src/puyapy/awst_build/eb/storage/_storage.py b/src/puyapy/awst_build/eb/storage/_storage.py index 7042ceaba7..393f269fb7 100644 --- a/src/puyapy/awst_build/eb/storage/_storage.py +++ b/src/puyapy/awst_build/eb/storage/_storage.py @@ -168,7 +168,7 @@ def extract_key_override( ) -> Expression | None: if key_arg is None: return None - elif isinstance(key_arg, InstanceBuilder) and key_arg.pytype in ( + if isinstance(key_arg, InstanceBuilder) and key_arg.pytype.is_type_or_subtype( pytypes.StringType, pytypes.StrLiteralType, pytypes.BytesType, diff --git a/src/puyapy/awst_build/eb/storage/box.py b/src/puyapy/awst_build/eb/storage/box.py index e00b9fdd75..d1df4c65f8 100644 --- a/src/puyapy/awst_build/eb/storage/box.py +++ b/src/puyapy/awst_build/eb/storage/box.py @@ -128,7 +128,7 @@ def _box_key_expr(self, location: SourceLocation) -> BoxValueExpression: exists_assertion_message = "check Box exists" return BoxValueExpression( key=self.resolve(), - wtype=self.pytype.content.wtype, + wtype=self.pytype.content_wtype, exists_assertion_message=exists_assertion_message, source_location=location, ) diff --git a/src/puyapy/awst_build/eb/storage/box_map.py b/src/puyapy/awst_build/eb/storage/box_map.py index 2aa033dcfb..b140704b20 100644 --- a/src/puyapy/awst_build/eb/storage/box_map.py +++ b/src/puyapy/awst_build/eb/storage/box_map.py @@ -107,7 +107,7 @@ def _init( location=location, ) # the type of the key is not retained in the AWST, so to - wtypes.validate_persistable(key.wtype, location) + wtypes.validate_persistable(result_type.key_wtype, location) typed_args = parse_storage_proxy_constructor_args( arg_mapping, @@ -136,7 +136,6 @@ def _build_box_value( ) -> BoxValueExpression: key_data = key.to_bytes(location) key_prefix = self.resolve() - content_wtype = self.pytype.content.wtype full_key = intrinsic_factory.concat( key_prefix, key_data, location, result_type=wtypes.box_key ) @@ -146,7 +145,7 @@ def _build_box_value( exists_assertion_message = "check BoxMap entry exists" return BoxValueExpression( key=full_key, - wtype=content_wtype, + wtype=self.pytype.content_wtype, exists_assertion_message=exists_assertion_message, source_location=location, ) diff --git a/src/puyapy/awst_build/eb/storage/box_ref.py b/src/puyapy/awst_build/eb/storage/box_ref.py index c138be42c0..93c1b28d31 100644 --- a/src/puyapy/awst_build/eb/storage/box_ref.py +++ b/src/puyapy/awst_build/eb/storage/box_ref.py @@ -185,7 +185,7 @@ def __init__( box_proxy: Expression, op_code: str, args: dict[str, pytypes.PyType], - return_type: pytypes.PyType, + return_type: pytypes.RuntimeType, ) -> None: super().__init__(location) self.box_proxy = box_proxy diff --git a/src/puyapy/awst_build/eb/storage/global_state.py b/src/puyapy/awst_build/eb/storage/global_state.py index 5b931e31ca..562f666826 100644 --- a/src/puyapy/awst_build/eb/storage/global_state.py +++ b/src/puyapy/awst_build/eb/storage/global_state.py @@ -99,20 +99,22 @@ def _init( match arg_mapping[type_or_value_arg_name]: case NodeBuilder(pytype=pytypes.TypeType(typ=content)): iv_builder = None + if result_type is None: + result_type = pytypes.GenericGlobalStateType.parameterise([content], location) + elif result_type.content != content: + logger.error( + "explicit type annotation does not match first argument" + " - suggest to remove the explicit type annotation, it shouldn't be required", + location=location, + ) + case value_arg if result_type is not None: + iv_builder = expect.argument_of_type_else_dummy(value_arg, result_type.content) case InstanceBuilder(pytype=content) as iv_builder: - pass + result_type = pytypes.GenericGlobalStateType.parameterise([content], location) case _: raise CodeError( "first argument must be a type reference or an initial value", location ) - if result_type is None: - result_type = pytypes.GenericGlobalStateType.parameterise([content], location) - elif result_type.content != content: - logger.error( - "explicit type annotation does not match first argument" - " - suggest to remove the explicit type annotation, it shouldn't be required", - location=location, - ) typed_args = parse_storage_proxy_constructor_args( arg_mapping, @@ -173,7 +175,7 @@ def _build_field( exists_assertion_message = "check GlobalState exists" return AppStateExpression( key=self.resolve(), - wtype=self.pytype.content.wtype, + wtype=self.pytype.content_wtype, exists_assertion_message=exists_assertion_message, source_location=location, ) diff --git a/src/puyapy/awst_build/eb/storage/local_state.py b/src/puyapy/awst_build/eb/storage/local_state.py index 92c2697a21..942a3bb0eb 100644 --- a/src/puyapy/awst_build/eb/storage/local_state.py +++ b/src/puyapy/awst_build/eb/storage/local_state.py @@ -205,7 +205,7 @@ def _build_field( return AppAccountStateExpression( key=self.resolve(), account=index_expr, - wtype=self.pytype.content.wtype, + wtype=self.pytype.content_wtype, exists_assertion_message=exists_assertion_message, source_location=location, ) diff --git a/src/puyapy/awst_build/eb/string.py b/src/puyapy/awst_build/eb/string.py index 80911e2797..02b91dace0 100644 --- a/src/puyapy/awst_build/eb/string.py +++ b/src/puyapy/awst_build/eb/string.py @@ -136,7 +136,8 @@ def binary_op( return NotImplemented other = other.resolve_literal(converter=StringTypeBuilder(other.source_location)) - if other.pytype != self.pytype: + # defer to most derived if not equal + if not (other.pytype <= pytypes.StringType): return NotImplemented lhs = self.resolve() @@ -157,7 +158,7 @@ def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = other.resolve_literal(converter=StringTypeBuilder(other.source_location)) - return compare_bytes(lhs=self, op=op, rhs=other, source_location=location) + return compare_bytes(self=self, op=op, other=other, source_location=location) @typing.override def bool_eval(self, location: SourceLocation, *, negate: bool = False) -> InstanceBuilder: diff --git a/src/puyapy/awst_build/eb/struct.py b/src/puyapy/awst_build/eb/struct.py index 9b4c89b09f..d029e789ea 100644 --- a/src/puyapy/awst_build/eb/struct.py +++ b/src/puyapy/awst_build/eb/struct.py @@ -12,7 +12,7 @@ class StructSubclassExpressionBuilder(TypeBuilder[pytypes.StructType]): def __init__(self, typ: pytypes.PyType, location: SourceLocation): assert isinstance(typ, pytypes.StructType) - assert pytypes.StructBaseType in typ.mro + assert pytypes.StructBaseType < typ super().__init__(typ, location) def call( diff --git a/src/puyapy/awst_build/eb/subroutine.py b/src/puyapy/awst_build/eb/subroutine.py index c1b732ed3d..f8e0921c06 100644 --- a/src/puyapy/awst_build/eb/subroutine.py +++ b/src/puyapy/awst_build/eb/subroutine.py @@ -19,7 +19,7 @@ from puyapy.awst_build.eb._utils import dummy_value from puyapy.awst_build.eb.factories import builder_for_instance from puyapy.awst_build.eb.interface import InstanceBuilder, NodeBuilder -from puyapy.awst_build.utils import get_arg_mapping, is_type_or_subtype +from puyapy.awst_build.utils import get_arg_mapping from puyapy.models import ContractFragmentMethod logger = log.get_logger(__name__) @@ -42,7 +42,8 @@ def call( location: SourceLocation, ) -> InstanceBuilder: result_pytyp = self.func_type.ret_type - if isinstance(result_pytyp, pytypes.LiteralOnlyType): + result_wtype = result_pytyp.wtype + if isinstance(result_wtype, str): raise CodeError( f"unsupported return type for user function: {result_pytyp}", location=location ) @@ -107,9 +108,9 @@ def call( return dummy_value(result_pytyp, location) arg = arg_map[arg_map_name] - if pytypes.ContractBaseType in arg_typ.mro: - if not is_type_or_subtype(arg.pytype, of=arg_typ): - expect.not_this_type(arg, default=expect.default_none) + if pytypes.ContractBaseType < arg_typ: + if not (arg_typ <= arg.pytype): + logger.error("unexpected argument type", location=arg.source_location) else: arg = expect.argument_of_type_else_dummy(arg, arg_typ) passed_name = arg_map_name if arg_map_name in arg_names else None @@ -118,7 +119,7 @@ def call( call_expr = SubroutineCallExpression( target=self.target, args=call_args, - wtype=result_pytyp.wtype, + wtype=result_wtype, source_location=location, ) return builder_for_instance(result_pytyp, call_expr) diff --git a/src/puyapy/awst_build/eb/template_variables.py b/src/puyapy/awst_build/eb/template_variables.py index fd35b1148d..70dd9c6856 100644 --- a/src/puyapy/awst_build/eb/template_variables.py +++ b/src/puyapy/awst_build/eb/template_variables.py @@ -70,7 +70,7 @@ def call( result_expr = TemplateVar( name=prefix_value + var_name, - wtype=self.result_type.wtype, + wtype=self.result_type.checked_wtype(location), source_location=location, ) return builder_for_instance(self.result_type, result_expr) diff --git a/src/puyapy/awst_build/eb/transaction/base.py b/src/puyapy/awst_build/eb/transaction/base.py index 5bbb2bc7bb..e69f37a683 100644 --- a/src/puyapy/awst_build/eb/transaction/base.py +++ b/src/puyapy/awst_build/eb/transaction/base.py @@ -24,14 +24,14 @@ def to_bytes(self, location: SourceLocation) -> Expression: @abc.abstractmethod def get_field_value( - self, field: TxnField, typ: pytypes.PyType, location: SourceLocation + self, field: TxnField, typ: pytypes.RuntimeType, location: SourceLocation ) -> InstanceBuilder: ... @abc.abstractmethod def get_array_field_value( self, field: TxnField, - typ: pytypes.PyType, + typ: pytypes.RuntimeType, index: InstanceBuilder, location: SourceLocation, ) -> InstanceBuilder: ... diff --git a/src/puyapy/awst_build/eb/transaction/group.py b/src/puyapy/awst_build/eb/transaction/group.py index 396cf95b69..88e5efb9c8 100644 --- a/src/puyapy/awst_build/eb/transaction/group.py +++ b/src/puyapy/awst_build/eb/transaction/group.py @@ -59,7 +59,7 @@ def call( args, location, default=expect.default_dummy_value(pytypes.UInt64Type) ) typ = self.produces() - if arg.pytype == pytypes.IntLiteralType: + if arg.pytype == pytypes.IntLiteralType: # exact type, exclude bool return arg.resolve_literal(GroupTransactionTypeBuilder(typ, location)) group_index = expect.argument_of_type_else_dummy(arg, pytypes.UInt64Type).resolve() txn = GroupTransactionReference( @@ -75,7 +75,7 @@ def __init__(self, expr: Expression, typ: pytypes.PyType): @typing.override def get_field_value( - self, field: TxnField, typ: pytypes.PyType, location: SourceLocation + self, field: TxnField, typ: pytypes.RuntimeType, location: SourceLocation ) -> InstanceBuilder: assert not field.is_array assert typ.wtype.scalar_type == field.avm_type @@ -92,12 +92,12 @@ def get_field_value( def get_array_field_value( self, field: TxnField, - typ: pytypes.PyType, + typ: pytypes.RuntimeType, index: InstanceBuilder, location: SourceLocation, ) -> InstanceBuilder: assert field.is_array - assert index.pytype == pytypes.UInt64Type + assert pytypes.UInt64Type <= index.pytype assert typ.wtype.scalar_type == field.avm_type expr = IntrinsicCall( op_code="gtxnsas", diff --git a/src/puyapy/awst_build/eb/transaction/inner.py b/src/puyapy/awst_build/eb/transaction/inner.py index 3be6224810..39d6c03605 100644 --- a/src/puyapy/awst_build/eb/transaction/inner.py +++ b/src/puyapy/awst_build/eb/transaction/inner.py @@ -40,7 +40,7 @@ def __init__(self, expr: Expression, typ: pytypes.PyType): @typing.override def get_field_value( - self, field: TxnField, typ: pytypes.PyType, location: SourceLocation + self, field: TxnField, typ: pytypes.RuntimeType, location: SourceLocation ) -> InstanceBuilder: expr = InnerTransactionField( itxn=self.resolve(), @@ -54,11 +54,11 @@ def get_field_value( def get_array_field_value( self, field: TxnField, - typ: pytypes.PyType, + typ: pytypes.RuntimeType, index: InstanceBuilder, location: SourceLocation, ) -> InstanceBuilder: - assert index.pytype == pytypes.UInt64Type + assert pytypes.UInt64Type <= index.pytype expr = InnerTransactionField( itxn=self.resolve(), field=field, @@ -85,14 +85,11 @@ def call( case InstanceBuilder( pytype=pytypes.InnerTransactionFieldsetType(transaction_type=txn_type) ): - pass + arg_exprs.append(arg.resolve()) + arg_result_type = pytypes.InnerTransactionResultTypes[txn_type] + result_types.append(arg_result_type) case other: - txn_type = None expect.not_this_type(other, default=expect.default_raise) - - arg_exprs.append(arg.resolve()) - arg_result_type = pytypes.InnerTransactionResultTypes[txn_type] - result_types.append(arg_result_type) result_typ = pytypes.GenericTupleType.parameterise(result_types, location) return TupleExpressionBuilder( SubmitInnerTransaction(itxns=arg_exprs, source_location=location), diff --git a/src/puyapy/awst_build/eb/transaction/itxn_args.py b/src/puyapy/awst_build/eb/transaction/itxn_args.py index 7084de09a1..e325d1ffba 100644 --- a/src/puyapy/awst_build/eb/transaction/itxn_args.py +++ b/src/puyapy/awst_build/eb/transaction/itxn_args.py @@ -43,7 +43,7 @@ def __attrs_post_init__(self) -> None: if self.array_promote: assert self.field.is_array if self.auto_serialize_bytes: - assert self.type == pytypes.BytesType + assert self.type is pytypes.BytesType assert not self.additional_types assert not self.literal_overrides @@ -75,13 +75,13 @@ def validate_and_convert(self, builder: NodeBuilder) -> InstanceBuilder: def _validate_and_convert_item(self, item: InstanceBuilder) -> InstanceBuilder: if self.field == TxnField.ApplicationArgs: - if item.pytype == pytypes.AccountType: + if pytypes.AccountType <= item.pytype: logger.warning( f"{item.pytype} will not be added to foreign array," f" use .bytes to suppress this warning", location=item.source_location, ) - elif item.pytype in (pytypes.AssetType, pytypes.ApplicationType): + elif item.pytype.is_type_or_subtype(pytypes.AssetType, pytypes.ApplicationType): logger.warning( f"{item.pytype} will not be added to foreign array," f" use .id to suppress this warning", diff --git a/src/puyapy/awst_build/eb/transaction/txn_fields.py b/src/puyapy/awst_build/eb/transaction/txn_fields.py index df63802189..8761c9c893 100644 --- a/src/puyapy/awst_build/eb/transaction/txn_fields.py +++ b/src/puyapy/awst_build/eb/transaction/txn_fields.py @@ -10,7 +10,7 @@ @attrs.frozen class PythonTxnField: field: TxnField - type: pytypes.PyType + type: pytypes.RuntimeType PYTHON_TXN_FIELDS = { diff --git a/src/puyapy/awst_build/eb/tuple.py b/src/puyapy/awst_build/eb/tuple.py index 8739a0c4e5..fd0ac7c1b5 100644 --- a/src/puyapy/awst_build/eb/tuple.py +++ b/src/puyapy/awst_build/eb/tuple.py @@ -81,6 +81,7 @@ def call( location: SourceLocation, ) -> InstanceBuilder: result = _init(args, location) + # equality comparison okay because type constrained to TupleType if result.pytype != self.produces(): raise CodeError("type mismatch between tuple parameters and argument types", location) return result @@ -387,7 +388,7 @@ def slice_index( raise CodeError("empty slices are not supported", location) updated_type = pytypes.GenericTupleType.parameterise(slice_types, location) - updated_wtype = updated_type.wtype + updated_wtype = updated_type.checked_wtype(location) return TupleExpressionBuilder( SliceExpression( source_location=location, diff --git a/src/puyapy/awst_build/eb/uint64.py b/src/puyapy/awst_build/eb/uint64.py index 4dbb7950b3..36ee13d6f8 100644 --- a/src/puyapy/awst_build/eb/uint64.py +++ b/src/puyapy/awst_build/eb/uint64.py @@ -123,7 +123,7 @@ def compare( self, other: InstanceBuilder, op: BuilderComparisonOp, location: SourceLocation ) -> InstanceBuilder: other = _resolve_literal_and_upcast_bool(other) - if not _is_uint64_or_enum_type(other): + if not (pytypes.UInt64Type <= other.pytype): return NotImplemented cmp_expr = NumericComparisonExpression( source_location=location, @@ -146,7 +146,7 @@ def binary_op( if uint64_op is None: return NotImplemented other = _resolve_literal_and_upcast_bool(other) - if not _is_uint64_or_enum_type(other): + if not (pytypes.UInt64Type <= other.pytype): return NotImplemented lhs = self.resolve() @@ -196,22 +196,18 @@ def _translate_uint64_math_operator( def _resolve_literal_and_upcast_bool(other: InstanceBuilder) -> InstanceBuilder: other = other.resolve_literal(converter=UInt64TypeBuilder(other.source_location)) - other = _upcast_bool(other) + if other.pytype == pytypes.BoolType: + return _upcast_bool(other) return other def _upcast_bool( builder: InstanceBuilder, location: SourceLocation | None = None ) -> InstanceBuilder: - if builder.pytype == pytypes.BoolType: - expr = ReinterpretCast( - expr=builder.resolve(), - wtype=wtypes.uint64_wtype, - source_location=location or builder.source_location, - ) - return UInt64ExpressionBuilder(expr) - return builder - - -def _is_uint64_or_enum_type(other: InstanceBuilder) -> bool: - return other.pytype == pytypes.UInt64Type or isinstance(other.pytype, pytypes.UInt64EnumType) + assert builder.pytype == pytypes.BoolType + expr = ReinterpretCast( + expr=builder.resolve(), + wtype=wtypes.uint64_wtype, + source_location=location or builder.source_location, + ) + return UInt64ExpressionBuilder(expr) diff --git a/src/puyapy/awst_build/intrinsic_models.py b/src/puyapy/awst_build/intrinsic_models.py index 06a7dea742..ece3ba0ae8 100644 --- a/src/puyapy/awst_build/intrinsic_models.py +++ b/src/puyapy/awst_build/intrinsic_models.py @@ -7,6 +7,7 @@ from functools import cached_property import attrs +from puya.awst import wtypes from puya.errors import InternalError from puyapy.awst_build import pytypes @@ -19,6 +20,11 @@ class PropertyOpMapping: typ: pytypes.PyType = attrs.field( validator=attrs.validators.not_(attrs.validators.in_([pytypes.NoneType])) ) + wtype: wtypes.WType = attrs.field(init=False) + + @wtype.default + def _wtype(self) -> wtypes.WType: + return self.typ.checked_wtype(location=None) @attrs.frozen @@ -60,7 +66,9 @@ def __attrs_post_init__(self) -> None: raise InternalError( f"intrinsic {self.op_code!r} argument {idx}: no stack input types provided" ) - if pytypes.BigUIntType in arg and pytypes.UInt64Type in arg: + if (pytypes.BigUIntType.is_type_or_supertype(*arg)) and ( + pytypes.UInt64Type.is_type_or_supertype(*arg) + ): raise InternalError( f"intrinsic {self.op_code!r} argument {idx}: overlap in integer types" ) @@ -71,10 +79,15 @@ class OpMappingWithOverloads: arity: int = attrs.field(validator=attrs.validators.ge(0)) result: pytypes.PyType = pytypes.NoneType """Types output by TEAL op""" + result_wtype: wtypes.WType = attrs.field(init=False) overloads: Sequence[FunctionOpMapping] = attrs.field( validator=attrs.validators.min_len(1), converter=tuple[FunctionOpMapping, ...] ) + @result_wtype.default + def _result_wtype(self) -> wtypes.WType: + return self.result.checked_wtype(location=None) + @arity.validator def _arity_matches(self, _attribute: object, arity: int) -> None: if any(len(o.args) != arity for o in self.overloads): diff --git a/src/puyapy/awst_build/module.py b/src/puyapy/awst_build/module.py index d03be6c1b7..b4716e4d5d 100644 --- a/src/puyapy/awst_build/module.py +++ b/src/puyapy/awst_build/module.py @@ -186,23 +186,42 @@ def visit_class_def(self, cdef: mypy.nodes.ClassDef) -> StatementResult: for ti in info.mro[1:] if ti.fullname not in _BUILTIN_INHERITABLE ] + # create a static type, but don't register it yet, + # it might end up being a struct instead + static_type = pytypes.StaticType( + name=cdef.fullname, bases=direct_base_types, mro=mro_types + ) for struct_base in (pytypes.StructBaseType, pytypes.ARC4StructBaseType): # note that since these struct bases aren't protocols, any subclasses # cannot be protocols - if direct_base_types == [struct_base]: + if struct_base < static_type: + if direct_base_types != [struct_base]: + self._error( + f"{struct_base} classes must only inherit directly from {struct_base}", + cdef_loc, + ) return _process_struct(self.context, struct_base, cdef) - if struct_base in mro_types: - self._error( - f"{struct_base} classes must only inherit directly from {struct_base}", - cdef_loc, - ) - return [] - if info.is_protocol: - protocol_type = pytypes.StaticType( - name=cdef.fullname, bases=direct_base_types, mro=mro_types + if pytypes.ContractBaseType < static_type: + module_name = cdef.info.module_name + class_name = cdef.name + assert "." not in class_name + assert cdef.fullname == f"{module_name}.{class_name}" + contract_type = pytypes.ContractType( + module_name=module_name, + class_name=class_name, + bases=direct_base_types, + mro=mro_types, + source_location=cdef_loc, ) - self.context.register_pytype(protocol_type) + self.context.register_pytype(contract_type) + + class_options = _process_contract_class_options(self.context, self, cdef) + converter = ContractASTConverter(self.context, cdef, class_options, contract_type) + return [converter.build] + + if info.is_protocol: + self.context.register_pytype(static_type) if pytypes.ARC4ClientBaseType in direct_base_types: ARC4ClientASTVisitor.visit(self.context, cdef) else: @@ -212,31 +231,13 @@ def visit_class_def(self, cdef: mypy.nodes.ClassDef) -> StatementResult: ) return [] - if pytypes.ContractBaseType not in mro_types: - logger.error( - f"Unsupported class declaration." - f" Contract classes must inherit either directly" - f" or indirectly from {pytypes.ContractBaseType}.", - location=cdef_loc, - ) - return [] - - module_name = cdef.info.module_name - class_name = cdef.name - assert "." not in class_name - assert cdef.fullname == f"{module_name}.{class_name}" - contract_type = pytypes.ContractType( - module_name=module_name, - class_name=class_name, - bases=direct_base_types, - mro=mro_types, - source_location=cdef_loc, + logger.error( + f"Unsupported class declaration." + f" Contract classes must inherit either directly" + f" or indirectly from {pytypes.ContractBaseType}.", + location=cdef_loc, ) - self.context.register_pytype(contract_type) - - class_options = _process_contract_class_options(self.context, self, cdef) - converter = ContractASTConverter(self.context, cdef, class_options, contract_type) - return [converter.build] + return [] def visit_operator_assignment_stmt( self, stmt: mypy.nodes.OperatorAssignmentStmt @@ -650,9 +651,11 @@ def _process_dataclass_like_fields( rvalue=mypy.nodes.TempNode(), type=mypy.types.Type() as mypy_type, ): - pytype = context.type_to_pytype(mypy_type, source_location=stmt_loc) fields[field_name] = pytype + if isinstance((maybe_err := pytype.wtype), str): + logger.error(maybe_err, location=stmt_loc) + has_error = True case mypy.nodes.SymbolNode(name=symbol_name) if ( cdef.info.names[symbol_name].plugin_generated ): diff --git a/src/puyapy/awst_build/pytypes.py b/src/puyapy/awst_build/pytypes.py index 2c4cc7f010..d7ca6f9544 100644 --- a/src/puyapy/awst_build/pytypes.py +++ b/src/puyapy/awst_build/pytypes.py @@ -28,7 +28,10 @@ logger = log.get_logger(__name__) -@attrs.frozen(kw_only=True, str=False) +ErrorMessage = typing.NewType("ErrorMessage", str) + + +@attrs.frozen(kw_only=True, str=False, order=False) class PyType(abc.ABC): name: str """The canonical fully qualified type name""" @@ -72,9 +75,18 @@ def __str__(self) -> str: @property @abc.abstractmethod - def wtype(self) -> wtypes.WType: + def wtype(self) -> wtypes.WType | ErrorMessage: """The WType that this type represents, if any.""" + def checked_wtype(self, location: SourceLocation | None) -> wtypes.WType: + match self.wtype: + case wtypes.WType() as wtype: + return wtype + case str(msg): + raise CodeError(msg, location) + case _: + typing.assert_never(self.wtype) + def parameterise( self, args: Sequence[PyType], # noqa: ARG002 @@ -83,8 +95,46 @@ def parameterise( """Produce parameterised type. Throws if not a generic type of if a parameterised generic type.""" if self.generic: - raise CodeError(f"Type already has parameters: {self}", source_location) - raise CodeError(f"Not a generic type: {self}", source_location) + raise CodeError(f"type already has parameters: {self}", source_location) + raise CodeError(f"not a generic type: {self}", source_location) + + @typing.final + def __lt__(self, other: object) -> bool: + if not isinstance(other, PyType): + return NotImplemented + # self < other -> self is a supertype of other + return self in other.mro + + @typing.final + def __le__(self, other: object) -> bool: + if not isinstance(other, PyType): + return NotImplemented + return self == other or self < other + + @typing.final + def __gt__(self, other: object) -> bool: + if not isinstance(other, PyType): + return NotImplemented + raise TypeError("types are partial ordered") + + @typing.final + def __ge__(self, other: object) -> bool: + if not isinstance(other, PyType): + return NotImplemented + raise TypeError("types are partial ordered") + + def is_type_or_subtype(self, *of_any: PyType) -> bool: + return any(of <= self for of in of_any) + + def is_type_or_supertype(self, *of_any: PyType) -> bool: + return any(self <= of for of in of_any) + + +class RuntimeType(PyType, abc.ABC): + @typing.override + @property + @abc.abstractmethod + def wtype(self) -> wtypes.WType: ... _builtins_registry: typing.Final = dict[str, PyType]() @@ -126,7 +176,7 @@ def builtins_registry() -> dict[str, PyType]: @typing.final -@attrs.frozen +@attrs.frozen(order=False) class _GenericType(PyType, abc.ABC, typing.Generic[_TPyType]): """Represents a typing.Generic type with unknown parameters""" @@ -138,8 +188,8 @@ def __attrs_post_init__(self) -> None: @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError("Generic type usage requires parameters") + def wtype(self) -> ErrorMessage: + return ErrorMessage("generic type usage requires parameters") @typing.override def parameterise( @@ -159,7 +209,7 @@ def _parameterise_type_type( (arg,) = args except ValueError: raise CodeError( - f"Expected a single type parameter, got {len(args)} parameters", source_location + f"expected a single type parameter, got {len(args)} parameters", source_location ) from None return TypeType(typ=arg) @@ -171,7 +221,7 @@ def _parameterise_type_type( @typing.final -@attrs.frozen +@attrs.frozen(order=False) class TypeType(PyType): typ: PyType generic: PyType = attrs.field(default=GenericTypeType, init=False) @@ -183,12 +233,12 @@ def _name_default(self) -> str: @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError("type objects are not usable as values") + def wtype(self) -> ErrorMessage: + return ErrorMessage("type objects are not usable as values") @typing.final -@attrs.frozen +@attrs.frozen(order=False) class TypingLiteralType(PyType): value: TypingLiteralValue source_location: SourceLocation | None @@ -203,8 +253,8 @@ def _name_default(self) -> str: @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError(f"{self} is not usable as a value", self.source_location) + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"{self} is not usable as a value") def _flatten_nested_unions(types: Sequence[PyType]) -> tuple[PyType, ...]: @@ -218,7 +268,7 @@ def _flatten_nested_unions(types: Sequence[PyType]) -> tuple[PyType, ...]: @typing.final -@attrs.frozen +@attrs.frozen(order=False) class UnionType(PyType): types: tuple[PyType, ...] = attrs.field( converter=_flatten_nested_unions, validator=attrs.validators.min_len(2) @@ -235,24 +285,24 @@ def _name(self) -> str: @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError("type unions are unsupported at this location", self.source_location) + def wtype(self) -> ErrorMessage: + return ErrorMessage("type unions are unsupported at this location") -@attrs.frozen +@attrs.frozen(order=False) class _BaseType(PyType): """Type that is only usable as a base type""" @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError(f"{self} is only usable as a base type") + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"{self} is only usable as a base type") def __attrs_post_init__(self) -> None: _register_builtin(self) -@attrs.frozen +@attrs.frozen(kw_only=True, order=False) class TupleLikeType(PyType, abc.ABC): items: tuple[PyType, ...] source_location: SourceLocation | None @@ -271,16 +321,25 @@ def _parameterise_tuple( ) -@attrs.frozen(kw_only=True) +@attrs.frozen(kw_only=True, order=False) class TupleType(TupleLikeType): generic: PyType | None = attrs.field(default=GenericTupleType, init=False) bases: tuple[PyType, ...] = attrs.field(default=(), init=False) mro: tuple[PyType, ...] = attrs.field(default=(), init=False) @property - def wtype(self) -> wtypes.WTuple: + def wtype(self) -> wtypes.WTuple | ErrorMessage: + item_wtypes = [] + for i in self.items: + match i.wtype: + case wtypes.WType() as wtype: + item_wtypes.append(wtype) + case ErrorMessage() as err: + return err + case other: + typing.assert_never(other) return wtypes.WTuple( - types=(i.wtype for i in self.items), + types=item_wtypes, source_location=self.source_location, ) @@ -288,51 +347,64 @@ def wtype(self) -> wtypes.WTuple: NamedTupleBaseType: typing.Final[PyType] = _BaseType(name="typing.NamedTuple") -@attrs.frozen -class NamedTupleType(TupleType): +@attrs.frozen(kw_only=True, order=False) +class NamedTupleType(TupleType, RuntimeType): fields: immutabledict[str, PyType] = attrs.field(converter=immutabledict) items: tuple[PyType, ...] = attrs.field(init=False) generic: None = attrs.field(default=None, init=False) bases: tuple[PyType, ...] = attrs.field(default=(NamedTupleBaseType,), init=False) mro: tuple[PyType, ...] = attrs.field(default=(NamedTupleBaseType,), init=False) + wtype: wtypes.WTuple = attrs.field(init=False) @items.default def _items(self) -> tuple[PyType, ...]: return tuple(self.fields.values()) - @typing.override - @property - def wtype(self) -> wtypes.WTuple: - return wtypes.WTuple( + @wtype.default + def _wtype(self) -> wtypes.WTuple: + unnamed_type = super().wtype + if isinstance(unnamed_type, str): + raise CodeError(unnamed_type, self.source_location) + return attrs.evolve( + unnamed_type, name=self.name, - types=(i.wtype for i in self.items), names=tuple(self.fields), - source_location=self.source_location, ) -@typing.final -@attrs.frozen -class ArrayType(PyType): +@attrs.frozen(order=False) +class SequenceType(PyType, abc.ABC): items: PyType + + +@typing.final +@attrs.frozen(order=False) +class ArrayType(SequenceType, RuntimeType): size: int | None wtype: wtypes.WType + # convenience accessors + items_wtype: wtypes.WType @typing.final -@attrs.frozen -class StorageProxyType(PyType): +@attrs.frozen(order=False) +class StorageProxyType(RuntimeType): content: PyType wtype: wtypes.WType + # convenience accessors + content_wtype: wtypes.WType @typing.final -@attrs.frozen -class StorageMapProxyType(PyType): +@attrs.frozen(order=False) +class StorageMapProxyType(RuntimeType): generic: PyType key: PyType content: PyType wtype: wtypes.WType + # convenience accessors + key_wtype: wtypes.WType + content_wtype: wtypes.WType @typing.final @@ -344,7 +416,7 @@ class FuncArg: @typing.final -@attrs.frozen(kw_only=True) +@attrs.frozen(kw_only=True, order=False) class FuncType(PyType): ret_type: PyType args: tuple[FuncArg, ...] = attrs.field(converter=tuple[FuncArg, ...]) @@ -355,21 +427,21 @@ class FuncType(PyType): @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError("function objects are not usable as values") + def wtype(self) -> ErrorMessage: + return ErrorMessage("function objects are not usable as values") @typing.final -@attrs.frozen +@attrs.frozen(order=False) class StaticType(PyType): @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError(f"{self} is only usable as a type and cannot be instantiated") + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"{self} is only usable as a type and cannot be instantiated") @typing.final -@attrs.frozen(kw_only=True) +@attrs.frozen(kw_only=True, order=False) class ContractType(PyType): generic: None = attrs.field(default=None, init=False) module_name: str @@ -383,16 +455,16 @@ def _name(self) -> ContractReference: @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError(f"{self} is only usable as a type and cannot be instantiated") + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"{self} is only usable as a type and cannot be instantiated") ObjectType: typing.Final[PyType] = _register_builtin(StaticType(name="builtins.object")) @typing.final -@attrs.frozen(init=False) -class StructType(PyType): +@attrs.frozen(init=False, order=False) +class StructType(RuntimeType): fields: immutabledict[str, PyType] = attrs.field( converter=immutabledict, validator=[attrs.validators.min_len(1)] ) @@ -418,8 +490,9 @@ def __init__( frozen: bool, source_location: SourceLocation | None, ): - field_wtypes = {name: field_typ.wtype for name, field_typ in fields.items()} - # TODO: this is a bit of a kludge + field_wtypes = { + name: field_typ.checked_wtype(source_location) for name, field_typ in fields.items() + } # TODO: this is a bit of a kludge wtype_cls: type[wtypes.ARC4Struct | wtypes.WStructType] if base is ARC4StructBaseType: wtype_cls = wtypes.ARC4Struct @@ -442,8 +515,8 @@ def __init__( @typing.final -@attrs.frozen -class _SimpleType(PyType): +@attrs.frozen(order=False) +class _SimpleType(RuntimeType): wtype: wtypes.WType def __attrs_post_init__(self) -> None: @@ -451,7 +524,7 @@ def __attrs_post_init__(self) -> None: @typing.final -@attrs.frozen +@attrs.frozen(order=False) class LiteralOnlyType(PyType): python_type: type[int | bytes | str] name: str = attrs.field(init=False) @@ -462,49 +535,54 @@ def _name(self) -> str: @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError(f"Python literals of type {self} cannot be used as runtime values") + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"Python literals of type {self} cannot be used as runtime values") -NoneType: typing.Final[PyType] = _SimpleType(name="types.NoneType", wtype=wtypes.void_wtype) +NoneType: typing.Final[RuntimeType] = _SimpleType(name="types.NoneType", wtype=wtypes.void_wtype) NeverType: typing.Final[PyType] = _SimpleType(name="typing.Never", wtype=wtypes.void_wtype) -BoolType: typing.Final[PyType] = _SimpleType(name="builtins.bool", wtype=wtypes.bool_wtype) IntLiteralType: typing.Final = _register_builtin(LiteralOnlyType(int)) StrLiteralType: typing.Final = _register_builtin(LiteralOnlyType(str)) BytesLiteralType: typing.Final = _register_builtin(LiteralOnlyType(bytes)) +BoolType: typing.Final[RuntimeType] = _SimpleType( + name="builtins.bool", + wtype=wtypes.bool_wtype, + bases=[IntLiteralType], + mro=[IntLiteralType], +) -UInt64Type: typing.Final[PyType] = _SimpleType( +UInt64Type: typing.Final[RuntimeType] = _SimpleType( name="algopy._primitives.UInt64", wtype=wtypes.uint64_wtype, ) -BigUIntType: typing.Final[PyType] = _SimpleType( +BigUIntType: typing.Final[RuntimeType] = _SimpleType( name="algopy._primitives.BigUInt", wtype=wtypes.biguint_wtype, ) -BytesType: typing.Final[PyType] = _SimpleType( +BytesType: typing.Final[RuntimeType] = _SimpleType( name="algopy._primitives.Bytes", wtype=wtypes.bytes_wtype, ) -StringType: typing.Final[PyType] = _SimpleType( +StringType: typing.Final[RuntimeType] = _SimpleType( name="algopy._primitives.String", wtype=wtypes.string_wtype, ) -AccountType: typing.Final[PyType] = _SimpleType( +AccountType: typing.Final[RuntimeType] = _SimpleType( name="algopy._reference.Account", wtype=wtypes.account_wtype, ) -AssetType: typing.Final[PyType] = _SimpleType( +AssetType: typing.Final[RuntimeType] = _SimpleType( name="algopy._reference.Asset", wtype=wtypes.asset_wtype, ) -ApplicationType: typing.Final[PyType] = _SimpleType( +ApplicationType: typing.Final[RuntimeType] = _SimpleType( name="algopy._reference.Application", wtype=wtypes.application_wtype, ) -@attrs.frozen(init=False) -class UInt64EnumType(PyType): +@attrs.frozen(init=False, order=False) +class UInt64EnumType(RuntimeType): def __init__(self, name: str): self.__attrs_init__( name=name, @@ -528,21 +606,21 @@ def wtype(self) -> wtypes.WType: name="algopy._util.OpUpFeeSource", ) -ARC4StringType: typing.Final[PyType] = _SimpleType( +ARC4StringType: typing.Final[RuntimeType] = _SimpleType( name="algopy.arc4.String", wtype=wtypes.arc4_string_alias, ) -ARC4BoolType: typing.Final[PyType] = _SimpleType( +ARC4BoolType: typing.Final[RuntimeType] = _SimpleType( name="algopy.arc4.Bool", wtype=wtypes.arc4_bool_wtype, ) -@attrs.frozen -class ARC4UIntNType(PyType): +@attrs.frozen(order=False) +class ARC4UIntNType(RuntimeType): bits: int wtype: wtypes.ARC4UIntN - native_type: PyType + native_type: RuntimeType def _require_int_literal( @@ -565,7 +643,7 @@ def _require_int_literal( def _make_arc4_unsigned_int_parameterise( - *, native_type: PyType, max_bits: int | None = None + *, native_type: RuntimeType, max_bits: int | None = None ) -> _Parameterise: def parameterise( self: _GenericType, args: _TypeArgs, source_location: SourceLocation | None @@ -574,11 +652,11 @@ def parameterise( (bits_t,) = args except ValueError: raise CodeError( - f"Expected a single type parameter, got {len(args)} parameters", source_location + f"expected a single type parameter, got {len(args)} parameters", source_location ) from None bits = _require_int_literal(self, bits_t, source_location) if (max_bits is not None) and bits > max_bits: - raise CodeError(f"Max bit size of {self} is {max_bits}, got {bits}", source_location) + raise CodeError(f"max bit size of {self} is {max_bits}, got {bits}", source_location) name = f"{self.name}[{bits_t.name}]" return ARC4UIntNType( @@ -626,8 +704,8 @@ def parameterise( ) -@attrs.frozen -class ARC4UFixedNxMType(PyType): +@attrs.frozen(order=False) +class ARC4UFixedNxMType(RuntimeType): generic: _GenericType bits: int precision: int @@ -642,14 +720,14 @@ def parameterise( bits_t, precision_t = args except ValueError: raise CodeError( - f"Expected two type parameters, got {len(args)} parameters", source_location + f"expected two type parameters, got {len(args)} parameters", source_location ) from None bits = _require_int_literal(self, bits_t, source_location, position_qualifier="first") precision = _require_int_literal( self, precision_t, source_location, position_qualifier="second" ) if (max_bits is not None) and bits > max_bits: - raise CodeError(f"Max bit size of {self} is {max_bits}, got {bits}", source_location) + raise CodeError(f"max bit size of {self} is {max_bits}, got {bits}", source_location) name = f"{self.name}[{bits_t.name}, {precision_t.name}]" return ARC4UFixedNxMType( @@ -673,31 +751,14 @@ def parameterise( ) -@typing.final -@attrs.frozen(kw_only=True) -class ARC4TupleType(TupleLikeType): - generic: PyType - bases: tuple[PyType, ...] = attrs.field(default=(), init=False) - mro: tuple[PyType, ...] = attrs.field(default=(), init=False) - - @property - def wtype(self) -> wtypes.ARC4Tuple: - return wtypes.ARC4Tuple( - types=(i.wtype for i in self.items), - source_location=self.source_location, - ) - - def _parameterise_arc4_tuple( - self: _GenericType[ARC4TupleType], args: _TypeArgs, source_location: SourceLocation | None + self: _GenericType[ARC4TupleType], # noqa: ARG001 + args: _TypeArgs, + source_location: SourceLocation | None, ) -> ARC4TupleType: - name = f"{self.name}[{', '.join(pyt.name for pyt in args)}]" - return ARC4TupleType( - generic=self, - name=name, - items=tuple(args), - source_location=source_location, - ) + item_wtypes = tuple(arg.checked_wtype(source_location) for arg in args) + wtype = wtypes.ARC4Tuple(types=item_wtypes, source_location=source_location) + return ARC4TupleType(items=tuple(args), wtype=wtype, source_location=source_location) GenericARC4TupleType: typing.Final = _GenericType( @@ -705,6 +766,21 @@ def _parameterise_arc4_tuple( parameterise=_parameterise_arc4_tuple, ) + +@typing.final +@attrs.frozen(kw_only=True, order=False) +class ARC4TupleType(TupleLikeType, RuntimeType): + generic: _GenericType = attrs.field(default=GenericARC4TupleType, init=False) + name: str = attrs.field(init=False) + bases: tuple[PyType, ...] = attrs.field(default=(), init=False) + mro: tuple[PyType, ...] = attrs.field(default=(), init=False) + wtype: wtypes.ARC4Tuple + + @name.default + def _name(self) -> str: + return f"{self.generic.name}[{', '.join(pyt.name for pyt in self.items)}]" + + CompiledContractType: typing.Final = _register_builtin( NamedTupleType( name="algopy._compiled.CompiledContract", @@ -732,8 +808,8 @@ def _parameterise_arc4_tuple( @typing.final -@attrs.frozen -class VariadicTupleType(PyType): +@attrs.frozen(order=False) +class VariadicTupleType(SequenceType): items: PyType generic: _GenericType = attrs.field(default=GenericTupleType, init=False) bases: tuple[PyType, ...] = attrs.field(default=(), init=False) @@ -746,8 +822,8 @@ def _name_factory(self) -> str: @typing.override @property - def wtype(self) -> typing.Never: - raise CodeError("variadic tuples cannot be used as runtime values") + def wtype(self) -> ErrorMessage: + return ErrorMessage("variadic tuples cannot be used as runtime values") def _make_array_parameterise( @@ -760,15 +836,18 @@ def parameterise( (arg,) = args except ValueError: raise CodeError( - f"Expected a single type parameter, got {len(args)} parameters", source_location + f"expected a single type parameter, got {len(args)} parameters", source_location ) from None name = f"{self.name}[{arg.name}]" + items_wtype = arg.checked_wtype(source_location) + return ArrayType( generic=self, name=name, size=None, items=arg, - wtype=typ(element_type=arg.wtype, source_location=source_location), + wtype=typ(element_type=items_wtype, source_location=source_location), + items_wtype=items_wtype, ) return parameterise @@ -793,6 +872,7 @@ def parameterise( ), size=None, items=ARC4ByteType, + items_wtype=ARC4ByteType.wtype, bases=[GenericARC4DynamicArrayType.parameterise([ARC4ByteType], source_location=None)], mro=[GenericARC4DynamicArrayType.parameterise([ARC4ByteType], source_location=None)], ) @@ -806,21 +886,24 @@ def _parameterise_arc4_static_array( items, size_t = args except ValueError: raise CodeError( - f"Expected a single type parameter, got {len(args)} parameters", source_location + f"expected a single type parameter, got {len(args)} parameters", source_location ) from None size = _require_int_literal(self, size_t, source_location, position_qualifier="second") if size < 0: - raise CodeError("Array size should be non-negative", source_location) + raise CodeError("array size should be non-negative", source_location) name = f"{self.name}[{items.name}, {size_t.name}]" + items_wtype = items.checked_wtype(source_location) + return ArrayType( generic=self, name=name, size=size, items=items, wtype=wtypes.ARC4StaticArray( - element_type=items.wtype, array_size=size, source_location=source_location + element_type=items_wtype, array_size=size, source_location=source_location ), + items_wtype=items_wtype, ) @@ -835,6 +918,7 @@ def _parameterise_arc4_static_array( size=32, generic=None, items=ARC4ByteType, + items_wtype=ARC4ByteType.wtype, bases=[ GenericARC4StaticArrayType.parameterise( [ARC4ByteType, TypingLiteralType(value=32, source_location=None)], @@ -851,7 +935,7 @@ def _parameterise_arc4_static_array( ) -def _make_storage_parameterise(key_wtype: wtypes.WType) -> _Parameterise[StorageProxyType]: +def _make_storage_parameterise(wtype: wtypes.WType) -> _Parameterise[StorageProxyType]: def parameterise( self: _GenericType[StorageProxyType], args: _TypeArgs, @@ -861,14 +945,16 @@ def parameterise( (arg,) = args except ValueError: raise CodeError( - f"Expected a single type parameter, got {len(args)} parameters", source_location + f"expected a single type parameter, got {len(args)} parameters", source_location ) from None name = f"{self.name}[{arg.name}]" + content_wtype = arg.checked_wtype(source_location) return StorageProxyType( generic=self, name=name, content=arg, - wtype=key_wtype, + wtype=wtype, + content_wtype=content_wtype, ) return parameterise @@ -883,15 +969,19 @@ def _parameterise_storage_map( key, content = args except ValueError: raise CodeError( - f"Expected two type parameters, got {len(args)} parameters", source_location + f"expected two type parameters, got {len(args)} parameters", source_location ) from None name = f"{self.name}[{key.name}, {content.name}]" + key_wtype = key.checked_wtype(source_location) + content_wtype = content.checked_wtype(source_location) return StorageMapProxyType( generic=self, name=name, key=key, content=content, wtype=wtypes.box_key, + key_wtype=key_wtype, + content_wtype=content_wtype, ) @@ -911,6 +1001,7 @@ def _parameterise_storage_map( StorageProxyType( name="algopy._box.BoxRef", content=BytesType, + content_wtype=BytesType.wtype, wtype=wtypes.box_key, generic=None, ) @@ -922,7 +1013,7 @@ def _parameterise_storage_map( ) -@attrs.frozen +@attrs.frozen(order=False) class TransactionRelatedType(PyType, abc.ABC): transaction_type: TransactionType | None """None implies "any" type, which may be considered as either union or an intersection""" @@ -932,19 +1023,19 @@ def __attrs_post_init__(self) -> None: @typing.final -@attrs.frozen +@attrs.frozen(order=False) class GroupTransactionType(TransactionRelatedType): wtype: wtypes.WGroupTransaction @typing.final -@attrs.frozen +@attrs.frozen(order=False) class InnerTransactionFieldsetType(TransactionRelatedType): wtype: wtypes.WInnerTransactionFields @typing.final -@attrs.frozen +@attrs.frozen(order=False) class InnerTransactionResultType(TransactionRelatedType): wtype: wtypes.WInnerTransaction @@ -1021,15 +1112,15 @@ def _make_itxn_result_type(kind: TransactionType | None) -> InnerTransactionResu ] = {kind: _make_itxn_result_type(kind) for kind in _all_txn_kinds} -@attrs.frozen(kw_only=True) +@attrs.frozen(kw_only=True, order=False) class _CompileTimeType(PyType): _wtype_error: str @typing.override @property - def wtype(self) -> typing.Never: + def wtype(self) -> ErrorMessage: msg = self._wtype_error.format(self=self) - raise CodeError(msg) + return ErrorMessage(msg) def __attrs_post_init__(self) -> None: _register_builtin(self) @@ -1041,7 +1132,7 @@ def __attrs_post_init__(self) -> None: ) -@attrs.frozen(kw_only=True) +@attrs.frozen(kw_only=True, order=False) class IntrinsicEnumType(PyType): generic: None = attrs.field(default=None, init=False) bases: tuple[PyType, ...] = attrs.field( @@ -1052,8 +1143,8 @@ class IntrinsicEnumType(PyType): members: immutabledict[str, str] = attrs.field(converter=immutabledict) @property - def wtype(self) -> wtypes.WType: - raise CodeError(f"{self} is only valid as a literal argument to an algopy.op function") + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"{self} is only valid as a literal argument to an algopy.op function") def _make_intrinsic_enum_types() -> Sequence[IntrinsicEnumType]: @@ -1070,7 +1161,7 @@ def _make_intrinsic_enum_types() -> Sequence[IntrinsicEnumType]: ] -@attrs.frozen(kw_only=True) +@attrs.frozen(kw_only=True, order=False) class IntrinsicNamespaceType(PyType): generic: None = attrs.field(default=None, init=False) bases: tuple[PyType, ...] = attrs.field(default=(), init=False) @@ -1080,8 +1171,8 @@ class IntrinsicNamespaceType(PyType): ) @property - def wtype(self) -> wtypes.WType: - raise CodeError(f"{self} is a namespace type only and not usable at runtime") + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"{self} is a namespace type only and not usable at runtime") def _make_intrinsic_namespace_types() -> Sequence[IntrinsicNamespaceType]: @@ -1148,7 +1239,7 @@ def _parameterise_any_compile_time( @typing.final -@attrs.frozen +@attrs.frozen(order=False) class PseudoGenericFunctionType(PyType): return_type: PyType generic: _GenericType[PseudoGenericFunctionType] @@ -1156,8 +1247,8 @@ class PseudoGenericFunctionType(PyType): mro: tuple[PyType, ...] = attrs.field(default=(), init=False) @property - def wtype(self) -> typing.Never: - raise CodeError(f"{self} is not a value") + def wtype(self) -> ErrorMessage: + return ErrorMessage(f"{self} is not a value") def _parameterise_pseudo_generic_function_type( @@ -1169,7 +1260,7 @@ def _parameterise_pseudo_generic_function_type( (arg,) = args except ValueError: raise CodeError( - f"Expected a single type parameter, got {len(args)} parameters", source_location + f"expected a single type parameter, got {len(args)} parameters", source_location ) from None name = f"{self.name}[{arg.name}]" return PseudoGenericFunctionType(generic=self, name=name, return_type=arg) diff --git a/src/puyapy/awst_build/subroutine.py b/src/puyapy/awst_build/subroutine.py index f5963f3c39..f07ed8b0eb 100644 --- a/src/puyapy/awst_build/subroutine.py +++ b/src/puyapy/awst_build/subroutine.py @@ -104,8 +104,8 @@ def __init__( self.contract_method_info = contract_method_info self.func_def = func_def self._precondition( - func_def.abstract_status == mypy.nodes.NOT_ABSTRACT, - "abstract functions should be skipped at a higher level", + not func_def.is_trivial_body, + "trivial functions should be skipped at a higher level", func_loc, ) type_info = func_def.type @@ -125,14 +125,14 @@ def __init__( self._return_type = self.context.type_to_pytype( type_info.ret_type, source_location=func_loc ) - return_wtype = self._return_type.wtype # check, to prevent further errors + return_wtype = self._return_type.checked_wtype(func_loc) # check & convert the arguments mypy_args = func_def.arguments mypy_arg_types = type_info.arg_types - if func_def.info is not mypy.nodes.FUNC_NO_INFO: # why god why + if type_info.def_extras.get("first_arg"): # function is a method if not mypy_args: - context.error("Method declaration is missing 'self' argument", func_loc) + logger.error("method declaration is missing 'self' argument", location=func_loc) else: self._precondition( mypy_args[0].variable.is_self, @@ -147,7 +147,6 @@ def __init__( "if function is not a method, first variable should be self-like", func_loc, ) - # TODO: this should be more than just type? self._symtable = dict[str, pytypes.PyType]() args = list[SubroutineArgument]() for arg, arg_type in zip(mypy_args, mypy_arg_types, strict=True): @@ -159,10 +158,9 @@ def __init__( "default function argument values are not supported yet", arg.initializer ) pytyp = self.context.type_to_pytype(arg_type, source_location=arg_loc) + wtype = pytyp.checked_wtype(arg_loc) arg_name = arg.variable.name - args.append( - SubroutineArgument(name=arg_name, wtype=pytyp.wtype, source_location=arg_loc) - ) + args.append(SubroutineArgument(name=arg_name, wtype=wtype, source_location=arg_loc)) self._symtable[arg_name] = pytyp # translate body translated_body = self.visit_block(func_def.body) @@ -262,10 +260,10 @@ def visit_expression_stmt(self, stmt: mypy.nodes.ExpressionStmt) -> ExpressionSt ): # special case to ignore ignoring the result of typing.reveal_type/assert_type pass - elif expr_builder.pytype in pytypes.InnerTransactionResultTypes.values() or ( - isinstance(expr_builder.pytype, pytypes.TupleType) + elif isinstance(expr_builder.pytype, pytypes.InnerTransactionResultType) or ( + isinstance(expr_builder.pytype, pytypes.TupleLikeType) and any( - (i in pytypes.InnerTransactionResultTypes.values()) + isinstance(i, pytypes.InnerTransactionResultType) for i in expr_builder.pytype.items ) ): @@ -349,17 +347,16 @@ def _assign_type( raise CodeError( "_ is not currently supported as a variable name", self._location(lvalue) ) - current_type = self._symtable.get(var_name) - if not (current_type is None or current_type == typ or current_type in typ.mro): + lvalue_loc = self._location(lvalue) + symbol_type = self._symtable.setdefault(var_name, typ) + if not (symbol_type <= typ): logger.error( - f"{var_name!r} already has type {current_type}" + f"{var_name!r} already has type {symbol_type}" f" which is not compatible with {typ}", - location=self._location(lvalue), + location=lvalue_loc, ) return False - else: - self._symtable[var_name] = typ - return True + return True case mypy.nodes.TupleExpr(items=lval_items) | mypy.nodes.ListExpr(items=lval_items): if star_expr := next( ( @@ -373,9 +370,7 @@ def _assign_type( "star expressions are not supported", self._location(star_expr) ) match typ: - case pytypes.ArrayType(items=homogenous_type) | pytypes.VariadicTupleType( - items=homogenous_type - ): + case pytypes.SequenceType(items=homogenous_type): tuple_item_types = (homogenous_type,) * len(lval_items) case pytypes.TupleLikeType(items=tuple_item_types): if len(tuple_item_types) != len(lval_items): @@ -449,9 +444,9 @@ def _handle_proxy_assignment( source_location=member_loc, member_name=member_name, kind=storage.kind, - storage_wtype=pytype.content.wtype, + storage_wtype=pytype.content_wtype, key_wtype=( - pytype.key.wtype if isinstance(pytype, pytypes.StorageMapProxyType) else None + pytype.key_wtype if isinstance(pytype, pytypes.StorageMapProxyType) else None ), key=key, description=rvalue.args.description, @@ -461,12 +456,12 @@ def _handle_proxy_assignment( return [] match pytype: case pytypes.StorageProxyType( - generic=pytypes.GenericGlobalStateType, content=content_type + generic=pytypes.GenericGlobalStateType, content_wtype=content_wtype ): global_state_target = AppStateExpression( key=key, exists_assertion_message=None, # this is a write, not a read - wtype=content_type.wtype, + wtype=content_wtype, source_location=member_loc, ) return [ @@ -637,7 +632,7 @@ def visit_return_stmt(self, stmt: mypy.nodes.ReturnStmt) -> ReturnStatement | No return ReturnStatement(source_location=loc, value=None) returning_builder = require_instance_builder(return_expr.accept(self)) - if returning_builder.pytype != self._return_type: + if not (self._return_type <= returning_builder.pytype): self._error( f"invalid return type of {returning_builder.pytype}, expected {self._return_type}", loc, @@ -698,7 +693,7 @@ def visit_match_stmt(self, stmt: mypy.nodes.MatchStmt) -> Switch | None: logger.error("unsupported case pattern", location=pattern_loc) if case_value_builder is not None: if case_value_builder.pytype != subject.pytype: - # TODO: what about other comparable types? + # TODO: what about other comparable types, or subtypes? logger.error( "type mismatch," " case values must be the exact same type as the subject type", @@ -733,15 +728,19 @@ def _visit_ref_expr(self, expr: mypy.nodes.MemberExpr | mypy.nodes.NameExpr) -> # For parameterised generics, these are resolved at the IndexExpr level, without # descending into IndexExpr.base. # By doing a simple lookup instead of resolving the PyType of expr, - # we can side step complex construsts in the stubs that we don't support in user code, + # we can side step complex constructs in the stubs that we don't support in user code, # such as overloads. - if py_typ := self.context.lookup_pytype(expr.fullname): # noqa: SIM102 - # side step these ones for now - if ( - pytypes.ContractBaseType not in py_typ.mro - and pytypes.ARC4ClientBaseType not in py_typ.bases - and py_typ != pytypes.LogicSigType - ): + if py_typ := self.context.lookup_pytype(expr.fullname): + if isinstance(py_typ, pytypes.ContractType): + if fragment := self.context.contract_fragments.get(py_typ.name): + return ContractTypeExpressionBuilder(py_typ, fragment, expr_loc) + elif pytypes.ARC4ClientBaseType < py_typ: # provides type info only + if fragment := self.context.contract_fragments.get(ContractReference(py_typ.name)): + return ARC4ClientTypeBuilder(py_typ, expr_loc, fragment) + elif py_typ == pytypes.LogicSigType: + ref = LogicSigReference(get_unaliased_fullname(expr)) + return LogicSigExpressionBuilder(ref, expr_loc) + else: return builder_for_type(py_typ, expr_loc) if expr.name == "__all__": @@ -757,19 +756,6 @@ def _visit_ref_expr(self, expr: mypy.nodes.MemberExpr | mypy.nodes.NameExpr) -> if func_builder := try_get_builder_for_func(fullname, expr_loc): return func_builder match expr: - case mypy.nodes.RefExpr(node=mypy.nodes.TypeInfo()) if ( - py_typ - and ( - fragment := self.context.contract_fragments.get(ContractReference(py_typ.name)) - ) - ): - if isinstance(py_typ, pytypes.ContractType): - return ContractTypeExpressionBuilder(py_typ, fragment, expr_loc) - if pytypes.ARC4ClientBaseType in py_typ.bases: # provides type info only - return ARC4ClientTypeBuilder(py_typ, expr_loc, fragment) - case mypy.nodes.RefExpr() if py_typ == pytypes.LogicSigType: - ref = LogicSigReference(fullname) - return LogicSigExpressionBuilder(ref, expr_loc) case mypy.nodes.NameExpr(node=mypy.nodes.Var(is_self=True)): if self.contract_method_info is None: raise InternalError( @@ -844,7 +830,9 @@ def _visit_ref_expr(self, expr: mypy.nodes.MemberExpr | mypy.nodes.NameExpr) -> expr_loc, ) var_expr = VarExpression( - name=var_name, wtype=local_type.wtype, source_location=expr_loc + name=var_name, + wtype=local_type.checked_wtype(expr_loc), + source_location=expr_loc, ) return builder_for_instance(local_type, var_expr) scope = { @@ -1032,9 +1020,14 @@ def visit_conditional_expr(self, expr: mypy.nodes.ConditionalExpr) -> NodeBuilde condition = expr.cond.accept(self).bool_eval(self._location(expr.cond)) true_b = require_instance_builder(expr.if_expr.accept(self)) false_b = require_instance_builder(expr.else_expr.accept(self)) - if true_b.pytype != false_b.pytype: - self._error("incompatible result types for 'true' and 'false' expressions", expr_loc) - expr_pytype = true_b.pytype + if true_b.pytype <= false_b.pytype: + expr_pytype = true_b.pytype + elif false_b.pytype < true_b.pytype: + expr_pytype = false_b.pytype + else: + raise CodeError( + "incompatible result types for 'true' and 'false' expressions", expr_loc + ) if ( isinstance(expr_pytype, pytypes.LiteralOnlyType) @@ -1244,15 +1237,5 @@ def is_self_member( return False -def require_instance_builder( - builder_or_literal: NodeBuilder, - *, - non_instance_msg: str = "expression is not a value", -) -> InstanceBuilder: - match builder_or_literal: - case InstanceBuilder() as builder: - return builder - case NodeBuilder(source_location=non_value_location): - raise CodeError(non_instance_msg, non_value_location) - case _: - typing.assert_never(builder_or_literal) +def require_instance_builder(builder_or_literal: NodeBuilder) -> InstanceBuilder: + return expect.instance_builder(builder_or_literal, default=expect.default_raise) diff --git a/src/puyapy/awst_build/utils.py b/src/puyapy/awst_build/utils.py index 66c316f184..0f63559e4e 100644 --- a/src/puyapy/awst_build/utils.py +++ b/src/puyapy/awst_build/utils.py @@ -260,7 +260,7 @@ def maybe_resolve_literal( ) -> TBuilder | InstanceBuilder: if not isinstance(operand, InstanceBuilder): return operand - if operand.pytype != target_type: + if not (target_type <= operand.pytype): target_type_builder = builder_for_type(target_type, operand.source_location) if isinstance(target_type_builder, TypeBuilder): return operand.resolve_literal(target_type_builder) @@ -280,33 +280,6 @@ def determine_base_type( if len(operands) == 1: return first for candidate in operands: - if all(is_type_or_subtype(operand, of=candidate) for operand in operands): + if all(candidate <= operand for operand in operands): return candidate return pytypes.UnionType(operands, location) - - -@typing.overload -def is_type_or_subtype(typ: pytypes.PyType | None, *, of: pytypes.PyType) -> bool: ... - - -@typing.overload -def is_type_or_subtype( - typ: pytypes.PyType | None, *, of_any: Sequence[pytypes.PyType] -) -> bool: ... - - -def is_type_or_subtype( - typ: pytypes.PyType | None, - *, - of: pytypes.PyType | None = None, - of_any: Sequence[pytypes.PyType] | None = None, -) -> bool: - if typ is None: - return False - if of is not None: - target = of - return typ == target or target in typ.mro - else: - assert of_any is not None - targets = of_any - return typ in targets or any(target in typ.mro for target in targets) diff --git a/stubs/algopy-stubs/_box.pyi b/stubs/algopy-stubs/_box.pyi index 8458e085cf..6ec76527bc 100644 --- a/stubs/algopy-stubs/_box.pyi +++ b/stubs/algopy-stubs/_box.pyi @@ -5,6 +5,7 @@ from algopy import Bytes, UInt64, String _TKey = typing.TypeVar("_TKey") _TValue = typing.TypeVar("_TValue") +@typing.final class Box(typing.Generic[_TValue]): """ Box abstracts the reading and writing of a single value to a single box. @@ -58,6 +59,7 @@ class Box(typing.Generic[_TValue]): Get the length of this Box. Fails if the box does not exist """ +@typing.final class BoxRef: """ BoxRef abstracts the reading and writing of boxes containing raw binary data. The size is @@ -158,6 +160,7 @@ class BoxRef: Get the length of this Box. Fails if the box does not exist """ +@typing.final class BoxMap(typing.Generic[_TKey, _TValue]): """ BoxMap abstracts the reading and writing of a set of boxes using a common key and content type. diff --git a/stubs/algopy-stubs/_compiled.pyi b/stubs/algopy-stubs/_compiled.pyi index 9e03cc69ad..fc8357001e 100644 --- a/stubs/algopy-stubs/_compiled.pyi +++ b/stubs/algopy-stubs/_compiled.pyi @@ -8,6 +8,7 @@ from algopy import ( UInt64, ) +@typing.final class CompiledContract(typing.NamedTuple): """ Provides compiled programs and state allocation values for a Contract. @@ -56,6 +57,7 @@ class CompiledContract(typing.NamedTuple): when calling compile_contract """ +@typing.final class CompiledLogicSig(typing.NamedTuple): """ Provides account for a Logic Signature. diff --git a/stubs/algopy-stubs/_constants.pyi b/stubs/algopy-stubs/_constants.pyi index fb76ecfd46..f6dd80f62b 100644 --- a/stubs/algopy-stubs/_constants.pyi +++ b/stubs/algopy-stubs/_constants.pyi @@ -1,5 +1,7 @@ +import typing from algopy import UInt64 +@typing.final class OnCompleteAction(UInt64): """On Completion actions available in an application call transaction""" @@ -28,6 +30,7 @@ class OnCompleteAction(UInt64): delete the AppParams for the application from the creator's balance record""" +@typing.final class TransactionType(UInt64): """The different transaction types available in a transaction""" diff --git a/stubs/algopy-stubs/_contract.pyi b/stubs/algopy-stubs/_contract.pyi index cfe633d852..234a5bcf5e 100644 --- a/stubs/algopy-stubs/_contract.pyi +++ b/stubs/algopy-stubs/_contract.pyi @@ -1,7 +1,9 @@ import abc +import typing from algopy import UInt64, urange +@typing.final class StateTotals: """ Options class to manually define the total amount of global and local state contract will use, diff --git a/stubs/algopy-stubs/_logic_sig.pyi b/stubs/algopy-stubs/_logic_sig.pyi index 33b37a2a70..ab0081d9fa 100644 --- a/stubs/algopy-stubs/_logic_sig.pyi +++ b/stubs/algopy-stubs/_logic_sig.pyi @@ -3,6 +3,7 @@ from collections.abc import Callable from algopy import UInt64 +@typing.final class LogicSig: """A logic signature""" diff --git a/stubs/algopy-stubs/_reference.pyi b/stubs/algopy-stubs/_reference.pyi index 571e8c4715..2cd4cf23d0 100644 --- a/stubs/algopy-stubs/_reference.pyi +++ b/stubs/algopy-stubs/_reference.pyi @@ -1,5 +1,7 @@ +import typing from algopy import Bytes, BytesBacked, UInt64 +@typing.final class Account(BytesBacked): """An Account on the Algorand network. @@ -142,6 +144,7 @@ class Account(BytesBacked): ``` """ +@typing.final class Asset: """An Asset on the Algorand network.""" @@ -287,6 +290,7 @@ class Asset: ``` """ +@typing.final class Application: """An Application on the Algorand network.""" diff --git a/stubs/algopy-stubs/_state.pyi b/stubs/algopy-stubs/_state.pyi index bcc4439999..0dd6391c89 100644 --- a/stubs/algopy-stubs/_state.pyi +++ b/stubs/algopy-stubs/_state.pyi @@ -4,6 +4,7 @@ from algopy import Account, Bytes, String, UInt64 _TState = typing.TypeVar("_TState") +@typing.final class LocalState(typing.Generic[_TState]): """Local state associated with the application and an account""" @@ -78,6 +79,7 @@ class LocalState(typing.Generic[_TState]): ``` """ +@typing.final class GlobalState(typing.Generic[_TState]): """Global state associated with the application, the key will be the name of the member, this is assigned to diff --git a/stubs/algopy-stubs/_unsigned_builtins.pyi b/stubs/algopy-stubs/_unsigned_builtins.pyi index 660398f5e6..ceae7611f7 100644 --- a/stubs/algopy-stubs/_unsigned_builtins.pyi +++ b/stubs/algopy-stubs/_unsigned_builtins.pyi @@ -10,6 +10,7 @@ from collections.abc import Iterable, Iterator, Reversible from algopy import UInt64 +@typing.final class urange(Reversible[UInt64]): # noqa: N801 """Produces a sequence of UInt64 from start (inclusive) to stop (exclusive) by step. @@ -29,6 +30,7 @@ class urange(Reversible[UInt64]): # noqa: N801 _T = typing.TypeVar("_T") +@typing.final class uenumerate(Reversible[tuple[UInt64, _T]]): # noqa: N801 """Yields pairs containing a count (from zero) and a value yielded by the iterable argument. diff --git a/stubs/algopy-stubs/_util.pyi b/stubs/algopy-stubs/_util.pyi index 739845f62a..3273fe0fa9 100644 --- a/stubs/algopy-stubs/_util.pyi +++ b/stubs/algopy-stubs/_util.pyi @@ -1,5 +1,7 @@ +import typing from algopy import Bytes, BytesBacked, String, UInt64 +@typing.final class OpUpFeeSource(UInt64): """Defines the source of fees for the OpUp utility.""" diff --git a/tests/test_expected_output/arc4.test b/tests/test_expected_output/arc4.test index 961a62b342..648b52ff27 100644 --- a/tests/test_expected_output/arc4.test +++ b/tests/test_expected_output/arc4.test @@ -1,7 +1,7 @@ # ruff: noqa # fmt: off # type: ignore -import gtxn + ## case: test_invalid_arc4_struct_member_type from algopy import * @@ -105,11 +105,11 @@ import typing from algopy import arc4, subroutine -A: typing.TypeAlias = arc4.UIntN[typing.Literal[72]] ## E: Max bit size of algopy.arc4.UIntN is 64, got 72 +A: typing.TypeAlias = arc4.UIntN[typing.Literal[72]] ## E: max bit size of algopy.arc4.UIntN is 64, got 72 B: typing.TypeAlias = arc4.BigUIntN[typing.Literal[520]] ## E: Bit size must be between 8 and 512 inclusive # TODO: add test for non-8-multiple -C: typing.TypeAlias = arc4.UFixedNxM[typing.Literal[72], typing.Literal[10]] ## E: Max bit size of algopy.arc4.UFixedNxM is 64, got 72 +C: typing.TypeAlias = arc4.UFixedNxM[typing.Literal[72], typing.Literal[10]] ## E: max bit size of algopy.arc4.UFixedNxM is 64, got 72 D: typing.TypeAlias = arc4.BigUFixedNxM[typing.Literal[520], typing.Literal[10]] ## E: Bit size must be between 8 and 512 inclusive # TODO: add test for non-8-multiple @@ -117,7 +117,7 @@ E: typing.TypeAlias = arc4.UFixedNxM[typing.Literal[64], typing.Literal[0]] ## E F: typing.TypeAlias = arc4.BigUFixedNxM[typing.Literal[512], typing.Literal[0]] ## E: Precision must be between 1 and 160 inclusive @subroutine -def testA(x: A) -> None: ## E: Max bit size of algopy.arc4.UIntN is 64, got 72 +def testA(x: A) -> None: ## E: max bit size of algopy.arc4.UIntN is 64, got 72 assert x @subroutine @@ -125,7 +125,7 @@ def testB(x: B) -> None: ## E: Bit size must be between 8 and 512 inclusive assert x @subroutine -def testC(x: C) -> None: ## E: Max bit size of algopy.arc4.UFixedNxM is 64, got 72 +def testC(x: C) -> None: ## E: max bit size of algopy.arc4.UFixedNxM is 64, got 72 assert x @subroutine @@ -608,3 +608,27 @@ class MyTest(ARC4Contract): def double_use_not_allowed(self, arr1: arc4.DynamicBytes, arr2: arc4.DynamicBytes) -> None: arr1.append(arc4.Byte(42)) arr2.append(arc4.Byte(43)) + + +## case: bad_array_types +import typing +from algopy import * + + +@subroutine +def a() -> None: + assert not arc4.StaticArray[int, typing.Literal[1]](1) ## E: Python literals of type int cannot be used as runtime values + +@subroutine +def b() -> None: + assert not arc4.StaticArray(1) ## E: Python literals of type int cannot be used as runtime values + + +@subroutine +def c() -> None: + assert not arc4.DynamicArray(1) ## E: Python literals of type int cannot be used as runtime values + + +@subroutine +def d() -> None: + assert not arc4.DynamicArray[int]() ## E: Python literals of type int cannot be used as runtime values diff --git a/tests/test_expected_output/tuple.test b/tests/test_expected_output/tuple.test index 9fa27de79f..f77abb350e 100644 --- a/tests/test_expected_output/tuple.test +++ b/tests/test_expected_output/tuple.test @@ -153,3 +153,12 @@ def iterate_tuple(base: gtxn.TransactionBase) -> None: assert a.fee > 0 for b in (gtxn.PaymentTransaction(1), gtxn.KeyRegistrationTransaction(2)): ## E: unable to iterate heterogeneous tuple without common base type assert b.fee > 0 + +## case: bad_named_tuple +from algopy import UInt64 +import typing + +class NotAllowed(typing.NamedTuple): + an_int: UInt64 + id: int ## E: Python literals of type int cannot be used as runtime values + flag: bool = True ## E: unsupported syntax for typing.NamedTuple member declaration From f205942bcd89aa09cd764ddb6fbcd59d09eadc2d Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 25 Oct 2024 15:42:00 +0800 Subject: [PATCH 12/20] doc: update documentation regarding nested tuples, named tuples and immutability options --- docs/lg-arc4.md | 26 +++++++++++++++++++++++--- docs/lg-types.md | 29 +++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/docs/lg-arc4.md b/docs/lg-arc4.md index f22aa64e7d..f2022d061d 100644 --- a/docs/lg-arc4.md +++ b/docs/lg-arc4.md @@ -109,6 +109,15 @@ from algopy import arc4 FourBytes: t.TypeAlias = arc4.StaticArray[arc4.Byte, t.Literal[4]] ``` + +### Address +**Type:** `algopy.arc4.Address` +**Encoding:** A byte array 32 bytes long +**Native equivalent:** [`algopy.Account`](#algopy.Account) + +Address represents an Algorand address's public key, and can be used instead of `algopy.Account` when needing to +reference an address in an ARC4 struct, tuple or return type. It is a subclass of `arc4.StaticArray[arc4.Byte, typing.Literal[32]]` + ### Dynamic arrays **Type:** `algopy.arc4.DynamicArray` @@ -138,9 +147,11 @@ ARC4 Tuples are immutable statically sized arrays of mixed item types. Item type **Type:** `algopy.arc4.Struct` **Encoding:** See [ARC4 Container Packing](#ARC4-Container-Packing) -**Native equivalent:** _none_ +**Native equivalent:** `typing.NamedTuple` -ARC4 Structs are mutable named tuples. Items can be accessed and mutated via names instead of indexes. +ARC4 Structs are named tuples. The class keyword `frozen` can be used to indicate if a struct can be mutated. +Items can be accessed and mutated via names instead of indexes. Structs do not have a `.native` property, +but a NamedTuple can be used in ABI methods are will be encoded/decode to an ARC4 struct automatically. ```python import typing @@ -149,7 +160,7 @@ from algopy import arc4 Decimal: typing.TypeAlias = arc4.UFixedNxM[typing.Literal[64], typing.Literal[9]] -class Vector(arc4.Struct, kw_only=True): +class Vector(arc4.Struct, kw_only=True, frozen=True): x: Decimal y: Decimal ``` @@ -200,7 +211,16 @@ class Reference(ARC4Contract): ... ``` +### Mutability + +To ensure semantic compatability the compiler will also check for any usages of mutable ARC4 types (arrays and structs) and ensure that any additional references are copied using the `.copy()` method. + +Python values are passed by reference, and when an object (eg. an array or struct) is mutated in one place, all references to that object see the mutated version. In Python this is managed via the heap. +In Algorand Python these mutable values are instead stored on the stack, so when an additional reference is made (i.e. by assigning to another variable) a copy is added to the stack. +Which means if one reference is mutated, the other references would not see the change. +In order to keep the semantics the same, the compiler forces the addition of `.copy()` each time a new reference to the same object to match what will happen on the AVM. +Struct types can be indicated as `frozen` which will eliminate the need for a `.copy()` as long as the struct also contains no mutable fields (such as arrays or another mutable struct) ## Typed clients diff --git a/docs/lg-types.md b/docs/lg-types.md index 4f0ca59545..99ac4aabbc 100644 --- a/docs/lg-types.md +++ b/docs/lg-types.md @@ -201,8 +201,11 @@ if a: ### Account -[`Account`](#algopy.Account) represents a logical Account, backed by a `bytes[]` representing the -public key. It has various account related methods that can be called from the type. +[`Account`](#algopy.Account) represents a logical Account, backed by a `bytes[32]` representing the +bytes of the public key (without the checksum). It has various account related methods that can be called from the type. + +Also see [`algopy.arc4.Address`](#algopy.arc4.Address) if needing to represent the address as a distinct type. + ### Asset @@ -230,8 +233,26 @@ In saying that, there are many places where built-in Python types can be used an ### tuple -Python tuples are supported as arguments to subroutines, local variables, return types. Nested tuples -are _not_ currently supported. +Python tuples are supported as arguments to subroutines, local variables, return types. + +### typing.NamedTuple + +Python named tuples are also supported using [`typing.NamedTuple`](https://docs.python.org/3/library/typing.html#typing.NamedTuple). + +```{note} +Default field values and subclassing a NamedTuple are not supported +``` + +```python +import typing + +import algopy + + +class Pair(typing.NamedTuple): + foo: algopy.Bytes + bar: algopy.Bytes +``` ### None From 4590c986092e904cdc4b9a847897b2c487f44333 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Thu, 7 Nov 2024 15:23:08 +0800 Subject: [PATCH 13/20] doc: remove note about --match-algod-bytecode --- docs/compiler.md | 1 - docs/lg-compile.md | 7 ------- 2 files changed, 8 deletions(-) diff --git a/docs/compiler.md b/docs/compiler.md index e4797614b0..7141ee8638 100644 --- a/docs/compiler.md +++ b/docs/compiler.md @@ -115,7 +115,6 @@ puyapy [-h] [--version] [-O {0,1,2}] | `--output-arc32`, `--no-output-arc32` | Output {contract}.arc32.json ARC-32 app spec file if the contract is an ARC-4 contract | `True` | | `--output-client`, `--no-output-client` | Output Algorand Python contract client for typed ARC4 ABI calls | `False` | | `--output-bytecode`, `--no-output-bytecode` | Output AVM bytecode | `False` | -| `--match-algod-bytecode` | When outputting bytecode (via `--output-bytecode` or compiled programs), ensure bytecode matches algod output, by disabling additional optimizations | False | | `--out-dir OUT_DIR` | The path for outputting artefacts | Same folder as contract | | `--log-level {notset,debug,info,warning,error,critical}` | Minimum level to log to console | `info` | | `-g {0,1,2}`, `--debug-level {0,1,2}` | Output debug information level
`0` = No debug annotations
`1` = Output debug annotations
`2` = Reserved for future use, currently the same as `1` | `1` | diff --git a/docs/lg-compile.md b/docs/lg-compile.md index b26c4f7e64..e6182e127a 100644 --- a/docs/lg-compile.md +++ b/docs/lg-compile.md @@ -7,13 +7,6 @@ Once compiled, this bytecode can be utilized to construct AVM Application Call t The `--output-bytecode` option can be used to generate `.bin` files for smart contracts and logic signatures, producing an approval and clear program for each smart contract. -```{note} -The Puya compiler incorporates several optimizations that are not present in the bytecode output generated by the -[`/v2/teal/compile`](https://developer.algorand.org/docs/rest-apis/algod/#post-v2tealcompile) endpoint. -When comparing the outputs of PuyaPy and Algod these differences may be observed. -To disable these optimizations and produce bytecode identical to Algod use the `--match-algod-bytecode` option. -``` - ## Obtaining bytecode within other contracts The [`compile_contract`](#algopy.compile_contract) function takes an Algorand Python smart contract class and returns a [`CompiledContract`](#algopy.CompiledContract), From 47b43a8ab0776274c2e1babcc5555059592da86d Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Thu, 7 Nov 2024 15:42:52 +0800 Subject: [PATCH 14/20] doc: consolidate existing documentation on calling other applications --- docs/language-guide.md | 1 + docs/lg-arc4.md | 66 ------------------- docs/lg-calling-apps.md | 142 ++++++++++++++++++++++++++++++++++++++++ docs/lg-compile.md | 58 ---------------- docs/lg-transactions.md | 39 ----------- 5 files changed, 143 insertions(+), 163 deletions(-) create mode 100644 docs/lg-calling-apps.md diff --git a/docs/language-guide.md b/docs/language-guide.md index 7c3d7cc585..ef035576da 100644 --- a/docs/language-guide.md +++ b/docs/language-guide.md @@ -80,6 +80,7 @@ lg-ops lg-opcode-budget lg-arc4 lg-arc28 +lg-calling-apps lg-compile lg-unsupported-python-features ``` diff --git a/docs/lg-arc4.md b/docs/lg-arc4.md index f2022d061d..a51377fea6 100644 --- a/docs/lg-arc4.md +++ b/docs/lg-arc4.md @@ -221,69 +221,3 @@ Which means if one reference is mutated, the other references would not see the In order to keep the semantics the same, the compiler forces the addition of `.copy()` each time a new reference to the same object to match what will happen on the AVM. Struct types can be indicated as `frozen` which will eliminate the need for a `.copy()` as long as the struct also contains no mutable fields (such as arrays or another mutable struct) - -## Typed clients - -[`arc4.abi_call`](#algopy.arc4.abi_call) can be used to do type safe calls to an ABI method of another contract, these -calls can be expressed in a few ways. - -### ARC4Contract method - -An ARC4Contract method written in Algorand Python can be referenced directly e.g. - -```python -from algopy import arc4, subroutine - -class HelloWorldContract(arc4.ARC4Contract): - - def hello(self, name: arc4.String) -> arc4.String: ... # implementation omitted - -@subroutine -def call_another_contract() -> None: - result, txn = arc4.abi_call(HelloWorldContract.hello, arc4.String("World"), app=...) - assert result == "Hello, World" -``` - -### ARC4Client method - -A ARC4Client client represents the ARC4 abimethods of a smart contract and can be used to call abimethods in a type safe way - -ARC4Client's can be produced by using `puyapy --output-client=True` when compiling a smart contract -(this would be useful if you wanted to publish a client for consumption by other smart contracts) -An ARC4Client can also be be generated from an ARC-32 application.json using `puyapy-clientgen` -e.g. `puyapy-clientgen examples/hello_world_arc4/out/HelloWorldContract.arc32.json`, this would be -the recommended approach for calling another smart contract that is not written in Algorand Python or does not provide the source - -```python -from algopy import arc4, subroutine - -class HelloWorldClient(arc4.ARC4Client): - - def hello(self, name: arc4.String) -> arc4.String: ... - -@subroutine -def call_another_contract() -> None: - # can reference another algopy contract method - result, txn = arc4.abi_call(HelloWorldClient.hello, arc4.String("World"), app=...) - assert result == "Hello, World" -``` - -### Method signature or name - -An ARC4 method selector can be used e.g. `"hello(string)string` along with a type index to specify the return type. -Additionally just a name can be provided and the method signature will be inferred e.g. - -```python -from algopy import arc4, subroutine - - -@subroutine -def call_another_contract() -> None: - # can reference a method selector - result, txn = arc4.abi_call[arc4.String]("hello(string)string", arc4.String("Algo"), app=...) - assert result == "Hello, Algo" - - # can reference a method name, the method selector is inferred from arguments and return type - result, txn = arc4.abi_call[arc4.String]("hello", "There", app=...) - assert result == "Hello, There" -``` diff --git a/docs/lg-calling-apps.md b/docs/lg-calling-apps.md new file mode 100644 index 0000000000..966ffe1650 --- /dev/null +++ b/docs/lg-calling-apps.md @@ -0,0 +1,142 @@ +# Calling other applications + +The preferred way to call other smart contracts is using [`algopy.arc4.abi_call`](#algopyarc4abi_call), [`algopy.arc4.arc4_create`](#algopyarc4arc4_create) or +[`algopy.arc4.arc4_update`](#algopyarc4arc4_update). These methods support type checking and encoding of arguments, decoding of results, group transactions, +and in the case of `arc4_create` and `arc4_update` automatic inclusion of approval and clear state programs. + +## `algopy.arc4.abi_call` + +[`algopy.arc4.abi_call`](#algopy.arc4.abi_call) can be used to call other ARC4 contracts, the first argument should refer to +an ARC4 method either by referencing an Algorand Python [`algopy.arc4.ARC4Contract`](#algopy.arc4.ARC4Contract) method, +an [`algopy.arc4.ARC4Client`](#algopy.arc4.ARC4Client) method generated from an ARC-32 app spec, or a string representing +the ARC4 method signature or name. +The following arguments should then be the arguments required for the call, these arguments will be type checked and converted where appropriate. +Any other related transaction parameters such as `app_id`, `fee` etc. can also be provided as keyword arguments. + +If the ARC4 method returns an ARC4 result then the result will be a tuple of the ARC4 result and the inner transaction. +If the ARC4 method does not return a result, or if the result type is not fully qualified then just the inner transaction is returned. + +```python +from algopy import Application, ARC4Contract, String, arc4, subroutine + +class HelloWorld(ARC4Contract): + + @arc4.abimethod() + def greet(self, name: String) -> String: + return "Hello " + name + +@subroutine +def call_existing_application(app: Application) -> None: + greeting, greet_txn = arc4.abi_call(HelloWorld.greet, "there", app_id=app) + + assert greeting == "Hello there" + assert greet_txn.app_id == 1234 +``` + + +### Alternative ways to use `arc4.abi_call` + +#### ARC4Client method + +A ARC4Client client represents the ARC4 abimethods of a smart contract and can be used to call abimethods in a type safe way + +ARC4Client's can be produced by using `puyapy --output-client=True` when compiling a smart contract +(this would be useful if you wanted to publish a client for consumption by other smart contracts) +An ARC4Client can also be be generated from an ARC-32 application.json using `puyapy-clientgen` +e.g. `puyapy-clientgen examples/hello_world_arc4/out/HelloWorldContract.arc32.json`, this would be +the recommended approach for calling another smart contract that is not written in Algorand Python or does not provide the source + +```python +from algopy import arc4, subroutine + +class HelloWorldClient(arc4.ARC4Client): + + def hello(self, name: arc4.String) -> arc4.String: ... + +@subroutine +def call_another_contract() -> None: + # can reference another algopy contract method + result, txn = arc4.abi_call(HelloWorldClient.hello, arc4.String("World"), app=...) + assert result == "Hello, World" +``` + +#### Method signature or name + +An ARC4 method selector can be used e.g. `"hello(string)string` along with a type index to specify the return type. +Additionally just a name can be provided and the method signature will be inferred e.g. + +```python +from algopy import arc4, subroutine + + +@subroutine +def call_another_contract() -> None: + # can reference a method selector + result, txn = arc4.abi_call[arc4.String]("hello(string)string", arc4.String("Algo"), app=...) + assert result == "Hello, Algo" + + # can reference a method name, the method selector is inferred from arguments and return type + result, txn = arc4.abi_call[arc4.String]("hello", "There", app=...) + assert result == "Hello, There" +``` + + +## `algopy.arc4.arc4_create` + +[`algopy.arc4.arc4_create`](#algopy.arc4.arc4_create) can be used to create ARC4 applications, and will automatically populate required fields for app creation (such as approval program, clear state program, and global/local state allocation). + +Like [`algopy.arc4.abi_call`](lg-transactions.md#arc4-application-calls) it handles ARC4 arguments and provides ARC4 return values. + +If the compiled programs and state allocation fields need to be customized (for example due to [template variables](#within-other-contracts)), +this can be done by passing a [`algopy.CompiledContract`](#algopy.CompiledContract) via the `compiled` keyword argument. + +```python +from algopy import ARC4Contract, String, arc4, subroutine + +class HelloWorld(ARC4Contract): + + @arc4.abimethod() + def greet(self, name: String) -> String: + return "Hello " + name + +@subroutine +def create_new_application() -> None: + hello_world_app = arc4.arc4_create(HelloWorld).created_app + + greeting, _txn = arc4.abi_call(HelloWorld.greet, "there", app_id=hello_world_app) + + assert greeting == "Hello there" +``` + +## `algopy.arc4.arc4_update` + +[`algopy.arc4.arc4_update`](#algopy.arc4.arc4_update) is used to update an existing ARC4 application and will automatically populate the required approval and clear state program fields. + +Like [`algopy.arc4.abi_call`](lg-transactions.md#arc4-application-calls) it handles ARC4 arguments and provides ARC4 return values. + +If the compiled programs need to be customized (for example due to (for example due to [template variables](#within-other-contracts)), +this can be done by passing a [`algopy.CompiledContract`](#algopy.CompiledContract) via the `compiled` keyword argument. + +```python +from algopy import Application, ARC4Contract, String, arc4, subroutine + +class NewApp(ARC4Contract): + + @arc4.abimethod() + def greet(self, name: String) -> String: + return "Hello " + name + +@subroutine +def update_existing_application(existing_app: Application) -> None: + hello_world_app = arc4.arc4_update(NewApp, app_id=existing_app) + + greeting, _txn = arc4.abi_call(NewApp.greet, "there", app_id=hello_world_app) + + assert greeting == "Hello there" +``` + +## Using `itxn.ApplicationCall` + +If the application being called is not an ARC4 contract, or an application specification is not available, +then [`algopy.itxn.ApplicationCall`](#algopy.itxn.ApplicationCall) can be used. This approach is generally more verbose +than the above approaches, so should only be used if required. See [here](./lg-transactions.md#create-an-arc4-application-and-then-call-it) for an example diff --git a/docs/lg-compile.md b/docs/lg-compile.md index e6182e127a..6062823fa8 100644 --- a/docs/lg-compile.md +++ b/docs/lg-compile.md @@ -16,64 +16,6 @@ This compiled contract can then be used to create an [`algopy.itxn.ApplicationCa The [`compile_logicsig`](#algopy.compile_logicsig) takes an Algorand Python logic signature and returns a [`CompiledLogicSig`](#algopy.CompiledLogicSig), which can be used to verify if a transaction has been signed by a particular logic signature. -## ARC4 contracts - -Additional functions are available for [creating](lg-compile.md#create) and [updating](lg-compile.md#update) ARC4 applications on-chain via an inner transaction. - -### Create - -[`algopy.arc4.arc4_create`](#algopy.arc4.arc4_create) can be used to create ARC4 applications, and will automatically populate required fields for app creation (such as approval program, clear state program, and global/local state allocation). - -Like [`algopy.arc4.abi_call`](lg-transactions.md#arc4-application-calls) it handles ARC4 arguments and provides ARC4 return values. - -If the compiled programs and state allocation fields need to be customized (for example due to [template variables](#within-other-contracts)), -this can be done by passing a [`algopy.CompiledContract`](#algopy.CompiledContract) via the `compiled` keyword argument. - -```python -from algopy import ARC4Contract, String, arc4, subroutine - -class HelloWorld(ARC4Contract): - - @arc4.abimethod() - def greet(self, name: String) -> String: - return "Hello " + name - -@subroutine -def create_new_application() -> None: - hello_world_app = arc4.arc4_create(HelloWorld).created_app - - greeting, _txn = arc4.abi_call(HelloWorld.greet, "there", app_id=hello_world_app) - - assert greeting == "Hello there" -``` - -### Update - -[`algopy.arc4.arc4_update`](#algopy.arc4.arc4_update) is used to update an existing ARC4 application and will automatically populate the required approval and clear state program fields. - -Like [`algopy.arc4.abi_call`](lg-transactions.md#arc4-application-calls) it handles ARC4 arguments and provides ARC4 return values. - -If the compiled programs need to be customized (for example due to (for example due to [template variables](#within-other-contracts)), -this can be done by passing a [`algopy.CompiledContract`](#algopy.CompiledContract) via the `compiled` keyword argument. - -```python -from algopy import Application, ARC4Contract, String, arc4, subroutine - -class NewApp(ARC4Contract): - - @arc4.abimethod() - def greet(self, name: String) -> String: - return "Hello " + name - -@subroutine -def update_existing_application(existing_app: Application) -> None: - hello_world_app = arc4.arc4_update(NewApp, app_id=existing_app) - - greeting, _txn = arc4.abi_call(NewApp.greet, "there", app_id=hello_world_app) - - assert greeting == "Hello there" -``` - ## Template variables Algorand Python supports defining [`algopy.TemplateVar`](#algopy.TemplateVar) variables that can be substituted during compilation. diff --git a/docs/lg-transactions.md b/docs/lg-transactions.md index 4d24a95637..362ac1744d 100644 --- a/docs/lg-transactions.md +++ b/docs/lg-transactions.md @@ -149,14 +149,6 @@ def example() -> None: ).submit() # extract result hello_world_result = arc4.String.from_log(call_txn.last_log) - - # OR, call it automatic ARC4 encoding, type validation and result handling - hello_world_result, call_txn = arc4.abi_call[arc4.String]( # declare return type - "hello(string)string", # method signature to call - "again", # abi method arguments - fee=0, # other transaction parameters - app_id=app - ) ``` #### Create and submit transactions in a loop @@ -175,37 +167,6 @@ def example(receivers: tuple[Account, Account, Account]) -> None: ).submit() ``` -### ARC4 Application calls - -#### `algopy.arc4.abi_call` - -[`algopy.arc4.abi_call`](#algopy.arc4.abi_call) can be used to call other ARC4 contracts, the first argument should refer to -an ARC4 method either by referencing an Algorand Python [`algopy.arc4.ARC4Contract`](#algopy.arc4.ARC4Contract) method, -an [`algopy.arc4.ARC4Client`](#algopy.arc4.ARC4Client) method generated from an ARC-32 app spec, or a string representing -the ARC4 method signature or name. -The following arguments should then be the arguments required for the call, these arguments will be type checked and converted where appropriate. -Any other related transaction parameters such as `app_id`, `fee` etc. can also be provided as keyword arguments. - -If the ARC4 method returns an ARC4 result then the result will be a tuple of the ARC4 result and the inner transaction. -If the ARC4 method does not return a result, or if the result type is not fully qualified then just the inner transaction is returned. - -```python -from algopy import Application, ARC4Contract, String, arc4, subroutine - -class HelloWorld(ARC4Contract): - - @arc4.abimethod() - def greet(self, name: String) -> String: - return "Hello " + name - -@subroutine -def call_existing_application(app: Application) -> None: - greeting, greet_txn = arc4.abi_call(HelloWorld.greet, "there", app_id=app) - - assert greeting == "Hello there" - assert greet_txn.app_id == 1234 -``` - ### Limitations Inner transactions are powerful, but currently do have some restrictions in how they are used. From c8f3ff740d669fafeae7c1487eef8ff143c250ec Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 8 Nov 2024 14:08:18 +0800 Subject: [PATCH 15/20] refactor: add additional validation for op int8 and uint8 immediates --- src/puya/teal/models.py | 28 +++++++++++++------ .../optimize/repeated_rotations_search.py | 14 +++++----- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/puya/teal/models.py b/src/puya/teal/models.py index 99f7ffc528..16c9ab5268 100644 --- a/src/puya/teal/models.py +++ b/src/puya/teal/models.py @@ -110,7 +110,7 @@ class RetSub(TealOp): @attrs.frozen class TealOpN(TealOp): - n: int + n: int = attrs.field(validator=[attrs.validators.ge(0), attrs.validators.le(255)]) @property def immediates(self) -> Sequence[int | str]: @@ -118,7 +118,17 @@ def immediates(self) -> Sequence[int | str]: @attrs.frozen -class Cover(TealOpN): +class TealOpUInt8(TealOpN): + n: int = attrs.field(validator=[attrs.validators.ge(0), attrs.validators.le(255)]) + + +@attrs.frozen +class TealOpInt8(TealOpN): + n: int = attrs.field(validator=[attrs.validators.ge(-128), attrs.validators.le(127)]) + + +@attrs.frozen +class Cover(TealOpUInt8): op_code: str = attrs.field(default="cover", init=False) consumes: int = attrs.field(init=False) produces: int = attrs.field(init=False) @@ -133,7 +143,7 @@ def _produces(self) -> int: @attrs.frozen -class Uncover(TealOpN): +class Uncover(TealOpUInt8): op_code: str = attrs.field(default="uncover", init=False) consumes: int = attrs.field(init=False) produces: int = attrs.field(init=False) @@ -155,7 +165,7 @@ class Swap(TealOp): @attrs.frozen -class Dig(TealOpN): +class Dig(TealOpUInt8): op_code: str = attrs.field(default="dig", init=False) consumes: int = attrs.field(init=False) produces: int = attrs.field(init=False) @@ -170,7 +180,7 @@ def _produces(self) -> int: @attrs.frozen -class Bury(TealOpN): +class Bury(TealOpUInt8): op_code: str = attrs.field(default="bury", init=False) consumes: int = attrs.field(init=False) produces: int = attrs.field(init=False) @@ -342,14 +352,14 @@ def immediates(self) -> Sequence[str]: @attrs.frozen -class FrameDig(TealOpN): +class FrameDig(TealOpInt8): op_code: str = attrs.field(default="frame_dig", init=False) consumes: int = attrs.field(default=0, init=False) produces: int = attrs.field(default=1, init=False) @attrs.frozen -class FrameBury(TealOpN): +class FrameBury(TealOpInt8): op_code: str = attrs.field(default="frame_bury", init=False) consumes: int = attrs.field(default=1, init=False) produces: int = attrs.field(default=0, init=False) @@ -368,7 +378,7 @@ def immediates(self) -> Sequence[int | str]: @attrs.frozen -class PopN(TealOpN): +class PopN(TealOpUInt8): op_code: str = attrs.field(default="popn", init=False) consumes: int = attrs.field(init=False) produces: int = attrs.field(default=0, init=False) @@ -379,7 +389,7 @@ def _consumes(self) -> int: @attrs.frozen -class DupN(TealOpN): +class DupN(TealOpUInt8): op_code: str = attrs.field(default="dupn", init=False) consumes: int = attrs.field(default=1, init=False) produces: int = attrs.field(init=False) diff --git a/src/puya/teal/optimize/repeated_rotations_search.py b/src/puya/teal/optimize/repeated_rotations_search.py index 86f9b7a42c..03027aa6c8 100644 --- a/src/puya/teal/optimize/repeated_rotations_search.py +++ b/src/puya/teal/optimize/repeated_rotations_search.py @@ -9,7 +9,7 @@ from puya.teal import models from puya.teal._util import preserve_stack_manipulations -TealOpSequence = tuple[models.TealOpN, ...] +TealOpSequence = tuple[models.TealOpUInt8, ...] logger = log.get_logger(__name__) @@ -25,7 +25,7 @@ class TealStack: def from_stack_size(cls, stack_size: int) -> "TealStack": return cls(stack=list(range(stack_size))) - def apply(self, ops: Sequence[models.TealOpN]) -> "TealStack": + def apply(self, ops: Sequence[models.TealOpUInt8]) -> "TealStack": stack = TealStack(self.stack.copy()) for op in ops: n = op.n @@ -75,7 +75,7 @@ def simplify_rotation_ops(original_ops: TealOpSequence) -> TealOpSequence | None @functools.cache def get_possible_rotation_ops(n: int) -> TealOpSequence: - possible_ops = list[models.TealOpN]() + possible_ops = list[models.TealOpUInt8]() for i in range(1, n + 1): possible_ops.append(models.Cover(i, source_location=None)) possible_ops.append(models.Uncover(i, source_location=None)) @@ -91,11 +91,11 @@ def get_possible_rotation_ops(n: int) -> TealOpSequence: def repeated_rotation_ops_search(teal_ops: list[models.TealOp]) -> list[models.TealOp]: - maybe_remove_rotations = list[models.TealOpN]() + maybe_remove_rotations = list[models.TealOpUInt8]() result = list[models.TealOp]() for teal_op in teal_ops: if teal_op.op_code in ROTATION_SIMPLIFY_OPS: - maybe_remove_rotations.append(typing.cast(models.TealOpN, teal_op)) + maybe_remove_rotations.append(typing.cast(models.TealOpUInt8, teal_op)) else: maybe_simplified = _maybe_simplified(maybe_remove_rotations) maybe_remove_rotations = [] @@ -106,8 +106,8 @@ def repeated_rotation_ops_search(teal_ops: list[models.TealOp]) -> list[models.T def _maybe_simplified( - maybe_remove_rotations: list[models.TealOpN], window_size: int = 5 -) -> Sequence[models.TealOpN]: + maybe_remove_rotations: list[models.TealOpUInt8], window_size: int = 5 +) -> Sequence[models.TealOpUInt8]: if len(maybe_remove_rotations) < 2: return maybe_remove_rotations From bf52c363039d43ad3c4a361f7e288ea7a330c10c Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 8 Nov 2024 14:04:01 +0800 Subject: [PATCH 16/20] fix: prevent errors trying to optimize dig 0 --- src/puya/teal/optimize/peephole.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/puya/teal/optimize/peephole.py b/src/puya/teal/optimize/peephole.py index 133f969a60..0c8b3674b8 100644 --- a/src/puya/teal/optimize/peephole.py +++ b/src/puya/teal/optimize/peephole.py @@ -116,7 +116,7 @@ def _optimize_pair(a: models.TealOp, b: models.TealOp) -> tuple[list[models.Teal assert isinstance(n2, int) return [models.PopN(n=n1 + n2, source_location=a.source_location)], True # `dig 1; dig 1` -> `dup2` - case models.TealOpN(op_code="dig", n=1), models.TealOpN(op_code="dig", n=1): + case models.TealOpUInt8(op_code="dig", n=1), models.TealOpUInt8(op_code="dig", n=1): return [models.Dup2(source_location=a.source_location or b.source_location)], True return [a, b], False @@ -155,6 +155,8 @@ def _optimize_triplet( is_stack_swap(c) and a.op_code in LOAD_OP_CODES_INCL_OFFSET and b.op_code in LOAD_OP_CODES_INCL_OFFSET + # cant swap dig 0, which will become a dup anyway + and (not isinstance(b, models.Dig) or b.n) ): if isinstance(a, models.Dig): a = attrs.evolve(a, n=a.n + 1) From eec0622a85f480ce6a19edf5566c5c7dc794cbf6 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 8 Nov 2024 15:18:46 +0800 Subject: [PATCH 17/20] refactor: remove unnecessary MIR optimization --- src/puya/mir/stack_allocation/peephole.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/puya/mir/stack_allocation/peephole.py b/src/puya/mir/stack_allocation/peephole.py index a840e92a08..e2e960eff4 100644 --- a/src/puya/mir/stack_allocation/peephole.py +++ b/src/puya/mir/stack_allocation/peephole.py @@ -37,9 +37,6 @@ def optimize_pair( if not isinstance(a, mir.MemoryOp): return None - if isinstance(b, mir.Pop) and b.n == 1 and isinstance(a, mir.LoadOp): - return () - # optimization: cases after here are only applicable if "b" is a MemoryOp if not isinstance(b, mir.MemoryOp): return None From f0ac8dce0f921bc95153f263033d0437768a48dd Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 1 Nov 2024 11:45:55 +0800 Subject: [PATCH 18/20] refactor: ensure consistent ordering of log output when removing unused variables --- src/puya/ir/optimize/dead_code_elimination.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/puya/ir/optimize/dead_code_elimination.py b/src/puya/ir/optimize/dead_code_elimination.py index 2bec52a303..088fd057f3 100644 --- a/src/puya/ir/optimize/dead_code_elimination.py +++ b/src/puya/ir/optimize/dead_code_elimination.py @@ -222,7 +222,7 @@ def remove_unused_variables(_context: CompileContext, subroutine: models.Subrout isinstance(ass.source, models.Intrinsic) and ass.source.op.code in SIDE_EFFECT_FREE_AVM_OPS ): - for reg in registers: + for reg in sorted(registers, key=lambda r: r.local_id): logger.debug(f"Removing unused variable {reg.local_id}") block.ops.remove(ass) modified += 1 From 0c31697053554d4fc64e9e49ad86eba6057fa67a Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Thu, 31 Oct 2024 21:26:51 +0800 Subject: [PATCH 19/20] feat: add support for AVM version 11 --- examples/sizes.txt | 4 +- langspec.json | 946 +++++++++- langspec.puya.json | 877 +++++++--- scripts/generate_avm_ops.py | 12 +- scripts/generate_stubs.py | 27 +- scripts/transform_lang_spec.py | 10 +- src/puya/algo_constants.py | 4 +- src/puya/awst/nodes.py | 12 + src/puya/compile.py | 2 +- src/puya/ir/avm_ops.py | 1518 ++++++++++++++++- src/puya/ir/avm_ops_models.py | 2 + src/puya/ir/main.py | 8 +- src/puya/ir/models.py | 3 +- src/puya/ir/validation/_base.py | 18 +- .../validation/min_avm_version_validator.py | 19 +- src/puya/mir/main.py | 1 + src/puya/mir/models.py | 1 + src/puya/options.py | 4 +- src/puya/teal/main.py | 6 +- src/puya/teal/models.py | 2 +- src/puya/teal/output.py | 2 +- src/puya/ussemble/assemble.py | 2 +- src/puya/ussemble/op_spec.py | 35 +- src/puyapy/__main__.py | 6 +- src/puyapy/awst_build/contract.py | 1 + src/puyapy/awst_build/intrinsic_data.py | 209 +++ src/puyapy/awst_build/module.py | 40 +- src/puyapy/compile.py | 2 +- src/puyapy/models.py | 1 + stubs/algopy-stubs/_contract.pyi | 4 + stubs/algopy-stubs/_logic_sig.pyi | 6 +- stubs/algopy-stubs/op.pyi | 187 ++ stubs/pyproject.toml | 2 +- test_cases/avm_11/contract.py | 42 + test_cases/avm_11/out/Contract.approval.teal | 158 ++ test_cases/avm_11/out/Contract.arc32.json | 50 + test_cases/avm_11/out/Contract.clear.teal | 5 + .../avm_11/out/Contract.destructured.ir | 84 + test_cases/avm_11/out/Contract.ssa.ir | 127 ++ .../avm_11/out/Contract.ssa.opt_pass_1.ir | 87 + .../avm_11/out/Contract.ssa.opt_pass_2.ir | 84 + .../avm_11/out/avm_11_sig.destructured.ir | 6 + test_cases/avm_11/out/avm_11_sig.mir | 11 + test_cases/avm_11/out/avm_11_sig.ssa.ir | 6 + test_cases/avm_11/out/avm_11_sig.teal | 9 + test_cases/avm_11/out/client_Contract.py | 13 + test_cases/avm_11/out/module.awst | 50 + .../avm_11/out_O2/Contract.approval.teal | 107 ++ test_cases/avm_11/out_O2/Contract.clear.teal | 5 + .../avm_11/out_O2/Contract.destructured.ir | 84 + .../avm_11/out_O2/avm_11_sig.destructured.ir | 6 + test_cases/avm_11/out_O2/avm_11_sig.teal | 7 + .../out_unoptimized/Contract.approval.teal | 205 +++ .../out_unoptimized/Contract.clear.teal | 5 + .../out_unoptimized/Contract.destructured.ir | 111 ++ .../avm_11_sig.destructured.ir | 6 + .../avm_11/out_unoptimized/avm_11_sig.teal | 9 + test_cases/avm_11/puya.log | 764 +++++++++ tests/test_assemble.py | 2 +- 59 files changed, 5684 insertions(+), 332 deletions(-) create mode 100644 test_cases/avm_11/contract.py create mode 100644 test_cases/avm_11/out/Contract.approval.teal create mode 100644 test_cases/avm_11/out/Contract.arc32.json create mode 100644 test_cases/avm_11/out/Contract.clear.teal create mode 100644 test_cases/avm_11/out/Contract.destructured.ir create mode 100644 test_cases/avm_11/out/Contract.ssa.ir create mode 100644 test_cases/avm_11/out/Contract.ssa.opt_pass_1.ir create mode 100644 test_cases/avm_11/out/Contract.ssa.opt_pass_2.ir create mode 100644 test_cases/avm_11/out/avm_11_sig.destructured.ir create mode 100644 test_cases/avm_11/out/avm_11_sig.mir create mode 100644 test_cases/avm_11/out/avm_11_sig.ssa.ir create mode 100644 test_cases/avm_11/out/avm_11_sig.teal create mode 100644 test_cases/avm_11/out/client_Contract.py create mode 100644 test_cases/avm_11/out/module.awst create mode 100644 test_cases/avm_11/out_O2/Contract.approval.teal create mode 100644 test_cases/avm_11/out_O2/Contract.clear.teal create mode 100644 test_cases/avm_11/out_O2/Contract.destructured.ir create mode 100644 test_cases/avm_11/out_O2/avm_11_sig.destructured.ir create mode 100644 test_cases/avm_11/out_O2/avm_11_sig.teal create mode 100644 test_cases/avm_11/out_unoptimized/Contract.approval.teal create mode 100644 test_cases/avm_11/out_unoptimized/Contract.clear.teal create mode 100644 test_cases/avm_11/out_unoptimized/Contract.destructured.ir create mode 100644 test_cases/avm_11/out_unoptimized/avm_11_sig.destructured.ir create mode 100644 test_cases/avm_11/out_unoptimized/avm_11_sig.teal create mode 100644 test_cases/avm_11/puya.log diff --git a/examples/sizes.txt b/examples/sizes.txt index c7f78eb440..84e945e831 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -25,6 +25,8 @@ asset/Reference 268 261 - | 144 141 - auction/Auction 592 522 - | 328 281 - augmented_assignment/Augmented 151 156 - | 77 78 - + avm_11 197 149 - | 129 92 - + avm_11/avm_11_sig 6 - - | 4 - - avm_types_in_abi/Test 386 317 - | 237 178 - biguint_binary_ops/BiguintBinaryOps 186 77 - | 100 20 - boolean_binary_ops/BooleanBinaryOps 1124 471 - | 680 258 - @@ -131,4 +133,4 @@ unssa/UnSSA 432 368 - | 241 204 - voting/VotingRoundApp 1590 1483 - | 733 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 70257 54092 54033 | 33497 22056 22012 \ No newline at end of file + Total 70460 54247 54188 | 33630 22152 22108 \ No newline at end of file diff --git a/langspec.json b/langspec.json index e22d04212d..43d5d2e526 100644 --- a/langspec.json +++ b/langspec.json @@ -1,5 +1,5 @@ { - "Version": 10, + "Version": 11, "LogicSigVersion": 10, "NamedTypes": [ { @@ -217,6 +217,10 @@ 0, 0 ], + "ArgEnumVersion": [ + 5, + 7 + ], "DocCost": "Secp256k1=1700; Secp256r1=2500", "Doc": "for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey =\u003e {0 or 1}", "DocExtra": "The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.", @@ -262,6 +266,10 @@ 0, 0 ], + "ArgEnumVersion": [ + 5, + 7 + ], "DocCost": "Secp256k1=650; Secp256r1=2400", "Doc": "decompress pubkey A into components X, Y", "DocExtra": "The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.", @@ -310,6 +318,10 @@ 0, 0 ], + "ArgEnumVersion": [ + 5, + 7 + ], "DocCost": "2000", "Doc": "for (data A, recovery id B, signature C, D) recover a public key", "DocExtra": "S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.", @@ -1475,6 +1487,76 @@ 3, 3 ], + "ArgEnumVersion": [ + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 5, + 5, + 5, + 5, + 5, + 6, + 6, + 7, + 7, + 7, + 7 + ], "DocCost": "1", "Doc": "field F of current transaction", "ImmediateNote": [ @@ -1517,7 +1599,12 @@ "CallerApplicationAddress", "AssetCreateMinBalance", "AssetOptInMinBalance", - "GenesisHash" + "GenesisHash", + "PayoutsEnabled", + "PayoutsGoOnlineFee", + "PayoutsPercent", + "PayoutsMinBalance", + "PayoutsMaxBalance" ], "ArgEnumDoc": [ "microalgos", @@ -1537,7 +1624,12 @@ "The application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.", "The additional minimum balance required to create (and opt-in to) an asset.", "The additional minimum balance required to opt-in to an asset.", - "The Genesis Hash for the network." + "The Genesis Hash for the network.", + "Whether block proposal payouts are enabled.", + "The fee required in a keyreg transaction to make an account incentive eligible.", + "The percentage of transaction fees in a block that can be paid to the block proposer.", + "The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round.", + "The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round." ], "ArgEnumTypes": [ "uint64", @@ -1557,7 +1649,12 @@ "address", "uint64", "uint64", - "[32]byte" + "[32]byte", + "bool", + "uint64", + "uint64", + "uint64", + "uint64" ], "ArgEnumBytes": [ 0, @@ -1577,7 +1674,12 @@ 14, 15, 16, - 17 + 17, + 18, + 19, + 20, + 21, + 22 ], "ArgModes": [ 3, @@ -1597,8 +1699,38 @@ 2, 3, 3, + 3, + 3, + 3, + 3, + 3, 3 ], + "ArgEnumVersion": [ + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 3, + 5, + 5, + 6, + 6, + 6, + 10, + 10, + 10, + 11, + 11, + 11, + 11, + 11 + ], "DocCost": "1", "Doc": "global field F", "ImmediateNote": [ @@ -1973,6 +2105,76 @@ 3, 3 ], + "ArgEnumVersion": [ + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 5, + 5, + 5, + 5, + 5, + 6, + 6, + 7, + 7, + 7, + 7 + ], "DocCost": "1", "Doc": "field F of the Tth transaction in the current group", "DocExtra": "for notes on transaction fields available, see `txn`. If this transaction is _i_ in the group, `gtxn i field` is equivalent to `txn field`.", @@ -2094,6 +2296,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Ith value of the array field F of the current transaction\n`txna` can be called using `txn` with 2 immediates.", "ImmediateNote": [ @@ -2168,6 +2379,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Ith value of the array field F from the Tth transaction in the current group\n`gtxna` can be called using `gtxn` with 3 immediates.", "ImmediateNote": [ @@ -2555,65 +2775,135 @@ 3, 3 ], - "DocCost": "1", - "Doc": "field F of the Ath transaction in the current group", - "DocExtra": "for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.", - "ImmediateNote": [ - { - "Comment": "transaction field index", - "Encoding": "uint8", - "Name": "F", - "Reference": "txn" - } - ], - "IntroducedVersion": 3, - "Groups": [ - "Loading Values" - ], - "Modes": 3 - }, - { - "Opcode": 57, - "Name": "gtxnsa", - "Cost": "1", - "Args": [ - "uint64" - ], - "Returns": [ - "any" - ], - "Size": 3, - "ArgEnum": [ - "ApplicationArgs", - "Accounts", - "Assets", - "Applications", - "Logs", - "ApprovalProgramPages", - "ClearStateProgramPages" - ], - "ArgEnumDoc": [ - "Arguments passed to the application in the ApplicationCall transaction", - "Accounts listed in the ApplicationCall transaction", - "Foreign Assets listed in the ApplicationCall transaction", - "Foreign Apps listed in the ApplicationCall transaction", - "Log messages emitted by an application call (only with `itxn` in v5). Application mode only", - "Approval Program as an array of pages", - "ClearState Program as an array of pages" - ], - "ArgEnumTypes": [ - "[]byte", - "address", - "uint64", - "uint64", - "[]byte", - "[]byte", - "[]byte" - ], - "ArgEnumBytes": [ - 26, - 28, - 48, + "ArgEnumVersion": [ + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 5, + 5, + 5, + 5, + 5, + 6, + 6, + 7, + 7, + 7, + 7 + ], + "DocCost": "1", + "Doc": "field F of the Ath transaction in the current group", + "DocExtra": "for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.", + "ImmediateNote": [ + { + "Comment": "transaction field index", + "Encoding": "uint8", + "Name": "F", + "Reference": "txn" + } + ], + "IntroducedVersion": 3, + "Groups": [ + "Loading Values" + ], + "Modes": 3 + }, + { + "Opcode": 57, + "Name": "gtxnsa", + "Cost": "1", + "Args": [ + "uint64" + ], + "Returns": [ + "any" + ], + "Size": 3, + "ArgEnum": [ + "ApplicationArgs", + "Accounts", + "Assets", + "Applications", + "Logs", + "ApprovalProgramPages", + "ClearStateProgramPages" + ], + "ArgEnumDoc": [ + "Arguments passed to the application in the ApplicationCall transaction", + "Accounts listed in the ApplicationCall transaction", + "Foreign Assets listed in the ApplicationCall transaction", + "Foreign Apps listed in the ApplicationCall transaction", + "Log messages emitted by an application call (only with `itxn` in v5). Application mode only", + "Approval Program as an array of pages", + "ClearState Program as an array of pages" + ], + "ArgEnumTypes": [ + "[]byte", + "address", + "uint64", + "uint64", + "[]byte", + "[]byte", + "[]byte" + ], + "ArgEnumBytes": [ + 26, + 28, + 48, 50, 58, 64, @@ -2628,6 +2918,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Ith value of the array field F from the Ath transaction in the current group\n`gtxnsa` can be called using `gtxns` with 2 immediates.", "ImmediateNote": [ @@ -3480,6 +3779,10 @@ 0, 0 ], + "ArgEnumVersion": [ + 6, + 6 + ], "DocCost": "1 + 1 per 16 bytes of A", "Doc": "decode A which was base64-encoded using _encoding_ E. Fail if A is not base64 encoded with encoding E", "DocExtra": "*Warning*: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings.\tThis opcode should only be used in cases where base64 is the only available option, e.g. interoperability with a third-party that only signs base64 strings.\n\n Decodes A using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (`URLEncoding`) or Standard (`StdEncoding`). See [RFC 4648 sections 4 and 5](https://rfc-editor.org/rfc/rfc4648.html#section-4). It is assumed that the encoding ends with the exact number of `=` padding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of `\\n` and `\\r` are allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of `=`, `\\r`, or `\\n`.", @@ -3534,6 +3837,11 @@ 0, 0 ], + "ArgEnumVersion": [ + 7, + 7, + 7 + ], "DocCost": "25 + 2 per 7 bytes of A", "Doc": "key B's value, of type R, from a [valid](jsonspec.md) utf-8 encoded json object A", "DocExtra": "*Warning*: Usage should be restricted to very rare use cases, as JSON decoding is expensive and quite limited. In addition, JSON objects are large and not optimized for size.\n\nAlmost all smart contracts should use simpler and smaller methods (such as the [ABI](https://arc.algorand.foundation/ARCs/arc-0004). This opcode should only be used in cases where JSON is only available option, e.g. when a third-party only signs JSON.", @@ -3782,6 +4090,10 @@ 0, 0 ], + "ArgEnumVersion": [ + 2, + 2 + ], "DocCost": "1", "Doc": "X is field F from account A's holding of asset B. Y is 1 if A is opted into B, else 0", "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.", @@ -3881,6 +4193,20 @@ 0, 0 ], + "ArgEnumVersion": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 5 + ], "DocCost": "1", "Doc": "X is field F from asset A. Y is 1 if A exists, else 0", "DocExtra": "params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.", @@ -3965,6 +4291,17 @@ 0, 0 ], + "ArgEnumVersion": [ + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5 + ], "DocCost": "1", "Doc": "X is field F from app A. Y is 1 if A exists, else 0", "DocExtra": "params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.", @@ -4006,7 +4343,10 @@ "AcctTotalAssetsCreated", "AcctTotalAssets", "AcctTotalBoxes", - "AcctTotalBoxBytes" + "AcctTotalBoxBytes", + "AcctIncentiveEligible", + "AcctLastProposed", + "AcctLastHeartbeat" ], "ArgEnumDoc": [ "Account balance in microalgos", @@ -4020,7 +4360,10 @@ "The number of existing ASAs created by this account.", "The numbers of ASAs held by this account (including ASAs this account created).", "The number of existing boxes created by this account's app.", - "The total number of bytes used by this account's app's box keys and values." + "The total number of bytes used by this account's app's box keys and values.", + "Has this account opted into block payouts", + "The round number of the last block this account proposed.", + "The round number of the last block this account sent a heartbeat." ], "ArgEnumTypes": [ "uint64", @@ -4034,6 +4377,9 @@ "uint64", "uint64", "uint64", + "uint64", + "bool", + "uint64", "uint64" ], "ArgEnumBytes": [ @@ -4048,7 +4394,10 @@ 8, 9, 10, - 11 + 11, + 12, + 13, + 14 ], "ArgModes": [ 0, @@ -4062,8 +4411,28 @@ 0, 0, 0, + 0, + 0, + 0, 0 ], + "ArgEnumVersion": [ + 6, + 6, + 6, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 11, + 11, + 11 + ], "DocCost": "1", "Doc": "X is field F from account A. Y is 1 if A owns positive algos, else 0", "ImmediateNote": [ @@ -4080,6 +4449,74 @@ ], "Modes": 2 }, + { + "Opcode": 116, + "Name": "voter_params_get", + "Cost": "1", + "Args": [ + "any" + ], + "Returns": [ + "any", + "bool" + ], + "Size": 2, + "ArgEnum": [ + "VoterBalance", + "VoterIncentiveEligible" + ], + "ArgEnumDoc": [ + "Online stake in microalgos", + "Had this account opted into block payouts" + ], + "ArgEnumTypes": [ + "uint64", + "bool" + ], + "ArgEnumBytes": [ + 0, + 1 + ], + "ArgModes": [ + 2, + 2 + ], + "ArgEnumVersion": [ + 6, + 11 + ], + "DocCost": "1", + "Doc": "X is field F from online account A as of the balance round: 320 rounds before the current round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a type specific zero-value", + "ImmediateNote": [ + { + "Comment": "voter params field index", + "Encoding": "uint8", + "Name": "F", + "Reference": "voter_params" + } + ], + "IntroducedVersion": 11, + "Groups": [ + "State Access" + ], + "Modes": 2 + }, + { + "Opcode": 117, + "Name": "online_stake", + "Cost": "1", + "Returns": [ + "uint64" + ], + "Size": 1, + "DocCost": "1", + "Doc": "the total online stake in the agreement round", + "IntroducedVersion": 11, + "Groups": [ + "State Access" + ], + "Modes": 2 + }, { "Opcode": 120, "Name": "min_balance", @@ -4211,6 +4648,46 @@ ], "Modes": 3 }, + { + "Opcode": 133, + "Name": "falcon_verify", + "Cost": "1700", + "Args": [ + "[]byte", + "[1232]byte", + "[1793]byte" + ], + "Returns": [ + "bool" + ], + "Size": 1, + "DocCost": "1700", + "Doc": "for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey", + "IntroducedVersion": 11, + "Groups": [ + "Cryptography" + ], + "Modes": 3 + }, + { + "Opcode": 134, + "Name": "sumhash512", + "Cost": "150 + 7 per 4 bytes of A", + "Args": [ + "[]byte" + ], + "Returns": [ + "[64]byte" + ], + "Size": 1, + "DocCost": "150 + 7 per 4 bytes of A", + "Doc": "sumhash512 of value A, yields [64]byte", + "IntroducedVersion": 11, + "Groups": [ + "Cryptography" + ], + "Modes": 3 + }, { "Opcode": 136, "Name": "callsub", @@ -5162,7 +5639,60 @@ 3, 3, 3, - 3 + 3 + ], + "ArgEnumVersion": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 5, + 6, + 7, + 7 ], "DocCost": "1", "Doc": "set field F of the current inner transaction to A", @@ -5553,6 +6083,76 @@ 3, 3 ], + "ArgEnumVersion": [ + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 5, + 5, + 5, + 5, + 5, + 6, + 6, + 7, + 7, + 7, + 7 + ], "DocCost": "1", "Doc": "field F of the last inner transaction", "ImmediateNote": [ @@ -5622,6 +6222,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Ith value of the array field F of the last inner transaction", "ImmediateNote": [ @@ -6015,6 +6624,76 @@ 3, 3 ], + "ArgEnumVersion": [ + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 5, + 5, + 5, + 5, + 5, + 6, + 6, + 7, + 7, + 7, + 7 + ], "DocCost": "1", "Doc": "field F of the Tth transaction in the last inner group submitted", "ImmediateNote": [ @@ -6089,6 +6768,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Ith value of the array field F from the Tth transaction in the last inner group submitted", "ImmediateNote": [ @@ -6309,6 +6997,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Ath value of the array field F of the current transaction", "ImmediateNote": [ @@ -6381,6 +7078,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Ath value of the array field F from the Tth transaction in the current group", "ImmediateNote": [ @@ -6459,6 +7165,15 @@ 3, 3 ], + "ArgEnumVersion": [ + 2, + 2, + 3, + 3, + 5, + 7, + 7 + ], "DocCost": "1", "Doc": "Bth value of the array field F from the Ath transaction in the current group", "ImmediateNote": [ @@ -6599,6 +7314,9 @@ "ArgModes": [ 0 ], + "ArgEnumVersion": [ + 7 + ], "DocCost": "5700", "Doc": "Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.", "DocExtra": "`VrfAlgorand` is the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft [draft-irtf-cfrg-vrf-03](https://datatracker.ietf.org/doc/draft-irtf-cfrg-vrf/03/).", @@ -6629,24 +7347,76 @@ "Size": 2, "ArgEnum": [ "BlkSeed", - "BlkTimestamp" + "BlkTimestamp", + "BlkProposer", + "BlkFeesCollected", + "BlkBonus", + "BlkBranch", + "BlkFeeSink", + "BlkProtocol", + "BlkTxnCounter", + "BlkProposerPayout" ], "ArgEnumDoc": [ + "", + "", + "", + "", + "", + "", + "", + "", "", "" ], "ArgEnumTypes": [ + "[32]byte", + "uint64", + "address", + "uint64", + "uint64", + "[32]byte", + "address", "[]byte", + "uint64", "uint64" ], "ArgEnumBytes": [ 0, - 1 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 ], "ArgModes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, 0, 0 ], + "ArgEnumVersion": [ + 7, + 7, + 11, + 11, + 11, + 11, + 11, + 11, + 11, + 11 + ], "DocCost": "1", "Doc": "field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)", "ImmediateNote": [ @@ -6736,6 +7506,12 @@ 0, 0 ], + "ArgEnumVersion": [ + 10, + 10, + 10, + 10 + ], "DocCost": "BN254g1=125; BN254g2=170; BLS12_381g1=205; BLS12_381g2=290", "Doc": "for curve points A and B, return the curve point A + B", "DocExtra": "A and B are curve points in affine representation: field element X concatenated with field element Y. Field element `Z` is encoded as follows.\nFor the base field elements (Fp), `Z` is encoded as a big-endian number and must be lower than the field modulus.\nFor the quadratic field extension (Fp2), `Z` is encoded as the concatenation of the individual encoding of the coefficients. For an Fp2 element of the form `Z = Z0 + Z1 i`, where `i` is a formal quadratic non-residue, the encoding of Z is the concatenation of the encoding of `Z0` and `Z1` in this order. (`Z0` and `Z1` must be less than the field modulus).\n\nThe point at infinity is encoded as `(X,Y) = (0,0)`.\nGroups G1 and G2 are denoted additively.\n\nFails if A or B is not in G.\nA and/or B are allowed to be the point at infinity.\nDoes _not_ check if A and B are in the main prime-order subgroup.", @@ -6789,6 +7565,12 @@ 0, 0 ], + "ArgEnumVersion": [ + 10, + 10, + 10, + 10 + ], "DocCost": "BN254g1=1810; BN254g2=3430; BLS12_381g1=2950; BLS12_381g2=6530", "Doc": "for curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.", "DocExtra": "A is a curve point encoded and checked as described in `ec_add`. Scalar B is interpreted as a big-endian unsigned integer. Fails if B exceeds 32 bytes.", @@ -6842,6 +7624,12 @@ 0, 0 ], + "ArgEnumVersion": [ + 10, + 10, + 10, + 10 + ], "DocCost": "BN254g1=8000 + 7400 per 64 bytes of B; BN254g2=8000 + 7400 per 128 bytes of B; BLS12_381g1=13000 + 10000 per 96 bytes of B; BLS12_381g2=13000 + 10000 per 192 bytes of B", "Doc": "1 if the product of the pairing of each point in A with its respective point in B is equal to the identity element of the target group Gt, else 0", "DocExtra": "A and B are concatenated points, encoded and checked as described in `ec_add`. A contains points of the group G, B contains points of the associated group (G2 if G is G1, and vice versa). Fails if A and B have a different number of points, or if any point is not in its described group or outside the main prime-order subgroup - a stronger condition than other opcodes. AVM values are limited to 4096 bytes, so `ec_pairing_check` is limited by the size of the points in the groups being operated upon.", @@ -6895,6 +7683,12 @@ 0, 0 ], + "ArgEnumVersion": [ + 10, + 10, + 10, + 10 + ], "DocCost": "BN254g1=3600 + 90 per 32 bytes of B; BN254g2=7200 + 270 per 32 bytes of B; BLS12_381g1=6500 + 95 per 32 bytes of B; BLS12_381g2=14850 + 485 per 32 bytes of B", "Doc": "for curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + ... + BnAn", "DocExtra": "A is a list of concatenated points, encoded and checked as described in `ec_add`. B is a list of concatenated scalars which, unlike ec_scalar_mul, must all be exactly 32 bytes long.\nThe name `ec_multi_scalar_mul` was chosen to reflect common usage, but a more consistent name would be `ec_multi_scalar_mul`. AVM values are limited to 4096 bytes, so `ec_multi_scalar_mul` is limited by the size of the points in the group being operated upon.", @@ -6947,6 +7741,12 @@ 0, 0 ], + "ArgEnumVersion": [ + 10, + 10, + 10, + 10 + ], "DocCost": "BN254g1=20; BN254g2=3100; BLS12_381g1=1850; BLS12_381g2=2340", "Doc": "1 if A is in the main prime-order subgroup of G (including the point at infinity) else 0. Program fails if A is not in G at all.", "ImmediateNote": [ @@ -6998,6 +7798,12 @@ 0, 0 ], + "ArgEnumVersion": [ + 10, + 10, + 10, + 10 + ], "DocCost": "BN254g1=630; BN254g2=3300; BLS12_381g1=1950; BLS12_381g2=8150", "Doc": "maps field element A to group G", "DocExtra": "BN254 points are mapped by the SVDW map. BLS12-381 points are mapped by the SSWU map.\nG1 element inputs are base field elements and G2 element inputs are quadratic field elements, with nearly the same encoding rules (for field elements) as defined in `ec_add`. There is one difference of encoding rule: G1 element inputs do not need to be 0-padded if they fit in less than 32 bytes for BN254 and less than 48 bytes for BLS12-381. (As usual, the empty byte array represents 0.) G2 elements inputs need to be always have the required size.", diff --git a/langspec.puya.json b/langspec.puya.json index 2cf952cc0e..e7ef1e7a4e 100644 --- a/langspec.puya.json +++ b/langspec.puya.json @@ -4079,6 +4079,49 @@ } ] }, + "falcon_verify": { + "name": "falcon_verify", + "code": 133, + "size": 1, + "doc": [ + "for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey" + ], + "cost": { + "value": 1700, + "doc": "1700" + }, + "min_avm_version": 11, + "halts": false, + "mode": "any", + "groups": [ + "Cryptography" + ], + "stack_inputs": [ + { + "name": "A", + "stack_type": "[]byte", + "doc": null + }, + { + "name": "B", + "stack_type": "[1232]byte", + "doc": null + }, + { + "name": "C", + "stack_type": "[1793]byte", + "doc": null + } + ], + "immediate_args": [], + "stack_outputs": [ + { + "name": "X", + "stack_type": "bool", + "doc": null + } + ] + }, "frame_bury": { "name": "frame_bury", "code": 140, @@ -5650,6 +5693,33 @@ } ] }, + "online_stake": { + "name": "online_stake", + "code": 117, + "size": 1, + "doc": [ + "the total online stake in the agreement round" + ], + "cost": { + "value": 1, + "doc": "1" + }, + "min_avm_version": 11, + "halts": false, + "mode": "app", + "groups": [ + "State Access" + ], + "stack_inputs": [], + "immediate_args": [], + "stack_outputs": [ + { + "name": "X", + "stack_type": "uint64", + "doc": null + } + ] + }, "pop": { "name": "pop", "code": 72, @@ -6522,6 +6592,39 @@ } ] }, + "sumhash512": { + "name": "sumhash512", + "code": 134, + "size": 1, + "doc": [ + "sumhash512 of value A, yields [64]byte" + ], + "cost": { + "value": null, + "doc": "150 + 7 per 4 bytes of A" + }, + "min_avm_version": 11, + "halts": false, + "mode": "any", + "groups": [ + "Cryptography" + ], + "stack_inputs": [ + { + "name": "A", + "stack_type": "[]byte", + "doc": null + } + ], + "immediate_args": [], + "stack_outputs": [ + { + "name": "X", + "stack_type": "[64]byte", + "doc": null + } + ] + }, "swap": { "name": "swap", "code": 76, @@ -6766,6 +6869,53 @@ } ] }, + "voter_params_get": { + "name": "voter_params_get", + "code": 116, + "size": 2, + "doc": [ + "X is field F from online account A as of the balance round: 320 rounds before the current round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a type specific zero-value" + ], + "cost": { + "value": 1, + "doc": "1" + }, + "min_avm_version": 11, + "halts": false, + "mode": "app", + "groups": [ + "State Access" + ], + "stack_inputs": [ + { + "name": "A", + "stack_type": "any", + "doc": null + } + ], + "immediate_args": [ + { + "name": "F", + "immediate_type": "arg_enum", + "arg_enum": "voter_params", + "modifies_stack_input": null, + "modifies_stack_output": 0, + "doc": "voter params field index" + } + ], + "stack_outputs": [ + { + "name": "X", + "stack_type": "any", + "doc": null + }, + { + "name": "Y", + "stack_type": "bool", + "doc": null + } + ] + }, "vrf_verify": { "name": "vrf_verify", "code": 208, @@ -6941,84 +7091,120 @@ "doc": "Account balance in microalgos", "stack_type": "uint64", "mode": "app", - "value": 0 + "value": 0, + "min_avm_version": 6 }, { "name": "AcctMinBalance", "doc": "Minimum required balance for account, in microalgos", "stack_type": "uint64", "mode": "app", - "value": 1 + "value": 1, + "min_avm_version": 6 }, { "name": "AcctAuthAddr", "doc": "Address the account is rekeyed to.", "stack_type": "address", "mode": "app", - "value": 2 + "value": 2, + "min_avm_version": 6 }, { "name": "AcctTotalNumUint", "doc": "The total number of uint64 values allocated by this account in Global and Local States.", "stack_type": "uint64", "mode": "app", - "value": 3 + "value": 3, + "min_avm_version": 8 }, { "name": "AcctTotalNumByteSlice", "doc": "The total number of byte array values allocated by this account in Global and Local States.", "stack_type": "uint64", "mode": "app", - "value": 4 + "value": 4, + "min_avm_version": 8 }, { "name": "AcctTotalExtraAppPages", "doc": "The number of extra app code pages used by this account.", "stack_type": "uint64", "mode": "app", - "value": 5 + "value": 5, + "min_avm_version": 8 }, { "name": "AcctTotalAppsCreated", "doc": "The number of existing apps created by this account.", "stack_type": "uint64", "mode": "app", - "value": 6 + "value": 6, + "min_avm_version": 8 }, { "name": "AcctTotalAppsOptedIn", "doc": "The number of apps this account is opted into.", "stack_type": "uint64", "mode": "app", - "value": 7 + "value": 7, + "min_avm_version": 8 }, { "name": "AcctTotalAssetsCreated", "doc": "The number of existing ASAs created by this account.", "stack_type": "uint64", "mode": "app", - "value": 8 + "value": 8, + "min_avm_version": 8 }, { "name": "AcctTotalAssets", "doc": "The numbers of ASAs held by this account (including ASAs this account created).", "stack_type": "uint64", "mode": "app", - "value": 9 + "value": 9, + "min_avm_version": 8 }, { "name": "AcctTotalBoxes", "doc": "The number of existing boxes created by this account's app.", "stack_type": "uint64", "mode": "app", - "value": 10 + "value": 10, + "min_avm_version": 8 }, { "name": "AcctTotalBoxBytes", "doc": "The total number of bytes used by this account's app's box keys and values.", "stack_type": "uint64", "mode": "app", - "value": 11 + "value": 11, + "min_avm_version": 8 + }, + { + "name": "AcctIncentiveEligible", + "doc": "Has this account opted into block payouts", + "stack_type": "bool", + "mode": "app", + "value": 12, + "min_avm_version": 11 + }, + { + "name": "AcctLastProposed", + "doc": "The round number of the last block this account proposed.", + "stack_type": "uint64", + "mode": "app", + "value": 13, + "min_avm_version": 11 + }, + { + "name": "AcctLastHeartbeat", + "doc": "The round number of the last block this account sent a heartbeat.", + "stack_type": "uint64", + "mode": "app", + "value": 14, + "min_avm_version": 11 } ], "app_params": [ @@ -7027,63 +7213,72 @@ "doc": "Bytecode of Approval Program", "stack_type": "[]byte", "mode": "app", - "value": 0 + "value": 0, + "min_avm_version": 5 }, { "name": "AppClearStateProgram", "doc": "Bytecode of Clear State Program", "stack_type": "[]byte", "mode": "app", - "value": 1 + "value": 1, + "min_avm_version": 5 }, { "name": "AppGlobalNumUint", "doc": "Number of uint64 values allowed in Global State", "stack_type": "uint64", "mode": "app", - "value": 2 + "value": 2, + "min_avm_version": 5 }, { "name": "AppGlobalNumByteSlice", "doc": "Number of byte array values allowed in Global State", "stack_type": "uint64", "mode": "app", - "value": 3 + "value": 3, + "min_avm_version": 5 }, { "name": "AppLocalNumUint", "doc": "Number of uint64 values allowed in Local State", "stack_type": "uint64", "mode": "app", - "value": 4 + "value": 4, + "min_avm_version": 5 }, { "name": "AppLocalNumByteSlice", "doc": "Number of byte array values allowed in Local State", "stack_type": "uint64", "mode": "app", - "value": 5 + "value": 5, + "min_avm_version": 5 }, { "name": "AppExtraProgramPages", "doc": "Number of Extra Program Pages of code space", "stack_type": "uint64", "mode": "app", - "value": 6 + "value": 6, + "min_avm_version": 5 }, { "name": "AppCreator", "doc": "Creator address", "stack_type": "address", "mode": "app", - "value": 7 + "value": 7, + "min_avm_version": 5 }, { "name": "AppAddress", "doc": "Address for which this application has authority", "stack_type": "address", "mode": "app", - "value": 8 + "value": 8, + "min_avm_version": 5 } ], "asset_holding": [ @@ -7092,14 +7287,16 @@ "doc": "Amount of the asset unit held by this account", "stack_type": "uint64", "mode": "app", - "value": 0 + "value": 0, + "min_avm_version": 2 }, { "name": "AssetFrozen", "doc": "Is the asset frozen or not", "stack_type": "bool", "mode": "app", - "value": 1 + "value": 1, + "min_avm_version": 2 } ], "asset_params": [ @@ -7108,84 +7305,96 @@ "doc": "Total number of units of this asset", "stack_type": "uint64", "mode": "app", - "value": 0 + "value": 0, + "min_avm_version": 2 }, { "name": "AssetDecimals", "doc": "See AssetParams.Decimals", "stack_type": "uint64", "mode": "app", - "value": 1 + "value": 1, + "min_avm_version": 2 }, { "name": "AssetDefaultFrozen", "doc": "Frozen by default or not", "stack_type": "bool", "mode": "app", - "value": 2 + "value": 2, + "min_avm_version": 2 }, { "name": "AssetUnitName", "doc": "Asset unit name", "stack_type": "[]byte", "mode": "app", - "value": 3 + "value": 3, + "min_avm_version": 2 }, { "name": "AssetName", "doc": "Asset name", "stack_type": "[]byte", "mode": "app", - "value": 4 + "value": 4, + "min_avm_version": 2 }, { "name": "AssetURL", "doc": "URL with additional info about the asset", "stack_type": "[]byte", "mode": "app", - "value": 5 + "value": 5, + "min_avm_version": 2 }, { "name": "AssetMetadataHash", "doc": "Arbitrary commitment", "stack_type": "[32]byte", "mode": "app", - "value": 6 + "value": 6, + "min_avm_version": 2 }, { "name": "AssetManager", "doc": "Manager address", "stack_type": "address", "mode": "app", - "value": 7 + "value": 7, + "min_avm_version": 2 }, { "name": "AssetReserve", "doc": "Reserve address", "stack_type": "address", "mode": "app", - "value": 8 + "value": 8, + "min_avm_version": 2 }, { "name": "AssetFreeze", "doc": "Freeze address", "stack_type": "address", "mode": "app", - "value": 9 + "value": 9, + "min_avm_version": 2 }, { "name": "AssetClawback", "doc": "Clawback address", "stack_type": "address", "mode": "app", - "value": 10 + "value": 10, + "min_avm_version": 2 }, { "name": "AssetCreator", "doc": "Creator address", "stack_type": "address", "mode": "app", - "value": 11 + "value": 11, + "min_avm_version": 5 } ], "base64": [ @@ -7194,30 +7403,98 @@ "doc": null, "stack_type": null, "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 6 }, { "name": "StdEncoding", "doc": null, "stack_type": null, "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 6 } ], "block": [ { "name": "BlkSeed", "doc": null, - "stack_type": "[]byte", + "stack_type": "[32]byte", "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 7 }, { "name": "BlkTimestamp", "doc": null, "stack_type": "uint64", "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 7 + }, + { + "name": "BlkProposer", + "doc": null, + "stack_type": "address", + "mode": "any", + "value": 2, + "min_avm_version": 11 + }, + { + "name": "BlkFeesCollected", + "doc": null, + "stack_type": "uint64", + "mode": "any", + "value": 3, + "min_avm_version": 11 + }, + { + "name": "BlkBonus", + "doc": null, + "stack_type": "uint64", + "mode": "any", + "value": 4, + "min_avm_version": 11 + }, + { + "name": "BlkBranch", + "doc": null, + "stack_type": "[32]byte", + "mode": "any", + "value": 5, + "min_avm_version": 11 + }, + { + "name": "BlkFeeSink", + "doc": null, + "stack_type": "address", + "mode": "any", + "value": 6, + "min_avm_version": 11 + }, + { + "name": "BlkProtocol", + "doc": null, + "stack_type": "[]byte", + "mode": "any", + "value": 7, + "min_avm_version": 11 + }, + { + "name": "BlkTxnCounter", + "doc": null, + "stack_type": "uint64", + "mode": "any", + "value": 8, + "min_avm_version": 11 + }, + { + "name": "BlkProposerPayout", + "doc": null, + "stack_type": "uint64", + "mode": "any", + "value": 9, + "min_avm_version": 11 } ], "EC": [ @@ -7226,28 +7503,32 @@ "doc": "G1 of the BN254 curve. Points encoded as 32 byte X following by 32 byte Y", "stack_type": null, "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 10 }, { "name": "BN254g2", "doc": "G2 of the BN254 curve. Points encoded as 64 byte X following by 64 byte Y", "stack_type": null, "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 10 }, { "name": "BLS12_381g1", "doc": "G1 of the BLS 12-381 curve. Points encoded as 48 byte X following by 48 byte Y", "stack_type": null, "mode": "any", - "value": 2 + "value": 2, + "min_avm_version": 10 }, { "name": "BLS12_381g2", "doc": "G2 of the BLS 12-381 curve. Points encoded as 96 byte X following by 96 byte Y", "stack_type": null, "mode": "any", - "value": 3 + "value": 3, + "min_avm_version": 10 } ], "ECDSA": [ @@ -7256,14 +7537,16 @@ "doc": "secp256k1 curve, used in Bitcoin", "stack_type": null, "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 5 }, { "name": "Secp256r1", "doc": "secp256r1 curve, NIST standard", "stack_type": null, "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 7 } ], "txn": [ @@ -7272,476 +7555,544 @@ "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 0 }, { "name": "Fee", "doc": "microalgos", "stack_type": "uint64", "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 0 }, { "name": "FirstValid", "doc": "round number", "stack_type": "uint64", "mode": "any", - "value": 2 + "value": 2, + "min_avm_version": 0 }, { "name": "FirstValidTime", "doc": "UNIX timestamp of block before txn.FirstValid. Fails if negative", "stack_type": "uint64", "mode": "any", - "value": 3 + "value": 3, + "min_avm_version": 7 }, { "name": "LastValid", "doc": "round number", "stack_type": "uint64", "mode": "any", - "value": 4 + "value": 4, + "min_avm_version": 0 }, { "name": "Note", "doc": "Any data up to 1024 bytes", "stack_type": "[]byte", "mode": "any", - "value": 5 + "value": 5, + "min_avm_version": 0 }, { "name": "Lease", "doc": "32 byte lease value", "stack_type": "[32]byte", "mode": "any", - "value": 6 + "value": 6, + "min_avm_version": 0 }, { "name": "Receiver", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 7 + "value": 7, + "min_avm_version": 0 }, { "name": "Amount", "doc": "microalgos", "stack_type": "uint64", "mode": "any", - "value": 8 + "value": 8, + "min_avm_version": 0 }, { "name": "CloseRemainderTo", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 9 + "value": 9, + "min_avm_version": 0 }, { "name": "VotePK", "doc": "32 byte address", "stack_type": "[32]byte", "mode": "any", - "value": 10 + "value": 10, + "min_avm_version": 0 }, { "name": "SelectionPK", "doc": "32 byte address", "stack_type": "[32]byte", "mode": "any", - "value": 11 + "value": 11, + "min_avm_version": 0 }, { "name": "VoteFirst", "doc": "The first round that the participation key is valid.", "stack_type": "uint64", "mode": "any", - "value": 12 + "value": 12, + "min_avm_version": 0 }, { "name": "VoteLast", "doc": "The last round that the participation key is valid.", "stack_type": "uint64", "mode": "any", - "value": 13 + "value": 13, + "min_avm_version": 0 }, { "name": "VoteKeyDilution", "doc": "Dilution for the 2-level participation key", "stack_type": "uint64", "mode": "any", - "value": 14 + "value": 14, + "min_avm_version": 0 }, { "name": "Type", "doc": "Transaction type as bytes", "stack_type": "[]byte", "mode": "any", - "value": 15 + "value": 15, + "min_avm_version": 0 }, { "name": "TypeEnum", "doc": "Transaction type as integer", "stack_type": "uint64", "mode": "any", - "value": 16 + "value": 16, + "min_avm_version": 0 }, { "name": "XferAsset", "doc": "Asset ID", "stack_type": "asset", "mode": "any", - "value": 17 + "value": 17, + "min_avm_version": 0 }, { "name": "AssetAmount", "doc": "value in Asset's units", "stack_type": "uint64", "mode": "any", - "value": 18 + "value": 18, + "min_avm_version": 0 }, { "name": "AssetSender", "doc": "32 byte address. Source of assets if Sender is the Asset's Clawback address.", "stack_type": "address", "mode": "any", - "value": 19 + "value": 19, + "min_avm_version": 0 }, { "name": "AssetReceiver", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 20 + "value": 20, + "min_avm_version": 0 }, { "name": "AssetCloseTo", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 21 + "value": 21, + "min_avm_version": 0 }, { "name": "GroupIndex", "doc": "Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1", "stack_type": "uint64", "mode": "any", - "value": 22 + "value": 22, + "min_avm_version": 0 }, { "name": "TxID", "doc": "The computed ID for this transaction. 32 bytes.", "stack_type": "[32]byte", "mode": "any", - "value": 23 + "value": 23, + "min_avm_version": 0 }, { "name": "ApplicationID", "doc": "ApplicationID from ApplicationCall transaction", "stack_type": "application", "mode": "any", - "value": 24 + "value": 24, + "min_avm_version": 2 }, { "name": "OnCompletion", "doc": "ApplicationCall transaction on completion action", "stack_type": "uint64", "mode": "any", - "value": 25 + "value": 25, + "min_avm_version": 2 }, { "name": "ApplicationArgs", "doc": "Arguments passed to the application in the ApplicationCall transaction", "stack_type": "[]byte", "mode": "any", - "value": 26 + "value": 26, + "min_avm_version": 2 }, { "name": "NumAppArgs", "doc": "Number of ApplicationArgs", "stack_type": "uint64", "mode": "any", - "value": 27 + "value": 27, + "min_avm_version": 2 }, { "name": "Accounts", "doc": "Accounts listed in the ApplicationCall transaction", "stack_type": "address", "mode": "any", - "value": 28 + "value": 28, + "min_avm_version": 2 }, { "name": "NumAccounts", "doc": "Number of Accounts", "stack_type": "uint64", "mode": "any", - "value": 29 + "value": 29, + "min_avm_version": 2 }, { "name": "ApprovalProgram", "doc": "Approval program", "stack_type": "[]byte", "mode": "any", - "value": 30 + "value": 30, + "min_avm_version": 2 }, { "name": "ClearStateProgram", "doc": "Clear state program", "stack_type": "[]byte", "mode": "any", - "value": 31 + "value": 31, + "min_avm_version": 2 }, { "name": "RekeyTo", "doc": "32 byte Sender's new AuthAddr", "stack_type": "address", "mode": "any", - "value": 32 + "value": 32, + "min_avm_version": 2 }, { "name": "ConfigAsset", "doc": "Asset ID in asset config transaction", "stack_type": "asset", "mode": "any", - "value": 33 + "value": 33, + "min_avm_version": 2 }, { "name": "ConfigAssetTotal", "doc": "Total number of units of this asset created", "stack_type": "uint64", "mode": "any", - "value": 34 + "value": 34, + "min_avm_version": 2 }, { "name": "ConfigAssetDecimals", "doc": "Number of digits to display after the decimal place when displaying the asset", "stack_type": "uint64", "mode": "any", - "value": 35 + "value": 35, + "min_avm_version": 2 }, { "name": "ConfigAssetDefaultFrozen", "doc": "Whether the asset's slots are frozen by default or not, 0 or 1", "stack_type": "bool", "mode": "any", - "value": 36 + "value": 36, + "min_avm_version": 2 }, { "name": "ConfigAssetUnitName", "doc": "Unit name of the asset", "stack_type": "[]byte", "mode": "any", - "value": 37 + "value": 37, + "min_avm_version": 2 }, { "name": "ConfigAssetName", "doc": "The asset name", "stack_type": "[]byte", "mode": "any", - "value": 38 + "value": 38, + "min_avm_version": 2 }, { "name": "ConfigAssetURL", "doc": "URL", "stack_type": "[]byte", "mode": "any", - "value": 39 + "value": 39, + "min_avm_version": 2 }, { "name": "ConfigAssetMetadataHash", "doc": "32 byte commitment to unspecified asset metadata", "stack_type": "[32]byte", "mode": "any", - "value": 40 + "value": 40, + "min_avm_version": 2 }, { "name": "ConfigAssetManager", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 41 + "value": 41, + "min_avm_version": 2 }, { "name": "ConfigAssetReserve", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 42 + "value": 42, + "min_avm_version": 2 }, { "name": "ConfigAssetFreeze", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 43 + "value": 43, + "min_avm_version": 2 }, { "name": "ConfigAssetClawback", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 44 + "value": 44, + "min_avm_version": 2 }, { "name": "FreezeAsset", "doc": "Asset ID being frozen or un-frozen", "stack_type": "asset", "mode": "any", - "value": 45 + "value": 45, + "min_avm_version": 2 }, { "name": "FreezeAssetAccount", "doc": "32 byte address of the account whose asset slot is being frozen or un-frozen", "stack_type": "address", "mode": "any", - "value": 46 + "value": 46, + "min_avm_version": 2 }, { "name": "FreezeAssetFrozen", "doc": "The new frozen value, 0 or 1", "stack_type": "bool", "mode": "any", - "value": 47 + "value": 47, + "min_avm_version": 2 }, { "name": "Assets", "doc": "Foreign Assets listed in the ApplicationCall transaction", "stack_type": "uint64", "mode": "any", - "value": 48 + "value": 48, + "min_avm_version": 3 }, { "name": "NumAssets", "doc": "Number of Assets", "stack_type": "uint64", "mode": "any", - "value": 49 + "value": 49, + "min_avm_version": 3 }, { "name": "Applications", "doc": "Foreign Apps listed in the ApplicationCall transaction", "stack_type": "uint64", "mode": "any", - "value": 50 + "value": 50, + "min_avm_version": 3 }, { "name": "NumApplications", "doc": "Number of Applications", "stack_type": "uint64", "mode": "any", - "value": 51 + "value": 51, + "min_avm_version": 3 }, { "name": "GlobalNumUint", "doc": "Number of global state integers in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 52 + "value": 52, + "min_avm_version": 3 }, { "name": "GlobalNumByteSlice", "doc": "Number of global state byteslices in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 53 + "value": 53, + "min_avm_version": 3 }, { "name": "LocalNumUint", "doc": "Number of local state integers in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 54 + "value": 54, + "min_avm_version": 3 }, { "name": "LocalNumByteSlice", "doc": "Number of local state byteslices in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 55 + "value": 55, + "min_avm_version": 3 }, { "name": "ExtraProgramPages", "doc": "Number of additional pages for each of the application's approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.", "stack_type": "uint64", "mode": "any", - "value": 56 + "value": 56, + "min_avm_version": 4 }, { "name": "Nonparticipation", "doc": "Marks an account nonparticipating for rewards", "stack_type": "bool", "mode": "any", - "value": 57 + "value": 57, + "min_avm_version": 5 }, { "name": "Logs", "doc": "Log messages emitted by an application call (only with `itxn` in v5). Application mode only", "stack_type": "[]byte", "mode": "app", - "value": 58 + "value": 58, + "min_avm_version": 5 }, { "name": "NumLogs", "doc": "Number of Logs (only with `itxn` in v5). Application mode only", "stack_type": "uint64", "mode": "app", - "value": 59 + "value": 59, + "min_avm_version": 5 }, { "name": "CreatedAssetID", "doc": "Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only", "stack_type": "asset", "mode": "app", - "value": 60 + "value": 60, + "min_avm_version": 5 }, { "name": "CreatedApplicationID", "doc": "ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only", "stack_type": "application", "mode": "app", - "value": 61 + "value": 61, + "min_avm_version": 5 }, { "name": "LastLog", "doc": "The last message emitted. Empty bytes if none were emitted. Application mode only", "stack_type": "[]byte", "mode": "app", - "value": 62 + "value": 62, + "min_avm_version": 6 }, { "name": "StateProofPK", "doc": "64 byte state proof public key", "stack_type": "[]byte", "mode": "any", - "value": 63 + "value": 63, + "min_avm_version": 6 }, { "name": "ApprovalProgramPages", "doc": "Approval Program as an array of pages", "stack_type": "[]byte", "mode": "any", - "value": 64 + "value": 64, + "min_avm_version": 7 }, { "name": "NumApprovalProgramPages", "doc": "Number of Approval Program pages", "stack_type": "uint64", "mode": "any", - "value": 65 + "value": 65, + "min_avm_version": 7 }, { "name": "ClearStateProgramPages", "doc": "ClearState Program as an array of pages", "stack_type": "[]byte", "mode": "any", - "value": 66 + "value": 66, + "min_avm_version": 7 }, { "name": "NumClearStateProgramPages", "doc": "Number of ClearState Program pages", "stack_type": "uint64", "mode": "any", - "value": 67 + "value": 67, + "min_avm_version": 7 } ], "txna": [ @@ -7750,49 +8101,56 @@ "doc": "Arguments passed to the application in the ApplicationCall transaction", "stack_type": "[]byte", "mode": "any", - "value": 26 + "value": 26, + "min_avm_version": 2 }, { "name": "Accounts", "doc": "Accounts listed in the ApplicationCall transaction", "stack_type": "address", "mode": "any", - "value": 28 + "value": 28, + "min_avm_version": 2 }, { "name": "Assets", "doc": "Foreign Assets listed in the ApplicationCall transaction", "stack_type": "asset", "mode": "any", - "value": 48 + "value": 48, + "min_avm_version": 3 }, { "name": "Applications", "doc": "Foreign Apps listed in the ApplicationCall transaction", "stack_type": "application", "mode": "any", - "value": 50 + "value": 50, + "min_avm_version": 3 }, { "name": "Logs", "doc": "Log messages emitted by an application call (only with `itxn` in v5). Application mode only", "stack_type": "[]byte", "mode": "app", - "value": 58 + "value": 58, + "min_avm_version": 5 }, { "name": "ApprovalProgramPages", "doc": "Approval Program as an array of pages", "stack_type": "[]byte", "mode": "any", - "value": 64 + "value": 64, + "min_avm_version": 7 }, { "name": "ClearStateProgramPages", "doc": "ClearState Program as an array of pages", "stack_type": "[]byte", "mode": "any", - "value": 66 + "value": 66, + "min_avm_version": 7 } ], "global": [ @@ -7801,126 +8159,184 @@ "doc": "microalgos", "stack_type": "uint64", "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 0 }, { "name": "MinBalance", "doc": "microalgos", "stack_type": "uint64", "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 0 }, { "name": "MaxTxnLife", "doc": "rounds", "stack_type": "uint64", "mode": "any", - "value": 2 + "value": 2, + "min_avm_version": 0 }, { "name": "ZeroAddress", "doc": "32 byte address of all zero bytes", "stack_type": "address", "mode": "any", - "value": 3 + "value": 3, + "min_avm_version": 0 }, { "name": "GroupSize", "doc": "Number of transactions in this atomic transaction group. At least 1", "stack_type": "uint64", "mode": "any", - "value": 4 + "value": 4, + "min_avm_version": 0 }, { "name": "LogicSigVersion", "doc": "Maximum supported version", "stack_type": "uint64", "mode": "any", - "value": 5 + "value": 5, + "min_avm_version": 2 }, { "name": "Round", "doc": "Current round number. Application mode only.", "stack_type": "uint64", "mode": "app", - "value": 6 + "value": 6, + "min_avm_version": 2 }, { "name": "LatestTimestamp", "doc": "Last confirmed block UNIX timestamp. Fails if negative. Application mode only.", "stack_type": "uint64", "mode": "app", - "value": 7 + "value": 7, + "min_avm_version": 2 }, { "name": "CurrentApplicationID", "doc": "ID of current application executing. Application mode only.", "stack_type": "application", "mode": "app", - "value": 8 + "value": 8, + "min_avm_version": 2 }, { "name": "CreatorAddress", "doc": "Address of the creator of the current application. Application mode only.", "stack_type": "address", "mode": "app", - "value": 9 + "value": 9, + "min_avm_version": 3 }, { "name": "CurrentApplicationAddress", "doc": "Address that the current application controls. Application mode only.", "stack_type": "address", "mode": "app", - "value": 10 + "value": 10, + "min_avm_version": 5 }, { "name": "GroupID", "doc": "ID of the transaction group. 32 zero bytes if the transaction is not part of a group.", "stack_type": "[32]byte", "mode": "any", - "value": 11 + "value": 11, + "min_avm_version": 5 }, { "name": "OpcodeBudget", "doc": "The remaining cost that can be spent by opcodes in this program.", "stack_type": "uint64", "mode": "any", - "value": 12 + "value": 12, + "min_avm_version": 6 }, { "name": "CallerApplicationID", "doc": "The application ID of the application that called this application. 0 if this application is at the top-level. Application mode only.", "stack_type": "uint64", "mode": "app", - "value": 13 + "value": 13, + "min_avm_version": 6 }, { "name": "CallerApplicationAddress", "doc": "The application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.", "stack_type": "address", "mode": "app", - "value": 14 + "value": 14, + "min_avm_version": 6 }, { "name": "AssetCreateMinBalance", "doc": "The additional minimum balance required to create (and opt-in to) an asset.", "stack_type": "uint64", "mode": "any", - "value": 15 + "value": 15, + "min_avm_version": 10 }, { "name": "AssetOptInMinBalance", "doc": "The additional minimum balance required to opt-in to an asset.", "stack_type": "uint64", "mode": "any", - "value": 16 + "value": 16, + "min_avm_version": 10 }, { "name": "GenesisHash", "doc": "The Genesis Hash for the network.", "stack_type": "[32]byte", "mode": "any", - "value": 17 + "value": 17, + "min_avm_version": 10 + }, + { + "name": "PayoutsEnabled", + "doc": "Whether block proposal payouts are enabled.", + "stack_type": "bool", + "mode": "any", + "value": 18, + "min_avm_version": 11 + }, + { + "name": "PayoutsGoOnlineFee", + "doc": "The fee required in a keyreg transaction to make an account incentive eligible.", + "stack_type": "uint64", + "mode": "any", + "value": 19, + "min_avm_version": 11 + }, + { + "name": "PayoutsPercent", + "doc": "The percentage of transaction fees in a block that can be paid to the block proposer.", + "stack_type": "uint64", + "mode": "any", + "value": 20, + "min_avm_version": 11 + }, + { + "name": "PayoutsMinBalance", + "doc": "The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round.", + "stack_type": "uint64", + "mode": "any", + "value": 21, + "min_avm_version": 11 + }, + { + "name": "PayoutsMaxBalance", + "doc": "The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round.", + "stack_type": "uint64", + "mode": "any", + "value": 22, + "min_avm_version": 11 } ], "itxn_field": [ @@ -7929,357 +8345,408 @@ "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 0 }, { "name": "Fee", "doc": "microalgos", "stack_type": "uint64", "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 0 }, { "name": "Note", "doc": "Any data up to 1024 bytes", "stack_type": "[]byte", "mode": "any", - "value": 5 + "value": 5, + "min_avm_version": 0 }, { "name": "Receiver", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 7 + "value": 7, + "min_avm_version": 0 }, { "name": "Amount", "doc": "microalgos", "stack_type": "uint64", "mode": "any", - "value": 8 + "value": 8, + "min_avm_version": 0 }, { "name": "CloseRemainderTo", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 9 + "value": 9, + "min_avm_version": 0 }, { "name": "VotePK", "doc": "32 byte address", "stack_type": "[32]byte", "mode": "any", - "value": 10 + "value": 10, + "min_avm_version": 0 }, { "name": "SelectionPK", "doc": "32 byte address", "stack_type": "[32]byte", "mode": "any", - "value": 11 + "value": 11, + "min_avm_version": 0 }, { "name": "VoteFirst", "doc": "The first round that the participation key is valid.", "stack_type": "uint64", "mode": "any", - "value": 12 + "value": 12, + "min_avm_version": 0 }, { "name": "VoteLast", "doc": "The last round that the participation key is valid.", "stack_type": "uint64", "mode": "any", - "value": 13 + "value": 13, + "min_avm_version": 0 }, { "name": "VoteKeyDilution", "doc": "Dilution for the 2-level participation key", "stack_type": "uint64", "mode": "any", - "value": 14 + "value": 14, + "min_avm_version": 0 }, { "name": "Type", "doc": "Transaction type as bytes", "stack_type": "[]byte", "mode": "any", - "value": 15 + "value": 15, + "min_avm_version": 0 }, { "name": "TypeEnum", "doc": "Transaction type as integer", "stack_type": "uint64", "mode": "any", - "value": 16 + "value": 16, + "min_avm_version": 0 }, { "name": "XferAsset", "doc": "Asset ID", "stack_type": "asset", "mode": "any", - "value": 17 + "value": 17, + "min_avm_version": 0 }, { "name": "AssetAmount", "doc": "value in Asset's units", "stack_type": "uint64", "mode": "any", - "value": 18 + "value": 18, + "min_avm_version": 0 }, { "name": "AssetSender", "doc": "32 byte address. Source of assets if Sender is the Asset's Clawback address.", "stack_type": "address", "mode": "any", - "value": 19 + "value": 19, + "min_avm_version": 0 }, { "name": "AssetReceiver", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 20 + "value": 20, + "min_avm_version": 0 }, { "name": "AssetCloseTo", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 21 + "value": 21, + "min_avm_version": 0 }, { "name": "ApplicationID", "doc": "ApplicationID from ApplicationCall transaction", "stack_type": "application", "mode": "any", - "value": 24 + "value": 24, + "min_avm_version": 2 }, { "name": "OnCompletion", "doc": "ApplicationCall transaction on completion action", "stack_type": "uint64", "mode": "any", - "value": 25 + "value": 25, + "min_avm_version": 2 }, { "name": "ApplicationArgs", "doc": "Arguments passed to the application in the ApplicationCall transaction", "stack_type": "[]byte", "mode": "any", - "value": 26 + "value": 26, + "min_avm_version": 2 }, { "name": "Accounts", "doc": "Accounts listed in the ApplicationCall transaction", "stack_type": "address", "mode": "any", - "value": 28 + "value": 28, + "min_avm_version": 2 }, { "name": "ApprovalProgram", "doc": "Approval program", "stack_type": "[]byte", "mode": "any", - "value": 30 + "value": 30, + "min_avm_version": 2 }, { "name": "ClearStateProgram", "doc": "Clear state program", "stack_type": "[]byte", "mode": "any", - "value": 31 + "value": 31, + "min_avm_version": 2 }, { "name": "RekeyTo", "doc": "32 byte Sender's new AuthAddr", "stack_type": "address", "mode": "any", - "value": 32 + "value": 32, + "min_avm_version": 2 }, { "name": "ConfigAsset", "doc": "Asset ID in asset config transaction", "stack_type": "asset", "mode": "any", - "value": 33 + "value": 33, + "min_avm_version": 2 }, { "name": "ConfigAssetTotal", "doc": "Total number of units of this asset created", "stack_type": "uint64", "mode": "any", - "value": 34 + "value": 34, + "min_avm_version": 2 }, { "name": "ConfigAssetDecimals", "doc": "Number of digits to display after the decimal place when displaying the asset", "stack_type": "uint64", "mode": "any", - "value": 35 + "value": 35, + "min_avm_version": 2 }, { "name": "ConfigAssetDefaultFrozen", "doc": "Whether the asset's slots are frozen by default or not, 0 or 1", "stack_type": "bool", "mode": "any", - "value": 36 + "value": 36, + "min_avm_version": 2 }, { "name": "ConfigAssetUnitName", "doc": "Unit name of the asset", "stack_type": "[]byte", "mode": "any", - "value": 37 + "value": 37, + "min_avm_version": 2 }, { "name": "ConfigAssetName", "doc": "The asset name", "stack_type": "[]byte", "mode": "any", - "value": 38 + "value": 38, + "min_avm_version": 2 }, { "name": "ConfigAssetURL", "doc": "URL", "stack_type": "[]byte", "mode": "any", - "value": 39 + "value": 39, + "min_avm_version": 2 }, { "name": "ConfigAssetMetadataHash", "doc": "32 byte commitment to unspecified asset metadata", "stack_type": "[32]byte", "mode": "any", - "value": 40 + "value": 40, + "min_avm_version": 2 }, { "name": "ConfigAssetManager", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 41 + "value": 41, + "min_avm_version": 2 }, { "name": "ConfigAssetReserve", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 42 + "value": 42, + "min_avm_version": 2 }, { "name": "ConfigAssetFreeze", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 43 + "value": 43, + "min_avm_version": 2 }, { "name": "ConfigAssetClawback", "doc": "32 byte address", "stack_type": "address", "mode": "any", - "value": 44 + "value": 44, + "min_avm_version": 2 }, { "name": "FreezeAsset", "doc": "Asset ID being frozen or un-frozen", "stack_type": "asset", "mode": "any", - "value": 45 + "value": 45, + "min_avm_version": 2 }, { "name": "FreezeAssetAccount", "doc": "32 byte address of the account whose asset slot is being frozen or un-frozen", "stack_type": "address", "mode": "any", - "value": 46 + "value": 46, + "min_avm_version": 2 }, { "name": "FreezeAssetFrozen", "doc": "The new frozen value, 0 or 1", "stack_type": "bool", "mode": "any", - "value": 47 + "value": 47, + "min_avm_version": 2 }, { "name": "Assets", "doc": "Foreign Assets listed in the ApplicationCall transaction", "stack_type": "uint64", "mode": "any", - "value": 48 + "value": 48, + "min_avm_version": 3 }, { "name": "Applications", "doc": "Foreign Apps listed in the ApplicationCall transaction", "stack_type": "uint64", "mode": "any", - "value": 50 + "value": 50, + "min_avm_version": 3 }, { "name": "GlobalNumUint", "doc": "Number of global state integers in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 52 + "value": 52, + "min_avm_version": 3 }, { "name": "GlobalNumByteSlice", "doc": "Number of global state byteslices in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 53 + "value": 53, + "min_avm_version": 3 }, { "name": "LocalNumUint", "doc": "Number of local state integers in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 54 + "value": 54, + "min_avm_version": 3 }, { "name": "LocalNumByteSlice", "doc": "Number of local state byteslices in ApplicationCall", "stack_type": "uint64", "mode": "any", - "value": 55 + "value": 55, + "min_avm_version": 3 }, { "name": "ExtraProgramPages", "doc": "Number of additional pages for each of the application's approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.", "stack_type": "uint64", "mode": "any", - "value": 56 + "value": 56, + "min_avm_version": 4 }, { "name": "Nonparticipation", "doc": "Marks an account nonparticipating for rewards", "stack_type": "bool", "mode": "any", - "value": 57 + "value": 57, + "min_avm_version": 5 }, { "name": "StateProofPK", "doc": "64 byte state proof public key", "stack_type": "[]byte", "mode": "any", - "value": 63 + "value": 63, + "min_avm_version": 6 }, { "name": "ApprovalProgramPages", "doc": "Approval Program as an array of pages", "stack_type": "[]byte", "mode": "any", - "value": 64 + "value": 64, + "min_avm_version": 7 }, { "name": "ClearStateProgramPages", "doc": "ClearState Program as an array of pages", "stack_type": "[]byte", "mode": "any", - "value": 66 + "value": 66, + "min_avm_version": 7 } ], "json_ref": [ @@ -8288,21 +8755,42 @@ "doc": null, "stack_type": "[]byte", "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 7 }, { "name": "JSONUint64", "doc": null, "stack_type": "uint64", "mode": "any", - "value": 1 + "value": 1, + "min_avm_version": 7 }, { "name": "JSONObject", "doc": null, "stack_type": "[]byte", "mode": "any", - "value": 2 + "value": 2, + "min_avm_version": 7 + } + ], + "voter_params": [ + { + "name": "VoterBalance", + "doc": "Online stake in microalgos", + "stack_type": "uint64", + "mode": "app", + "value": 0, + "min_avm_version": 6 + }, + { + "name": "VoterIncentiveEligible", + "doc": "Had this account opted into block payouts", + "stack_type": "bool", + "mode": "app", + "value": 1, + "min_avm_version": 11 } ], "vrf_verify": [ @@ -8311,7 +8799,8 @@ "doc": null, "stack_type": null, "mode": "any", - "value": 0 + "value": 0, + "min_avm_version": 7 } ] } diff --git a/scripts/generate_avm_ops.py b/scripts/generate_avm_ops.py index 3328c3f8e3..a9f3be88c3 100644 --- a/scripts/generate_avm_ops.py +++ b/scripts/generate_avm_ops.py @@ -138,11 +138,13 @@ def generate_op_node( stack_returns = [get_stack_type(out.stack_type) for out in op.stack_outputs] if dynamic_im_index is None: variant = Variant( + enum=None, signature=OpSignature( args=stack_args, returns=stack_returns, ), supported_modes=_map_run_mode(op.mode), + min_avm_version=op.min_avm_version, ) else: im = op.immediate_args[dynamic_im_index] @@ -162,11 +164,13 @@ def generate_op_node( assert arg_enum.stack_type is not None, "🤕" to_mod[list_index] = get_stack_type(arg_enum.stack_type) variant.variant_map[arg_enum.name] = Variant( + enum=arg_enum.name, signature=OpSignature( args=list(stack_args), returns=list(stack_returns), ), supported_modes=_map_run_mode(arg_enum.mode), + min_avm_version=arg_enum.min_avm_version, ) data = AVMOpData( @@ -201,13 +205,7 @@ def _map_run_mode(mode: langspec.RunMode) -> RunMode: def get_stack_type(stack_type: langspec.StackType) -> StackType: - if stack_type in ( - langspec.StackType.bytes_8, - langspec.StackType.bytes_32, - langspec.StackType.bytes_33, - langspec.StackType.bytes_64, - langspec.StackType.bytes_80, - ): + if stack_type.name.startswith("bytes_"): return StackType.bytes else: return StackType[stack_type.name] diff --git a/scripts/generate_stubs.py b/scripts/generate_stubs.py index 2e503ee95e..a8d8444ad6 100755 --- a/scripts/generate_stubs.py +++ b/scripts/generate_stubs.py @@ -11,6 +11,7 @@ import attrs from puya import log +from puya.algo_constants import SUPPORTED_AVM_VERSIONS from puyapy.awst_build import pytypes from puyapy.awst_build.intrinsic_models import FunctionOpMapping, OpMappingWithOverloads from puyapy.awst_build.utils import snake_case @@ -28,6 +29,7 @@ logger = log.get_logger(__name__) INDENT = " " * 4 VCS_ROOT = Path(__file__).parent.parent +MIN_SUPPORTED_VERSION = min(SUPPORTED_AVM_VERSIONS) PYTYPE_TO_LITERAL: dict[pytypes.PyType, pytypes.LiteralOnlyType | None] = { @@ -56,6 +58,8 @@ StackType.bytes_33: [pytypes.BytesType], StackType.bytes_64: [pytypes.BytesType], StackType.bytes_80: [pytypes.BytesType], + StackType.bytes_1232: [pytypes.BytesType], + StackType.bytes_1793: [pytypes.BytesType], StackType.bool: [pytypes.BoolType, pytypes.UInt64Type], StackType.uint64: [pytypes.UInt64Type], StackType.any: [pytypes.BytesType, pytypes.UInt64Type], @@ -344,6 +348,7 @@ class FunctionDef: args: list[TypedName] = attrs.field(factory=list) return_docs: list[str] = attrs.field(factory=list) op_mapping: OpMappingWithOverloads + min_avm_version: int @attrs.define @@ -523,6 +528,7 @@ def build_class_var_stub(function: FunctionDef, indent: str) -> Iterable[str]: returns = pytype_stub_repr(function.op_mapping.result) return_docs = function.return_docs doc = return_docs if return_docs else function.doc[:] + _maybe_add_min_version_doc(doc, function.min_avm_version) yield f"{indent}{function.name}: typing.Final[{returns}] = ..." yield f'{indent}"""' for doc_line in doc: @@ -577,6 +583,9 @@ def build_class_from_overriding_immediate( method = build_operation_method( op, snake_case(value.name), aliases, const_immediate_value=(immediate, value) ) + # some enums are reused across ops, so need to take the max minimum of op and enum version + method.min_avm_version = max(op.min_avm_version, value.min_avm_version) + _maybe_add_min_version_doc(method.doc, method.min_avm_version) for op_mapping in method.op_mapping.overloads: class_ops.add(op_mapping.op_code) @@ -588,7 +597,7 @@ def build_class_from_overriding_immediate( def get_op_doc(op: Op) -> list[str]: doc = [d.replace("\\", "\\\\") for d in op.doc] - + _maybe_add_min_version_doc(doc, op.min_avm_version) return doc @@ -618,9 +627,24 @@ def build_enum(spec: LanguageSpec, arg_enum: str) -> Iterable[str]: yield f'{INDENT}"""Available values for the `{arg_enum}` enum"""' for value in values: yield f"{INDENT}{value.name}: {enum_name} = ..." + enum_doc = [] + if value.doc: + enum_doc.append(value.doc) + _maybe_add_min_version_doc(enum_doc, value.min_avm_version) + if enum_doc: + yield f'{INDENT}"""' + for doc_line in enum_doc: + yield f"{INDENT}{doc_line}" + yield f'{INDENT}"""' yield "" +def _maybe_add_min_version_doc(doc: list[str], version: int) -> None: + # only output min AVM version if it is greater than our min supported version + if version > MIN_SUPPORTED_VERSION: + doc.append(f"Min AVM version: {version}") + + def build_operation_method( op: Op, op_function_name: str, @@ -722,6 +746,7 @@ def build_operation_method( result=result_typ, overloads=op_mappings, ), + min_avm_version=op.min_avm_version, ) return proto_function diff --git a/scripts/transform_lang_spec.py b/scripts/transform_lang_spec.py index f7c656222e..1c1a55cf5c 100755 --- a/scripts/transform_lang_spec.py +++ b/scripts/transform_lang_spec.py @@ -106,6 +106,7 @@ class Operation(typing.TypedDict, total=False): ArgEnumTypes: list[str] ArgEnumBytes: list[int] ArgModes: list[int] + ArgEnumVersion: list[int] ImmediateNote: list[ImmediateNote] # the following values are not in the original langspec.json @@ -131,6 +132,8 @@ class StackType(enum.StrEnum): bytes_33 = "[33]byte" bytes_64 = "[64]byte" bytes_80 = "[80]byte" + bytes_1232 = "[1232]byte" + bytes_1793 = "[1793]byte" bool = enum.auto() address = enum.auto() address_or_index = enum.auto() @@ -163,6 +166,7 @@ class ArgEnum: stack_type: StackType | None mode: RunMode value: int + min_avm_version: int class ImmediateKind(enum.StrEnum): @@ -373,13 +377,14 @@ def create_indexed_enum(op: Operation) -> list[ArgEnum]: enum_docs = op["ArgEnumDoc"] enum_bytes = op["ArgEnumBytes"] enum_modes = op["ArgModes"] + enum_versions = op["ArgEnumVersion"] if not enum_types: enum_types = [None] * len(enum_names) result = list[ArgEnum]() - for enum_name, enum_type, enum_doc, enum_mode, enum_byte in zip( - enum_names, enum_types, enum_docs, enum_modes, enum_bytes, strict=True + for enum_name, enum_type, enum_doc, enum_mode, enum_byte, enum_version in zip( + enum_names, enum_types, enum_docs, enum_modes, enum_bytes, enum_versions, strict=True ): stack_type = None if enum_type is None else StackType(enum_type) enum_value = ArgEnum( @@ -388,6 +393,7 @@ def create_indexed_enum(op: Operation) -> list[ArgEnum]: stack_type=stack_type, mode=_map_enum_mode(op["Modes"], enum_mode), value=enum_byte, + min_avm_version=enum_version, ) result.append(enum_value) return result diff --git a/src/puya/algo_constants.py b/src/puya/algo_constants.py index 39f54530ae..ecf5da255e 100644 --- a/src/puya/algo_constants.py +++ b/src/puya/algo_constants.py @@ -19,6 +19,6 @@ # Which language versions does this version of puya support targeting # This will typically just be the current mainnet version and potentially the vNext if it doesn't # contain breaking changes -SUPPORTED_TEAL_LANGUAGE_VERSIONS = [10] +SUPPORTED_AVM_VERSIONS = [10, 11] # Which language version is currently deployed to mainnet -MAINNET_TEAL_LANGUAGE_VERSION = 10 +MAINNET_AVM_VERSION = 10 diff --git a/src/puya/awst/nodes.py b/src/puya/awst/nodes.py index 004026f718..1877682560 100644 --- a/src/puya/awst/nodes.py +++ b/src/puya/awst/nodes.py @@ -9,6 +9,7 @@ import attrs from immutabledict import immutabledict +from puya.algo_constants import SUPPORTED_AVM_VERSIONS from puya.avm_type import AVMType from puya.awst import wtypes from puya.awst.txn_fields import TxnField @@ -1601,12 +1602,21 @@ def accept(self, visitor: ContractMemberVisitor[T]) -> T: return visitor.visit_app_storage_definition(self) +def _validate_avm_version(node: Node, _: object, avm_version: int | None) -> None: + if avm_version is not None and avm_version not in SUPPORTED_AVM_VERSIONS: + raise CodeError( + "unsupported AVM version", + node.source_location, + ) + + @attrs.frozen(kw_only=True) class LogicSignature(RootNode): id: LogicSigReference short_name: str program: Subroutine = attrs.field() docstring: str | None + avm_version: int | None = attrs.field(validator=_validate_avm_version) @program.validator def _validate_program(self, _instance: object, program: Subroutine) -> None: @@ -1733,6 +1743,8 @@ class Contract(RootNode): """State totals which can override in part or in full those implied by `app_state`.""" reserved_scratch_space: Set[int] """Scratch slots that the contract is explicitly setting aside for direct/explicit usage.""" + avm_version: int | None = attrs.field(validator=_validate_avm_version) + """AVM version to target, defaults to options.target_avm_version""" @approval_program.validator def check_approval(self, _attribute: object, approval: ContractMethod) -> None: diff --git a/src/puya/compile.py b/src/puya/compile.py index 88e3c9ec35..9a68972016 100644 --- a/src/puya/compile.py +++ b/src/puya/compile.py @@ -194,7 +194,7 @@ def _dummy_program() -> _CompiledProgram: return _CompiledProgram( teal=TealProgram( id="", - target_avm_version=0, + avm_version=0, main=TealSubroutine( is_main=True, signature=Signature( diff --git a/src/puya/ir/avm_ops.py b/src/puya/ir/avm_ops.py index 13effc44e8..9c630ca621 100644 --- a/src/puya/ir/avm_ops.py +++ b/src/puya/ir/avm_ops.py @@ -56,84 +56,134 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctBalance", supported_modes=RunMode.app, + min_avm_version=6, ), "AcctMinBalance": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctMinBalance", supported_modes=RunMode.app, + min_avm_version=6, ), "AcctAuthAddr": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.address, StackType.bool], ), + enum="AcctAuthAddr", supported_modes=RunMode.app, + min_avm_version=6, ), "AcctTotalNumUint": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalNumUint", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalNumByteSlice": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalNumByteSlice", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalExtraAppPages": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalExtraAppPages", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalAppsCreated": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalAppsCreated", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalAppsOptedIn": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalAppsOptedIn", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalAssetsCreated": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalAssetsCreated", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalAssets": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalAssets", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalBoxes": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalBoxes", supported_modes=RunMode.app, + min_avm_version=8, ), "AcctTotalBoxBytes": Variant( signature=OpSignature( args=[StackType.address_or_index], returns=[StackType.uint64, StackType.bool], ), + enum="AcctTotalBoxBytes", supported_modes=RunMode.app, + min_avm_version=8, + ), + "AcctIncentiveEligible": Variant( + signature=OpSignature( + args=[StackType.address_or_index], returns=[StackType.bool, StackType.bool] + ), + enum="AcctIncentiveEligible", + supported_modes=RunMode.app, + min_avm_version=11, + ), + "AcctLastProposed": Variant( + signature=OpSignature( + args=[StackType.address_or_index], + returns=[StackType.uint64, StackType.bool], + ), + enum="AcctLastProposed", + supported_modes=RunMode.app, + min_avm_version=11, + ), + "AcctLastHeartbeat": Variant( + signature=OpSignature( + args=[StackType.address_or_index], + returns=[StackType.uint64, StackType.bool], + ), + enum="AcctLastHeartbeat", + supported_modes=RunMode.app, + min_avm_version=11, ), }, ), @@ -152,7 +202,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -172,7 +224,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bigint] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=10, @@ -190,7 +244,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64, StackType.uint64], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -207,7 +263,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -222,7 +280,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="app_global_del", variants=Variant( signature=OpSignature(args=[StackType.state_key], returns=[]), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -243,7 +303,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="app_global_get", variants=Variant( signature=OpSignature(args=[StackType.state_key], returns=[StackType.any]), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -263,7 +325,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.application, StackType.state_key], returns=[StackType.any, StackType.bool], ), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -282,7 +346,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="app_global_put", variants=Variant( signature=OpSignature(args=[StackType.state_key, StackType.any], returns=[]), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -299,7 +365,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.address_or_index, StackType.state_key], returns=[] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -322,7 +390,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.address_or_index, StackType.state_key], returns=[StackType.any] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -343,7 +413,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.address_or_index, StackType.application, StackType.state_key], returns=[StackType.any, StackType.bool], ), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -365,7 +437,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.address_or_index, StackType.state_key, StackType.any], returns=[] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -384,7 +458,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.address_or_index, StackType.application], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -407,55 +483,73 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.application], returns=[StackType.bytes, StackType.bool] ), + enum="AppApprovalProgram", supported_modes=RunMode.app, + min_avm_version=5, ), "AppClearStateProgram": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.bytes, StackType.bool] ), + enum="AppClearStateProgram", supported_modes=RunMode.app, + min_avm_version=5, ), "AppGlobalNumUint": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.uint64, StackType.bool] ), + enum="AppGlobalNumUint", supported_modes=RunMode.app, + min_avm_version=5, ), "AppGlobalNumByteSlice": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.uint64, StackType.bool] ), + enum="AppGlobalNumByteSlice", supported_modes=RunMode.app, + min_avm_version=5, ), "AppLocalNumUint": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.uint64, StackType.bool] ), + enum="AppLocalNumUint", supported_modes=RunMode.app, + min_avm_version=5, ), "AppLocalNumByteSlice": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.uint64, StackType.bool] ), + enum="AppLocalNumByteSlice", supported_modes=RunMode.app, + min_avm_version=5, ), "AppExtraProgramPages": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.uint64, StackType.bool] ), + enum="AppExtraProgramPages", supported_modes=RunMode.app, + min_avm_version=5, ), "AppCreator": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.address, StackType.bool] ), + enum="AppCreator", supported_modes=RunMode.app, + min_avm_version=5, ), "AppAddress": Variant( signature=OpSignature( args=[StackType.application], returns=[StackType.address, StackType.bool] ), + enum="AppAddress", supported_modes=RunMode.app, + min_avm_version=5, ), }, ), @@ -474,7 +568,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: arg = AVMOpData( op_code="arg", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.bytes]), supported_modes=RunMode.lsig + signature=OpSignature(args=[], returns=[StackType.bytes]), + enum=None, + supported_modes=RunMode.lsig, + min_avm_version=1, ), immediate_types=(ImmediateKind.uint8,), cost=1, @@ -488,7 +585,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: arg_0 = AVMOpData( op_code="arg_0", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.bytes]), supported_modes=RunMode.lsig + signature=OpSignature(args=[], returns=[StackType.bytes]), + enum=None, + supported_modes=RunMode.lsig, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -502,7 +602,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: arg_1 = AVMOpData( op_code="arg_1", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.bytes]), supported_modes=RunMode.lsig + signature=OpSignature(args=[], returns=[StackType.bytes]), + enum=None, + supported_modes=RunMode.lsig, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -516,7 +619,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: arg_2 = AVMOpData( op_code="arg_2", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.bytes]), supported_modes=RunMode.lsig + signature=OpSignature(args=[], returns=[StackType.bytes]), + enum=None, + supported_modes=RunMode.lsig, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -530,7 +636,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: arg_3 = AVMOpData( op_code="arg_3", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.bytes]), supported_modes=RunMode.lsig + signature=OpSignature(args=[], returns=[StackType.bytes]), + enum=None, + supported_modes=RunMode.lsig, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -545,7 +654,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="args", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.lsig, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -559,7 +670,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: assert_ = AVMOpData( op_code="assert", variants=Variant( - signature=OpSignature(args=[StackType.uint64], returns=[]), supported_modes=RunMode.any + signature=OpSignature(args=[StackType.uint64], returns=[]), + enum=None, + supported_modes=RunMode.any, + min_avm_version=3, ), immediate_types=(), cost=1, @@ -580,14 +694,18 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.address_or_index, StackType.asset], returns=[StackType.uint64, StackType.bool], ), + enum="AssetBalance", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetFrozen": Variant( signature=OpSignature( args=[StackType.address_or_index, StackType.asset], returns=[StackType.bool, StackType.bool], ), + enum="AssetFrozen", supported_modes=RunMode.app, + min_avm_version=2, ), }, ), @@ -613,73 +731,97 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.asset], returns=[StackType.uint64, StackType.bool] ), + enum="AssetTotal", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetDecimals": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.uint64, StackType.bool] ), + enum="AssetDecimals", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetDefaultFrozen": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.bool, StackType.bool] ), + enum="AssetDefaultFrozen", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetUnitName": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.bytes, StackType.bool] ), + enum="AssetUnitName", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetName": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.bytes, StackType.bool] ), + enum="AssetName", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetURL": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.bytes, StackType.bool] ), + enum="AssetURL", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetMetadataHash": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.bytes, StackType.bool] ), + enum="AssetMetadataHash", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetManager": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.address, StackType.bool] ), + enum="AssetManager", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetReserve": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.address, StackType.bool] ), + enum="AssetReserve", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetFreeze": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.address, StackType.bool] ), + enum="AssetFreeze", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetClawback": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.address, StackType.bool] ), + enum="AssetClawback", supported_modes=RunMode.app, + min_avm_version=2, ), "AssetCreator": Variant( signature=OpSignature( args=[StackType.asset], returns=[StackType.address, StackType.bool] ), + enum="AssetCreator", supported_modes=RunMode.app, + min_avm_version=5, ), }, ), @@ -699,7 +841,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="balance", variants=Variant( signature=OpSignature(args=[StackType.address_or_index], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.app, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -719,7 +863,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="base64_decode", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=7, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -750,7 +896,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="bitlen", variants=Variant( signature=OpSignature(args=[StackType.any], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -770,7 +918,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -787,7 +937,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=6, @@ -802,7 +954,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="~", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -817,7 +971,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="b~", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=4, @@ -834,7 +990,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -851,7 +1009,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=6, @@ -868,7 +1028,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -885,7 +1047,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=6, @@ -903,11 +1067,63 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "BlkSeed": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="BlkSeed", supported_modes=RunMode.any, + min_avm_version=7, ), "BlkTimestamp": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="BlkTimestamp", + supported_modes=RunMode.any, + min_avm_version=7, + ), + "BlkProposer": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="BlkProposer", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "BlkFeesCollected": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="BlkFeesCollected", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "BlkBonus": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="BlkBonus", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "BlkBranch": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="BlkBranch", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "BlkFeeSink": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="BlkFeeSink", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "BlkProtocol": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="BlkProtocol", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "BlkTxnCounter": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="BlkTxnCounter", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "BlkProposerPayout": Variant( + signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="BlkProposerPayout", supported_modes=RunMode.any, + min_avm_version=11, ), }, ), @@ -927,7 +1143,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.box_name, StackType.uint64], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=8, ), immediate_types=(), cost=1, @@ -946,7 +1164,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="box_del", variants=Variant( signature=OpSignature(args=[StackType.box_name], returns=[StackType.bool]), + enum=None, supported_modes=RunMode.app, + min_avm_version=8, ), immediate_types=(), cost=1, @@ -964,7 +1184,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.box_name, StackType.uint64, StackType.uint64], returns=[StackType.bytes], ), + enum=None, supported_modes=RunMode.app, + min_avm_version=8, ), immediate_types=(), cost=1, @@ -982,7 +1204,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.box_name], returns=[StackType.bytes, StackType.bool] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=8, ), immediate_types=(), cost=1, @@ -1001,7 +1225,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.box_name], returns=[StackType.uint64, StackType.bool] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=8, ), immediate_types=(), cost=1, @@ -1016,7 +1242,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="box_put", variants=Variant( signature=OpSignature(args=[StackType.box_name, StackType.bytes], returns=[]), + enum=None, supported_modes=RunMode.app, + min_avm_version=8, ), immediate_types=(), cost=1, @@ -1036,7 +1264,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.box_name, StackType.uint64, StackType.bytes], returns=[] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=8, ), immediate_types=(), cost=1, @@ -1052,7 +1282,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="box_resize", variants=Variant( signature=OpSignature(args=[StackType.box_name, StackType.uint64], returns=[]), + enum=None, supported_modes=RunMode.app, + min_avm_version=10, ), immediate_types=(), cost=1, @@ -1072,7 +1304,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.box_name, StackType.uint64, StackType.uint64, StackType.bytes], returns=[], ), + enum=None, supported_modes=RunMode.app, + min_avm_version=10, ), immediate_types=(), cost=1, @@ -1091,7 +1325,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="bsqrt", variants=Variant( signature=OpSignature(args=[StackType.bigint], returns=[StackType.bigint]), + enum=None, supported_modes=RunMode.any, + min_avm_version=6, ), immediate_types=(), cost=40, @@ -1107,7 +1343,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="btoi", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -1125,7 +1363,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="bzero", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -1142,7 +1382,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -1161,7 +1403,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -1180,7 +1424,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bigint] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=20, @@ -1199,7 +1445,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.uint64, StackType.uint64, StackType.uint64, StackType.uint64], returns=[StackType.uint64, StackType.uint64, StackType.uint64, StackType.uint64], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=20, @@ -1220,7 +1468,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.uint64, StackType.uint64, StackType.uint64], returns=[StackType.uint64], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=6, ), immediate_types=(), cost=1, @@ -1240,7 +1490,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=10, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1278,7 +1530,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="ec_map_to", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=10, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1303,7 +1557,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=10, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1327,7 +1583,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=10, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1352,7 +1610,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=10, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1371,7 +1631,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="ec_subgroup_check", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bool]), + enum=None, supported_modes=RunMode.any, + min_avm_version=10, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1389,7 +1651,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes], returns=[StackType.bytes, StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1410,7 +1674,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.bytes, StackType.uint64, StackType.bytes, StackType.bytes], returns=[StackType.bytes, StackType.bytes], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(ImmediateKind.arg_enum,), cost=2000, @@ -1438,7 +1704,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: ], returns=[StackType.bool], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(ImmediateKind.arg_enum,), cost=None, @@ -1461,7 +1729,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes, StackType.bytes], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1900, @@ -1483,7 +1753,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes, StackType.bytes], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=7, ), immediate_types=(), cost=1900, @@ -1499,7 +1771,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="==", variants=Variant( signature=OpSignature(args=[StackType.any, StackType.any], returns=[StackType.bool]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -1516,7 +1790,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -1533,7 +1809,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -1551,7 +1829,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64, StackType.uint64], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=10, @@ -1567,7 +1847,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="extract", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(ImmediateKind.uint8, ImmediateKind.uint8), cost=1, @@ -1586,7 +1868,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.bytes, StackType.uint64, StackType.uint64], returns=[StackType.bytes], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -1606,7 +1890,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -1624,7 +1910,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -1642,7 +1930,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -1654,10 +1944,33 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: B+8. If B+8 is larger than the array length, the program fails """ + falcon_verify = AVMOpData( + op_code="falcon_verify", + variants=Variant( + signature=OpSignature( + args=[StackType.bytes, StackType.bytes, StackType.bytes], returns=[StackType.bool] + ), + enum=None, + supported_modes=RunMode.any, + min_avm_version=11, + ), + immediate_types=(), + cost=1700, + min_avm_version=11, + supported_modes=RunMode.any, + ) + """ + for (data A, compressed-format signature B, pubkey C) verify the signature of data against the + pubkey + """ + gaid = AVMOpData( op_code="gaid", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.uint64]), supported_modes=RunMode.app + signature=OpSignature(args=[], returns=[StackType.uint64]), + enum=None, + supported_modes=RunMode.app, + min_avm_version=4, ), immediate_types=(ImmediateKind.uint8,), cost=1, @@ -1675,7 +1988,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="gaids", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.app, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -1695,7 +2010,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.any, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=3, ), immediate_types=(), cost=1, @@ -1715,7 +2032,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=3, ), immediate_types=(), cost=1, @@ -1734,275 +2053,411 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "Sender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Sender", supported_modes=RunMode.any, + min_avm_version=0, ), "Fee": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Fee", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValid", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValidTime": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValidTime", supported_modes=RunMode.any, + min_avm_version=7, ), "LastValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LastValid", supported_modes=RunMode.any, + min_avm_version=0, ), "Note": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Note", supported_modes=RunMode.any, + min_avm_version=0, ), "Lease": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Lease", supported_modes=RunMode.any, + min_avm_version=0, ), "Receiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Receiver", supported_modes=RunMode.any, + min_avm_version=0, ), "Amount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Amount", supported_modes=RunMode.any, + min_avm_version=0, ), "CloseRemainderTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="CloseRemainderTo", supported_modes=RunMode.any, + min_avm_version=0, ), "VotePK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="VotePK", supported_modes=RunMode.any, + min_avm_version=0, ), "SelectionPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="SelectionPK", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteFirst": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteFirst", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteLast": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteLast", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteKeyDilution": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteKeyDilution", supported_modes=RunMode.any, + min_avm_version=0, ), "Type": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Type", supported_modes=RunMode.any, + min_avm_version=0, ), "TypeEnum": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="TypeEnum", supported_modes=RunMode.any, + min_avm_version=0, ), "XferAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="XferAsset", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetAmount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="AssetAmount", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetSender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetSender", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetReceiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetReceiver", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetCloseTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetCloseTo", supported_modes=RunMode.any, + min_avm_version=0, ), "GroupIndex": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GroupIndex", supported_modes=RunMode.any, + min_avm_version=0, ), "TxID": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="TxID", supported_modes=RunMode.any, + min_avm_version=0, ), "ApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="ApplicationID", supported_modes=RunMode.any, + min_avm_version=2, ), "OnCompletion": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="OnCompletion", supported_modes=RunMode.any, + min_avm_version=2, ), "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAppArgs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAppArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAccounts": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAccounts", supported_modes=RunMode.any, + min_avm_version=2, ), "ApprovalProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "ClearStateProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "RekeyTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="RekeyTo", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="ConfigAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetTotal": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetTotal", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDecimals": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetDecimals", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDefaultFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="ConfigAssetDefaultFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetUnitName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetUnitName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetURL": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetURL", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetMetadataHash": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetMetadataHash", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetManager": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetManager", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetReserve": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetReserve", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetFreeze": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetFreeze", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetClawback": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetClawback", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="FreezeAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetAccount": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="FreezeAssetAccount", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="FreezeAssetFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "NumAssets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAssets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "NumApplications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApplications", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "ExtraProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ExtraProgramPages", supported_modes=RunMode.any, + min_avm_version=4, ), "Nonparticipation": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="Nonparticipation", supported_modes=RunMode.any, + min_avm_version=5, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "NumLogs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumLogs", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedAssetID": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="CreatedAssetID", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="CreatedApplicationID", supported_modes=RunMode.app, + min_avm_version=5, ), "LastLog": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="LastLog", supported_modes=RunMode.app, + min_avm_version=6, ), "StateProofPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="StateProofPK", supported_modes=RunMode.any, + min_avm_version=6, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -2022,31 +2477,45 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -2066,33 +2535,47 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature( args=[StackType.uint64], returns=[StackType.application] ), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -2108,7 +2591,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: gload = AVMOpData( op_code="gload", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.any]), supported_modes=RunMode.app + signature=OpSignature(args=[], returns=[StackType.any]), + enum=None, + supported_modes=RunMode.app, + min_avm_version=4, ), immediate_types=(ImmediateKind.uint8, ImmediateKind.uint8), cost=1, @@ -2125,7 +2611,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="gloads", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.any]), + enum=None, supported_modes=RunMode.app, + min_avm_version=4, ), immediate_types=(ImmediateKind.uint8,), cost=1, @@ -2144,7 +2632,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.any] ), + enum=None, supported_modes=RunMode.app, + min_avm_version=6, ), immediate_types=(), cost=1, @@ -2162,75 +2652,141 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "MinTxnFee": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="MinTxnFee", supported_modes=RunMode.any, + min_avm_version=0, ), "MinBalance": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="MinBalance", supported_modes=RunMode.any, + min_avm_version=0, ), "MaxTxnLife": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="MaxTxnLife", supported_modes=RunMode.any, + min_avm_version=0, ), "ZeroAddress": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ZeroAddress", supported_modes=RunMode.any, + min_avm_version=0, ), "GroupSize": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GroupSize", supported_modes=RunMode.any, + min_avm_version=0, ), "LogicSigVersion": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LogicSigVersion", supported_modes=RunMode.any, + min_avm_version=2, ), "Round": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Round", supported_modes=RunMode.app, + min_avm_version=2, ), "LatestTimestamp": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LatestTimestamp", supported_modes=RunMode.app, + min_avm_version=2, ), "CurrentApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="CurrentApplicationID", supported_modes=RunMode.app, + min_avm_version=2, ), "CreatorAddress": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="CreatorAddress", supported_modes=RunMode.app, + min_avm_version=3, ), "CurrentApplicationAddress": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="CurrentApplicationAddress", supported_modes=RunMode.app, + min_avm_version=5, ), "GroupID": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="GroupID", supported_modes=RunMode.any, + min_avm_version=5, ), "OpcodeBudget": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="OpcodeBudget", supported_modes=RunMode.any, + min_avm_version=6, ), "CallerApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="CallerApplicationID", supported_modes=RunMode.app, + min_avm_version=6, ), "CallerApplicationAddress": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="CallerApplicationAddress", supported_modes=RunMode.app, + min_avm_version=6, ), "AssetCreateMinBalance": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="AssetCreateMinBalance", supported_modes=RunMode.any, + min_avm_version=10, ), "AssetOptInMinBalance": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="AssetOptInMinBalance", supported_modes=RunMode.any, + min_avm_version=10, ), "GenesisHash": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="GenesisHash", + supported_modes=RunMode.any, + min_avm_version=10, + ), + "PayoutsEnabled": Variant( + signature=OpSignature(args=[], returns=[StackType.bool]), + enum="PayoutsEnabled", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "PayoutsGoOnlineFee": Variant( + signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="PayoutsGoOnlineFee", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "PayoutsPercent": Variant( + signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="PayoutsPercent", + supported_modes=RunMode.any, + min_avm_version=11, + ), + "PayoutsMinBalance": Variant( + signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="PayoutsMinBalance", supported_modes=RunMode.any, + min_avm_version=11, + ), + "PayoutsMaxBalance": Variant( + signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="PayoutsMaxBalance", + supported_modes=RunMode.any, + min_avm_version=11, ), }, ), @@ -2249,7 +2805,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -2266,7 +2824,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -2283,7 +2843,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -2300,7 +2862,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -2319,275 +2883,411 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "Sender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Sender", supported_modes=RunMode.any, + min_avm_version=0, ), "Fee": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Fee", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValid", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValidTime": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValidTime", supported_modes=RunMode.any, + min_avm_version=7, ), "LastValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LastValid", supported_modes=RunMode.any, + min_avm_version=0, ), "Note": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Note", supported_modes=RunMode.any, + min_avm_version=0, ), "Lease": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Lease", supported_modes=RunMode.any, + min_avm_version=0, ), "Receiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Receiver", supported_modes=RunMode.any, + min_avm_version=0, ), "Amount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Amount", supported_modes=RunMode.any, + min_avm_version=0, ), "CloseRemainderTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="CloseRemainderTo", supported_modes=RunMode.any, + min_avm_version=0, ), "VotePK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="VotePK", supported_modes=RunMode.any, + min_avm_version=0, ), "SelectionPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="SelectionPK", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteFirst": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteFirst", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteLast": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteLast", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteKeyDilution": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteKeyDilution", supported_modes=RunMode.any, + min_avm_version=0, ), "Type": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Type", supported_modes=RunMode.any, + min_avm_version=0, ), "TypeEnum": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="TypeEnum", supported_modes=RunMode.any, + min_avm_version=0, ), "XferAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="XferAsset", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetAmount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="AssetAmount", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetSender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetSender", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetReceiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetReceiver", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetCloseTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetCloseTo", supported_modes=RunMode.any, + min_avm_version=0, ), "GroupIndex": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GroupIndex", supported_modes=RunMode.any, + min_avm_version=0, ), "TxID": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="TxID", supported_modes=RunMode.any, + min_avm_version=0, ), "ApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="ApplicationID", supported_modes=RunMode.any, + min_avm_version=2, ), "OnCompletion": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="OnCompletion", supported_modes=RunMode.any, + min_avm_version=2, ), "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAppArgs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAppArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAccounts": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAccounts", supported_modes=RunMode.any, + min_avm_version=2, ), "ApprovalProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "ClearStateProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "RekeyTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="RekeyTo", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="ConfigAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetTotal": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetTotal", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDecimals": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetDecimals", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDefaultFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="ConfigAssetDefaultFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetUnitName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetUnitName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetURL": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetURL", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetMetadataHash": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetMetadataHash", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetManager": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetManager", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetReserve": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetReserve", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetFreeze": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetFreeze", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetClawback": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetClawback", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="FreezeAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetAccount": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="FreezeAssetAccount", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="FreezeAssetFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "NumAssets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAssets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "NumApplications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApplications", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "ExtraProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ExtraProgramPages", supported_modes=RunMode.any, + min_avm_version=4, ), "Nonparticipation": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="Nonparticipation", supported_modes=RunMode.any, + min_avm_version=5, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "NumLogs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumLogs", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedAssetID": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="CreatedAssetID", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="CreatedApplicationID", supported_modes=RunMode.app, + min_avm_version=5, ), "LastLog": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="LastLog", supported_modes=RunMode.app, + min_avm_version=6, ), "StateProofPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="StateProofPK", supported_modes=RunMode.any, + min_avm_version=6, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -2610,31 +3310,45 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -2656,33 +3370,47 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature( args=[StackType.uint64], returns=[StackType.application] ), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -2702,279 +3430,415 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "Sender": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Sender", supported_modes=RunMode.any, + min_avm_version=0, ), "Fee": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="Fee", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValid": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="FirstValid", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValidTime": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="FirstValidTime", supported_modes=RunMode.any, + min_avm_version=7, ), "LastValid": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="LastValid", supported_modes=RunMode.any, + min_avm_version=0, ), "Note": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Note", supported_modes=RunMode.any, + min_avm_version=0, ), "Lease": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Lease", supported_modes=RunMode.any, + min_avm_version=0, ), "Receiver": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Receiver", supported_modes=RunMode.any, + min_avm_version=0, ), "Amount": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="Amount", supported_modes=RunMode.any, + min_avm_version=0, ), "CloseRemainderTo": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="CloseRemainderTo", supported_modes=RunMode.any, + min_avm_version=0, ), "VotePK": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="VotePK", supported_modes=RunMode.any, + min_avm_version=0, ), "SelectionPK": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="SelectionPK", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteFirst": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="VoteFirst", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteLast": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="VoteLast", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteKeyDilution": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="VoteKeyDilution", supported_modes=RunMode.any, + min_avm_version=0, ), "Type": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Type", supported_modes=RunMode.any, + min_avm_version=0, ), "TypeEnum": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="TypeEnum", supported_modes=RunMode.any, + min_avm_version=0, ), "XferAsset": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="XferAsset", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetAmount": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="AssetAmount", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetSender": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="AssetSender", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetReceiver": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="AssetReceiver", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetCloseTo": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="AssetCloseTo", supported_modes=RunMode.any, + min_avm_version=0, ), "GroupIndex": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="GroupIndex", supported_modes=RunMode.any, + min_avm_version=0, ), "TxID": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="TxID", supported_modes=RunMode.any, + min_avm_version=0, ), "ApplicationID": Variant( signature=OpSignature( args=[StackType.uint64], returns=[StackType.application] ), + enum="ApplicationID", supported_modes=RunMode.any, + min_avm_version=2, ), "OnCompletion": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="OnCompletion", supported_modes=RunMode.any, + min_avm_version=2, ), "ApplicationArgs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAppArgs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="NumAppArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAccounts": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="NumAccounts", supported_modes=RunMode.any, + min_avm_version=2, ), "ApprovalProgram": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApprovalProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "ClearStateProgram": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ClearStateProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "RekeyTo": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="RekeyTo", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAsset": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="ConfigAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetTotal": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="ConfigAssetTotal", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDecimals": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="ConfigAssetDecimals", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDefaultFrozen": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bool]), + enum="ConfigAssetDefaultFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetUnitName": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ConfigAssetUnitName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetName": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ConfigAssetName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetURL": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ConfigAssetURL", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetMetadataHash": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ConfigAssetMetadataHash", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetManager": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="ConfigAssetManager", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetReserve": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="ConfigAssetReserve", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetFreeze": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="ConfigAssetFreeze", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetClawback": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="ConfigAssetClawback", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAsset": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="FreezeAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetAccount": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="FreezeAssetAccount", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetFrozen": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bool]), + enum="FreezeAssetFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "NumAssets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="NumAssets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "NumApplications": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="NumApplications", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumUint": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="GlobalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumByteSlice": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="GlobalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumUint": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="LocalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumByteSlice": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="LocalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "ExtraProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="ExtraProgramPages", supported_modes=RunMode.any, + min_avm_version=4, ), "Nonparticipation": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bool]), + enum="Nonparticipation", supported_modes=RunMode.any, + min_avm_version=5, ), "Logs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "NumLogs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="NumLogs", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedAssetID": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="CreatedAssetID", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedApplicationID": Variant( signature=OpSignature( args=[StackType.uint64], returns=[StackType.application] ), + enum="CreatedApplicationID", supported_modes=RunMode.app, + min_avm_version=5, ), "LastLog": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="LastLog", supported_modes=RunMode.app, + min_avm_version=6, ), "StateProofPK": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="StateProofPK", supported_modes=RunMode.any, + min_avm_version=6, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="NumApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum="NumClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -2998,33 +3862,47 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature( args=[StackType.uint64], returns=[StackType.application] ), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -3048,43 +3926,57 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bytes] ), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.address] ), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.asset] ), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.application] ), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bytes] ), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bytes] ), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bytes] ), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -3101,7 +3993,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="itob", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -3119,275 +4013,411 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "Sender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Sender", supported_modes=RunMode.any, + min_avm_version=0, ), "Fee": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Fee", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValid", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValidTime": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValidTime", supported_modes=RunMode.any, + min_avm_version=7, ), "LastValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LastValid", supported_modes=RunMode.any, + min_avm_version=0, ), "Note": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Note", supported_modes=RunMode.any, + min_avm_version=0, ), "Lease": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Lease", supported_modes=RunMode.any, + min_avm_version=0, ), "Receiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Receiver", supported_modes=RunMode.any, + min_avm_version=0, ), "Amount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Amount", supported_modes=RunMode.any, + min_avm_version=0, ), "CloseRemainderTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="CloseRemainderTo", supported_modes=RunMode.any, + min_avm_version=0, ), "VotePK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="VotePK", supported_modes=RunMode.any, + min_avm_version=0, ), "SelectionPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="SelectionPK", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteFirst": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteFirst", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteLast": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteLast", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteKeyDilution": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteKeyDilution", supported_modes=RunMode.any, + min_avm_version=0, ), "Type": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Type", supported_modes=RunMode.any, + min_avm_version=0, ), "TypeEnum": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="TypeEnum", supported_modes=RunMode.any, + min_avm_version=0, ), "XferAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="XferAsset", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetAmount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="AssetAmount", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetSender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetSender", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetReceiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetReceiver", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetCloseTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetCloseTo", supported_modes=RunMode.any, + min_avm_version=0, ), "GroupIndex": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GroupIndex", supported_modes=RunMode.any, + min_avm_version=0, ), "TxID": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="TxID", supported_modes=RunMode.any, + min_avm_version=0, ), "ApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="ApplicationID", supported_modes=RunMode.any, + min_avm_version=2, ), "OnCompletion": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="OnCompletion", supported_modes=RunMode.any, + min_avm_version=2, ), "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAppArgs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAppArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAccounts": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAccounts", supported_modes=RunMode.any, + min_avm_version=2, ), "ApprovalProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "ClearStateProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "RekeyTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="RekeyTo", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="ConfigAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetTotal": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetTotal", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDecimals": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetDecimals", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDefaultFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="ConfigAssetDefaultFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetUnitName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetUnitName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetURL": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetURL", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetMetadataHash": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetMetadataHash", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetManager": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetManager", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetReserve": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetReserve", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetFreeze": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetFreeze", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetClawback": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetClawback", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="FreezeAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetAccount": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="FreezeAssetAccount", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="FreezeAssetFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "NumAssets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAssets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "NumApplications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApplications", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "ExtraProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ExtraProgramPages", supported_modes=RunMode.any, + min_avm_version=4, ), "Nonparticipation": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="Nonparticipation", supported_modes=RunMode.any, + min_avm_version=5, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "NumLogs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumLogs", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedAssetID": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="CreatedAssetID", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="CreatedApplicationID", supported_modes=RunMode.app, + min_avm_version=5, ), "LastLog": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="LastLog", supported_modes=RunMode.app, + min_avm_version=6, ), "StateProofPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="StateProofPK", supported_modes=RunMode.any, + min_avm_version=6, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -3402,7 +4432,12 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: itxn_begin = AVMOpData( op_code="itxn_begin", - variants=Variant(signature=OpSignature(args=[], returns=[]), supported_modes=RunMode.app), + variants=Variant( + signature=OpSignature(args=[], returns=[]), + enum=None, + supported_modes=RunMode.app, + min_avm_version=5, + ), immediate_types=(), cost=1, min_avm_version=5, @@ -3424,207 +4459,309 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "Sender": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="Sender", supported_modes=RunMode.any, + min_avm_version=0, ), "Fee": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="Fee", supported_modes=RunMode.any, + min_avm_version=0, ), "Note": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="Note", supported_modes=RunMode.any, + min_avm_version=0, ), "Receiver": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="Receiver", supported_modes=RunMode.any, + min_avm_version=0, ), "Amount": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="Amount", supported_modes=RunMode.any, + min_avm_version=0, ), "CloseRemainderTo": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="CloseRemainderTo", supported_modes=RunMode.any, + min_avm_version=0, ), "VotePK": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="VotePK", supported_modes=RunMode.any, + min_avm_version=0, ), "SelectionPK": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="SelectionPK", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteFirst": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="VoteFirst", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteLast": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="VoteLast", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteKeyDilution": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="VoteKeyDilution", supported_modes=RunMode.any, + min_avm_version=0, ), "Type": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="Type", supported_modes=RunMode.any, + min_avm_version=0, ), "TypeEnum": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="TypeEnum", supported_modes=RunMode.any, + min_avm_version=0, ), "XferAsset": Variant( signature=OpSignature(args=[StackType.asset], returns=[]), + enum="XferAsset", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetAmount": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="AssetAmount", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetSender": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="AssetSender", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetReceiver": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="AssetReceiver", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetCloseTo": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="AssetCloseTo", supported_modes=RunMode.any, + min_avm_version=0, ), "ApplicationID": Variant( signature=OpSignature(args=[StackType.application], returns=[]), + enum="ApplicationID", supported_modes=RunMode.any, + min_avm_version=2, ), "OnCompletion": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="OnCompletion", supported_modes=RunMode.any, + min_avm_version=2, ), "ApplicationArgs": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "ApprovalProgram": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ApprovalProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "ClearStateProgram": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ClearStateProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "RekeyTo": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="RekeyTo", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAsset": Variant( signature=OpSignature(args=[StackType.asset], returns=[]), + enum="ConfigAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetTotal": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="ConfigAssetTotal", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDecimals": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="ConfigAssetDecimals", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDefaultFrozen": Variant( signature=OpSignature(args=[StackType.bool], returns=[]), + enum="ConfigAssetDefaultFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetUnitName": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ConfigAssetUnitName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetName": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ConfigAssetName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetURL": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ConfigAssetURL", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetMetadataHash": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ConfigAssetMetadataHash", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetManager": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="ConfigAssetManager", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetReserve": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="ConfigAssetReserve", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetFreeze": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="ConfigAssetFreeze", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetClawback": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="ConfigAssetClawback", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAsset": Variant( signature=OpSignature(args=[StackType.asset], returns=[]), + enum="FreezeAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetAccount": Variant( signature=OpSignature(args=[StackType.address], returns=[]), + enum="FreezeAssetAccount", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetFrozen": Variant( signature=OpSignature(args=[StackType.bool], returns=[]), + enum="FreezeAssetFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumUint": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="GlobalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumByteSlice": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="GlobalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumUint": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="LocalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumByteSlice": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="LocalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "ExtraProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[]), + enum="ExtraProgramPages", supported_modes=RunMode.any, + min_avm_version=4, ), "Nonparticipation": Variant( signature=OpSignature(args=[StackType.bool], returns=[]), + enum="Nonparticipation", supported_modes=RunMode.any, + min_avm_version=5, ), "StateProofPK": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="StateProofPK", supported_modes=RunMode.any, + min_avm_version=6, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.bytes], returns=[]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -3645,7 +4782,12 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: itxn_next = AVMOpData( op_code="itxn_next", - variants=Variant(signature=OpSignature(args=[], returns=[]), supported_modes=RunMode.app), + variants=Variant( + signature=OpSignature(args=[], returns=[]), + enum=None, + supported_modes=RunMode.app, + min_avm_version=6, + ), immediate_types=(), cost=1, min_avm_version=6, @@ -3659,7 +4801,12 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: itxn_submit = AVMOpData( op_code="itxn_submit", - variants=Variant(signature=OpSignature(args=[], returns=[]), supported_modes=RunMode.app), + variants=Variant( + signature=OpSignature(args=[], returns=[]), + enum=None, + supported_modes=RunMode.app, + min_avm_version=5, + ), immediate_types=(), cost=1, min_avm_version=5, @@ -3680,31 +4827,45 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -3724,33 +4885,47 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature( args=[StackType.uint64], returns=[StackType.application] ), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -3772,19 +4947,25 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum="JSONString", supported_modes=RunMode.any, + min_avm_version=7, ), "JSONUint64": Variant( signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.uint64] ), + enum="JSONUint64", supported_modes=RunMode.any, + min_avm_version=7, ), "JSONObject": Variant( signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum="JSONObject", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -3809,7 +4990,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="keccak256", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=130, @@ -3824,7 +5007,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="len", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -3838,7 +5023,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: load = AVMOpData( op_code="load", variants=Variant( - signature=OpSignature(args=[], returns=[StackType.any]), supported_modes=RunMode.any + signature=OpSignature(args=[], returns=[StackType.any]), + enum=None, + supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(ImmediateKind.uint8,), cost=1, @@ -3853,7 +5041,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="loads", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.any]), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -3867,7 +5057,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: log = AVMOpData( op_code="log", variants=Variant( - signature=OpSignature(args=[StackType.bytes], returns=[]), supported_modes=RunMode.app + signature=OpSignature(args=[StackType.bytes], returns=[]), + enum=None, + supported_modes=RunMode.app, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -3887,7 +5080,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -3904,7 +5099,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -3921,7 +5118,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -3938,7 +5137,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -3954,7 +5155,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="min_balance", variants=Variant( signature=OpSignature(args=[StackType.address_or_index], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.app, + min_avm_version=3, ), immediate_types=(), cost=1, @@ -3978,7 +5181,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -3995,7 +5200,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bigint] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=20, @@ -4012,7 +5219,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -4032,7 +5241,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bigint] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=20, @@ -4050,7 +5261,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64, StackType.uint64], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -4065,7 +5278,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="!=", variants=Variant( signature=OpSignature(args=[StackType.any, StackType.any], returns=[StackType.bool]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -4082,7 +5297,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -4097,7 +5314,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="!", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bool]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -4108,13 +5327,32 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: A == 0 yields 1; else 0 """ + online_stake = AVMOpData( + op_code="online_stake", + variants=Variant( + signature=OpSignature(args=[], returns=[StackType.uint64]), + enum=None, + supported_modes=RunMode.app, + min_avm_version=11, + ), + immediate_types=(), + cost=1, + min_avm_version=11, + supported_modes=RunMode.app, + ) + """ + the total online stake in the agreement round + """ + or_ = AVMOpData( op_code="||", variants=Variant( signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.bool] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -4131,7 +5369,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bytes, StackType.bytes], returns=[StackType.bytes] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=7, ), immediate_types=(ImmediateKind.uint8,), cost=1, @@ -4152,7 +5392,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.bytes, StackType.uint64, StackType.bytes], returns=[StackType.bytes], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=7, ), immediate_types=(), cost=1, @@ -4172,7 +5414,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.any, StackType.any, StackType.bool], returns=[StackType.any] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=3, ), immediate_types=(), cost=1, @@ -4189,7 +5433,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.any, StackType.uint64, StackType.uint64], returns=[StackType.any] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=3, ), immediate_types=(), cost=1, @@ -4213,7 +5459,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.bytes, StackType.uint64, StackType.uint64], returns=[StackType.bytes], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=3, ), immediate_types=(), cost=1, @@ -4229,7 +5477,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="sha256", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=35, @@ -4244,7 +5494,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="sha3_256", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=7, ), immediate_types=(), cost=130, @@ -4259,7 +5511,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="sha512_256", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=45, @@ -4276,7 +5530,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -4293,7 +5549,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=1, @@ -4308,7 +5566,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="sqrt", variants=Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.uint64]), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=4, @@ -4322,7 +5582,10 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: store = AVMOpData( op_code="store", variants=Variant( - signature=OpSignature(args=[StackType.any], returns=[]), supported_modes=RunMode.any + signature=OpSignature(args=[StackType.any], returns=[]), + enum=None, + supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(ImmediateKind.uint8,), cost=1, @@ -4337,7 +5600,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="stores", variants=Variant( signature=OpSignature(args=[StackType.uint64, StackType.any], returns=[]), + enum=None, supported_modes=RunMode.any, + min_avm_version=5, ), immediate_types=(), cost=1, @@ -4354,7 +5619,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.uint64, StackType.uint64], returns=[StackType.uint64] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=1, ), immediate_types=(), cost=1, @@ -4371,7 +5638,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature( args=[StackType.bigint, StackType.bigint], returns=[StackType.bigint] ), + enum=None, supported_modes=RunMode.any, + min_avm_version=4, ), immediate_types=(), cost=10, @@ -4386,7 +5655,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: op_code="substring", variants=Variant( signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, supported_modes=RunMode.any, + min_avm_version=2, ), immediate_types=(ImmediateKind.uint8, ImmediateKind.uint8), cost=1, @@ -4405,7 +5676,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.bytes, StackType.uint64, StackType.uint64], returns=[StackType.bytes], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=2, ), immediate_types=(), cost=1, @@ -4417,6 +5690,23 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: than the array length, the program fails """ + sumhash512 = AVMOpData( + op_code="sumhash512", + variants=Variant( + signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, + supported_modes=RunMode.any, + min_avm_version=11, + ), + immediate_types=(), + cost=None, + min_avm_version=11, + supported_modes=RunMode.any, + ) + """ + sumhash512 of value A, yields [64]byte + """ + txn = AVMOpData( op_code="txn", variants=DynamicVariants( @@ -4424,275 +5714,411 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "Sender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Sender", supported_modes=RunMode.any, + min_avm_version=0, ), "Fee": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Fee", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValid", supported_modes=RunMode.any, + min_avm_version=0, ), "FirstValidTime": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="FirstValidTime", supported_modes=RunMode.any, + min_avm_version=7, ), "LastValid": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LastValid", supported_modes=RunMode.any, + min_avm_version=0, ), "Note": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Note", supported_modes=RunMode.any, + min_avm_version=0, ), "Lease": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Lease", supported_modes=RunMode.any, + min_avm_version=0, ), "Receiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Receiver", supported_modes=RunMode.any, + min_avm_version=0, ), "Amount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Amount", supported_modes=RunMode.any, + min_avm_version=0, ), "CloseRemainderTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="CloseRemainderTo", supported_modes=RunMode.any, + min_avm_version=0, ), "VotePK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="VotePK", supported_modes=RunMode.any, + min_avm_version=0, ), "SelectionPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="SelectionPK", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteFirst": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteFirst", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteLast": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteLast", supported_modes=RunMode.any, + min_avm_version=0, ), "VoteKeyDilution": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="VoteKeyDilution", supported_modes=RunMode.any, + min_avm_version=0, ), "Type": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Type", supported_modes=RunMode.any, + min_avm_version=0, ), "TypeEnum": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="TypeEnum", supported_modes=RunMode.any, + min_avm_version=0, ), "XferAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="XferAsset", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetAmount": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="AssetAmount", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetSender": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetSender", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetReceiver": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetReceiver", supported_modes=RunMode.any, + min_avm_version=0, ), "AssetCloseTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="AssetCloseTo", supported_modes=RunMode.any, + min_avm_version=0, ), "GroupIndex": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GroupIndex", supported_modes=RunMode.any, + min_avm_version=0, ), "TxID": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="TxID", supported_modes=RunMode.any, + min_avm_version=0, ), "ApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="ApplicationID", supported_modes=RunMode.any, + min_avm_version=2, ), "OnCompletion": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="OnCompletion", supported_modes=RunMode.any, + min_avm_version=2, ), "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAppArgs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAppArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "NumAccounts": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAccounts", supported_modes=RunMode.any, + min_avm_version=2, ), "ApprovalProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "ClearStateProgram": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgram", supported_modes=RunMode.any, + min_avm_version=2, ), "RekeyTo": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="RekeyTo", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="ConfigAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetTotal": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetTotal", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDecimals": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ConfigAssetDecimals", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetDefaultFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="ConfigAssetDefaultFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetUnitName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetUnitName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetName": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetName", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetURL": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetURL", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetMetadataHash": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ConfigAssetMetadataHash", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetManager": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetManager", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetReserve": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetReserve", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetFreeze": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetFreeze", supported_modes=RunMode.any, + min_avm_version=2, ), "ConfigAssetClawback": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="ConfigAssetClawback", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAsset": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="FreezeAsset", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetAccount": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="FreezeAssetAccount", supported_modes=RunMode.any, + min_avm_version=2, ), "FreezeAssetFrozen": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="FreezeAssetFrozen", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "NumAssets": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumAssets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "NumApplications": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApplications", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "GlobalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="GlobalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumUint": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumUint", supported_modes=RunMode.any, + min_avm_version=3, ), "LocalNumByteSlice": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="LocalNumByteSlice", supported_modes=RunMode.any, + min_avm_version=3, ), "ExtraProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="ExtraProgramPages", supported_modes=RunMode.any, + min_avm_version=4, ), "Nonparticipation": Variant( signature=OpSignature(args=[], returns=[StackType.bool]), + enum="Nonparticipation", supported_modes=RunMode.any, + min_avm_version=5, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "NumLogs": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumLogs", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedAssetID": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="CreatedAssetID", supported_modes=RunMode.app, + min_avm_version=5, ), "CreatedApplicationID": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="CreatedApplicationID", supported_modes=RunMode.app, + min_avm_version=5, ), "LastLog": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="LastLog", supported_modes=RunMode.app, + min_avm_version=6, ), "StateProofPK": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="StateProofPK", supported_modes=RunMode.any, + min_avm_version=6, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "NumClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.uint64]), + enum="NumClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -4712,31 +6138,45 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature(args=[], returns=[StackType.application]), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -4758,33 +6198,47 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: variant_map={ "ApplicationArgs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApplicationArgs", supported_modes=RunMode.any, + min_avm_version=2, ), "Accounts": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.address]), + enum="Accounts", supported_modes=RunMode.any, + min_avm_version=2, ), "Assets": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.asset]), + enum="Assets", supported_modes=RunMode.any, + min_avm_version=3, ), "Applications": Variant( signature=OpSignature( args=[StackType.uint64], returns=[StackType.application] ), + enum="Applications", supported_modes=RunMode.any, + min_avm_version=3, ), "Logs": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="Logs", supported_modes=RunMode.app, + min_avm_version=5, ), "ApprovalProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ApprovalProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), "ClearStateProgramPages": Variant( signature=OpSignature(args=[StackType.uint64], returns=[StackType.bytes]), + enum="ClearStateProgramPages", supported_modes=RunMode.any, + min_avm_version=7, ), }, ), @@ -4797,6 +6251,40 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: Ath value of the array field F of the current transaction """ + voter_params_get = AVMOpData( + op_code="voter_params_get", + variants=DynamicVariants( + immediate_index=0, + variant_map={ + "VoterBalance": Variant( + signature=OpSignature( + args=[StackType.any], returns=[StackType.uint64, StackType.bool] + ), + enum="VoterBalance", + supported_modes=RunMode.app, + min_avm_version=6, + ), + "VoterIncentiveEligible": Variant( + signature=OpSignature( + args=[StackType.any], returns=[StackType.bool, StackType.bool] + ), + enum="VoterIncentiveEligible", + supported_modes=RunMode.app, + min_avm_version=11, + ), + }, + ), + immediate_types=(ImmediateKind.arg_enum,), + cost=1, + min_avm_version=11, + supported_modes=RunMode.app, + ) + """ + X is field F from online account A as of the balance round: 320 rounds before the current + round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a + type specific zero-value + """ + vrf_verify = AVMOpData( op_code="vrf_verify", variants=Variant( @@ -4804,7 +6292,9 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: args=[StackType.bytes, StackType.bytes, StackType.bytes], returns=[StackType.bytes, StackType.bool], ), + enum=None, supported_modes=RunMode.any, + min_avm_version=7, ), immediate_types=(ImmediateKind.arg_enum,), cost=5700, diff --git a/src/puya/ir/avm_ops_models.py b/src/puya/ir/avm_ops_models.py index 0b6d28606f..c1477a2688 100644 --- a/src/puya/ir/avm_ops_models.py +++ b/src/puya/ir/avm_ops_models.py @@ -47,7 +47,9 @@ class OpSignature: @attrs.frozen class Variant: signature: OpSignature + enum: str | None supported_modes: RunMode + min_avm_version: int @attrs.frozen diff --git a/src/puya/ir/main.py b/src/puya/ir/main.py index a30666fdc0..76f28455b6 100644 --- a/src/puya/ir/main.py +++ b/src/puya/ir/main.py @@ -41,7 +41,7 @@ StateTotals, ) from puya.parse import SourceLocation -from puya.utils import StableSet, attrs_extend, set_remove +from puya.utils import StableSet, attrs_extend, coalesce, set_remove logger = log.get_logger(__name__) @@ -244,6 +244,7 @@ def _build_ir(ctx: IRBuildContext, contract: awst_nodes.Contract) -> Contract: if not sub.body: # in case something is pre-built (ie from embedded lib) FunctionIRBuilder.build_body(ctx, function=func, subroutine=sub) + avm_version = coalesce(contract.avm_version, ctx.options.target_avm_version) approval_ir = _make_program( ctx, contract.approval_program, @@ -252,6 +253,7 @@ def _build_ir(ctx: IRBuildContext, contract: awst_nodes.Contract) -> Contract: *ctx.embedded_funcs_lookup.values(), ), program_id=".".join((contract.id, contract.approval_program.short_name)), + avm_version=avm_version, ) clear_state_ir = _make_program( ctx, @@ -261,6 +263,7 @@ def _build_ir(ctx: IRBuildContext, contract: awst_nodes.Contract) -> Contract: *ctx.embedded_funcs_lookup.values(), ), program_id=".".join((contract.id, contract.clear_program.short_name)), + avm_version=avm_version, ) result = Contract( source_location=contract.source_location, @@ -307,6 +310,7 @@ def _build_logic_sig_ir( *ctx.embedded_funcs_lookup.values(), ), program_id=logic_sig.id, + avm_version=coalesce(logic_sig.avm_version, ctx.options.target_avm_version), ) result = LogicSignature( source_location=logic_sig.source_location, @@ -391,6 +395,7 @@ def _make_program( references: Iterable[Subroutine], *, program_id: str, + avm_version: int, ) -> Program: if main.args: raise InternalError("main method should not have args") @@ -410,6 +415,7 @@ def _make_program( id=program_id, main=main_sub, subroutines=tuple(references), + avm_version=avm_version, ) diff --git a/src/puya/ir/models.py b/src/puya/ir/models.py index 1dc3a856fc..b5644d4c1c 100644 --- a/src/puya/ir/models.py +++ b/src/puya/ir/models.py @@ -913,7 +913,7 @@ def validate_with_ssa(self) -> None: attrs.validate(self) -@attrs.define(eq=False) +@attrs.define(kw_only=True, eq=False) class Program(Context): """An individual compilation unit - ie either an Approval or a Clear State program""" @@ -938,6 +938,7 @@ class Program(Context): main: Subroutine subroutines: Sequence[Subroutine] source_location: SourceLocation | None = None + avm_version: int def __attrs_post_init__(self) -> None: if self.source_location is None: diff --git a/src/puya/ir/validation/_base.py b/src/puya/ir/validation/_base.py index 864cd6b5e5..2dd969c7fe 100644 --- a/src/puya/ir/validation/_base.py +++ b/src/puya/ir/validation/_base.py @@ -3,16 +3,20 @@ from puya.context import CompileContext from puya.ir.avm_ops_models import RunMode -from puya.ir.models import Contract, LogicSignature, ModuleArtifact +from puya.ir.models import Contract, LogicSignature, ModuleArtifact, Program from puya.ir.visitor import IRTraverser class DestructuredIRValidator(IRTraverser, abc.ABC): def __init__( - self, context: CompileContext, run_mode: typing.Literal[RunMode.app, RunMode.lsig] + self, + context: CompileContext, + program: Program, + run_mode: typing.Literal[RunMode.app, RunMode.lsig], ): self.context = context self.current_run_mode = run_mode + self.active_program = program @classmethod def validate(cls, context: CompileContext, artifact: ModuleArtifact) -> None: @@ -26,13 +30,13 @@ def validate(cls, context: CompileContext, artifact: ModuleArtifact) -> None: @classmethod def validate_logic_sig(cls, context: CompileContext, logic_sig: LogicSignature) -> None: - validator = cls(context, RunMode.lsig) + validator = cls(context, logic_sig.program, RunMode.lsig) for sub in logic_sig.program.all_subroutines: validator.visit_all_blocks(sub.body) @classmethod def validate_contract(cls, context: CompileContext, contract: Contract) -> None: - validator = cls(context, RunMode.app) - subs = (sub for program in contract.all_programs() for sub in program.all_subroutines) - for sub in subs: - validator.visit_all_blocks(sub.body) + for program in contract.all_programs(): + validator = cls(context, program, RunMode.app) + for sub in program.all_subroutines: + validator.visit_all_blocks(sub.body) diff --git a/src/puya/ir/validation/min_avm_version_validator.py b/src/puya/ir/validation/min_avm_version_validator.py index 0ac1e420df..68b744df98 100644 --- a/src/puya/ir/validation/min_avm_version_validator.py +++ b/src/puya/ir/validation/min_avm_version_validator.py @@ -10,11 +10,16 @@ class MinAvmVersionValidator(DestructuredIRValidator): @typing.override def visit_intrinsic_op(self, intrinsic: Intrinsic) -> None: - target_avm_version = self.context.options.target_avm_version - if intrinsic.op.min_avm_version > target_avm_version: - logger.warning( - f"Opcode {intrinsic.op} requires a min AVM version of " - f"{intrinsic.op.min_avm_version} but the target AVM version is" - f" {target_avm_version}", - intrinsic.source_location, + program_avm_version = self.active_program.avm_version + op_avm_version = intrinsic.op_variant.min_avm_version + if op_avm_version > program_avm_version: + op_desc = intrinsic.op.value + # if variant min version differs from op min version, then include variant enum + if op_avm_version != intrinsic.op.min_avm_version: + op_desc += f" {intrinsic.op_variant.enum}" + logger.error( + f"Opcode {op_desc!r} requires a min AVM version of " + f"{op_avm_version} but the target AVM version is" + f" {program_avm_version}", + location=intrinsic.source_location, ) diff --git a/src/puya/mir/main.py b/src/puya/mir/main.py index c8328f860d..b85c9d029c 100644 --- a/src/puya/mir/main.py +++ b/src/puya/mir/main.py @@ -22,6 +22,7 @@ def program_ir_to_mir( _lower_subroutine_to_mir(ctx, ir_sub, is_main=False, name=ir_sub.full_name) for ir_sub in program_ir.subroutines ], + avm_version=program_ir.avm_version, ) global_stack_allocation(ctx, result, mir_output_path) return result diff --git a/src/puya/mir/models.py b/src/puya/mir/models.py index 15819b351e..b1ffc24190 100644 --- a/src/puya/mir/models.py +++ b/src/puya/mir/models.py @@ -624,6 +624,7 @@ class Program: id: str main: MemorySubroutine subroutines: list[MemorySubroutine] + avm_version: int @property def all_subroutines(self) -> Iterator[MemorySubroutine]: diff --git a/src/puya/options.py b/src/puya/options.py index 6c3ef62491..0a6ac6334e 100644 --- a/src/puya/options.py +++ b/src/puya/options.py @@ -4,7 +4,7 @@ import attrs -from puya.algo_constants import MAINNET_TEAL_LANGUAGE_VERSION +from puya.algo_constants import MAINNET_AVM_VERSION class LocalsCoalescingStrategy(enum.StrEnum): @@ -25,7 +25,7 @@ class PuyaOptions: output_bytecode: bool = False debug_level: int = 1 optimization_level: int = 1 - target_avm_version: int = MAINNET_TEAL_LANGUAGE_VERSION + target_avm_version: int = MAINNET_AVM_VERSION cli_template_definitions: Mapping[str, int | bytes] = attrs.field(factory=dict) template_vars_prefix: str = "TMPL_" # TODO: the below is probably not scalable as a set of optimisation on/off flags, diff --git a/src/puya/teal/main.py b/src/puya/teal/main.py index 95264ea868..7f844a9f28 100644 --- a/src/puya/teal/main.py +++ b/src/puya/teal/main.py @@ -11,7 +11,7 @@ def mir_to_teal(context: CompileContext, program_mir: mir.Program) -> teal_models.TealProgram: - teal = _build_teal(context, program_mir) + teal = _build_teal(program_mir) before = _get_all_stack_manipulations(teal) teal = optimize_teal_program(context, teal) @@ -36,10 +36,10 @@ def _get_all_stack_manipulations( ] -def _build_teal(context: CompileContext, mir_program: mir.Program) -> teal_models.TealProgram: +def _build_teal(mir_program: mir.Program) -> teal_models.TealProgram: program = teal_models.TealProgram( id=mir_program.id, - target_avm_version=context.options.target_avm_version, + avm_version=mir_program.avm_version, main=TealBuilder.build_subroutine(mir_program.main), subroutines=[TealBuilder.build_subroutine(mir_sub) for mir_sub in mir_program.subroutines], ) diff --git a/src/puya/teal/models.py b/src/puya/teal/models.py index 16c9ab5268..503962df38 100644 --- a/src/puya/teal/models.py +++ b/src/puya/teal/models.py @@ -513,7 +513,7 @@ class TealSubroutine: @attrs.define class TealProgram: id: str - target_avm_version: int + avm_version: int main: TealSubroutine subroutines: list[TealSubroutine] diff --git a/src/puya/teal/output.py b/src/puya/teal/output.py index cd16204467..5bb7a105e0 100644 --- a/src/puya/teal/output.py +++ b/src/puya/teal/output.py @@ -10,7 +10,7 @@ def emit_teal(context: CompileContext, program: models.TealProgram) -> str: indent = " " * 4 result = [ - f"#pragma version {context.options.target_avm_version}", + f"#pragma version {program.avm_version}", "", ] for subroutine in program.all_subroutines: diff --git a/src/puya/ussemble/assemble.py b/src/puya/ussemble/assemble.py index b43efb0bfc..a2a7eac6c9 100644 --- a/src/puya/ussemble/assemble.py +++ b/src/puya/ussemble/assemble.py @@ -27,7 +27,7 @@ def assemble_bytecode_and_debug_info( ) -> models.AssembledProgram: function_block_ids = {s.blocks[0].label: s.signature.name for s in program.all_subroutines} - version_bytes = _encode_varuint(ctx.options.target_avm_version) + version_bytes = _encode_varuint(program.avm_version) pc_events = defaultdict[int, DebugEvent](DebugEvent) # type: ignore[arg-type] pc_ops = dict[int, models.AVMOp]() label_pcs = dict[str, int]() diff --git a/src/puya/ussemble/op_spec.py b/src/puya/ussemble/op_spec.py index b1de4c3c24..c073a81b9e 100644 --- a/src/puya/ussemble/op_spec.py +++ b/src/puya/ussemble/op_spec.py @@ -164,6 +164,11 @@ "AssetCreateMinBalance": 15, "AssetOptInMinBalance": 16, "GenesisHash": 17, + "PayoutsEnabled": 18, + "PayoutsGoOnlineFee": 19, + "PayoutsPercent": 20, + "PayoutsMinBalance": 21, + "PayoutsMaxBalance": 22, } ) ], @@ -506,16 +511,27 @@ "AcctTotalAssets": 9, "AcctTotalBoxes": 10, "AcctTotalBoxBytes": 11, + "AcctIncentiveEligible": 12, + "AcctLastProposed": 13, + "AcctLastHeartbeat": 14, } ) ], ), + "voter_params_get": OpSpec( + name="voter_params_get", + code=116, + immediates=[ImmediateEnum(codes={"VoterBalance": 0, "VoterIncentiveEligible": 1})], + ), + "online_stake": OpSpec(name="online_stake", code=117, immediates=[]), "min_balance": OpSpec(name="min_balance", code=120, immediates=[]), "pushbytes": OpSpec(name="pushbytes", code=128, immediates=[ImmediateKind.bytes]), "pushint": OpSpec(name="pushint", code=129, immediates=[ImmediateKind.varuint]), "pushbytess": OpSpec(name="pushbytess", code=130, immediates=[ImmediateKind.bytes_array]), "pushints": OpSpec(name="pushints", code=131, immediates=[ImmediateKind.varuint_array]), "ed25519verify_bare": OpSpec(name="ed25519verify_bare", code=132, immediates=[]), + "falcon_verify": OpSpec(name="falcon_verify", code=133, immediates=[]), + "sumhash512": OpSpec(name="sumhash512", code=134, immediates=[]), "callsub": OpSpec(name="callsub", code=136, immediates=[ImmediateKind.label]), "retsub": OpSpec(name="retsub", code=137, immediates=[]), "proto": OpSpec(name="proto", code=138, immediates=[ImmediateKind.uint8, ImmediateKind.uint8]), @@ -907,7 +923,24 @@ name="vrf_verify", code=208, immediates=[ImmediateEnum(codes={"VrfAlgorand": 0})] ), "block": OpSpec( - name="block", code=209, immediates=[ImmediateEnum(codes={"BlkSeed": 0, "BlkTimestamp": 1})] + name="block", + code=209, + immediates=[ + ImmediateEnum( + codes={ + "BlkSeed": 0, + "BlkTimestamp": 1, + "BlkProposer": 2, + "BlkFeesCollected": 3, + "BlkBonus": 4, + "BlkBranch": 5, + "BlkFeeSink": 6, + "BlkProtocol": 7, + "BlkTxnCounter": 8, + "BlkProposerPayout": 9, + } + ) + ], ), "box_splice": OpSpec(name="box_splice", code=210, immediates=[]), "box_resize": OpSpec(name="box_resize", code=211, immediates=[]), diff --git a/src/puyapy/__main__.py b/src/puyapy/__main__.py index 00989e6ede..2ed2988716 100644 --- a/src/puyapy/__main__.py +++ b/src/puyapy/__main__.py @@ -4,7 +4,7 @@ from importlib.metadata import version from pathlib import Path -from puya.algo_constants import MAINNET_TEAL_LANGUAGE_VERSION, SUPPORTED_TEAL_LANGUAGE_VERSIONS +from puya.algo_constants import MAINNET_AVM_VERSION, SUPPORTED_AVM_VERSIONS from puya.log import LogLevel, configure_logging from puya.options import LocalsCoalescingStrategy @@ -138,8 +138,8 @@ def main() -> None: parser.add_argument( "--target-avm-version", type=int, - choices=SUPPORTED_TEAL_LANGUAGE_VERSIONS, - default=MAINNET_TEAL_LANGUAGE_VERSION, + choices=SUPPORTED_AVM_VERSIONS, + default=MAINNET_AVM_VERSION, ) parser.add_argument( "--locals-coalescing-strategy", diff --git a/src/puyapy/awst_build/contract.py b/src/puyapy/awst_build/contract.py index 7fe958053c..99d7bcd3c8 100644 --- a/src/puyapy/awst_build/contract.py +++ b/src/puyapy/awst_build/contract.py @@ -220,6 +220,7 @@ def build(self, context: ASTConversionModuleContext) -> awst_nodes.Contract | No source_location=self.fragment.source_location, reserved_scratch_space=self.fragment.reserved_scratch_space, state_totals=self.fragment.options.state_totals, + avm_version=self.fragment.options.avm_version, ) def empty_statement(self, _stmt: mypy.nodes.Statement) -> None: diff --git a/src/puyapy/awst_build/intrinsic_data.py b/src/puyapy/awst_build/intrinsic_data.py index 6abedf998d..e9694a2b80 100644 --- a/src/puyapy/awst_build/intrinsic_data.py +++ b/src/puyapy/awst_build/intrinsic_data.py @@ -324,6 +324,16 @@ ), ], ), + falcon_verify=OpMappingWithOverloads( + result=pytypes.BoolType, + arity=3, + overloads=[ + FunctionOpMapping( + "falcon_verify", + args=[(pytypes.BytesType,), (pytypes.BytesType,), (pytypes.BytesType,)], + ), + ], + ), gaid=OpMappingWithOverloads( result=pytypes.UInt64Type, arity=1, @@ -441,6 +451,15 @@ ), ], ), + online_stake=OpMappingWithOverloads( + result=pytypes.UInt64Type, + arity=0, + overloads=[ + FunctionOpMapping( + "online_stake", + ), + ], + ), replace=OpMappingWithOverloads( result=pytypes.BytesType, arity=3, @@ -589,6 +608,16 @@ ), ], ), + sumhash512=OpMappingWithOverloads( + result=pytypes.BytesType, + arity=1, + overloads=[ + FunctionOpMapping( + "sumhash512", + args=[(pytypes.BytesType,)], + ), + ], + ), vrf_verify=OpMappingWithOverloads( result=pytypes.GenericTupleType.parameterise( (pytypes.BytesType, pytypes.BoolType), source_location=None @@ -763,6 +792,45 @@ ), ], ), + acct_incentive_eligible=OpMappingWithOverloads( + result=pytypes.GenericTupleType.parameterise( + (pytypes.BoolType, pytypes.BoolType), source_location=None + ), + arity=1, + overloads=[ + FunctionOpMapping( + "acct_params_get", + immediates=["AcctIncentiveEligible"], + args=[(pytypes.AccountType, pytypes.UInt64Type)], + ), + ], + ), + acct_last_proposed=OpMappingWithOverloads( + result=pytypes.GenericTupleType.parameterise( + (pytypes.UInt64Type, pytypes.BoolType), source_location=None + ), + arity=1, + overloads=[ + FunctionOpMapping( + "acct_params_get", + immediates=["AcctLastProposed"], + args=[(pytypes.AccountType, pytypes.UInt64Type)], + ), + ], + ), + acct_last_heartbeat=OpMappingWithOverloads( + result=pytypes.GenericTupleType.parameterise( + (pytypes.UInt64Type, pytypes.BoolType), source_location=None + ), + arity=1, + overloads=[ + FunctionOpMapping( + "acct_params_get", + immediates=["AcctLastHeartbeat"], + args=[(pytypes.AccountType, pytypes.UInt64Type)], + ), + ], + ), ), AppGlobal=dict( get_bytes=OpMappingWithOverloads( @@ -1238,6 +1306,94 @@ ), ], ), + blk_proposer=OpMappingWithOverloads( + result=pytypes.AccountType, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkProposer"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), + blk_fees_collected=OpMappingWithOverloads( + result=pytypes.UInt64Type, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkFeesCollected"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), + blk_bonus=OpMappingWithOverloads( + result=pytypes.UInt64Type, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkBonus"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), + blk_branch=OpMappingWithOverloads( + result=pytypes.BytesType, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkBranch"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), + blk_fee_sink=OpMappingWithOverloads( + result=pytypes.AccountType, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkFeeSink"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), + blk_protocol=OpMappingWithOverloads( + result=pytypes.BytesType, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkProtocol"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), + blk_txn_counter=OpMappingWithOverloads( + result=pytypes.UInt64Type, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkTxnCounter"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), + blk_proposer_payout=OpMappingWithOverloads( + result=pytypes.UInt64Type, + arity=1, + overloads=[ + FunctionOpMapping( + "block", + immediates=["BlkProposerPayout"], + args=[(pytypes.UInt64Type,)], + ), + ], + ), ), Box=dict( create=OpMappingWithOverloads( @@ -3445,6 +3601,31 @@ "GenesisHash", pytypes.BytesType, ), + payouts_enabled=PropertyOpMapping( + "global", + "PayoutsEnabled", + pytypes.BoolType, + ), + payouts_go_online_fee=PropertyOpMapping( + "global", + "PayoutsGoOnlineFee", + pytypes.UInt64Type, + ), + payouts_percent=PropertyOpMapping( + "global", + "PayoutsPercent", + pytypes.UInt64Type, + ), + payouts_min_balance=PropertyOpMapping( + "global", + "PayoutsMinBalance", + pytypes.UInt64Type, + ), + payouts_max_balance=PropertyOpMapping( + "global", + "PayoutsMaxBalance", + pytypes.UInt64Type, + ), ), ITxn=dict( sender=OpMappingWithOverloads( @@ -5191,4 +5372,32 @@ pytypes.UInt64Type, ), ), + VoterParamsGet=dict( + voter_balance=OpMappingWithOverloads( + result=pytypes.GenericTupleType.parameterise( + (pytypes.UInt64Type, pytypes.BoolType), source_location=None + ), + arity=1, + overloads=[ + FunctionOpMapping( + "voter_params_get", + immediates=["VoterBalance"], + args=[(pytypes.BytesType, pytypes.UInt64Type)], + ), + ], + ), + voter_incentive_eligible=OpMappingWithOverloads( + result=pytypes.GenericTupleType.parameterise( + (pytypes.BoolType, pytypes.BoolType), source_location=None + ), + arity=1, + overloads=[ + FunctionOpMapping( + "voter_params_get", + immediates=["VoterIncentiveEligible"], + args=[(pytypes.BytesType, pytypes.UInt64Type)], + ), + ], + ), + ), ) diff --git a/src/puyapy/awst_build/module.py b/src/puyapy/awst_build/module.py index b4716e4d5d..c162f56887 100644 --- a/src/puyapy/awst_build/module.py +++ b/src/puyapy/awst_build/module.py @@ -39,6 +39,7 @@ @attrs.frozen(kw_only=True) class _LogicSigDecoratorInfo: name_override: str | None + avm_version: int | None _BUILTIN_INHERITABLE: typing.Final = frozenset( @@ -99,6 +100,7 @@ def deferred(ctx: ASTConversionModuleContext) -> RootNode: short_name=coalesce(info.name_override, program.name), docstring=func_def.docstring, source_location=self._location(logicsig_dec), + avm_version=info.avm_version, ) return [deferred] @@ -120,19 +122,33 @@ def deferred(ctx: ASTConversionModuleContext) -> RootNode: def _process_logic_sig_decorator( self, decorator: mypy.nodes.Expression ) -> _LogicSigDecoratorInfo: + name_override = None + avm_version = None match decorator: - case mypy.nodes.NameExpr() | mypy.nodes.CallExpr(args=[]): + case mypy.nodes.NameExpr(): pass - case mypy.nodes.CallExpr(arg_names=["name"], args=[name_arg]): - name_const = name_arg.accept(self) - if isinstance(name_const, str): - return _LogicSigDecoratorInfo(name_override=name_const) - self.context.error(f"Expected a string, got {name_const!r}", name_arg) + case mypy.nodes.CallExpr(arg_names=arg_names, args=args): + for arg_name, arg in zip(arg_names, args, strict=True): + match arg_name: + case "name": + name_const = arg.accept(self) + if isinstance(name_const, str): + name_override = name_const + else: + self.context.error("expected a str", arg) + case "avm_version": + version_const = arg.accept(self) + if isinstance(version_const, int): + avm_version = version_const + else: + self.context.error("expected an int", arg) + case _: + self.context.error("unexpected argument", arg) case _: self.context.error( - f"Invalid {constants.LOGICSIG_DECORATOR_ALIAS} usage", decorator + f"invalid {constants.LOGICSIG_DECORATOR_ALIAS} usage", decorator ) - return _LogicSigDecoratorInfo(name_override=None) + return _LogicSigDecoratorInfo(name_override=name_override, avm_version=avm_version) def visit_class_def(self, cdef: mypy.nodes.ClassDef) -> StatementResult: self.check_fatal_decorators(cdef.decorators) @@ -582,6 +598,7 @@ def _process_contract_class_options( name_override: str | None = None scratch_slot_reservations = set[int]() state_totals = None + avm_version = None for kw_name, kw_expr in cdef.keywords.items(): with context.log_exceptions(kw_expr): match kw_name: @@ -623,6 +640,12 @@ def _process_contract_class_options( else: arg_map[arg_name] = arg_value state_totals = StateTotals(**arg_map) + case "avm_version": + version_value = kw_expr.accept(expr_visitor) + if isinstance(version_value, int): + avm_version = version_value + else: + context.error("unexpected argument type", kw_expr) case "metaclass": context.error("metaclass option is unsupported", kw_expr) case _: @@ -631,6 +654,7 @@ def _process_contract_class_options( name_override=name_override, scratch_slot_reservations=scratch_slot_reservations, state_totals=state_totals, + avm_version=avm_version, ) diff --git a/src/puyapy/compile.py b/src/puyapy/compile.py index be5470f450..f8520691de 100644 --- a/src/puyapy/compile.py +++ b/src/puyapy/compile.py @@ -33,7 +33,7 @@ # this should contain the lowest version number that this compiler does NOT support # i.e. the next minor version after what is defined in stubs/pyproject.toml:tool.poetry.version -MAX_SUPPORTED_ALGOPY_VERSION_EX = version.parse("2.3.0") +MAX_SUPPORTED_ALGOPY_VERSION_EX = version.parse("2.4.0") MIN_SUPPORTED_ALGOPY_VERSION = version.parse(f"{MAX_SUPPORTED_ALGOPY_VERSION_EX.major}.0.0") logger = log.get_logger(__name__) diff --git a/src/puyapy/models.py b/src/puyapy/models.py index 18687c24ad..b7284136ef 100644 --- a/src/puyapy/models.py +++ b/src/puyapy/models.py @@ -27,6 +27,7 @@ class ContractClassOptions: name_override: str | None scratch_slot_reservations: Set[int] | None state_totals: StateTotals | None + avm_version: int | None @attrs.frozen diff --git a/stubs/algopy-stubs/_contract.pyi b/stubs/algopy-stubs/_contract.pyi index 234a5bcf5e..ae9c18bd14 100644 --- a/stubs/algopy-stubs/_contract.pyi +++ b/stubs/algopy-stubs/_contract.pyi @@ -40,6 +40,7 @@ class Contract(abc.ABC): name: str = ..., scratch_slots: urange | tuple[int | urange, ...] | list[int | urange] = ..., state_totals: StateTotals = ..., + avm_version: int = ..., ): """ When declaring a Contract subclass, options and configuration are passed in @@ -82,6 +83,9 @@ class Contract(abc.ABC): specified. Note that it is valid to not provide any arguments to the `StateTotals` constructor, like so `state_totals=StateTotals()`, in which case all values will be automatically calculated. + :param avm_version: + Determines which AVM version to use, this affects what operations are supported. + Defaults to value provided supplied on command line (which defaults to current mainnet version) """ @abc.abstractmethod diff --git a/stubs/algopy-stubs/_logic_sig.pyi b/stubs/algopy-stubs/_logic_sig.pyi index ab0081d9fa..bb47929305 100644 --- a/stubs/algopy-stubs/_logic_sig.pyi +++ b/stubs/algopy-stubs/_logic_sig.pyi @@ -10,5 +10,9 @@ class LogicSig: @typing.overload def logicsig(sub: Callable[[], bool | UInt64], /) -> LogicSig: ... @typing.overload -def logicsig(*, name: str) -> Callable[[Callable[[], bool | UInt64]], LogicSig]: +def logicsig( + *, + name: str = ..., + avm_version: int = ..., +) -> Callable[[Callable[[], bool | UInt64]], LogicSig]: """Decorator to indicate a function is a logic signature""" diff --git a/stubs/algopy-stubs/op.pyi b/stubs/algopy-stubs/op.pyi index d948ba1ac8..d31be95519 100644 --- a/stubs/algopy-stubs/op.pyi +++ b/stubs/algopy-stubs/op.pyi @@ -15,9 +15,21 @@ class EC(str): """Available values for the `EC` enum""" BN254g1: EC = ... + """ + G1 of the BN254 curve. Points encoded as 32 byte X following by 32 byte Y + """ BN254g2: EC = ... + """ + G2 of the BN254 curve. Points encoded as 64 byte X following by 64 byte Y + """ BLS12_381g1: EC = ... + """ + G1 of the BLS 12-381 curve. Points encoded as 48 byte X following by 48 byte Y + """ BLS12_381g2: EC = ... + """ + G2 of the BLS 12-381 curve. Points encoded as 96 byte X following by 96 byte Y + """ class Base64(str): """Available values for the `base64` enum""" @@ -29,7 +41,13 @@ class ECDSA(str): """Available values for the `ECDSA` enum""" Secp256k1: ECDSA = ... + """ + secp256k1 curve, used in Bitcoin + """ Secp256r1: ECDSA = ... + """ + secp256r1 curve, NIST standard + """ class VrfVerify(str): """Available values for the `vrf_verify` enum""" @@ -244,6 +262,14 @@ def extract_uint64(a: Bytes | bytes, b: UInt64 | int, /) -> UInt64: Native TEAL opcode: [`extract_uint64`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint64) """ +def falcon_verify(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes, /) -> bool: + """ + for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey + Min AVM version: 11 + + Native TEAL opcode: [`falcon_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#falcon_verify) + """ + def gaid(a: UInt64 | int, /) -> UInt64: """ ID of the asset or application created in the Ath transaction of the current group @@ -310,6 +336,14 @@ def mulw(a: UInt64 | int, b: UInt64 | int, /) -> tuple[UInt64, UInt64]: Native TEAL opcode: [`mulw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#mulw) """ +def online_stake() -> UInt64: + """ + the total online stake in the agreement round + Min AVM version: 11 + + Native TEAL opcode: [`online_stake`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#online_stake) + """ + def replace(a: Bytes | bytes, b: UInt64 | int, c: Bytes | bytes, /) -> Bytes: """ Copy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A) @@ -404,6 +438,14 @@ def substring(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int, /) -> Bytes: Native TEAL opcode: [`substring`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#substring), [`substring3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#substring3) """ +def sumhash512(a: Bytes | bytes, /) -> Bytes: + """ + sumhash512 of value A, yields [64]byte + Min AVM version: 11 + + Native TEAL opcode: [`sumhash512`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sumhash512) + """ + def vrf_verify( s: VrfVerify, a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes, / ) -> tuple[Bytes, bool]: @@ -517,6 +559,33 @@ class AcctParamsGet: Native TEAL opcode: [`acct_params_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#acct_params_get) """ + @staticmethod + def acct_incentive_eligible(a: Account | UInt64 | int, /) -> tuple[bool, bool]: + """ + Min AVM version: 11 + :returns tuple[bool, bool]: Has this account opted into block payouts + + Native TEAL opcode: [`acct_params_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#acct_params_get) + """ + + @staticmethod + def acct_last_proposed(a: Account | UInt64 | int, /) -> tuple[UInt64, bool]: + """ + Min AVM version: 11 + :returns tuple[UInt64, bool]: The round number of the last block this account proposed. + + Native TEAL opcode: [`acct_params_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#acct_params_get) + """ + + @staticmethod + def acct_last_heartbeat(a: Account | UInt64 | int, /) -> tuple[UInt64, bool]: + """ + Min AVM version: 11 + :returns tuple[UInt64, bool]: The round number of the last block this account sent a heartbeat. + + Native TEAL opcode: [`acct_params_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#acct_params_get) + """ + class AppGlobal: """ Get or modify Global app state @@ -870,6 +939,70 @@ class Block: Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) """ + @staticmethod + def blk_proposer(a: UInt64 | int, /) -> Account: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + + @staticmethod + def blk_fees_collected(a: UInt64 | int, /) -> UInt64: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + + @staticmethod + def blk_bonus(a: UInt64 | int, /) -> UInt64: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + + @staticmethod + def blk_branch(a: UInt64 | int, /) -> Bytes: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + + @staticmethod + def blk_fee_sink(a: UInt64 | int, /) -> Account: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + + @staticmethod + def blk_protocol(a: UInt64 | int, /) -> Bytes: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + + @staticmethod + def blk_txn_counter(a: UInt64 | int, /) -> UInt64: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + + @staticmethod + def blk_proposer_payout(a: UInt64 | int, /) -> UInt64: + """ + Min AVM version: 11 + + Native TEAL opcode: [`block`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#block) + """ + class Box: """ Get or modify box state @@ -2294,6 +2427,36 @@ class Global: The Genesis Hash for the network. """ + payouts_enabled: typing.Final[bool] = ... + """ + Whether block proposal payouts are enabled. + Min AVM version: 11 + """ + + payouts_go_online_fee: typing.Final[UInt64] = ... + """ + The fee required in a keyreg transaction to make an account incentive eligible. + Min AVM version: 11 + """ + + payouts_percent: typing.Final[UInt64] = ... + """ + The percentage of transaction fees in a block that can be paid to the block proposer. + Min AVM version: 11 + """ + + payouts_min_balance: typing.Final[UInt64] = ... + """ + The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round. + Min AVM version: 11 + """ + + payouts_max_balance: typing.Final[UInt64] = ... + """ + The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round. + Min AVM version: 11 + """ + class ITxn: """ Get values for the last inner transaction @@ -3701,3 +3864,27 @@ class Txn: """ Number of ClearState Program pages """ + +class VoterParamsGet: + """ + X is field F from online account A as of the balance round: 320 rounds before the current round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a type specific zero-value + Native TEAL op: [`voter_params_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#voter_params_get) + """ + + @staticmethod + def voter_balance(a: Bytes | UInt64 | bytes | int, /) -> tuple[UInt64, bool]: + """ + Min AVM version: 11 + :returns tuple[UInt64, bool]: Online stake in microalgos + + Native TEAL opcode: [`voter_params_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#voter_params_get) + """ + + @staticmethod + def voter_incentive_eligible(a: Bytes | UInt64 | bytes | int, /) -> tuple[bool, bool]: + """ + Min AVM version: 11 + :returns tuple[bool, bool]: Had this account opted into block payouts + + Native TEAL opcode: [`voter_params_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#voter_params_get) + """ diff --git a/stubs/pyproject.toml b/stubs/pyproject.toml index be072296eb..0cc98349bf 100644 --- a/stubs/pyproject.toml +++ b/stubs/pyproject.toml @@ -3,7 +3,7 @@ name = "algorand-python" # this version represents the version of the stub API's and should follow semver semantics # when updating this value also update src/compile.py:MAX_SUPPORTED_ALGOPY_VERSION_EX if it is a major/minor change # also see stubs/README.md#versioning -version = "2.2.0" +version = "2.3.0" description = "API for writing Algorand Python Smart contracts" authors = ["Algorand Foundation "] readme = "README.md" diff --git a/test_cases/avm_11/contract.py b/test_cases/avm_11/contract.py new file mode 100644 index 0000000000..6b919429d7 --- /dev/null +++ b/test_cases/avm_11/contract.py @@ -0,0 +1,42 @@ +from algopy import ARC4Contract, Txn, UInt64, arc4, logicsig, op + + +@logicsig(avm_version=11) +def avm_11_sig() -> UInt64: + return op.sumhash512(b"").length + + +class Contract(ARC4Contract, avm_version=11): + + @arc4.abimethod + def test_new_ops(self) -> None: + # op functions + assert not op.falcon_verify(b"", b"", op.bzero(1793)) + assert op.sumhash512(b"") + assert op.online_stake() + + # AcctParamsGet, TODO: add to Account once 11 is in mainnet? + a, b = op.AcctParamsGet.acct_incentive_eligible(Txn.sender) + c, d = op.AcctParamsGet.acct_last_proposed(Txn.sender) + e, f = op.AcctParamsGet.acct_last_heartbeat(Txn.sender) + + # Block + assert not op.Block.blk_proposer(0), "proposer" + assert op.Block.blk_fees_collected(0), "fees collected" + assert op.Block.blk_bonus(0), "bonus" + assert op.Block.blk_branch(0), "branch" + assert op.Block.blk_fee_sink(0), "fee sink" + assert op.Block.blk_protocol(0), "protocol" + assert op.Block.blk_txn_counter(0), "txn counter" + assert op.Block.blk_proposer_payout(0), "proposer payout" + + # Global + assert op.Global.payouts_enabled, "payouts_enabled" + assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" + assert op.Global.payouts_percent, "payouts_percent" + assert op.Global.payouts_min_balance, "payouts_min_balance" + assert op.Global.payouts_max_balance, "payouts_max_balance" + + # Voter params + g, h = op.VoterParamsGet.voter_balance(0) + i, j = op.VoterParamsGet.voter_incentive_eligible(0) diff --git a/test_cases/avm_11/out/Contract.approval.teal b/test_cases/avm_11/out/Contract.approval.teal new file mode 100644 index 0000000000..e05c11f54b --- /dev/null +++ b/test_cases/avm_11/out/Contract.approval.teal @@ -0,0 +1,158 @@ +#pragma version 11 + +test_cases.avm_11.contract.Contract.approval_program: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // avm_11/contract.py:9 + // class Contract(ARC4Contract, avm_version=11): + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@5 + pushbytes 0xc2b8dd8a // method "test_new_ops()void" + txna ApplicationArgs 0 + match __puya_arc4_router___test_new_ops_route@2 + intc_0 // 0 + retsub + +__puya_arc4_router___test_new_ops_route@2: + // avm_11/contract.py:11 + // @arc4.abimethod + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub test_new_ops + intc_1 // 1 + retsub + +__puya_arc4_router___bare_routing@5: + // avm_11/contract.py:9 + // class Contract(ARC4Contract, avm_version=11): + txn OnCompletion + bnz __puya_arc4_router___after_if_else@9 + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@9: + // avm_11/contract.py:9 + // class Contract(ARC4Contract, avm_version=11): + intc_0 // 0 + retsub + + +// test_cases.avm_11.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_11/contract.py:11-12 + // @arc4.abimethod + // def test_new_ops(self) -> None: + proto 0 0 + // avm_11/contract.py:13-14 + // # op functions + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + pushint 1793 // 1793 + bzero + pushbytes 0x + dup + uncover 2 + falcon_verify + ! + assert + // avm_11/contract.py:15 + // assert op.sumhash512(b"") + pushbytes 0x + sumhash512 + len + assert + // avm_11/contract.py:16 + // assert op.online_stake() + online_stake + assert + // avm_11/contract.py:23-24 + // # Block + // assert not op.Block.blk_proposer(0), "proposer" + intc_0 // 0 + block BlkProposer + global ZeroAddress + == + assert // proposer + // avm_11/contract.py:25 + // assert op.Block.blk_fees_collected(0), "fees collected" + intc_0 // 0 + block BlkFeesCollected + assert // fees collected + // avm_11/contract.py:26 + // assert op.Block.blk_bonus(0), "bonus" + intc_0 // 0 + block BlkBonus + assert // bonus + // avm_11/contract.py:27 + // assert op.Block.blk_branch(0), "branch" + intc_0 // 0 + block BlkBranch + len + assert // branch + // avm_11/contract.py:28 + // assert op.Block.blk_fee_sink(0), "fee sink" + intc_0 // 0 + block BlkFeeSink + global ZeroAddress + != + assert // fee sink + // avm_11/contract.py:29 + // assert op.Block.blk_protocol(0), "protocol" + intc_0 // 0 + block BlkProtocol + len + assert // protocol + // avm_11/contract.py:30 + // assert op.Block.blk_txn_counter(0), "txn counter" + intc_0 // 0 + block BlkTxnCounter + assert // txn counter + // avm_11/contract.py:31 + // assert op.Block.blk_proposer_payout(0), "proposer payout" + intc_0 // 0 + block BlkProposerPayout + assert // proposer payout + // avm_11/contract.py:33-34 + // # Global + // assert op.Global.payouts_enabled, "payouts_enabled" + global PayoutsEnabled + assert // payouts_enabled + // avm_11/contract.py:35 + // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" + global PayoutsGoOnlineFee + assert // payouts_go_online_fee + // avm_11/contract.py:36 + // assert op.Global.payouts_percent, "payouts_percent" + global PayoutsPercent + assert // payouts_percent + // avm_11/contract.py:37 + // assert op.Global.payouts_min_balance, "payouts_min_balance" + global PayoutsMinBalance + assert // payouts_min_balance + // avm_11/contract.py:38 + // assert op.Global.payouts_max_balance, "payouts_max_balance" + global PayoutsMaxBalance + assert // payouts_max_balance + // avm_11/contract.py:40-41 + // # Voter params + // g, h = op.VoterParamsGet.voter_balance(0) + intc_0 // 0 + voter_params_get VoterBalance + popn 2 + // avm_11/contract.py:42 + // i, j = op.VoterParamsGet.voter_incentive_eligible(0) + intc_0 // 0 + voter_params_get VoterIncentiveEligible + popn 2 + retsub diff --git a/test_cases/avm_11/out/Contract.arc32.json b/test_cases/avm_11/out/Contract.arc32.json new file mode 100644 index 0000000000..39c621d99b --- /dev/null +++ b/test_cases/avm_11/out/Contract.arc32.json @@ -0,0 +1,50 @@ +{ + "hints": { + "test_new_ops()void": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDExCgp0ZXN0X2Nhc2VzLmF2bV8xMS5jb250cmFjdC5Db250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5hdm1fMTEuY29udHJhY3QuQ29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjkKICAgIC8vIGNsYXNzIENvbnRyYWN0KEFSQzRDb250cmFjdCwgYXZtX3ZlcnNpb249MTEpOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDUKICAgIHB1c2hieXRlcyAweGMyYjhkZDhhIC8vIG1ldGhvZCAidGVzdF9uZXdfb3BzKCl2b2lkIgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAogICAgbWF0Y2ggX19wdXlhX2FyYzRfcm91dGVyX19fdGVzdF9uZXdfb3BzX3JvdXRlQDIKICAgIGludGNfMCAvLyAwCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX3Rlc3RfbmV3X29wc19yb3V0ZUAyOgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjExCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBpcyBub3QgY3JlYXRpbmcKICAgIGNhbGxzdWIgdGVzdF9uZXdfb3BzCiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANToKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDkKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gaXMgY3JlYXRpbmcKICAgIGludGNfMSAvLyAxCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VAOToKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIGludGNfMCAvLyAwCiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLmF2bV8xMS5jb250cmFjdC5Db250cmFjdC50ZXN0X25ld19vcHMoKSAtPiB2b2lkOgp0ZXN0X25ld19vcHM6CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTEtMTIKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgLy8gZGVmIHRlc3RfbmV3X29wcyhzZWxmKSAtPiBOb25lOgogICAgcHJvdG8gMCAwCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTMtMTQKICAgIC8vICMgb3AgZnVuY3Rpb25zCiAgICAvLyBhc3NlcnQgbm90IG9wLmZhbGNvbl92ZXJpZnkoYiIiLCBiIiIsIG9wLmJ6ZXJvKDE3OTMpKQogICAgcHVzaGludCAxNzkzIC8vIDE3OTMKICAgIGJ6ZXJvCiAgICBwdXNoYnl0ZXMgMHgKICAgIGR1cAogICAgdW5jb3ZlciAyCiAgICBmYWxjb25fdmVyaWZ5CiAgICAhCiAgICBhc3NlcnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToxNQogICAgLy8gYXNzZXJ0IG9wLnN1bWhhc2g1MTIoYiIiKQogICAgcHVzaGJ5dGVzIDB4CiAgICBzdW1oYXNoNTEyCiAgICBsZW4KICAgIGFzc2VydAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjE2CiAgICAvLyBhc3NlcnQgb3Aub25saW5lX3N0YWtlKCkKICAgIG9ubGluZV9zdGFrZQogICAgYXNzZXJ0CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjMtMjQKICAgIC8vICMgQmxvY2sKICAgIC8vIGFzc2VydCBub3Qgb3AuQmxvY2suYmxrX3Byb3Bvc2VyKDApLCAicHJvcG9zZXIiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrUHJvcG9zZXIKICAgIGdsb2JhbCBaZXJvQWRkcmVzcwogICAgPT0KICAgIGFzc2VydCAvLyBwcm9wb3NlcgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI1CiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX2ZlZXNfY29sbGVjdGVkKDApLCAiZmVlcyBjb2xsZWN0ZWQiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrRmVlc0NvbGxlY3RlZAogICAgYXNzZXJ0IC8vIGZlZXMgY29sbGVjdGVkCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjYKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfYm9udXMoMCksICJib251cyIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtCb251cwogICAgYXNzZXJ0IC8vIGJvbnVzCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjcKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfYnJhbmNoKDApLCAiYnJhbmNoIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa0JyYW5jaAogICAgbGVuCiAgICBhc3NlcnQgLy8gYnJhbmNoCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjgKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfZmVlX3NpbmsoMCksICJmZWUgc2luayIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtGZWVTaW5rCiAgICBnbG9iYWwgWmVyb0FkZHJlc3MKICAgICE9CiAgICBhc3NlcnQgLy8gZmVlIHNpbmsKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyOQogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19wcm90b2NvbCgwKSwgInByb3RvY29sIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa1Byb3RvY29sCiAgICBsZW4KICAgIGFzc2VydCAvLyBwcm90b2NvbAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMwCiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX3R4bl9jb3VudGVyKDApLCAidHhuIGNvdW50ZXIiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrVHhuQ291bnRlcgogICAgYXNzZXJ0IC8vIHR4biBjb3VudGVyCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzEKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfcHJvcG9zZXJfcGF5b3V0KDApLCAicHJvcG9zZXIgcGF5b3V0IgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa1Byb3Bvc2VyUGF5b3V0CiAgICBhc3NlcnQgLy8gcHJvcG9zZXIgcGF5b3V0CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzMtMzQKICAgIC8vICMgR2xvYmFsCiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfZW5hYmxlZCwgInBheW91dHNfZW5hYmxlZCIKICAgIGdsb2JhbCBQYXlvdXRzRW5hYmxlZAogICAgYXNzZXJ0IC8vIHBheW91dHNfZW5hYmxlZAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjM1CiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfZ29fb25saW5lX2ZlZSwgInBheW91dHNfZ29fb25saW5lX2ZlZSIKICAgIGdsb2JhbCBQYXlvdXRzR29PbmxpbmVGZWUKICAgIGFzc2VydCAvLyBwYXlvdXRzX2dvX29ubGluZV9mZWUKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTozNgogICAgLy8gYXNzZXJ0IG9wLkdsb2JhbC5wYXlvdXRzX3BlcmNlbnQsICJwYXlvdXRzX3BlcmNlbnQiCiAgICBnbG9iYWwgUGF5b3V0c1BlcmNlbnQKICAgIGFzc2VydCAvLyBwYXlvdXRzX3BlcmNlbnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTozNwogICAgLy8gYXNzZXJ0IG9wLkdsb2JhbC5wYXlvdXRzX21pbl9iYWxhbmNlLCAicGF5b3V0c19taW5fYmFsYW5jZSIKICAgIGdsb2JhbCBQYXlvdXRzTWluQmFsYW5jZQogICAgYXNzZXJ0IC8vIHBheW91dHNfbWluX2JhbGFuY2UKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTozOAogICAgLy8gYXNzZXJ0IG9wLkdsb2JhbC5wYXlvdXRzX21heF9iYWxhbmNlLCAicGF5b3V0c19tYXhfYmFsYW5jZSIKICAgIGdsb2JhbCBQYXlvdXRzTWF4QmFsYW5jZQogICAgYXNzZXJ0IC8vIHBheW91dHNfbWF4X2JhbGFuY2UKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo0MC00MQogICAgLy8gIyBWb3RlciBwYXJhbXMKICAgIC8vIGcsIGggPSBvcC5Wb3RlclBhcmFtc0dldC52b3Rlcl9iYWxhbmNlKDApCiAgICBpbnRjXzAgLy8gMAogICAgdm90ZXJfcGFyYW1zX2dldCBWb3RlckJhbGFuY2UKICAgIHBvcG4gMgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjQyCiAgICAvLyBpLCBqID0gb3AuVm90ZXJQYXJhbXNHZXQudm90ZXJfaW5jZW50aXZlX2VsaWdpYmxlKDApCiAgICBpbnRjXzAgLy8gMAogICAgdm90ZXJfcGFyYW1zX2dldCBWb3RlckluY2VudGl2ZUVsaWdpYmxlCiAgICBwb3BuIDIKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDExCgp0ZXN0X2Nhc2VzLmF2bV8xMS5jb250cmFjdC5Db250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "Contract", + "methods": [ + { + "name": "test_new_ops", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/test_cases/avm_11/out/Contract.clear.teal b/test_cases/avm_11/out/Contract.clear.teal new file mode 100644 index 0000000000..00e6c16dd3 --- /dev/null +++ b/test_cases/avm_11/out/Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 11 + +test_cases.avm_11.contract.Contract.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/avm_11/out/Contract.destructured.ir b/test_cases/avm_11/out/Contract.destructured.ir new file mode 100644 index 0000000000..0d60a684c3 --- /dev/null +++ b/test_cases/avm_11/out/Contract.destructured.ir @@ -0,0 +1,84 @@ +contract test_cases.avm_11.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@2, * => return 0u} + block@2: // test_new_ops_route_L11 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.avm_11.contract.Contract.test_new_ops() + return 1u + block@5: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L9 + return 0u + + subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: + block@0: // L11 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + (assert tmp%4#0) + let tmp%6#0: uint64 = online_stake + (assert tmp%6#0) + let tmp%11#0: bytes = ((block BlkProposer) 0u) + let tmp%12#0: bytes = (global ZeroAddress) + let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) + (assert tmp%13#0) // proposer + let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%14#0) // fees collected + let tmp%16#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%16#0) // bonus + let tmp%18#0: bytes = ((block BlkBranch) 0u) + let tmp%19#0: uint64 = (len tmp%18#0) + (assert tmp%19#0) // branch + let tmp%21#0: bytes = ((block BlkFeeSink) 0u) + let tmp%22#0: bytes = (global ZeroAddress) + let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) + (assert tmp%23#0) // fee sink + let tmp%24#0: bytes = ((block BlkProtocol) 0u) + let tmp%25#0: uint64 = (len tmp%24#0) + (assert tmp%25#0) // protocol + let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%27#0) // txn counter + let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%29#0) // proposer payout + let tmp%31#0: bool = (global PayoutsEnabled) + (assert tmp%31#0) // payouts_enabled + let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%32#0) // payouts_go_online_fee + let tmp%34#0: uint64 = (global PayoutsPercent) + (assert tmp%34#0) // payouts_percent + let tmp%36#0: uint64 = (global PayoutsMinBalance) + (assert tmp%36#0) // payouts_min_balance + let tmp%38#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%38#0) // payouts_max_balance + let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) + let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out/Contract.ssa.ir b/test_cases/avm_11/out/Contract.ssa.ir new file mode 100644 index 0000000000..0112af3013 --- /dev/null +++ b/test_cases/avm_11/out/Contract.ssa.ir @@ -0,0 +1,127 @@ +contract test_cases.avm_11.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@5 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@3} + block@2: // test_new_ops_route_L11 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // is not creating + test_cases.avm_11.contract.Contract.test_new_ops() + return 1u + block@3: // switch_case_default_L9 + goto block@4 + block@4: // switch_case_next_L9 + goto block@9 + block@5: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + switch tmp%7#0 {0u => block@6, * => block@7} + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (== tmp%8#0 0u) + (assert tmp%9#0) // is creating + test_cases.avm_11.contract.Contract.__algopy_default_create() + return 1u + block@7: // switch_case_default_L9 + goto block@8 + block@8: // switch_case_next_L9 + goto block@9 + block@9: // after_if_else_L9 + return 0u + + subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: + block@0: // L11 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + let tmp%5#0: bool = (!= tmp%4#0 0u) + (assert tmp%5#0) + let tmp%6#0: uint64 = online_stake + let tmp%7#0: bool = (!= tmp%6#0 0u) + (assert tmp%7#0) + let tmp%8#0: bytes = (txn Sender) + let (tuple_assignment%0#0: bool, tuple_assignment%1#0: bool) = ((acct_params_get AcctIncentiveEligible) tmp%8#0) + let a#0: bool = tuple_assignment%0#0 + let b#0: bool = tuple_assignment%1#0 + let tmp%9#0: bytes = (txn Sender) + let (tuple_assignment%2#0: uint64, tuple_assignment%3#0: bool) = ((acct_params_get AcctLastProposed) tmp%9#0) + let c#0: uint64 = tuple_assignment%2#0 + let d#0: bool = tuple_assignment%3#0 + let tmp%10#0: bytes = (txn Sender) + let (tuple_assignment%4#0: uint64, tuple_assignment%5#0: bool) = ((acct_params_get AcctLastHeartbeat) tmp%10#0) + let e#0: uint64 = tuple_assignment%4#0 + let f#0: bool = tuple_assignment%5#0 + let tmp%11#0: bytes = ((block BlkProposer) 0u) + let tmp%12#0: bytes = (global ZeroAddress) + let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) + (assert tmp%13#0) // proposer + let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + let tmp%15#0: bool = (!= tmp%14#0 0u) + (assert tmp%15#0) // fees collected + let tmp%16#0: uint64 = ((block BlkBonus) 0u) + let tmp%17#0: bool = (!= tmp%16#0 0u) + (assert tmp%17#0) // bonus + let tmp%18#0: bytes = ((block BlkBranch) 0u) + let tmp%19#0: uint64 = (len tmp%18#0) + let tmp%20#0: bool = (!= tmp%19#0 0u) + (assert tmp%20#0) // branch + let tmp%21#0: bytes = ((block BlkFeeSink) 0u) + let tmp%22#0: bytes = (global ZeroAddress) + let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) + (assert tmp%23#0) // fee sink + let tmp%24#0: bytes = ((block BlkProtocol) 0u) + let tmp%25#0: uint64 = (len tmp%24#0) + let tmp%26#0: bool = (!= tmp%25#0 0u) + (assert tmp%26#0) // protocol + let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + let tmp%28#0: bool = (!= tmp%27#0 0u) + (assert tmp%28#0) // txn counter + let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) + let tmp%30#0: bool = (!= tmp%29#0 0u) + (assert tmp%30#0) // proposer payout + let tmp%31#0: bool = (global PayoutsEnabled) + (assert tmp%31#0) // payouts_enabled + let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + let tmp%33#0: bool = (!= tmp%32#0 0u) + (assert tmp%33#0) // payouts_go_online_fee + let tmp%34#0: uint64 = (global PayoutsPercent) + let tmp%35#0: bool = (!= tmp%34#0 0u) + (assert tmp%35#0) // payouts_percent + let tmp%36#0: uint64 = (global PayoutsMinBalance) + let tmp%37#0: bool = (!= tmp%36#0 0u) + (assert tmp%37#0) // payouts_min_balance + let tmp%38#0: uint64 = (global PayoutsMaxBalance) + let tmp%39#0: bool = (!= tmp%38#0 0u) + (assert tmp%39#0) // payouts_max_balance + let (tuple_assignment%6#0: uint64, tuple_assignment%7#0: bool) = ((voter_params_get VoterBalance) 0u) + let g#0: uint64 = tuple_assignment%6#0 + let h#0: bool = tuple_assignment%7#0 + let (tuple_assignment%8#0: bool, tuple_assignment%9#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) + let i#0: bool = tuple_assignment%8#0 + let j#0: bool = tuple_assignment%9#0 + return + + subroutine test_cases.avm_11.contract.Contract.__algopy_default_create() -> void: + block@0: // L1 + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out/Contract.ssa.opt_pass_1.ir b/test_cases/avm_11/out/Contract.ssa.opt_pass_1.ir new file mode 100644 index 0000000000..51f314905e --- /dev/null +++ b/test_cases/avm_11/out/Contract.ssa.opt_pass_1.ir @@ -0,0 +1,87 @@ +contract test_cases.avm_11.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@2, * => return 0u} + block@2: // test_new_ops_route_L11 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.avm_11.contract.Contract.test_new_ops() + return 1u + block@5: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L9 + return 0u + + subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: + block@0: // L11 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + (assert tmp%4#0) + let tmp%6#0: uint64 = online_stake + (assert tmp%6#0) + let tmp%8#0: bytes = (txn Sender) + let tmp%9#0: bytes = (txn Sender) + let tmp%10#0: bytes = (txn Sender) + let tmp%11#0: bytes = ((block BlkProposer) 0u) + let tmp%12#0: bytes = (global ZeroAddress) + let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) + (assert tmp%13#0) // proposer + let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%14#0) // fees collected + let tmp%16#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%16#0) // bonus + let tmp%18#0: bytes = ((block BlkBranch) 0u) + let tmp%19#0: uint64 = (len tmp%18#0) + (assert tmp%19#0) // branch + let tmp%21#0: bytes = ((block BlkFeeSink) 0u) + let tmp%22#0: bytes = (global ZeroAddress) + let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) + (assert tmp%23#0) // fee sink + let tmp%24#0: bytes = ((block BlkProtocol) 0u) + let tmp%25#0: uint64 = (len tmp%24#0) + (assert tmp%25#0) // protocol + let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%27#0) // txn counter + let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%29#0) // proposer payout + let tmp%31#0: bool = (global PayoutsEnabled) + (assert tmp%31#0) // payouts_enabled + let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%32#0) // payouts_go_online_fee + let tmp%34#0: uint64 = (global PayoutsPercent) + (assert tmp%34#0) // payouts_percent + let tmp%36#0: uint64 = (global PayoutsMinBalance) + (assert tmp%36#0) // payouts_min_balance + let tmp%38#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%38#0) // payouts_max_balance + let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) + let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out/Contract.ssa.opt_pass_2.ir b/test_cases/avm_11/out/Contract.ssa.opt_pass_2.ir new file mode 100644 index 0000000000..0d60a684c3 --- /dev/null +++ b/test_cases/avm_11/out/Contract.ssa.opt_pass_2.ir @@ -0,0 +1,84 @@ +contract test_cases.avm_11.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@2, * => return 0u} + block@2: // test_new_ops_route_L11 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.avm_11.contract.Contract.test_new_ops() + return 1u + block@5: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L9 + return 0u + + subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: + block@0: // L11 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + (assert tmp%4#0) + let tmp%6#0: uint64 = online_stake + (assert tmp%6#0) + let tmp%11#0: bytes = ((block BlkProposer) 0u) + let tmp%12#0: bytes = (global ZeroAddress) + let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) + (assert tmp%13#0) // proposer + let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%14#0) // fees collected + let tmp%16#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%16#0) // bonus + let tmp%18#0: bytes = ((block BlkBranch) 0u) + let tmp%19#0: uint64 = (len tmp%18#0) + (assert tmp%19#0) // branch + let tmp%21#0: bytes = ((block BlkFeeSink) 0u) + let tmp%22#0: bytes = (global ZeroAddress) + let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) + (assert tmp%23#0) // fee sink + let tmp%24#0: bytes = ((block BlkProtocol) 0u) + let tmp%25#0: uint64 = (len tmp%24#0) + (assert tmp%25#0) // protocol + let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%27#0) // txn counter + let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%29#0) // proposer payout + let tmp%31#0: bool = (global PayoutsEnabled) + (assert tmp%31#0) // payouts_enabled + let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%32#0) // payouts_go_online_fee + let tmp%34#0: uint64 = (global PayoutsPercent) + (assert tmp%34#0) // payouts_percent + let tmp%36#0: uint64 = (global PayoutsMinBalance) + (assert tmp%36#0) // payouts_min_balance + let tmp%38#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%38#0) // payouts_max_balance + let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) + let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out/avm_11_sig.destructured.ir b/test_cases/avm_11/out/avm_11_sig.destructured.ir new file mode 100644 index 0000000000..0e977ec107 --- /dev/null +++ b/test_cases/avm_11/out/avm_11_sig.destructured.ir @@ -0,0 +1,6 @@ +program logicsig test_cases.avm_11.contract.avm_11_sig: + subroutine test_cases.avm_11.contract.avm_11_sig() -> uint64: + block@0: // L4 + let tmp%0#0: bytes = (sumhash512 0x) + let tmp%1#0: uint64 = (len tmp%0#0) + return tmp%1#0 \ No newline at end of file diff --git a/test_cases/avm_11/out/avm_11_sig.mir b/test_cases/avm_11/out/avm_11_sig.mir new file mode 100644 index 0000000000..87b1bf3d6b --- /dev/null +++ b/test_cases/avm_11/out/avm_11_sig.mir @@ -0,0 +1,11 @@ +// Op Stack (out) +// test_cases.avm_11.contract.avm_11_sig() -> uint64: +main_block@0: + // avm_11/contract.py:6 + // return op.sumhash512(b"").length + byte 0x 0x + sumhash512 tmp%0#0 + len tmp%1#0 + return + + diff --git a/test_cases/avm_11/out/avm_11_sig.ssa.ir b/test_cases/avm_11/out/avm_11_sig.ssa.ir new file mode 100644 index 0000000000..0e977ec107 --- /dev/null +++ b/test_cases/avm_11/out/avm_11_sig.ssa.ir @@ -0,0 +1,6 @@ +program logicsig test_cases.avm_11.contract.avm_11_sig: + subroutine test_cases.avm_11.contract.avm_11_sig() -> uint64: + block@0: // L4 + let tmp%0#0: bytes = (sumhash512 0x) + let tmp%1#0: uint64 = (len tmp%0#0) + return tmp%1#0 \ No newline at end of file diff --git a/test_cases/avm_11/out/avm_11_sig.teal b/test_cases/avm_11/out/avm_11_sig.teal new file mode 100644 index 0000000000..aff150abb9 --- /dev/null +++ b/test_cases/avm_11/out/avm_11_sig.teal @@ -0,0 +1,9 @@ +#pragma version 11 + +test_cases.avm_11.contract.avm_11_sig: + // avm_11/contract.py:6 + // return op.sumhash512(b"").length + pushbytes 0x + sumhash512 + len + return diff --git a/test_cases/avm_11/out/client_Contract.py b/test_cases/avm_11/out/client_Contract.py new file mode 100644 index 0000000000..17a5280f81 --- /dev/null +++ b/test_cases/avm_11/out/client_Contract.py @@ -0,0 +1,13 @@ +# This file is auto-generated, do not modify +# flake8: noqa +# fmt: off +import typing + +import algopy + + +class Contract(algopy.arc4.ARC4Client, typing.Protocol): + @algopy.arc4.abimethod + def test_new_ops( + self, + ) -> None: ... diff --git a/test_cases/avm_11/out/module.awst b/test_cases/avm_11/out/module.awst new file mode 100644 index 0000000000..1d1ae024a2 --- /dev/null +++ b/test_cases/avm_11/out/module.awst @@ -0,0 +1,50 @@ +logicsig test_cases.avm_11.contract.avm_11_sig +{ + return len(sumhash512(hex<"">)) +} + +contract Contract +{ + method_resolution_order: ( + algopy.arc4.ARC4Contract, + ) + + subroutine algopy.arc4.ARC4Contract.approval_program(): bool + { + return arc4_router() + } + + subroutine algopy.arc4.ARC4Contract.clear_state_program(): bool + { + return true + } + + abimethod test_cases.avm_11.contract.Contract.test_new_ops(): void + { + assert(!(falcon_verify(hex<"">, hex<"">, bzero(1793u)))) + assert(len(sumhash512(hex<"">)) != 0u) + assert(online_stake() != 0u) + (a, b): tuple = acct_params_get(txn()) + (c, d): tuple = acct_params_get(txn()) + (e, f): tuple = acct_params_get(txn()) + assert(block(0u) == global(), comment="proposer") + assert(block(0u) != 0u, comment="fees collected") + assert(block(0u) != 0u, comment="bonus") + assert(len(block(0u)) != 0u, comment="branch") + assert(block(0u) != global(), comment="fee sink") + assert(len(block(0u)) != 0u, comment="protocol") + assert(block(0u) != 0u, comment="txn counter") + assert(block(0u) != 0u, comment="proposer payout") + assert(global(), comment="payouts_enabled") + assert(global() != 0u, comment="payouts_go_online_fee") + assert(global() != 0u, comment="payouts_percent") + assert(global() != 0u, comment="payouts_min_balance") + assert(global() != 0u, comment="payouts_max_balance") + (g, h): tuple = voter_params_get(0u) + (i, j): tuple = voter_params_get(0u) + } + + baremethod test_cases.avm_11.contract.Contract.__algopy_default_create(): void + { + } +} \ No newline at end of file diff --git a/test_cases/avm_11/out_O2/Contract.approval.teal b/test_cases/avm_11/out_O2/Contract.approval.teal new file mode 100644 index 0000000000..7e0118f54d --- /dev/null +++ b/test_cases/avm_11/out_O2/Contract.approval.teal @@ -0,0 +1,107 @@ +#pragma version 11 + +test_cases.avm_11.contract.Contract.approval_program: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@5 + pushbytes 0xc2b8dd8a // method "test_new_ops()void" + txna ApplicationArgs 0 + match __puya_arc4_router___test_new_ops_route@2 + intc_0 // 0 + retsub + +__puya_arc4_router___test_new_ops_route@2: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub test_new_ops + intc_1 // 1 + retsub + +__puya_arc4_router___bare_routing@5: + txn OnCompletion + bnz __puya_arc4_router___after_if_else@9 + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@9: + intc_0 // 0 + retsub + + +// test_cases.avm_11.contract.Contract.test_new_ops() -> void: +test_new_ops: + proto 0 0 + pushint 1793 // 1793 + bzero + pushbytes 0x + dup + uncover 2 + falcon_verify + ! + assert + pushbytes 0x + sumhash512 + len + assert + online_stake + assert + intc_0 // 0 + block BlkProposer + global ZeroAddress + == + assert // proposer + intc_0 // 0 + block BlkFeesCollected + assert // fees collected + intc_0 // 0 + block BlkBonus + assert // bonus + intc_0 // 0 + block BlkBranch + len + assert // branch + intc_0 // 0 + block BlkFeeSink + global ZeroAddress + != + assert // fee sink + intc_0 // 0 + block BlkProtocol + len + assert // protocol + intc_0 // 0 + block BlkTxnCounter + assert // txn counter + intc_0 // 0 + block BlkProposerPayout + assert // proposer payout + global PayoutsEnabled + assert // payouts_enabled + global PayoutsGoOnlineFee + assert // payouts_go_online_fee + global PayoutsPercent + assert // payouts_percent + global PayoutsMinBalance + assert // payouts_min_balance + global PayoutsMaxBalance + assert // payouts_max_balance + intc_0 // 0 + voter_params_get VoterBalance + popn 2 + intc_0 // 0 + voter_params_get VoterIncentiveEligible + popn 2 + retsub diff --git a/test_cases/avm_11/out_O2/Contract.clear.teal b/test_cases/avm_11/out_O2/Contract.clear.teal new file mode 100644 index 0000000000..00e6c16dd3 --- /dev/null +++ b/test_cases/avm_11/out_O2/Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 11 + +test_cases.avm_11.contract.Contract.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/avm_11/out_O2/Contract.destructured.ir b/test_cases/avm_11/out_O2/Contract.destructured.ir new file mode 100644 index 0000000000..0d60a684c3 --- /dev/null +++ b/test_cases/avm_11/out_O2/Contract.destructured.ir @@ -0,0 +1,84 @@ +contract test_cases.avm_11.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@5 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@2, * => return 0u} + block@2: // test_new_ops_route_L11 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // is not creating + test_cases.avm_11.contract.Contract.test_new_ops() + return 1u + block@5: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@9 : block@6 + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // is creating + return 1u + block@9: // after_if_else_L9 + return 0u + + subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: + block@0: // L11 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + (assert tmp%4#0) + let tmp%6#0: uint64 = online_stake + (assert tmp%6#0) + let tmp%11#0: bytes = ((block BlkProposer) 0u) + let tmp%12#0: bytes = (global ZeroAddress) + let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) + (assert tmp%13#0) // proposer + let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%14#0) // fees collected + let tmp%16#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%16#0) // bonus + let tmp%18#0: bytes = ((block BlkBranch) 0u) + let tmp%19#0: uint64 = (len tmp%18#0) + (assert tmp%19#0) // branch + let tmp%21#0: bytes = ((block BlkFeeSink) 0u) + let tmp%22#0: bytes = (global ZeroAddress) + let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) + (assert tmp%23#0) // fee sink + let tmp%24#0: bytes = ((block BlkProtocol) 0u) + let tmp%25#0: uint64 = (len tmp%24#0) + (assert tmp%25#0) // protocol + let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%27#0) // txn counter + let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%29#0) // proposer payout + let tmp%31#0: bool = (global PayoutsEnabled) + (assert tmp%31#0) // payouts_enabled + let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%32#0) // payouts_go_online_fee + let tmp%34#0: uint64 = (global PayoutsPercent) + (assert tmp%34#0) // payouts_percent + let tmp%36#0: uint64 = (global PayoutsMinBalance) + (assert tmp%36#0) // payouts_min_balance + let tmp%38#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%38#0) // payouts_max_balance + let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) + let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out_O2/avm_11_sig.destructured.ir b/test_cases/avm_11/out_O2/avm_11_sig.destructured.ir new file mode 100644 index 0000000000..0e977ec107 --- /dev/null +++ b/test_cases/avm_11/out_O2/avm_11_sig.destructured.ir @@ -0,0 +1,6 @@ +program logicsig test_cases.avm_11.contract.avm_11_sig: + subroutine test_cases.avm_11.contract.avm_11_sig() -> uint64: + block@0: // L4 + let tmp%0#0: bytes = (sumhash512 0x) + let tmp%1#0: uint64 = (len tmp%0#0) + return tmp%1#0 \ No newline at end of file diff --git a/test_cases/avm_11/out_O2/avm_11_sig.teal b/test_cases/avm_11/out_O2/avm_11_sig.teal new file mode 100644 index 0000000000..491958c962 --- /dev/null +++ b/test_cases/avm_11/out_O2/avm_11_sig.teal @@ -0,0 +1,7 @@ +#pragma version 11 + +test_cases.avm_11.contract.avm_11_sig: + pushbytes 0x + sumhash512 + len + return diff --git a/test_cases/avm_11/out_unoptimized/Contract.approval.teal b/test_cases/avm_11/out_unoptimized/Contract.approval.teal new file mode 100644 index 0000000000..657ee040f3 --- /dev/null +++ b/test_cases/avm_11/out_unoptimized/Contract.approval.teal @@ -0,0 +1,205 @@ +#pragma version 11 + +test_cases.avm_11.contract.Contract.approval_program: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // avm_11/contract.py:9 + // class Contract(ARC4Contract, avm_version=11): + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 + txna ApplicationArgs 0 + pushbytes 0xc2b8dd8a // method "test_new_ops()void" + swap + match __puya_arc4_router___test_new_ops_route@2 + b __puya_arc4_router___switch_case_default@3 + +__puya_arc4_router___test_new_ops_route@2: + // avm_11/contract.py:11 + // @arc4.abimethod + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + callsub test_new_ops + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@5: + // avm_11/contract.py:9 + // class Contract(ARC4Contract, avm_version=11): + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algopy_default_create@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router_____algopy_default_create@6: + txn ApplicationID + intc_0 // 0 + == + assert // is creating + callsub __algopy_default_create + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@7: + +__puya_arc4_router___after_if_else@9: + // avm_11/contract.py:9 + // class Contract(ARC4Contract, avm_version=11): + intc_0 // 0 + retsub + + +// test_cases.avm_11.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_11/contract.py:11-12 + // @arc4.abimethod + // def test_new_ops(self) -> None: + proto 0 0 + // avm_11/contract.py:13-14 + // # op functions + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + pushint 1793 // 1793 + bzero + pushbytes 0x + dup + uncover 2 + falcon_verify + ! + assert + // avm_11/contract.py:15 + // assert op.sumhash512(b"") + pushbytes 0x + sumhash512 + len + intc_0 // 0 + != + assert + // avm_11/contract.py:16 + // assert op.online_stake() + online_stake + intc_0 // 0 + != + assert + // avm_11/contract.py:23-24 + // # Block + // assert not op.Block.blk_proposer(0), "proposer" + intc_0 // 0 + block BlkProposer + global ZeroAddress + == + assert // proposer + // avm_11/contract.py:25 + // assert op.Block.blk_fees_collected(0), "fees collected" + intc_0 // 0 + block BlkFeesCollected + intc_0 // 0 + != + assert // fees collected + // avm_11/contract.py:26 + // assert op.Block.blk_bonus(0), "bonus" + intc_0 // 0 + block BlkBonus + intc_0 // 0 + != + assert // bonus + // avm_11/contract.py:27 + // assert op.Block.blk_branch(0), "branch" + intc_0 // 0 + block BlkBranch + len + intc_0 // 0 + != + assert // branch + // avm_11/contract.py:28 + // assert op.Block.blk_fee_sink(0), "fee sink" + intc_0 // 0 + block BlkFeeSink + global ZeroAddress + != + assert // fee sink + // avm_11/contract.py:29 + // assert op.Block.blk_protocol(0), "protocol" + intc_0 // 0 + block BlkProtocol + len + intc_0 // 0 + != + assert // protocol + // avm_11/contract.py:30 + // assert op.Block.blk_txn_counter(0), "txn counter" + intc_0 // 0 + block BlkTxnCounter + intc_0 // 0 + != + assert // txn counter + // avm_11/contract.py:31 + // assert op.Block.blk_proposer_payout(0), "proposer payout" + intc_0 // 0 + block BlkProposerPayout + intc_0 // 0 + != + assert // proposer payout + // avm_11/contract.py:33-34 + // # Global + // assert op.Global.payouts_enabled, "payouts_enabled" + global PayoutsEnabled + assert // payouts_enabled + // avm_11/contract.py:35 + // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" + global PayoutsGoOnlineFee + intc_0 // 0 + != + assert // payouts_go_online_fee + // avm_11/contract.py:36 + // assert op.Global.payouts_percent, "payouts_percent" + global PayoutsPercent + intc_0 // 0 + != + assert // payouts_percent + // avm_11/contract.py:37 + // assert op.Global.payouts_min_balance, "payouts_min_balance" + global PayoutsMinBalance + intc_0 // 0 + != + assert // payouts_min_balance + // avm_11/contract.py:38 + // assert op.Global.payouts_max_balance, "payouts_max_balance" + global PayoutsMaxBalance + intc_0 // 0 + != + assert // payouts_max_balance + // avm_11/contract.py:40-41 + // # Voter params + // g, h = op.VoterParamsGet.voter_balance(0) + intc_0 // 0 + voter_params_get VoterBalance + popn 2 + // avm_11/contract.py:42 + // i, j = op.VoterParamsGet.voter_incentive_eligible(0) + intc_0 // 0 + voter_params_get VoterIncentiveEligible + popn 2 + retsub + + +// test_cases.avm_11.contract.Contract.__algopy_default_create() -> void: +__algopy_default_create: + proto 0 0 + retsub diff --git a/test_cases/avm_11/out_unoptimized/Contract.clear.teal b/test_cases/avm_11/out_unoptimized/Contract.clear.teal new file mode 100644 index 0000000000..00e6c16dd3 --- /dev/null +++ b/test_cases/avm_11/out_unoptimized/Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 11 + +test_cases.avm_11.contract.Contract.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/avm_11/out_unoptimized/Contract.destructured.ir b/test_cases/avm_11/out_unoptimized/Contract.destructured.ir new file mode 100644 index 0000000000..29ff61235b --- /dev/null +++ b/test_cases/avm_11/out_unoptimized/Contract.destructured.ir @@ -0,0 +1,111 @@ +contract test_cases.avm_11.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@5 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@3} + block@2: // test_new_ops_route_L11 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // is not creating + test_cases.avm_11.contract.Contract.test_new_ops() + return 1u + block@3: // switch_case_default_L9 + goto block@4 + block@4: // switch_case_next_L9 + goto block@9 + block@5: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + switch tmp%7#0 {0u => block@6, * => block@7} + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (== tmp%8#0 0u) + (assert tmp%9#0) // is creating + test_cases.avm_11.contract.Contract.__algopy_default_create() + return 1u + block@7: // switch_case_default_L9 + goto block@8 + block@8: // switch_case_next_L9 + goto block@9 + block@9: // after_if_else_L9 + return 0u + + subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: + block@0: // L11 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + let tmp%5#0: bool = (!= tmp%4#0 0u) + (assert tmp%5#0) + let tmp%6#0: uint64 = online_stake + let tmp%7#0: bool = (!= tmp%6#0 0u) + (assert tmp%7#0) + let tmp%11#0: bytes = ((block BlkProposer) 0u) + let tmp%12#0: bytes = (global ZeroAddress) + let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) + (assert tmp%13#0) // proposer + let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + let tmp%15#0: bool = (!= tmp%14#0 0u) + (assert tmp%15#0) // fees collected + let tmp%16#0: uint64 = ((block BlkBonus) 0u) + let tmp%17#0: bool = (!= tmp%16#0 0u) + (assert tmp%17#0) // bonus + let tmp%18#0: bytes = ((block BlkBranch) 0u) + let tmp%19#0: uint64 = (len tmp%18#0) + let tmp%20#0: bool = (!= tmp%19#0 0u) + (assert tmp%20#0) // branch + let tmp%21#0: bytes = ((block BlkFeeSink) 0u) + let tmp%22#0: bytes = (global ZeroAddress) + let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) + (assert tmp%23#0) // fee sink + let tmp%24#0: bytes = ((block BlkProtocol) 0u) + let tmp%25#0: uint64 = (len tmp%24#0) + let tmp%26#0: bool = (!= tmp%25#0 0u) + (assert tmp%26#0) // protocol + let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + let tmp%28#0: bool = (!= tmp%27#0 0u) + (assert tmp%28#0) // txn counter + let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) + let tmp%30#0: bool = (!= tmp%29#0 0u) + (assert tmp%30#0) // proposer payout + let tmp%31#0: bool = (global PayoutsEnabled) + (assert tmp%31#0) // payouts_enabled + let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + let tmp%33#0: bool = (!= tmp%32#0 0u) + (assert tmp%33#0) // payouts_go_online_fee + let tmp%34#0: uint64 = (global PayoutsPercent) + let tmp%35#0: bool = (!= tmp%34#0 0u) + (assert tmp%35#0) // payouts_percent + let tmp%36#0: uint64 = (global PayoutsMinBalance) + let tmp%37#0: bool = (!= tmp%36#0 0u) + (assert tmp%37#0) // payouts_min_balance + let tmp%38#0: uint64 = (global PayoutsMaxBalance) + let tmp%39#0: bool = (!= tmp%38#0 0u) + (assert tmp%39#0) // payouts_max_balance + let (tuple_assignment%6#0: uint64, tuple_assignment%7#0: bool) = ((voter_params_get VoterBalance) 0u) + let (tuple_assignment%8#0: bool, tuple_assignment%9#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) + return + + subroutine test_cases.avm_11.contract.Contract.__algopy_default_create() -> void: + block@0: // L1 + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out_unoptimized/avm_11_sig.destructured.ir b/test_cases/avm_11/out_unoptimized/avm_11_sig.destructured.ir new file mode 100644 index 0000000000..0e977ec107 --- /dev/null +++ b/test_cases/avm_11/out_unoptimized/avm_11_sig.destructured.ir @@ -0,0 +1,6 @@ +program logicsig test_cases.avm_11.contract.avm_11_sig: + subroutine test_cases.avm_11.contract.avm_11_sig() -> uint64: + block@0: // L4 + let tmp%0#0: bytes = (sumhash512 0x) + let tmp%1#0: uint64 = (len tmp%0#0) + return tmp%1#0 \ No newline at end of file diff --git a/test_cases/avm_11/out_unoptimized/avm_11_sig.teal b/test_cases/avm_11/out_unoptimized/avm_11_sig.teal new file mode 100644 index 0000000000..aff150abb9 --- /dev/null +++ b/test_cases/avm_11/out_unoptimized/avm_11_sig.teal @@ -0,0 +1,9 @@ +#pragma version 11 + +test_cases.avm_11.contract.avm_11_sig: + // avm_11/contract.py:6 + // return op.sumhash512(b"").length + pushbytes 0x + sumhash512 + len + return diff --git a/test_cases/avm_11/puya.log b/test_cases/avm_11/puya.log new file mode 100644 index 0000000000..d4eac4176c --- /dev/null +++ b/test_cases/avm_11/puya.log @@ -0,0 +1,764 @@ +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['avm_11'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +info: Found python prefix: /.venv +info: writing avm_11/out/module.awst +debug: Sealing block@0: // L12 +debug: Terminated block@0: // L12 +debug: Looking for 'required_budget_with_buffer' in an unsealed block creating an incomplete Phi: block@1: // while_top_L20 +debug: Created Phi assignment: let required_budget_with_buffer#1: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@1: // while_top_L20 +debug: Terminated block@1: // while_top_L20 +debug: Sealing block@2: // while_body_L21 +debug: Looking for 'fee_source' in an unsealed block creating an incomplete Phi: block@1: // while_top_L20 +debug: Created Phi assignment: let fee_source#1: uint64 = undefined while trying to resolve 'fee_source' in block@1: // while_top_L20 +debug: Terminated block@2: // while_body_L21 +debug: Sealing block@3: // switch_case_0_L28 +debug: Terminated block@3: // switch_case_0_L28 +debug: Sealing block@4: // switch_case_1_L30 +debug: Terminated block@4: // switch_case_1_L30 +debug: Sealing block@5: // switch_case_default_L26 +debug: Terminated block@5: // switch_case_default_L26 +debug: Sealing block@6: // switch_case_next_L26 +debug: Terminated block@6: // switch_case_next_L26 +debug: Sealing block@1: // while_top_L20 +debug: Added required_budget_with_buffer#0 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0) in block@0: // L12 +debug: Created Phi assignment: let required_budget_with_buffer#2: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@6: // switch_case_next_L26 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3) in block@3: // switch_case_0_L28 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4) in block@4: // switch_case_1_L30 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) in block@5: // switch_case_default_L26 +debug: Replacing trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 +debug: Deleting Phi assignment: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) +debug: Replaced trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 in current definition for 1 blocks +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) in block@6: // switch_case_next_L26 +debug: Replacing trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 +debug: Deleting Phi assignment: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) +debug: Replaced trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 in current definition for 6 blocks +debug: Added fee_source#0 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0) in block@0: // L12 +debug: Created Phi assignment: let fee_source#2: uint64 = undefined while trying to resolve 'fee_source' in block@6: // switch_case_next_L26 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3) in block@3: // switch_case_0_L28 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4) in block@4: // switch_case_1_L30 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) in block@5: // switch_case_default_L26 +debug: Replacing trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 +debug: Deleting Phi assignment: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) +debug: Replaced trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 in current definition for 1 blocks +debug: Added fee_source#1 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) in block@6: // switch_case_next_L26 +debug: Replacing trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 +debug: Deleting Phi assignment: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) +debug: Replaced trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 in current definition for 6 blocks +debug: Sealing block@7: // after_while_L20 +debug: Terminated block@7: // after_while_L20 +debug: Sealing block@0: // L4 +debug: Terminated block@0: // L4 +debug: Looking for 'start' in an unsealed block creating an incomplete Phi: block@1: // while_top_L11 +debug: Created Phi assignment: let start#1: uint64 = undefined while trying to resolve 'start' in block@1: // while_top_L11 +debug: Looking for 'item' in an unsealed block creating an incomplete Phi: block@1: // while_top_L11 +debug: Created Phi assignment: let item#1: bytes = undefined while trying to resolve 'item' in block@1: // while_top_L11 +debug: Looking for 'sequence' in an unsealed block creating an incomplete Phi: block@1: // while_top_L11 +debug: Created Phi assignment: let sequence#1: bytes = undefined while trying to resolve 'sequence' in block@1: // while_top_L11 +debug: Terminated block@1: // while_top_L11 +debug: Sealing block@2: // while_body_L12 +debug: Terminated block@2: // while_body_L12 +debug: Sealing block@3: // if_body_L13 +debug: Terminated block@3: // if_body_L13 +debug: Sealing block@4: // after_if_else_L12 +debug: Terminated block@4: // after_if_else_L12 +debug: Sealing block@1: // while_top_L11 +debug: Added start#0 to Phi node: let start#1: uint64 = φ(start#0 <- block@0) in block@0: // L4 +debug: Added start#2 to Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#2 <- block@4) in block@4: // after_if_else_L12 +debug: Added item#0 to Phi node: let item#1: bytes = φ(item#0 <- block@0) in block@0: // L4 +debug: Added item#1 to Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) in block@4: // after_if_else_L12 +debug: Replacing trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 +debug: Deleting Phi assignment: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) +debug: Replaced trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 in current definition for 3 blocks +debug: Added sequence#0 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0) in block@0: // L4 +debug: Added sequence#1 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) in block@4: // after_if_else_L12 +debug: Replacing trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 +debug: Deleting Phi assignment: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) +debug: Replaced trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 in current definition for 3 blocks +debug: Sealing block@5: // after_while_L11 +debug: Terminated block@5: // after_while_L11 +debug: Sealing block@0: // L25 +debug: Terminated block@0: // L25 +debug: Sealing block@0: // L44 +debug: Terminated block@0: // L44 +debug: Sealing block@0: // L62 +debug: Terminated block@0: // L62 +debug: Sealing block@0: // L92 +debug: Terminated block@0: // L92 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L110 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L110 +debug: Terminated block@1: // for_header_L110 +debug: Sealing block@2: // for_body_L111 +debug: Looking for 'head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L110 +debug: Created Phi assignment: let head_and_tail#1: bytes = undefined while trying to resolve 'head_and_tail' in block@1: // for_header_L110 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1: // for_header_L110 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1: // for_header_L110 +debug: Terminated block@2: // for_body_L111 +debug: Sealing block@3: // for_footer_L110 +debug: Terminated block@3: // for_footer_L110 +debug: Sealing block@1: // for_header_L110 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L92 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3: // for_footer_L110 +debug: Added head_and_tail#0 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0) in block@0: // L92 +debug: Added head_and_tail#1 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 +debug: Deleting Phi assignment: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0: // L92 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3: // for_footer_L110 +debug: Sealing block@4: // after_for_L110 +debug: Created Phi assignment: let length_minus_1#1: uint64 = undefined while trying to resolve 'length_minus_1' in block@1: // for_header_L110 +debug: Added length_minus_1#0 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0) in block@0: // L92 +debug: Added length_minus_1#1 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 +debug: Deleting Phi assignment: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) +debug: Replaced trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_header_offset#1: uint64 = undefined while trying to resolve 'popped_header_offset' in block@1: // for_header_L110 +debug: Added popped_header_offset#0 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0) in block@0: // L92 +debug: Added popped_header_offset#1 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 +debug: Deleting Phi assignment: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_offset#1: uint64 = undefined while trying to resolve 'popped_offset' in block@1: // for_header_L110 +debug: Added popped_offset#0 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0) in block@0: // L92 +debug: Added popped_offset#1 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 +debug: Deleting Phi assignment: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped#1: bytes = undefined while trying to resolve 'popped' in block@1: // for_header_L110 +debug: Added popped#0 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0) in block@0: // L92 +debug: Added popped#1 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 +debug: Deleting Phi assignment: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) +debug: Replaced trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 in current definition for 3 blocks +debug: Terminated block@4: // after_for_L110 +debug: Sealing block@0: // L124 +debug: Terminated block@0: // L124 +debug: Sealing block@1: // if_body_L147 +debug: Terminated block@1: // if_body_L147 +debug: Sealing block@2: // after_if_else_L146 +debug: Created Phi assignment: let array_length#1: uint64 = undefined while trying to resolve 'array_length' in block@2: // after_if_else_L146 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0) in block@0: // L124 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 +debug: Deleting Phi assignment: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) +debug: Replaced trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 in current definition for 1 blocks +debug: Created Phi assignment: let is_packed#1: bool = undefined while trying to resolve 'is_packed' in block@2: // after_if_else_L146 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0) in block@0: // L124 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 +debug: Deleting Phi assignment: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) +debug: Replaced trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 in current definition for 1 blocks +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@2: // after_if_else_L146 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0: // L124 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 in current definition for 1 blocks +debug: Terminated block@2: // after_if_else_L146 +debug: Looking for 'i' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let i#1: uint64 = undefined while trying to resolve 'i' in block@3: // for_header_L150 +debug: Terminated block@3: // for_header_L150 +debug: Sealing block@4: // for_body_L151 +debug: Looking for 'result' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let result#2: bytes = undefined while trying to resolve 'result' in block@3: // for_header_L150 +debug: Looking for 'write_offset' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let write_offset#1: uint64 = undefined while trying to resolve 'write_offset' in block@3: // for_header_L150 +debug: Looking for 'new_items_bytes' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let new_items_bytes#1: bytes = undefined while trying to resolve 'new_items_bytes' in block@3: // for_header_L150 +debug: Terminated block@4: // for_body_L151 +debug: Sealing block@5: // for_footer_L150 +debug: Terminated block@5: // for_footer_L150 +debug: Sealing block@3: // for_header_L150 +debug: Added i#0 to Phi node: let i#1: uint64 = φ(i#0 <- block@2) in block@2: // after_if_else_L146 +debug: Added i#2 to Phi node: let i#1: uint64 = φ(i#0 <- block@2, i#2 <- block@5) in block@5: // for_footer_L150 +debug: Created Phi assignment: let result#4: bytes = undefined while trying to resolve 'result' in block@2: // after_if_else_L146 +debug: Added result#0 to Phi node: let result#4: bytes = φ(result#0 <- block@0) in block@0: // L124 +debug: Added result#1 to Phi node: let result#4: bytes = φ(result#0 <- block@0, result#1 <- block@1) in block@1: // if_body_L147 +debug: Added result#4 to Phi node: let result#2: bytes = φ(result#4 <- block@2) in block@2: // after_if_else_L146 +debug: Added result#3 to Phi node: let result#2: bytes = φ(result#4 <- block@2, result#3 <- block@5) in block@5: // for_footer_L150 +debug: Added write_offset#0 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2) in block@2: // after_if_else_L146 +debug: Added write_offset#2 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2, write_offset#2 <- block@5) in block@5: // for_footer_L150 +debug: Created Phi assignment: let new_items_bytes#2: bytes = undefined while trying to resolve 'new_items_bytes' in block@2: // after_if_else_L146 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0) in block@0: // L124 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 in current definition for 1 blocks +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2) in block@2: // after_if_else_L146 +debug: Added new_items_bytes#1 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) in block@5: // for_footer_L150 +debug: Replacing trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) +debug: Replaced trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 in current definition for 3 blocks +debug: Sealing block@6: // after_for_L150 +debug: Terminated block@6: // after_for_L150 +debug: Sealing block@0: // L157 +debug: Terminated block@0: // L157 +debug: Sealing block@0: // L189 +debug: Terminated block@0: // L189 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L199 +debug: Terminated block@1: // for_header_L199 +debug: Sealing block@2: // for_body_L200 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1: // for_header_L199 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1: // for_header_L199 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let item_offset_adjustment#1: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@1: // for_header_L199 +debug: Terminated block@2: // for_body_L200 +debug: Sealing block@3: // for_footer_L199 +debug: Terminated block@3: // for_footer_L199 +debug: Sealing block@1: // for_header_L199 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L189 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3: // for_footer_L199 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0: // L189 +debug: Added array_head_and_tail#1 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0: // L189 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3: // for_footer_L199 +debug: Added item_offset_adjustment#0 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0) in block@0: // L189 +debug: Added item_offset_adjustment#1 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 +debug: Deleting Phi assignment: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) +debug: Replaced trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 in current definition for 3 blocks +debug: Sealing block@4: // after_for_L199 +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@1: // for_header_L199 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0: // L189 +debug: Added new_items_count#1 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 in current definition for 3 blocks +debug: Terminated block@4: // after_for_L199 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let head_offset#4: uint64 = undefined while trying to resolve 'head_offset' in block@5: // for_header_L204 +debug: Terminated block@5: // for_header_L204 +debug: Sealing block@6: // for_body_L205 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@5: // for_header_L204 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let new_head#3: bytes = undefined while trying to resolve 'new_head' in block@5: // for_header_L204 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let item_offset_adjustment#3: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@5: // for_header_L204 +debug: Terminated block@6: // for_body_L205 +debug: Sealing block@7: // for_footer_L204 +debug: Terminated block@7: // for_footer_L204 +debug: Sealing block@5: // for_header_L204 +debug: Added head_offset#3 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4) in block@4: // after_for_L199 +debug: Added head_offset#5 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4, head_offset#5 <- block@7) in block@7: // for_footer_L204 +debug: Created Phi assignment: let new_head_and_tail#2: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1: // for_header_L199 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0) in block@0: // L189 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) +debug: Replaced trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4) in block@4: // after_for_L199 +debug: Added new_head_and_tail#1 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) +debug: Replaced trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#1 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4) in block@4: // after_for_L199 +debug: Added new_head#4 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4, new_head#4 <- block@7) in block@7: // for_footer_L204 +debug: Added item_offset_adjustment#2 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4) in block@4: // after_for_L199 +debug: Added item_offset_adjustment#3 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 +debug: Deleting Phi assignment: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) +debug: Replaced trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 in current definition for 3 blocks +debug: Sealing block@8: // after_for_L204 +debug: Created Phi assignment: let array_items_count#1: uint64 = undefined while trying to resolve 'array_items_count' in block@5: // for_header_L204 +debug: Created Phi assignment: let array_items_count#2: uint64 = undefined while trying to resolve 'array_items_count' in block@1: // for_header_L199 +debug: Added array_items_count#0 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0) in block@0: // L189 +debug: Added array_items_count#2 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) +debug: Replaced trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 in current definition for 3 blocks +debug: Added array_items_count#0 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4) in block@4: // after_for_L199 +debug: Added array_items_count#1 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) +debug: Replaced trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let new_items_count#2: uint64 = undefined while trying to resolve 'new_items_count' in block@5: // for_header_L204 +debug: Added new_items_count#0 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4) in block@4: // after_for_L199 +debug: Added new_items_count#2 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) +debug: Replaced trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let array_head_and_tail#2: bytes = undefined while trying to resolve 'array_head_and_tail' in block@5: // for_header_L204 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4) in block@4: // after_for_L199 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) +debug: Replaced trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 in current definition for 3 blocks +debug: Terminated block@8: // after_for_L204 +debug: Sealing block@0: // L217 +debug: Terminated block@0: // L217 +debug: Sealing block@0: // L240 +debug: Terminated block@0: // L240 +debug: Sealing block@0: // L252 +debug: Terminated block@0: // L252 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L269 +debug: Terminated block@1: // for_header_L269 +debug: Sealing block@2: // for_body_L270 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1: // for_header_L269 +debug: Looking for 'new_item_length' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let new_item_length#1: uint64 = undefined while trying to resolve 'new_item_length' in block@1: // for_header_L269 +debug: Looking for 'original_item_length' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let original_item_length#1: uint64 = undefined while trying to resolve 'original_item_length' in block@1: // for_header_L269 +debug: Terminated block@2: // for_body_L270 +debug: Sealing block@3: // for_footer_L269 +debug: Terminated block@3: // for_footer_L269 +debug: Sealing block@1: // for_header_L269 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L252 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3: // for_footer_L269 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0) in block@0: // L252 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3: // for_footer_L269 +debug: Added new_item_length#0 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0) in block@0: // L252 +debug: Added new_item_length#1 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) in block@3: // for_footer_L269 +debug: Replacing trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 +debug: Deleting Phi assignment: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 in current definition for 3 blocks +debug: Added original_item_length#0 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0) in block@0: // L252 +debug: Added original_item_length#1 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) in block@3: // for_footer_L269 +debug: Replacing trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 +debug: Deleting Phi assignment: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 in current definition for 3 blocks +debug: Sealing block@4: // after_for_L269 +debug: Terminated block@4: // after_for_L269 +debug: Sealing block@0: // L278 +debug: Terminated block@0: // L278 +debug: Sealing block@0: // L306 +debug: Terminated block@0: // L306 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L327 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L327 +debug: Terminated block@1: // for_header_L327 +debug: Sealing block@2: // for_body_L328 +debug: Looking for 'tail_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L327 +debug: Created Phi assignment: let tail_offset#1: uint64 = undefined while trying to resolve 'tail_offset' in block@1: // for_header_L327 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L327 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1: // for_header_L327 +debug: Terminated block@2: // for_body_L328 +debug: Sealing block@3: // for_footer_L327 +debug: Terminated block@3: // for_footer_L327 +debug: Sealing block@1: // for_header_L327 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L306 +debug: Added head_offset#3 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#3 <- block@3) in block@3: // for_footer_L327 +debug: Added tail_offset#0 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0) in block@0: // L306 +debug: Added tail_offset#2 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0, tail_offset#2 <- block@3) in block@3: // for_footer_L327 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0: // L306 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3: // for_footer_L327 +debug: Sealing block@4: // after_for_L327 +debug: Terminated block@4: // after_for_L327 +debug: Sealing block@0: // L4 +debug: Terminated block@0: // L4 +debug: Sealing block@0: // L9 +debug: Terminated block@0: // L9 +debug: Sealing block@1: // abi_routing_L9 +debug: Terminated block@1: // abi_routing_L9 +debug: Sealing block@2: // test_new_ops_route_L11 +debug: Terminated block@2: // test_new_ops_route_L11 +debug: Sealing block@3: // switch_case_default_L9 +debug: Terminated block@3: // switch_case_default_L9 +debug: Sealing block@4: // switch_case_next_L9 +debug: Terminated block@4: // switch_case_next_L9 +debug: Sealing block@5: // bare_routing_L9 +debug: Terminated block@5: // bare_routing_L9 +debug: Sealing block@6: // __algopy_default_create_L1 +debug: Terminated block@6: // __algopy_default_create_L1 +debug: Sealing block@7: // switch_case_default_L9 +debug: Terminated block@7: // switch_case_default_L9 +debug: Sealing block@8: // switch_case_next_L9 +debug: Terminated block@8: // switch_case_next_L9 +debug: Sealing block@9: // after_if_else_L9 +debug: Terminated block@9: // after_if_else_L9 +debug: Sealing block@0: // L11 +debug: Terminated block@0: // L11 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 +debug: Output IR to avm_11/out/avm_11_sig.ssa.ir +info: optimizing test_cases.avm_11.contract.avm_11_sig at level 1 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine test_cases.avm_11.contract.avm_11_sig +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: No optimizations performed in pass 1, ending loop +debug: Removing Phis from test_cases.avm_11.contract.avm_11_sig +debug: Coalescing local variables in test_cases.avm_11.contract.avm_11_sig using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in test_cases.avm_11.contract.avm_11_sig +debug: Performing post-SSA optimizations +debug: Output IR to avm_11/out/avm_11_sig.destructured.ir +debug: Inserted main_block@0.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced main_block@0.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted main_block@0.ops[6]: 'l-store-copy tmp%1#0 0' +debug: Replaced main_block@0.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Output IR to avm_11/out/Contract.ssa.ir +info: optimizing test_cases.avm_11.contract.Contract at level 1 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__ +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== tmp%3#0 NoOp) to (! tmp%3#0) +debug: Simplified (== tmp%8#0 0u) to (! tmp%8#0) +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: inlining the default target of a switch/goto nth +debug: adding block@1: // abi_routing_L9 as a predecessor of block@4: // switch_case_next_L9 due to inlining of block@3: // switch_case_default_L9 +debug: simplified terminator of block@1: // abi_routing_L9 from switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@3} to switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@4} +debug: simplifying a switch with constants into goto nth +debug: simplified terminator of block@5: // bare_routing_L9 from switch tmp%7#0 {0u => block@6, * => block@7} to goto_nth [block@6][tmp%7#0] else goto block@7 +debug: inlining the default target of a switch/goto nth +debug: adding block@1: // abi_routing_L9 as a predecessor of block@9: // after_if_else_L9 due to inlining of block@4: // switch_case_next_L9 +debug: simplified terminator of block@1: // abi_routing_L9 from switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@4} to switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@9} +debug: simplifying a goto nth with two targets into a conditional branch +debug: simplified terminator of block@5: // bare_routing_L9 from goto_nth [block@6][tmp%7#0] else goto block@7 to goto tmp%7#0 ? block@7 : block@6 +debug: inlining the default target of a switch/goto nth +debug: simplified terminator of block@1: // abi_routing_L9 from switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@9} to switch tmp%2#0 {method "test_new_ops()void" => block@2, * => return 0u} +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@4: // switch_case_next_L9 with block@3: // switch_case_default_L9 in block@9: // after_if_else_L9 +debug: Merged linear block@4: // switch_case_next_L9 into block@3: // switch_case_default_L9 +debug: Replaced predecessor block@8: // switch_case_next_L9 with block@7: // switch_case_default_L9 in block@9: // after_if_else_L9 +debug: Merged linear block@8: // switch_case_next_L9 into block@7: // switch_case_default_L9 +debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@3: // switch_case_default_L9 +debug: Removed empty block: block@7: // switch_case_default_L9 +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.avm_11.contract.Contract.test_new_ops +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: tuple_assignment%0#0, a#0 +debug: Replacing {tuple_assignment%0#0} with a#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%1#0, b#0 +debug: Replacing {tuple_assignment%1#0} with b#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%2#0, c#0 +debug: Replacing {tuple_assignment%2#0} with c#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%3#0, d#0 +debug: Replacing {tuple_assignment%3#0} with d#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%4#0, e#0 +debug: Replacing {tuple_assignment%4#0} with e#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%5#0, f#0 +debug: Replacing {tuple_assignment%5#0} with f#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%6#0, g#0 +debug: Replacing {tuple_assignment%6#0} with g#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%7#0, h#0 +debug: Replacing {tuple_assignment%7#0} with h#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%8#0, i#0 +debug: Replacing {tuple_assignment%8#0} with i#0 made 1 modifications +debug: Found equivalence set: tuple_assignment%9#0, j#0 +debug: Replacing {tuple_assignment%9#0} with j#0 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%5#0 +debug: Removing unused variable tmp%7#0 +debug: Removing unused variable a#0 +debug: Removing unused variable b#0 +debug: Removing unused variable c#0 +debug: Removing unused variable d#0 +debug: Removing unused variable e#0 +debug: Removing unused variable f#0 +debug: Removing unused variable tmp%15#0 +debug: Removing unused variable tmp%17#0 +debug: Removing unused variable tmp%20#0 +debug: Removing unused variable tmp%26#0 +debug: Removing unused variable tmp%28#0 +debug: Removing unused variable tmp%30#0 +debug: Removing unused variable tmp%33#0 +debug: Removing unused variable tmp%35#0 +debug: Removing unused variable tmp%37#0 +debug: Removing unused variable tmp%39#0 +debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) +debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.avm_11.contract.Contract.__algopy_default_create +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to avm_11/out/Contract.ssa.opt_pass_1.ir +debug: Begin optimization pass 2/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.avm_11.contract.Contract.test_new_ops +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%8#0 +debug: Removing unused variable tmp%9#0 +debug: Removing unused variable tmp%10#0 +debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) +debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to avm_11/out/Contract.ssa.opt_pass_2.ir +debug: Begin optimization pass 3/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.avm_11.contract.Contract.test_new_ops +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Remove Unused Variables +debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) +debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: No optimizations performed in pass 3, ending loop +debug: Removing Phis from algopy.arc4.ARC4Contract.approval_program +debug: Removing Phis from test_cases.avm_11.contract.Contract.__puya_arc4_router__ +debug: Removing Phis from test_cases.avm_11.contract.Contract.test_new_ops +debug: Removing Phis from algopy.arc4.ARC4Contract.clear_state_program +debug: Coalescing local variables in algopy.arc4.ARC4Contract.approval_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.avm_11.contract.Contract.__puya_arc4_router__ using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.avm_11.contract.Contract.test_new_ops using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in algopy.arc4.ARC4Contract.clear_state_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.approval_program +debug: Sequentializing parallel copies in test_cases.avm_11.contract.Contract.__puya_arc4_router__ +debug: Sequentializing parallel copies in test_cases.avm_11.contract.Contract.test_new_ops +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.clear_state_program +debug: Performing post-SSA optimizations +debug: Output IR to avm_11/out/Contract.destructured.ir +debug: Inserted main_block@0.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced main_block@0.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted __puya_arc4_router___block@0.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced __puya_arc4_router___block@0.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted __puya_arc4_router___abi_routing@1.ops[1]: 'l-store-copy tmp%2#0 0' +debug: Replaced __puya_arc4_router___abi_routing@1.ops[4]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted __puya_arc4_router___test_new_ops_route@2.ops[1]: 'l-store-copy tmp%3#0 0' +debug: Replaced __puya_arc4_router___test_new_ops_route@2.ops[3]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted __puya_arc4_router___test_new_ops_route@2.ops[5]: 'l-store-copy tmp%4#0 0' +debug: Replaced __puya_arc4_router___test_new_ops_route@2.ops[7]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted __puya_arc4_router___test_new_ops_route@2.ops[10]: 'l-store-copy tmp%5#0 0' +debug: Replaced __puya_arc4_router___test_new_ops_route@2.ops[12]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted __puya_arc4_router___bare_routing@5.ops[1]: 'l-store-copy tmp%7#0 0' +debug: Replaced __puya_arc4_router___bare_routing@5.ops[3]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted __puya_arc4_router_____algopy_default_create@6.ops[1]: 'l-store-copy tmp%8#0 0' +debug: Replaced __puya_arc4_router_____algopy_default_create@6.ops[3]: 'v-load tmp%8#0' with 'l-load tmp%8#0' +debug: Inserted __puya_arc4_router_____algopy_default_create@6.ops[5]: 'l-store-copy tmp%9#0 0' +debug: Replaced __puya_arc4_router_____algopy_default_create@6.ops[7]: 'v-load tmp%9#0' with 'l-load tmp%9#0' +debug: Inserted test_new_ops_block@0.ops[7]: 'l-store-copy tmp%1#0 0' +debug: Replaced test_new_ops_block@0.ops[9]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted test_new_ops_block@0.ops[11]: 'l-store-copy tmp%2#0 0' +debug: Replaced test_new_ops_block@0.ops[13]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted test_new_ops_block@0.ops[17]: 'l-store-copy tmp%3#0 0' +debug: Replaced test_new_ops_block@0.ops[19]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted test_new_ops_block@0.ops[21]: 'l-store-copy tmp%4#0 0' +debug: Replaced test_new_ops_block@0.ops[23]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted test_new_ops_block@0.ops[26]: 'l-store-copy tmp%6#0 0' +debug: Replaced test_new_ops_block@0.ops[28]: 'v-load tmp%6#0' with 'l-load tmp%6#0' +debug: Inserted test_new_ops_block@0.ops[38]: 'l-store-copy tmp%13#0 0' +debug: Replaced test_new_ops_block@0.ops[40]: 'v-load tmp%13#0' with 'l-load tmp%13#0' +debug: Inserted test_new_ops_block@0.ops[44]: 'l-store-copy tmp%14#0 0' +debug: Replaced test_new_ops_block@0.ops[46]: 'v-load tmp%14#0' with 'l-load tmp%14#0' +debug: Inserted test_new_ops_block@0.ops[50]: 'l-store-copy tmp%16#0 0' +debug: Replaced test_new_ops_block@0.ops[52]: 'v-load tmp%16#0' with 'l-load tmp%16#0' +debug: Inserted test_new_ops_block@0.ops[56]: 'l-store-copy tmp%18#0 0' +debug: Replaced test_new_ops_block@0.ops[58]: 'v-load tmp%18#0' with 'l-load tmp%18#0' +debug: Inserted test_new_ops_block@0.ops[60]: 'l-store-copy tmp%19#0 0' +debug: Replaced test_new_ops_block@0.ops[62]: 'v-load tmp%19#0' with 'l-load tmp%19#0' +debug: Inserted test_new_ops_block@0.ops[72]: 'l-store-copy tmp%23#0 0' +debug: Replaced test_new_ops_block@0.ops[74]: 'v-load tmp%23#0' with 'l-load tmp%23#0' +debug: Inserted test_new_ops_block@0.ops[78]: 'l-store-copy tmp%24#0 0' +debug: Replaced test_new_ops_block@0.ops[80]: 'v-load tmp%24#0' with 'l-load tmp%24#0' +debug: Inserted test_new_ops_block@0.ops[82]: 'l-store-copy tmp%25#0 0' +debug: Replaced test_new_ops_block@0.ops[84]: 'v-load tmp%25#0' with 'l-load tmp%25#0' +debug: Inserted test_new_ops_block@0.ops[88]: 'l-store-copy tmp%27#0 0' +debug: Replaced test_new_ops_block@0.ops[90]: 'v-load tmp%27#0' with 'l-load tmp%27#0' +debug: Inserted test_new_ops_block@0.ops[94]: 'l-store-copy tmp%29#0 0' +debug: Replaced test_new_ops_block@0.ops[96]: 'v-load tmp%29#0' with 'l-load tmp%29#0' +debug: Inserted test_new_ops_block@0.ops[99]: 'l-store-copy tmp%31#0 0' +debug: Replaced test_new_ops_block@0.ops[101]: 'v-load tmp%31#0' with 'l-load tmp%31#0' +debug: Inserted test_new_ops_block@0.ops[104]: 'l-store-copy tmp%32#0 0' +debug: Replaced test_new_ops_block@0.ops[106]: 'v-load tmp%32#0' with 'l-load tmp%32#0' +debug: Inserted test_new_ops_block@0.ops[109]: 'l-store-copy tmp%34#0 0' +debug: Replaced test_new_ops_block@0.ops[111]: 'v-load tmp%34#0' with 'l-load tmp%34#0' +debug: Inserted test_new_ops_block@0.ops[114]: 'l-store-copy tmp%36#0 0' +debug: Replaced test_new_ops_block@0.ops[116]: 'v-load tmp%36#0' with 'l-load tmp%36#0' +debug: Inserted test_new_ops_block@0.ops[119]: 'l-store-copy tmp%38#0 0' +debug: Replaced test_new_ops_block@0.ops[121]: 'v-load tmp%38#0' with 'l-load tmp%38#0' +debug: Inserted test_new_ops_block@0.ops[34]: 'l-store-copy tmp%12#0 0' +debug: Replaced test_new_ops_block@0.ops[37]: 'v-load tmp%12#0' with 'l-load tmp%12#0' +debug: Inserted test_new_ops_block@0.ops[69]: 'l-store-copy tmp%22#0 0' +debug: Replaced test_new_ops_block@0.ops[72]: 'v-load tmp%22#0' with 'l-load tmp%22#0' +debug: Inserted test_new_ops_block@0.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced test_new_ops_block@0.ops[6]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted test_new_ops_block@0.ops[33]: 'l-store-copy tmp%11#0 0' +debug: Replaced test_new_ops_block@0.ops[38]: 'v-load tmp%11#0' with 'l-load tmp%11#0' +debug: Inserted test_new_ops_block@0.ops[69]: 'l-store-copy tmp%21#0 0' +debug: Replaced test_new_ops_block@0.ops[74]: 'v-load tmp%21#0' with 'l-load tmp%21#0' +debug: Found 3 edge set/s for test_cases.avm_11.contract.Contract.__puya_arc4_router__ +info: Writing avm_11/out/avm_11_sig.teal +info: Writing avm_11/out/avm_11_sig.bin +info: Writing avm_11/out/avm_11_sig.puya.map +info: Writing avm_11/out/Contract.arc32.json +info: Writing avm_11/out/Contract.approval.teal +info: Writing avm_11/out/Contract.clear.teal +info: Writing avm_11/out/Contract.approval.bin +info: Writing avm_11/out/Contract.clear.bin +info: Writing avm_11/out/Contract.approval.puya.map +info: Writing avm_11/out/Contract.clear.puya.map +info: writing avm_11/out/client_Contract.py \ No newline at end of file diff --git a/tests/test_assemble.py b/tests/test_assemble.py index fd84064f5d..2e936365f7 100644 --- a/tests/test_assemble.py +++ b/tests/test_assemble.py @@ -123,7 +123,7 @@ def test_assemble_last_op_jump() -> None: ), program=teal.TealProgram( id="", - target_avm_version=10, + avm_version=10, main=teal.TealSubroutine( is_main=True, signature=Signature(name="", parameters=(), returns=()), From fe7a0ead47a44ea4c77538ccc45d3823eb6d41de Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 8 Nov 2024 16:01:43 +0800 Subject: [PATCH 20/20] feat: add `.copy()` to arc4.Tuple --- examples/sizes.txt | 4 +- src/puyapy/awst_build/eb/arc4/tuple.py | 4 +- stubs/algopy-stubs/arc4.pyi | 3 + .../out/Arc4TuplesTypeContract.approval.mir | 52 +- .../out/Arc4TuplesTypeContract.approval.teal | 48 +- .../out/Arc4TuplesTypeContract.clear.mir | 2 +- .../out/Arc4TuplesTypeContract.clear.teal | 2 +- .../Arc4TuplesTypeContract.destructured.ir | 16 +- .../out/Arc4TuplesTypeContract.ssa.ir | 68 ++- .../Arc4TuplesTypeContract.ssa.opt_pass_1.ir | 46 +- .../Arc4TuplesTypeContract.ssa.opt_pass_10.ir | 26 +- .../Arc4TuplesTypeContract.ssa.opt_pass_11.ir | 25 +- .../Arc4TuplesTypeContract.ssa.opt_pass_12.ir | 24 +- .../Arc4TuplesTypeContract.ssa.opt_pass_13.ir | 22 +- .../Arc4TuplesTypeContract.ssa.opt_pass_14.ir | 20 +- .../Arc4TuplesTypeContract.ssa.opt_pass_15.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_16.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_17.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_18.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_19.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_2.ir | 39 +- .../Arc4TuplesTypeContract.ssa.opt_pass_20.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_21.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_22.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_23.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_24.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_25.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_3.ir | 36 +- .../Arc4TuplesTypeContract.ssa.opt_pass_4.ir | 35 +- .../Arc4TuplesTypeContract.ssa.opt_pass_5.ir | 33 +- .../Arc4TuplesTypeContract.ssa.opt_pass_6.ir | 31 +- .../Arc4TuplesTypeContract.ssa.opt_pass_7.ir | 30 +- .../Arc4TuplesTypeContract.ssa.opt_pass_8.ir | 29 +- .../Arc4TuplesTypeContract.ssa.opt_pass_9.ir | 27 +- test_cases/arc4_types/out/module.awst | 11 + test_cases/arc4_types/out/tuples.O0.log | 296 +++++++---- test_cases/arc4_types/out/tuples.O1.log | 131 ++--- test_cases/arc4_types/out/tuples.O2.log | 131 ++--- .../Arc4TuplesTypeContract.approval.teal | 23 + .../Arc4TuplesTypeContract.destructured.ir | 16 +- .../Arc4TuplesTypeContract.approval.teal | 157 +++++- .../Arc4TuplesTypeContract.clear.teal | 2 +- .../Arc4TuplesTypeContract.destructured.ir | 63 ++- test_cases/arc4_types/puya.log | 470 +++++++++++++++++- test_cases/arc4_types/tuples.py | 16 +- 45 files changed, 1821 insertions(+), 293 deletions(-) diff --git a/examples/sizes.txt b/examples/sizes.txt index 84e945e831..a0ceeac4a6 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -19,7 +19,7 @@ arc4_types/Arc4StringTypes 455 35 - | 245 13 - arc4_types/Arc4StructsFromAnotherModule 67 12 - | 49 6 - arc4_types/Arc4StructsType 389 239 - | 259 121 - - arc4_types/Arc4TuplesType 795 136 - | 537 58 - + arc4_types/Arc4TuplesType 954 173 - | 657 77 - arc4_types/MutableParams2 334 202 - | 193 97 - arc_28/EventEmitter 186 133 - | 100 64 - asset/Reference 268 261 - | 144 141 - @@ -133,4 +133,4 @@ unssa/UnSSA 432 368 - | 241 204 - voting/VotingRoundApp 1590 1483 - | 733 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 70460 54247 54188 | 33630 22152 22108 \ No newline at end of file + Total 70619 54284 54225 | 33750 22171 22127 \ No newline at end of file diff --git a/src/puyapy/awst_build/eb/arc4/tuple.py b/src/puyapy/awst_build/eb/arc4/tuple.py index 281c3147ac..f3d44cedfa 100644 --- a/src/puyapy/awst_build/eb/arc4/tuple.py +++ b/src/puyapy/awst_build/eb/arc4/tuple.py @@ -12,7 +12,7 @@ from puyapy.awst_build.eb._base import GenericTypeBuilder from puyapy.awst_build.eb._bytes_backed import BytesBackedInstanceExpressionBuilder from puyapy.awst_build.eb._utils import compare_bytes, constant_bool_and_error, dummy_value -from puyapy.awst_build.eb.arc4._base import ARC4TypeBuilder +from puyapy.awst_build.eb.arc4._base import ARC4TypeBuilder, CopyBuilder from puyapy.awst_build.eb.factories import builder_for_instance from puyapy.awst_build.eb.interface import ( BuilderComparisonOp, @@ -118,6 +118,8 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: source_location=location, ) return TupleExpressionBuilder(result_expr, native_pytype) + case "copy": + return CopyBuilder(self.resolve(), location, self.pytype) case _: return super().member_access(name, location) diff --git a/stubs/algopy-stubs/arc4.pyi b/stubs/algopy-stubs/arc4.pyi index 14d8371fd7..c2094a40d7 100644 --- a/stubs/algopy-stubs/arc4.pyi +++ b/stubs/algopy-stubs/arc4.pyi @@ -469,6 +469,9 @@ class Tuple(_ABIEncoded, tuple[typing.Unpack[_TTuple]]): """Convert to a native Python tuple - note that the elements of the tuple should be considered to be copies of the original elements""" + def copy(self) -> typing.Self: + """Create a copy of this tuple""" + @typing.dataclass_transform( eq_default=False, order_default=False, kw_only_default=False, field_specifiers=() ) diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir index 71408043bd..df69ddddce 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir @@ -20,6 +20,9 @@ main_block@0: == tmp%20#0 assert // arc4_types/tuples.py:49 + // self.test_copy() + callsub test_copy + // arc4_types/tuples.py:51 // return True int 1 1 return @@ -27,13 +30,13 @@ main_block@0: // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> uint64, bytes: test_stuff: (𝕡) test_tuple#0 | - // arc4_types/tuples.py:54-55 + // arc4_types/tuples.py:56-57 // @subroutine // def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: proto 1 2 (𝕡) test_tuple#0 | test_stuff_block@0: (𝕡) test_tuple#0 | - // arc4_types/tuples.py:56 + // arc4_types/tuples.py:58 // a, b, c, d, e = test_tuple.native p-load test_tuple#0 (𝕡) test_tuple#0 | test_tuple#0 (copy) extract 0 1 // on error: Index access is out of bounds (𝕡) test_tuple#0 | a#0 @@ -57,7 +60,7 @@ test_stuff_block@0: substring3 (𝕡) test_tuple#0 | a#0,b#0,c#0,d#0 p-load test_tuple#0 (𝕡) test_tuple#0 | a#0,b#0,c#0,d#0,test_tuple#0 (copy) extract 6 1 // on error: Index access is out of bounds (𝕡) test_tuple#0 | a#0,b#0,c#0,d#0,e#0 - // arc4_types/tuples.py:62 + // arc4_types/tuples.py:64 // total = a.native + b.native + e.native l-load a#0 4 (𝕡) test_tuple#0 | b#0,c#0,d#0,e#0,a#0 btoi (𝕡) test_tuple#0 | b#0,c#0,d#0,e#0,tmp%4#0 @@ -71,7 +74,7 @@ test_stuff_block@0: l-load tmp%6#0 1 (𝕡) test_tuple#0 | c#0,d#0,tmp%7#0,tmp%6#0 l-load tmp%7#0 1 (𝕡) test_tuple#0 | c#0,d#0,tmp%6#0,tmp%7#0 + (𝕡) test_tuple#0 | c#0,d#0,total#0 - // arc4_types/tuples.py:63 + // arc4_types/tuples.py:65 // text = c.native + " " + d.native l-load c#0 2 (𝕡) test_tuple#0 | d#0,total#0,c#0 extract 2 0 (𝕡) test_tuple#0 | d#0,total#0,tmp%8#0 @@ -82,7 +85,7 @@ test_stuff_block@0: l-load tmp%9#0 1 (𝕡) test_tuple#0 | total#0,tmp%10#0,tmp%9#0 l-load tmp%10#0 1 (𝕡) test_tuple#0 | total#0,tmp%9#0,tmp%10#0 concat (𝕡) test_tuple#0 | total#0,text#0 - // arc4_types/tuples.py:65 + // arc4_types/tuples.py:67 // return total, String(text) l-load-copy text#0 0 (𝕡) test_tuple#0 | total#0,text#0,text#0 (copy) len (𝕡) test_tuple#0 | total#0,text#0,length%0#0 @@ -95,3 +98,42 @@ test_stuff_block@0: retsub total#0,encoded_value%0#0 +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + // arc4_types/tuples.py:69-70 + // @subroutine + // def test_copy(self) -> None: + proto 0 0 + +test_copy_block@0: + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + byte 0x000100 0x000100 + // arc4_types/tuples.py:77 + // tup[1][0] = Byte(1) + byte 0x01 0x000100,0x01 + replace2 2 updated_target%0#0 + byte 0x000003 updated_target%0#0,0x000003 + l-load updated_target%0#0 1 0x000003,updated_target%0#0 + concat tup#2 + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + l-load-copy tup#2 0 tup#2,tup#2 (copy) + int 1 tup#2,tup#2 (copy),1 + extract_uint16 tup#2,item_start_offset%3#0 + l-load-copy tup#2 1 tup#2,item_start_offset%3#0,tup#2 (copy) + len tup#2,item_start_offset%3#0,item_end_offset%3#0 + l-load tup#2 2 item_start_offset%3#0,item_end_offset%3#0,tup#2 + l-load item_start_offset%3#0 2 item_end_offset%3#0,tup#2,item_start_offset%3#0 + l-load item_end_offset%3#0 2 tup#2,item_start_offset%3#0,item_end_offset%3#0 + substring3 tmp%4#0 + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + byte 0x000100 tmp%4#0,0x000100 + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + != tmp%6#0 + assert + retsub + + diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal index b31753235b..aca39c9d38 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal @@ -1,6 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: + bytecblock 0x000100 // arc4_types/tuples.py:15 // my_tuple = Tuple((UInt8(1), UInt8(2), String("hello"), String("world"), UInt8(255))) pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 @@ -19,6 +20,9 @@ test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: == assert // arc4_types/tuples.py:49 + // self.test_copy() + callsub test_copy + // arc4_types/tuples.py:51 // return True pushint 1 // 1 return @@ -26,11 +30,11 @@ test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> uint64, bytes: test_stuff: - // arc4_types/tuples.py:54-55 + // arc4_types/tuples.py:56-57 // @subroutine // def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: proto 1 2 - // arc4_types/tuples.py:56 + // arc4_types/tuples.py:58 // a, b, c, d, e = test_tuple.native frame_dig -1 extract 0 1 // on error: Index access is out of bounds @@ -54,7 +58,7 @@ test_stuff: substring3 frame_dig -1 extract 6 1 // on error: Index access is out of bounds - // arc4_types/tuples.py:62 + // arc4_types/tuples.py:64 // total = a.native + b.native + e.native uncover 4 btoi @@ -64,7 +68,7 @@ test_stuff: swap btoi + - // arc4_types/tuples.py:63 + // arc4_types/tuples.py:65 // text = c.native + " " + d.native uncover 2 extract 2 0 @@ -73,7 +77,7 @@ test_stuff: uncover 2 extract 2 0 concat - // arc4_types/tuples.py:65 + // arc4_types/tuples.py:67 // return total, String(text) dup len @@ -82,3 +86,37 @@ test_stuff: swap concat retsub + + +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + // arc4_types/tuples.py:69-70 + // @subroutine + // def test_copy(self) -> None: + proto 0 0 + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + bytec_0 // 0x000100 + // arc4_types/tuples.py:77 + // tup[1][0] = Byte(1) + pushbytes 0x01 + replace2 2 + pushbytes 0x000003 + swap + concat + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + dup + pushint 1 // 1 + extract_uint16 + dig 1 + len + substring3 + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + bytec_0 // 0x000100 + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + != + assert + retsub diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir index 62240133ba..71483a4563 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir @@ -1,7 +1,7 @@ // Op Stack (out) // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> uint64: main_block@0: - // arc4_types/tuples.py:52 + // arc4_types/tuples.py:54 // return True int 1 1 return diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal index ea52beb6e0..1a5dffc0f4 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program: - // arc4_types/tuples.py:52 + // arc4_types/tuples.py:54 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir index fef8f00d02..72898b4c87 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir @@ -8,10 +8,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -34,8 +35,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir index 37dd684653..591441b471 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir @@ -215,10 +215,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let item0%0#0: bytes = (extract3 test_tuple#0 0u 1u) // on error: Index access is out of bounds let item1%0#0: bytes = (extract3 test_tuple#0 1u 1u) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -260,8 +261,71 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length%0#0: uint64 = (len 0x) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x) + let current_tail_offset%0#0: uint64 = 3u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x00) + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let tup#0: bytes = encoded_tuple_buffer%3#0 + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let data%0#0: bytes = (concat 0x 0x00) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let assigned_value%0#0: bytes = concat_result%0#0 + let item_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_offset%0#0) + let updated_data%0#0: bytes = (concat data_up_to_item%0#0 assigned_value%0#0) + let tup#1: bytes = updated_data%0#0 + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let result%0#0: bytes = (concat 0x 0x00) + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let copy%0#0: bytes = tup#1 + let tup2#0: bytes = copy%0#0 + let item_start_offset%2#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%2#0: uint64 = (len tup#1) + let tmp%3#0: bytes = (substring3 tup#1 item_start_offset%2#0 item_end_offset%2#0) + let assigned_value%1#0: bytes = 0x01 + let array_length%0#0: uint64 = (extract_uint16 tmp%3#0 0u) + let index_is_in_bounds%0#0: bool = (< 0u array_length%0#0) + (assert index_is_in_bounds%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = (replace3 tmp%3#0 2u assigned_value%1#0) + let assigned_value%2#0: bytes = updated_target%0#0 + let item_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_offset%1#0) + let updated_data%1#0: bytes = (concat data_up_to_item%1#0 assigned_value%2#0) + let tup#2: bytes = updated_data%1#0 + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let item_start_offset%4#0: uint64 = (extract_uint16 tup2#0 1u) + let item_end_offset%4#0: uint64 = (len tup2#0) + let tmp%5#0: bytes = (substring3 tup2#0 item_start_offset%4#0 item_end_offset%4#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%5#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir index 794a1996de..ea8628de81 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir @@ -151,10 +151,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -183,8 +184,49 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length%0#0: uint64 = 0u + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_tuple_buffer%1#0: bytes = 0x00 + let offset_as_uint16%0#0: bytes = 0x0003 + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len length_uint16%0#0) + let tup#0: bytes = (concat encoded_tuple_buffer%2#0 length_uint16%0#0) + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let data%0#0: bytes = 0x00 + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let result%0#0: bytes = 0x00 + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir index c4f6ea28ca..2ddb0b184c 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir @@ -104,10 +104,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -130,8 +131,29 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let concat_result%0#0: bytes = 0x000100 + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir index f5a1adf39c..288f53ba2b 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir @@ -102,10 +102,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -128,8 +129,28 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tup#1: bytes = 0x000003000100 + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir index 5c52008605..3e42ad3fb2 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir @@ -99,10 +99,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -125,8 +126,27 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let item_start_offset%1#0: uint64 = 3u + let item_end_offset%1#0: uint64 = 6u + let tmp%1#0: bytes = (substring3 0x000003000100 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 0x000003000100 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir index 9ffd947476..3b69b2f8b4 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir @@ -86,10 +86,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -112,8 +113,25 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tmp%1#0: bytes = 0x000100 + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = 0x000003 + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir index 29510c26b1..f426c9ed23 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir @@ -75,10 +75,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -101,8 +102,23 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tmp%2#0: bool = 1u + (assert tmp%2#0) + let array_length%0#0: uint64 = 1u + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir index 809329ccc4..fe1f3600f8 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir @@ -28,10 +28,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -54,8 +55,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir index ce83ce4c29..eb6824c6fb 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir @@ -20,10 +20,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -46,8 +47,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir index 6567fa808a..2c1ad0b4da 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir @@ -17,10 +17,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -43,8 +44,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir index 0d9ca91b2f..5916b56caf 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir @@ -16,10 +16,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -42,8 +43,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir index cacba276ef..218464e3d9 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir @@ -15,10 +15,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -41,8 +42,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir index 1c000aad7b..967b171da8 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir @@ -134,10 +134,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -166,8 +167,42 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length_uint16%0#0: bytes = 0x0000 + let encoded_tuple_buffer%2#0: bytes = 0x000003 + let tup#0: bytes = (concat encoded_tuple_buffer%2#0 length_uint16%0#0) + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let array_data%0#0: bytes = 0x000100 + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir index 2b66f520ac..0c5284ed26 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir @@ -14,10 +14,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -40,8 +41,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir index bb52e59f33..4da64bca71 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir @@ -13,10 +13,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -39,8 +40,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir index 16ee6e7cd1..ed4425b6d0 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir @@ -12,10 +12,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -38,8 +39,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir index 2084acba93..cb1ef59638 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir @@ -11,10 +11,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -37,8 +38,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir index d992143e3d..e5a188bfad 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir @@ -10,10 +10,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -36,8 +37,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir index fef8f00d02..72898b4c87 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir @@ -8,10 +8,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -34,8 +35,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir index ab7b4a7714..caede4dcfd 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir @@ -121,10 +121,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -147,8 +148,39 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tup#0: bytes = 0x0000030000 + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir index bc0d57fca4..3af3122c64 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir @@ -117,10 +117,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -143,8 +144,38 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let item_start_offset%0#0: uint64 = 3u + let item_end_offset%0#0: uint64 = 5u + let tmp%0#0: bytes = (substring3 0x0000030000 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 0x0000030000 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir index dbc048164e..519dca143a 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir @@ -115,10 +115,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -141,8 +142,36 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tmp%0#0: bytes = 0x0000 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = 0x000003 + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir index f78f237292..52d6a736e1 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir @@ -112,10 +112,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -138,8 +139,34 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let expr_value_trimmed%0#0: bytes = 0x + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir index 47aa8bf6a4..2afb2ed199 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir @@ -110,10 +110,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -136,8 +137,33 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let concatenated%0#0: bytes = 0x00 + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir index 26acacc3b0..fb8946c487 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir @@ -108,10 +108,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -134,8 +135,32 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let len_%0#0: uint64 = 1u + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 0x00) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir index 51e667831e..df6b0ed861 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir @@ -106,10 +106,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -132,8 +133,30 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let len_16_bit%0#0: bytes = 0x0001 + let concat_result%0#0: bytes = (concat len_16_bit%0#0 0x00) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/module.awst b/test_cases/arc4_types/out/module.awst index cf598578a9..7343ce3ba9 100644 --- a/test_cases/arc4_types/out/module.awst +++ b/test_cases/arc4_types/out/module.awst @@ -19,6 +19,7 @@ contract Arc4TuplesTypeContract (total, concat): tuple> = this::test_stuff(my_tuple) assert(arc4_decode(concat, string) == 'hello world') assert(total == 258u) + this::test_copy() return true } @@ -37,6 +38,16 @@ contract Arc4TuplesTypeContract text: string = arc4_decode(c, string) + ' ' + arc4_decode(d, string) return (total, arc4_encode(text, arc4.dynamic_array)) } + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy(): void + { + tup: arc4.tuple> = arc4_encode((0_arc4u8, arc4_encode(hex<"">, arc4.dynamic_array)), arc4.tuple>) + tup[1].extend((0_arc4u8)) + assert(tup[1] == new arc4.dynamic_array(0_arc4u8)) + tup2: arc4.tuple> = tup.copy() + tup[1][0u]: arc4.uint8 = 1_arc4u8 + assert(tup[1] != tup2[1]) + } } contract Arc4StructsTypeContract diff --git a/test_cases/arc4_types/out/tuples.O0.log b/test_cases/arc4_types/out/tuples.O0.log index 2a740995a1..54955d1378 100644 --- a/test_cases/arc4_types/out/tuples.O0.log +++ b/test_cases/arc4_types/out/tuples.O0.log @@ -436,92 +436,92 @@ PC Teal Stack 627 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 628 dig 10 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 630 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 -658 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 -661 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -663 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 -664 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 -665 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 -666 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -668 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1 -669 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1, 1 -670 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 -671 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 -673 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 -675 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 -676 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 -678 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -680 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 -681 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -683 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 -685 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 -687 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F -688 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 -690 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -692 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14 -693 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -695 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21 -696 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -698 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -700 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -702 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 -703 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -705 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 -707 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 -708 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF -709 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 -711 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x01, 0x0005776F726C64, 0xFF -713 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x01, 0x0005776F726C64, 0xFF, 0x000568656C6C6F -715 cover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0x0005776F726C64, 0xFF -717 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0xFF, 0x0005776F726C64 -718 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0x01, 0xFF -720 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -721 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -723 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 -724 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 -725 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01 -726 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01, 0x01 -728 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 -729 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -730 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -732 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 -734 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 -735 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF -736 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF, 0xFF -738 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 -739 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -740 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -742 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -744 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14 -745 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -747 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21 -748 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -750 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -752 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -754 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64 -755 dig 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64, 0x0005776F726C64 -757 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 -758 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -759 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 1 -760 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 -762 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 -763 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 -764 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF -765 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 -766 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 -767 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F -769 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" -772 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " -775 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " -776 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 -778 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" -781 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" -782 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" -783 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 -784 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B -785 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B -788 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" -789 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 -790 retsub 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 0x000B68656C6C6F20776F726C64 +661 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 +664 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +666 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 +667 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 +668 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 +669 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +671 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1 +672 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1, 1 +673 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 +674 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 +676 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 +678 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 +679 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 +681 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +683 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 +684 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +686 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 +688 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 +690 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F +691 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 +693 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +695 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14 +696 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +698 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21 +699 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +701 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +703 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +705 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 +706 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +708 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 +710 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 +711 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF +712 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 +714 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x01, 0x0005776F726C64, 0xFF +716 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x01, 0x0005776F726C64, 0xFF, 0x000568656C6C6F +718 cover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0x0005776F726C64, 0xFF +720 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0xFF, 0x0005776F726C64 +721 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0x01, 0xFF +723 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +724 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +726 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 +727 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 +728 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01 +729 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01, 0x01 +731 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 +732 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +733 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +735 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 +737 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 +738 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF +739 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF, 0xFF +741 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 +742 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +743 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +745 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +747 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14 +748 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +750 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21 +751 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +753 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +755 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +757 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64 +758 dig 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64, 0x0005776F726C64 +760 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 +761 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +762 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 1 +763 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 +765 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 +766 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 +767 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF +768 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 +769 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 +770 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F +772 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" +775 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " +778 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " +779 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 +781 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" +784 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" +785 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" +786 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 +787 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B +788 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B +791 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" +792 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 +793 retsub 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 0x000B68656C6C6F20776F726C64 633 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, "hello world" 636 pushbytes "hello world" 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, "hello world", "hello world" 649 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 1 @@ -529,5 +529,125 @@ PC Teal Stack 651 pushint 258 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 258 654 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 655 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 -656 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 -657 return 1 \ No newline at end of file +656 callsub test_copy 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +794 proto 0 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +797 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x +798 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0 +799 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000000000000000 +800 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000 +803 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x +804 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000 +805 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x +806 bytec_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x, 0x00 +807 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00 +808 pushint 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00, 3 +810 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00, 0x0000000000000003 +811 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00, 0x0003 +814 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x000003 +815 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003, 0x0000 +816 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000 +817 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000030000 +818 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000030000, 1 +819 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 3 +820 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x0000030000 +821 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x0000030000, 0x0000030000 +822 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x0000030000, 5 +823 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 5, 0x0000030000 +824 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 5, 0x0000030000, 0x0000030000 +825 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 5, 0x0000030000, 0x0000030000, 3 +827 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000030000, 3, 5 +829 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000 +830 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x +833 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x, 0x +834 bytec_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x, 0x, 0x00 +835 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x, 0x00 +836 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00 +837 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 0x00 +838 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 1 +839 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 0x0000000000000001 +840 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 0x0001 +843 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0001, 0x00 +844 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100 +845 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100, 0x0000030000 +847 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100, 0x0000030000, 1 +848 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100, 3 +849 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 3, 0x0000030000 +851 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 3, 0x0000030000, 0 +852 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 0x0000030000, 0, 3 +854 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 0x000003 +855 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003, 0x000100 +856 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100 +857 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100 +858 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 1 +859 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3 +860 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x000003000100 +861 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x000003000100, 0x000003000100 +862 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x000003000100, 6 +863 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 6, 0x000003000100 +864 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 6, 0x000003000100, 0x000003000100 +865 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 6, 0x000003000100, 0x000003000100, 3 +867 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 3, 6 +869 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100 +870 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x +871 bytec_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x, 0x00 +872 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x00 +873 pushbytes 0x0001 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x00, 0x0001 +877 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x0001, 0x00 +878 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x000100 +879 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 1 +880 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100 +881 dupn 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000003000100 +883 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000003000100, 1 +884 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 3 +885 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000100 +886 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000100, 0x000003000100 +887 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000100, 6 +888 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000003000100 +889 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000003000100, 0x000003000100 +890 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 6, 0x000003000100, 0x000003000100, 3 +892 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000003000100, 3, 6 +894 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100 +895 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 0x000100 +896 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 0x000100, 0 +897 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 1 +898 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 1, 0 +899 > 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 1 +900 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100 +901 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 2 +903 pushbytes 0x01 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 2, 0x01 +906 replace3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101 +907 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101, 0x000003000100 +909 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101, 0x000003000100, 1 +910 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101, 3 +911 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 3, 0x000003000100 +913 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 3, 0x000003000100, 0 +914 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003000100, 0, 3 +916 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003 +917 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003, 0x000101 +918 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101 +919 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 0x000003000101 +920 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 0x000003000101, 1 +921 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 3 +922 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000101 +923 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000101, 0x000003000101 +924 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000101, 6 +925 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000003000101 +926 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 6, 0x000003000101, 3 +928 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 3, 6 +930 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101 +931 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003000100 +933 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003000100, 1 +934 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 3 +935 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000101 +936 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000101, 0x000003000100 +938 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000101, 6 +939 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000101 +940 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 6, 0x000101, 0x000003000100 +942 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 6, 0x000101, 0x000003000100, 3 +944 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000101, 0x000003000100, 3, 6 +946 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000101, 0x000100 +947 != 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 +948 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +949 retsub 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +659 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 +660 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/tuples.O1.log b/test_cases/arc4_types/out/tuples.O1.log index 1dcd41b336..f182ca54ee 100644 --- a/test_cases/arc4_types/out/tuples.O1.log +++ b/test_cases/arc4_types/out/tuples.O1.log @@ -1,57 +1,76 @@ PC Teal Stack -1 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 -24 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 -53 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 -56 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -58 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 -61 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -63 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 -66 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 -68 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 -70 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 -71 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 -73 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -75 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 -76 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -78 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 -80 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 -82 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F -83 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 -85 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 -86 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -88 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -90 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -92 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 -93 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -95 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF -98 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 -100 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 -101 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 -103 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 -104 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 -105 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF -106 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 -107 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 -108 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F -110 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" -113 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " -116 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " -117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 -119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" -122 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" -123 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" -124 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 -125 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B -126 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B -129 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" -130 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 -131 retsub 258, 0x000B68656C6C6F20776F726C64 -27 extract 2 0 258, "hello world" -30 pushbytes "hello world" 258, "hello world", "hello world" -43 == 258, 1 -44 assert 258 -45 pushint 258 258, 258 -48 == 1 -49 assert -50 pushint 1 1 -52 return 1 \ No newline at end of file +1 bytecblock 0x000100 +7 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 +30 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 +62 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 +65 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +67 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 +70 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +72 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 +75 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 +77 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 +79 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 +80 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 +82 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +84 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 +85 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +87 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 +89 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 +91 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F +92 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 +94 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 +95 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +97 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +99 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +101 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 +102 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +104 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF +107 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 +109 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 +110 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 +112 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 +113 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 +114 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF +115 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 +116 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 +117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F +119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" +122 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " +125 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " +126 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 +128 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" +131 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" +132 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" +133 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 +134 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B +135 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B +138 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" +139 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 +140 retsub 258, 0x000B68656C6C6F20776F726C64 +33 extract 2 0 258, "hello world" +36 pushbytes "hello world" 258, "hello world", "hello world" +49 == 258, 1 +50 assert 258 +51 pushint 258 258, 258 +54 == 1 +55 assert +56 callsub test_copy +141 proto 0 0 +144 bytec_0 0x000100 +145 pushbytes 0x01 0x000100, 0x01 +148 replace2 2 0x000101 +150 pushbytes 0x000003 0x000101, 0x000003 +155 swap 0x000003, 0x000101 +156 concat 0x000003000101 +157 dup 0x000003000101, 0x000003000101 +158 pushint 1 0x000003000101, 0x000003000101, 1 +160 extract_uint16 0x000003000101, 3 +161 dig 1 0x000003000101, 3, 0x000003000101 +163 len 0x000003000101, 3, 6 +164 substring3 0x000101 +165 bytec_0 0x000101, 0x000100 +166 != 1 +167 assert +168 retsub +59 pushint 1 1 +61 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/tuples.O2.log b/test_cases/arc4_types/out/tuples.O2.log index 1dcd41b336..f182ca54ee 100644 --- a/test_cases/arc4_types/out/tuples.O2.log +++ b/test_cases/arc4_types/out/tuples.O2.log @@ -1,57 +1,76 @@ PC Teal Stack -1 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 -24 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 -53 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 -56 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -58 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 -61 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -63 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 -66 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 -68 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 -70 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 -71 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 -73 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -75 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 -76 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -78 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 -80 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 -82 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F -83 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 -85 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 -86 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -88 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -90 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -92 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 -93 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -95 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF -98 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 -100 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 -101 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 -103 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 -104 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 -105 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF -106 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 -107 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 -108 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F -110 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" -113 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " -116 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " -117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 -119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" -122 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" -123 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" -124 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 -125 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B -126 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B -129 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" -130 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 -131 retsub 258, 0x000B68656C6C6F20776F726C64 -27 extract 2 0 258, "hello world" -30 pushbytes "hello world" 258, "hello world", "hello world" -43 == 258, 1 -44 assert 258 -45 pushint 258 258, 258 -48 == 1 -49 assert -50 pushint 1 1 -52 return 1 \ No newline at end of file +1 bytecblock 0x000100 +7 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 +30 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 +62 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 +65 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +67 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 +70 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +72 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 +75 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 +77 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 +79 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 +80 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 +82 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +84 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 +85 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +87 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 +89 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 +91 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F +92 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 +94 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 +95 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +97 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +99 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +101 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 +102 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +104 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF +107 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 +109 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 +110 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 +112 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 +113 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 +114 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF +115 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 +116 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 +117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F +119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" +122 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " +125 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " +126 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 +128 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" +131 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" +132 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" +133 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 +134 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B +135 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B +138 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" +139 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 +140 retsub 258, 0x000B68656C6C6F20776F726C64 +33 extract 2 0 258, "hello world" +36 pushbytes "hello world" 258, "hello world", "hello world" +49 == 258, 1 +50 assert 258 +51 pushint 258 258, 258 +54 == 1 +55 assert +56 callsub test_copy +141 proto 0 0 +144 bytec_0 0x000100 +145 pushbytes 0x01 0x000100, 0x01 +148 replace2 2 0x000101 +150 pushbytes 0x000003 0x000101, 0x000003 +155 swap 0x000003, 0x000101 +156 concat 0x000003000101 +157 dup 0x000003000101, 0x000003000101 +158 pushint 1 0x000003000101, 0x000003000101, 1 +160 extract_uint16 0x000003000101, 3 +161 dig 1 0x000003000101, 3, 0x000003000101 +163 len 0x000003000101, 3, 6 +164 substring3 0x000101 +165 bytec_0 0x000101, 0x000100 +166 != 1 +167 assert +168 retsub +59 pushint 1 1 +61 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal index 2212fb11a5..e4e343a315 100644 --- a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal @@ -1,6 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: + bytecblock 0x000100 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 callsub test_stuff extract 2 0 @@ -10,6 +11,7 @@ test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: pushint 258 // 258 == assert + callsub test_copy pushint 1 // 1 return @@ -61,3 +63,24 @@ test_stuff: swap concat retsub + + +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + proto 0 0 + bytec_0 // 0x000100 + pushbytes 0x01 + replace2 2 + pushbytes 0x000003 + swap + concat + dup + pushint 1 // 1 + extract_uint16 + dig 1 + len + substring3 + bytec_0 // 0x000100 + != + assert + retsub diff --git a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir index fef8f00d02..72898b4c87 100644 --- a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir +++ b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir @@ -8,10 +8,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -34,8 +35,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal index 056fa06e28..00be061272 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal @@ -563,6 +563,9 @@ main_bool_merge@13: == assert // arc4_types/tuples.py:49 + // self.test_copy() + callsub test_copy + // arc4_types/tuples.py:51 // return True intc_1 // 1 return @@ -570,11 +573,11 @@ main_bool_merge@13: // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> uint64, bytes: test_stuff: - // arc4_types/tuples.py:54-55 + // arc4_types/tuples.py:56-57 // @subroutine // def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: proto 1 2 - // arc4_types/tuples.py:56 + // arc4_types/tuples.py:58 // a, b, c, d, e = test_tuple.native frame_dig -1 intc_0 // 0 @@ -614,7 +617,7 @@ test_stuff: swap cover 2 swap - // arc4_types/tuples.py:58 + // arc4_types/tuples.py:60 // assert test_tuple[-0] == a frame_dig -1 intc_0 // 0 @@ -623,7 +626,7 @@ test_stuff: dig 1 b== assert - // arc4_types/tuples.py:59 + // arc4_types/tuples.py:61 // assert test_tuple[-1] == e frame_dig -1 pushint 6 // 6 @@ -632,7 +635,7 @@ test_stuff: dig 2 b== assert - // arc4_types/tuples.py:60 + // arc4_types/tuples.py:62 // assert test_tuple[-2] == d frame_dig -1 pushint 4 // 4 @@ -646,7 +649,7 @@ test_stuff: dig 3 == assert - // arc4_types/tuples.py:62 + // arc4_types/tuples.py:64 // total = a.native + b.native + e.native btoi uncover 3 @@ -655,7 +658,7 @@ test_stuff: swap btoi + - // arc4_types/tuples.py:63 + // arc4_types/tuples.py:65 // text = c.native + " " + d.native uncover 2 extract 2 0 @@ -664,7 +667,7 @@ test_stuff: uncover 2 extract 2 0 concat - // arc4_types/tuples.py:65 + // arc4_types/tuples.py:67 // return total, String(text) dup len @@ -673,3 +676,141 @@ test_stuff: swap concat retsub + + +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + // arc4_types/tuples.py:69-70 + // @subroutine + // def test_copy(self) -> None: + proto 0 0 + // arc4_types/tuples.py:71 + // tup = Tuple((UInt8(), DynamicBytes())) + bytec_1 // 0x + len + itob + extract 6 2 + bytec_1 // 0x + concat + bytec_1 // 0x + bytec_0 // 0x00 + concat + pushint 3 // 3 + itob + extract 6 2 + concat + swap + concat + // arc4_types/tuples.py:72 + // tup[1].append(Byte()) + dup + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + dup + uncover 3 + uncover 3 + substring3 + extract 2 0 + bytec_1 // 0x + bytec_0 // 0x00 + concat + concat + dup + len + itob + extract 6 2 + swap + concat + dig 1 + intc_1 // 1 + extract_uint16 + uncover 2 + intc_0 // 0 + uncover 2 + extract3 + swap + concat + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + dup + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + dup + uncover 3 + uncover 3 + substring3 + bytec_1 // 0x + bytec_0 // 0x00 + concat + pushbytes 0x0001 + swap + concat + == + assert + // arc4_types/tuples.py:76 + // tup2 = tup.copy() + dupn 2 + // arc4_types/tuples.py:77 + // tup[1][0] = Byte(1) + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + dup + uncover 3 + uncover 3 + substring3 + dup + intc_0 // 0 + extract_uint16 + intc_0 // 0 + > + assert // Index access is out of bounds + pushint 2 // 2 + pushbytes 0x01 + replace3 + dig 1 + intc_1 // 1 + extract_uint16 + uncover 2 + intc_0 // 0 + uncover 2 + extract3 + swap + concat + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + dup + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + uncover 2 + uncover 2 + substring3 + dig 1 + intc_1 // 1 + extract_uint16 + swap + dig 2 + len + swap + uncover 3 + uncover 3 + uncover 3 + substring3 + != + assert + retsub diff --git a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal index ea52beb6e0..1a5dffc0f4 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program: - // arc4_types/tuples.py:52 + // arc4_types/tuples.py:54 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir index 1f348154a0..17ee8a4f36 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir +++ b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir @@ -205,10 +205,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let item0%0#0: bytes = (extract3 test_tuple#0 0u 1u) // on error: Index access is out of bounds let item1%0#0: bytes = (extract3 test_tuple#0 1u 1u) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -250,8 +251,66 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length%0#0: uint64 = (len 0x) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x) + let encoded_tuple_buffer%1#0: bytes = (concat 0x 0x00) + let as_bytes%1#0: bytes = (itob 3u) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let tup#0: bytes = encoded_tuple_buffer%3#0 + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let data%0#0: bytes = (concat 0x 0x00) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let assigned_value%0#0: bytes = concat_result%0#0 + let item_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_offset%0#0) + let updated_data%0#0: bytes = (concat data_up_to_item%0#0 assigned_value%0#0) + let tup#0: bytes = updated_data%0#0 + let item_start_offset%1#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%1#0: uint64 = (len tup#0) + let tmp%1#0: bytes = (substring3 tup#0 item_start_offset%1#0 item_end_offset%1#0) + let result%0#0: bytes = (concat 0x 0x00) + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let copy%0#0: bytes = tup#0 + let tup2#0: bytes = copy%0#0 + let item_start_offset%2#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%2#0: uint64 = (len tup#0) + let tmp%3#0: bytes = (substring3 tup#0 item_start_offset%2#0 item_end_offset%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%3#0 0u) + let index_is_in_bounds%0#0: bool = (< 0u array_length%0#0) + (assert index_is_in_bounds%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = (replace3 tmp%3#0 2u 0x01) + let assigned_value%2#0: bytes = updated_target%0#0 + let item_offset%1#0: uint64 = (extract_uint16 tup#0 1u) + let data_up_to_item%1#0: bytes = (extract3 tup#0 0u item_offset%1#0) + let updated_data%1#0: bytes = (concat data_up_to_item%1#0 assigned_value%2#0) + let tup#0: bytes = updated_data%1#0 + let item_start_offset%3#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%3#0: uint64 = (len tup#0) + let tmp%4#0: bytes = (substring3 tup#0 item_start_offset%3#0 item_end_offset%3#0) + let item_start_offset%4#0: uint64 = (extract_uint16 tup2#0 1u) + let item_end_offset%4#0: uint64 = (len tup2#0) + let tmp%5#0: bytes = (substring3 tup2#0 item_start_offset%4#0 item_end_offset%4#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%5#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/puya.log b/test_cases/arc4_types/puya.log index 870b42f462..38e9362492 100644 --- a/test_cases/arc4_types/puya.log +++ b/test_cases/arc4_types/puya.log @@ -363,8 +363,10 @@ debug: Sealing block@2: // bare_routing_L13 debug: Terminated block@2: // bare_routing_L13 debug: Sealing block@3: // after_if_else_L13 debug: Terminated block@3: // after_if_else_L13 -debug: Sealing block@0: // L54 -debug: Terminated block@0: // L54 +debug: Sealing block@0: // L56 +debug: Terminated block@0: // L56 +debug: Sealing block@0: // L69 +debug: Terminated block@0: // L69 debug: Sealing block@0: // L14 debug: Terminated block@0: // L14 debug: Sealing block@1: // and_contd_L39 @@ -520,8 +522,8 @@ debug: Replacing trivial Phi node: let my_tuple#1: bytes = φ(my_tuple#0 <- bloc debug: Deleting Phi assignment: let my_tuple#1: bytes = φ(my_tuple#0 <- block@11, my_tuple#0 <- block@12) debug: Replaced trivial Phi node: let my_tuple#1: bytes = φ(my_tuple#0 <- block@11, my_tuple#0 <- block@12) (my_tuple#1) with my_tuple#0 in current definition for 1 blocks debug: Terminated block@13: // bool_merge_L40 -debug: Sealing block@0: // L51 -debug: Terminated block@0: // L51 +debug: Sealing block@0: // L53 +debug: Terminated block@0: // L53 debug: Sealing block@0: // L34 debug: Terminated block@0: // L34 debug: Sealing block@1: // abi_routing_L34 @@ -2083,11 +2085,11 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination -debug: Replacing redundant declaration let item_start_offset%1#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) -debug: Replacing redundant declaration let reinterpret_biguint%0#0: biguint = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:8-9, ir_type=bytes, name='a', version=0),) -debug: Replacing redundant declaration let reinterpret_biguint%2#0: biguint = ((extract 6 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:20-21, ir_type=bytes, name='e', version=0),) -debug: Replacing redundant declaration let item_start_offset%2#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) -debug: Replacing redundant declaration let item_end_offset%2#0: uint64 = (len test_tuple#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:24-41, ir_type=uint64, name='item_end_offset%1', version=0),) +debug: Replacing redundant declaration let item_start_offset%1#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) +debug: Replacing redundant declaration let reinterpret_biguint%0#0: biguint = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:8-9, ir_type=bytes, name='a', version=0),) +debug: Replacing redundant declaration let reinterpret_biguint%2#0: biguint = ((extract 6 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:20-21, ir_type=bytes, name='e', version=0),) +debug: Replacing redundant declaration let item_start_offset%2#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) +debug: Replacing redundant declaration let item_end_offset%2#0: uint64 = (len test_tuple#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:24-41, ir_type=uint64, name='item_end_offset%1', version=0),) debug: Found equivalence set: item_end_offset%0#0, item_start_offset%1#0, item_start_offset%2#0 debug: Replacing {item_start_offset%1#0, item_start_offset%2#0} with item_end_offset%0#0 made 2 modifications debug: Found equivalence set: a#0, reinterpret_biguint%0#0 @@ -2096,10 +2098,65 @@ debug: Found equivalence set: e#0, reinterpret_biguint%2#0 debug: Replacing {reinterpret_biguint%2#0} with e#0 made 1 modifications debug: Found equivalence set: item_end_offset%1#0, item_end_offset%2#0 debug: Replacing {item_end_offset%2#0} with item_end_offset%1#0 made 1 modifications -debug: Replacing redundant declaration let tmp%2#0: bytes = (substring3 test_tuple#0 item_end_offset%0#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:17-18, ir_type=bytes, name='d', version=0),) +debug: Replacing redundant declaration let tmp%2#0: bytes = (substring3 test_tuple#0 item_end_offset%0#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:17-18, ir_type=bytes, name='d', version=0),) debug: Found equivalence set: d#0, tmp%2#0 debug: Replacing {tmp%2#0} with d#0 made 1 modifications debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: encoded_tuple_buffer%3#0, tup#0 +debug: Replacing {encoded_tuple_buffer%3#0} with tup#0 made 1 modifications +debug: Found equivalence set: concat_result%0#0, assigned_value%0#0 +debug: Replacing {assigned_value%0#0} with concat_result%0#0 made 1 modifications +debug: Found equivalence set: updated_data%0#0, tup#1, copy%0#0, tup2#0 +debug: Replacing {updated_data%0#0, copy%0#0, tup2#0} with tup#1 made 4 modifications +debug: Found equivalence set: updated_target%0#0, assigned_value%2#0 +debug: Replacing {assigned_value%2#0} with updated_target%0#0 made 1 modifications +debug: Found equivalence set: updated_data%1#0, tup#2 +debug: Replacing {updated_data%1#0} with tup#2 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (len 0x) to 0u +debug: Simplified (concat length_uint16%0#0 0x) to length_uint16%0#0 +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x0003 +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified (replace3 tmp%3#0 2u 0x01) to ((replace2 2) tmp%3#0 0x01) +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable current_tail_offset%0#0 +debug: Removing unused variable encoded_tuple_buffer%0#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable current_tail_offset%1#0 +debug: Removing unused variable assigned_value%1#0 +debug: Removing unused variable index_is_in_bounds%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Replacing redundant declaration let item_offset%0#0: uint64 = (extract_uint16 tup#0 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:72:8-14, ir_type=uint64, name='item_start_offset%0', version=0),) +debug: Replacing redundant declaration let item_start_offset%2#0: uint64 = (extract_uint16 tup#1 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_start_offset%1', version=0),) +debug: Replacing redundant declaration let item_end_offset%2#0: uint64 = (len tup#1) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_end_offset%1', version=0),) +debug: Replacing redundant declaration let item_offset%1#0: uint64 = (extract_uint16 tup#1 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_start_offset%1', version=0),) +debug: Replacing redundant declaration let item_start_offset%4#0: uint64 = (extract_uint16 tup#1 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_start_offset%1', version=0),) +debug: Replacing redundant declaration let item_end_offset%4#0: uint64 = (len tup#1) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_end_offset%1', version=0),) +debug: Found equivalence set: length_uint16%0#0, encoded_value%0#0 +debug: Replacing {encoded_value%0#0} with length_uint16%0#0 made 2 modifications +debug: Found equivalence set: item_start_offset%0#0, item_offset%0#0 +debug: Replacing {item_offset%0#0} with item_start_offset%0#0 made 1 modifications +debug: Found equivalence set: item_start_offset%1#0, item_start_offset%2#0, item_offset%1#0, item_start_offset%4#0 +debug: Replacing {item_start_offset%2#0, item_offset%1#0, item_start_offset%4#0} with item_start_offset%1#0 made 3 modifications +debug: Found equivalence set: item_end_offset%1#0, item_end_offset%2#0, item_end_offset%4#0 +debug: Replacing {item_end_offset%2#0, item_end_offset%4#0} with item_end_offset%1#0 made 2 modifications +debug: Replacing redundant declaration let tmp%3#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=bytes, name='tmp%1', version=0),) +debug: Replacing redundant declaration let tmp%5#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=bytes, name='tmp%1', version=0),) +debug: Found equivalence set: tmp%1#0, tmp%3#0, tmp%5#0 +debug: Replacing {tmp%3#0, tmp%5#0} with tmp%1#0 made 3 modifications +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer @@ -2174,6 +2231,29 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0000 +debug: Simplified (concat 0x00 0x0003) to 0x000003 +debug: Simplified (concat 0x0001 0x00) to 0x000100 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length%0#0 +debug: Removing unused variable as_bytes%0#0 +debug: Removing unused variable encoded_tuple_buffer%1#0 +debug: Removing unused variable offset_as_uint16%0#0 +debug: Removing unused variable data_length%0#0 +debug: Removing unused variable data%0#0 +debug: Removing unused variable result%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2234,6 +2314,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x000003 0x0000) to 0x0000030000 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length_uint16%0#0 +debug: Removing unused variable encoded_tuple_buffer%2#0 +debug: Removing unused variable array_data%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2281,6 +2378,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (extract_uint16 0x0000030000 1u) to 3u +debug: Simplified (len 0x0000030000) to 5u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tup#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2326,6 +2439,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (substring3 0x0000030000 3u 5u) to 0x0000 +debug: Simplified (extract3 0x0000030000 0u 3u) to 0x000003 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable item_start_offset%0#0 +debug: Removing unused variable item_end_offset%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2372,6 +2502,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 2 0) 0x0000) to 0x +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%0#0 +debug: Removing unused variable data_up_to_item%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2417,6 +2563,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable expr_value_trimmed%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2462,6 +2623,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (len 0x00) to 1u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable concatenated%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2507,6 +2683,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%2#0) to 0x0001 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable len_%0#0 +debug: Removing unused variable as_bytes%2#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2552,6 +2744,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0001 0x00) to 0x000100 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable len_16_bit%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2597,6 +2804,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x000003 0x000100) to 0x000003000100 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable concat_result%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2652,6 +2874,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (extract_uint16 0x000003000100 1u) to 3u +debug: Simplified (len 0x000003000100) to 6u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tup#1 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2716,6 +2954,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (substring3 0x000003000100 3u 6u) to 0x000100 +debug: Simplified (extract3 0x000003000100 0u 3u) to 0x000003 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable item_start_offset%1#0 +debug: Removing unused variable item_end_offset%1#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2787,6 +3042,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== 0x000100 0x000100) to 1u +debug: Simplified (extract_uint16 0x000100 0u) to 1u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable data_up_to_item%1#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2893,6 +3165,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%2#0 +debug: Removing unused variable array_length%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2942,6 +3229,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2986,6 +3286,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3029,6 +3342,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3072,6 +3398,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3115,6 +3454,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3158,6 +3510,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3201,6 +3566,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3244,6 +3622,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3287,6 +3678,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3329,6 +3733,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3370,6 +3787,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3386,15 +3816,19 @@ debug: Optimizer: Remove Calls To No Op Subroutines debug: No optimizations performed in pass 26, ending loop debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff +debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff +debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Performing post-SSA optimizations debug: Output IR to arc4_types/out/Arc4TuplesTypeContract.destructured.ir @@ -3454,6 +3888,22 @@ debug: Inserted test_stuff_block@0.ops[58]: 'l-store-copy total#0 1' debug: Replaced test_stuff_block@0.ops[96]: 'v-load total#0' with 'l-load total#0' debug: Inserted test_stuff_block@0.ops[23]: 'l-store-copy c#0 3' debug: Replaced test_stuff_block@0.ops[61]: 'v-load c#0' with 'l-load c#0' +debug: Inserted test_copy_block@0.ops[7]: 'l-store-copy tup#2 0' +debug: Replaced test_copy_block@0.ops[9]: 'v-load tup#2' with 'l-load tup#2' +debug: Inserted test_copy_block@0.ops[20]: 'l-store-copy tmp%4#0 0' +debug: Replaced test_copy_block@0.ops[22]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted test_copy_block@0.ops[25]: 'l-store-copy tmp%6#0 0' +debug: Replaced test_copy_block@0.ops[27]: 'v-load tmp%6#0' with 'l-load tmp%6#0' +debug: Inserted test_copy_block@0.ops[3]: 'l-store-copy updated_target%0#0 0' +debug: Replaced test_copy_block@0.ops[6]: 'v-load updated_target%0#0' with 'l-load updated_target%0#0' +debug: Inserted test_copy_block@0.ops[15]: 'l-store-copy tup#2 0' +debug: Replaced test_copy_block@0.ops[18]: 'v-load tup#2' with 'l-load tup#2' +debug: Inserted test_copy_block@0.ops[17]: 'l-store-copy item_end_offset%3#0 1' +debug: Replaced test_copy_block@0.ops[21]: 'v-load item_end_offset%3#0' with 'l-load item_end_offset%3#0' +debug: Inserted test_copy_block@0.ops[11]: 'l-store-copy tup#2 0' +debug: Replaced test_copy_block@0.ops[15]: 'v-load tup#2' with 'l-load tup#2' +debug: Inserted test_copy_block@0.ops[14]: 'l-store-copy item_start_offset%3#0 1' +debug: Replaced test_copy_block@0.ops[22]: 'v-load item_start_offset%3#0' with 'l-load item_start_offset%3#0' debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.ir info: optimizing test_cases.arc4_types.structs.Arc4StructsTypeContract at level 1 debug: Begin optimization pass 1/100 diff --git a/test_cases/arc4_types/tuples.py b/test_cases/arc4_types/tuples.py index e8584a3ad7..20d7ad9790 100644 --- a/test_cases/arc4_types/tuples.py +++ b/test_cases/arc4_types/tuples.py @@ -1,7 +1,7 @@ import typing from algopy import Bytes, Contract, UInt64, subroutine -from algopy.arc4 import Bool, String, Tuple, UInt8 +from algopy.arc4 import Bool, Byte, DynamicBytes, String, Tuple, UInt8 TestTuple: typing.TypeAlias = Tuple[UInt8, UInt8, String, String, UInt8] @@ -46,6 +46,8 @@ def approval_program(self) -> bool: assert concat.native == "hello world" assert total == 258 + self.test_copy() + return True def clear_state_program(self) -> bool: @@ -63,3 +65,15 @@ def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: text = c.native + " " + d.native return total, String(text) + + @subroutine + def test_copy(self) -> None: + tup = Tuple((UInt8(), DynamicBytes())) + tup[1].append(Byte()) + + assert tup[1] == DynamicBytes(0) + + tup2 = tup.copy() + tup[1][0] = Byte(1) + + assert tup[1] != tup2[1]