// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movb $0x0, %al
callq 0xcfc0
leaq -0x18(%rbp), %rdi
leaq 0x176b7(%rip), %rsi     # 0x1b004
addq $0x2, %rsi
callq 0x3380
movq $0x13540, -0x20(%rbp)   # imm = 0x13540
movq 0x1a7ab(%rip), %rax     # 0x1e110
movq %rax, -0x60(%rbp)
movq 0x1a7a8(%rip), %rax     # 0x1e118
movq %rax, -0x58(%rbp)
movq 0x1a7a5(%rip), %rax     # 0x1e120
movq %rax, -0x50(%rbp)
movl 0x1a7a3(%rip), %eax     # 0x1e128
movl %eax, -0x48(%rbp)
movw 0x1a79d(%rip), %ax      # 0x1e12c
movw %ax, -0x44(%rbp)
movb 0x1a795(%rip), %al      # 0x1e12e
movb %al, -0x42(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x1f, -0x40(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %r8
leaq -0xa0(%rbp), %rdi
leaq -0x18(%rbp), %rax
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %r9
movq %r9, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0xe270
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x3060
movb $0x3, -0xe1(%rbp)
movb $0x6, -0xc6(%rbp)
movb $0x6e, -0xc5(%rbp)
movb $-0x20, -0xc4(%rbp)
cmpq $0x80, -0xa0(%rbp)
jne 0x3a21
jmp 0x3a40
leaq 0x17901(%rip), %rdi     # 0x1b329
leaq 0x17621(%rip), %rsi     # 0x1b050
movl $0x9a, %edx
leaq 0x17919(%rip), %rcx     # 0x1b354
callq 0x3040
movq -0x98(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0x80, %edx
callq 0x3090
cmpl $0x0, %eax
jne 0x3a5f
jmp 0x3a7e
leaq 0x178fe(%rip), %rdi     # 0x1b364
leaq 0x175e3(%rip), %rsi     # 0x1b050
movl $0x9b, %edx
leaq 0x178db(%rip), %rcx     # 0x1b354
callq 0x3040
cmpq $0x0, -0x70(%rbp)
jne 0x3a87
jmp 0x3aa6
leaq 0x17687(%rip), %rdi     # 0x1b115
leaq 0x175bb(%rip), %rsi     # 0x1b050
movl $0x9c, %edx
leaq 0x178b3(%rip), %rcx     # 0x1b354
callq 0x3040
movb $0x0, %al
callq 0xd4d0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)