// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/tst/evm.c
// Function: test_shl
void test_shl() {
    evmInit();

    address_t from = AddressFromHex42("0x4a6f6B9fF1fc974096f9063a45Fd12bD5B928AD1");
    uint64_t gas = 0x13540;
    val_t value;
    data_t input;

    // 5f60031b595260035f1b5952613377601d1b5952601d6133771b5952595ff3
    op_t program[] = {
        PUSH0, PUSH1, 3, SHL, MSIZE, MSTORE,
        PUSH1, 3, PUSH0, SHL, MSIZE, MSTORE,
        PUSH2, 0x33, 0x77, PUSH1, 29, SHL, MSIZE, MSTORE,
        PUSH1, 29, PUSH2, 0x33, 0x77, SHL, MSIZE, MSTORE,
        MSIZE, PUSH0, RETURN
    };

    input.content = program;
    input.size = sizeof(program);

    result_t result = txCreate(from, gas, value, input);

    op_t expected[] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6e, 0xe0, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    };
    assert(result.returnData.size == sizeof(expected));
    assert(memcmp(result.returnData.content, expected, sizeof(expected)) == 0);
    assert(result.gasRemaining == 0);

    evmFinalize();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
xorl %eax, %eax
callq 0xca4d
movq $-0x2, %r14
leaq 0x18(%rsp), %r15
leaq 0xfdd6(%rip), %r12      # 0x14070
movq 0x19d57(%rip), %r13     # 0x1dff8
leaq 0x12e35(%rip), %rbx     # 0x170dd
movzbl 0x4(%r14,%r12), %ecx
leal -0x30(%rcx), %ebp
cmpb $0xa, %bpl
jb 0x42cf
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x42c3
addb $-0x57, %cl
jmp 0x42cd
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x430d
addb $-0x37, %cl
movl %ecx, %ebp
movzbl 0x5(%r14,%r12), %ecx
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x42f4
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x42e8
addb $-0x57, %cl
jmp 0x42f2
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x4322
addb $-0x37, %cl
movl %ecx, %eax
shlb $0x4, %bpl
addb %al, %bpl
movb %bpl, (%r15)
addq $0x2, %r14
incq %r15
cmpq $0x26, %r14
jb 0x42a8
jmp 0x4336
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %bpl
jmp 0x42cf
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %al
jmp 0x42f4
movups 0x12e42(%rip), %xmm0    # 0x1717f
leaq 0x100(%rsp), %r8
movups %xmm0, 0xf(%r8)
movaps 0x12e1f(%rip), %xmm0    # 0x17170
movaps %xmm0, (%r8)
movl 0x28(%rsp), %eax
movl %eax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0xc0(%rsp), %rbx
leaq 0xb4(%rsp), %rdx
movl $0x13540, %esi          # imm = 0x13540
movl $0x1f, %ecx
movq %rbx, %rdi
callq 0xd683
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movb $0x3, 0x6f(%rsp)
movw $0x6e06, 0x8a(%rsp)     # imm = 0x6E06
movb $-0x20, 0x8c(%rsp)
cmpq $0x80, (%rbx)
jne 0x441b
movq 0xc8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movl $0x80, %edx
callq 0x30d0
testl %eax, %eax
jne 0x443a
cmpq $0x0, 0xf0(%rsp)
jne 0x4459
xorl %eax, %eax
callq 0xcd49
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xff73(%rip), %rdi      # 0x14395
leaq 0xfc93(%rip), %rsi      # 0x140bc
leaq 0xff90(%rip), %rcx      # 0x143c0
movl $0x9a, %edx
callq 0x3040
leaq 0xff8f(%rip), %rdi      # 0x143d0
leaq 0xfc74(%rip), %rsi      # 0x140bc
leaq 0xff71(%rip), %rcx      # 0x143c0
movl $0x9b, %edx
callq 0x3040
leaq 0xfd21(%rip), %rdi      # 0x14181
leaq 0xfc55(%rip), %rsi      # 0x140bc
leaq 0xff52(%rip), %rcx      # 0x143c0
movl $0x9c, %edx
callq 0x3040