// File: /workspace/github_c_makefile_star2_O1/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 0xca7b
movq $-0x2, %r14
leaq 0x18(%rsp), %r15
leaq 0xfe1b(%rip), %r12      # 0x14050
movq 0x19dbc(%rip), %r13     # 0x1dff8
leaq 0x12e7a(%rip), %rbx     # 0x170bd
movzbl 0x4(%r14,%r12), %ecx
leal -0x30(%rcx), %ebp
cmpb $0xa, %bpl
jb 0x426a
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x425e
addb $-0x57, %cl
jmp 0x4268
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x42a8
addb $-0x37, %cl
movl %ecx, %ebp
movzbl 0x5(%r14,%r12), %ecx
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x428f
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x4283
addb $-0x57, %cl
jmp 0x428d
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x42bd
addb $-0x37, %cl
movl %ecx, %eax
shlb $0x4, %bpl
addb %al, %bpl
movb %bpl, (%r15)
addq $0x2, %r14
incq %r15
cmpq $0x26, %r14
jb 0x4243
jmp 0x42d1
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %bpl
jmp 0x426a
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %al
jmp 0x428f
movups 0x12e87(%rip), %xmm0    # 0x1715f
leaq 0x100(%rsp), %r8
movups %xmm0, 0xf(%r8)
movaps 0x12e64(%rip), %xmm0    # 0x17150
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 0xd845
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 0x43b6
movq 0xc8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movl $0x80, %edx
callq 0x30d0
testl %eax, %eax
jne 0x43d5
cmpq $0x0, 0xf0(%rsp)
jne 0x43f4
xorl %eax, %eax
callq 0xcf29
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xffb8(%rip), %rdi      # 0x14375
leaq 0xfcd8(%rip), %rsi      # 0x1409c
leaq 0xffd5(%rip), %rcx      # 0x143a0
movl $0x9a, %edx
callq 0x3040
leaq 0xffd4(%rip), %rdi      # 0x143b0
leaq 0xfcb9(%rip), %rsi      # 0x1409c
leaq 0xffb6(%rip), %rcx      # 0x143a0
movl $0x9b, %edx
callq 0x3040
leaq 0xfd66(%rip), %rdi      # 0x14161
leaq 0xfc9a(%rip), %rsi      # 0x1409c
leaq 0xff97(%rip), %rcx      # 0x143a0
movl $0x9c, %edx
callq 0x3040