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

    // 5f5f5560015f5560025f555f5f5560015f55600160015560026001555f60015500
    op_t program[] = {
        PUSH0, PUSH0, SSTORE,
        PUSH1, 0x01, PUSH0, SSTORE,
        PUSH1, 0x02, PUSH0, SSTORE,
        PUSH0, PUSH0, SSTORE,
        PUSH1, 0x01, PUSH0, SSTORE,
        PUSH1, 0x01, PUSH1, 0x01, SSTORE,
        PUSH1, 0x02, PUSH1, 0x01, SSTORE,
        PUSH0, PUSH1, 0x01, SSTORE,
        STOP,
    };
    address_t from = AddressFromHex42("0x4a6f6B9fF1fc974096f9063a45Fd12bD5B928AD1");
    uint64_t gas = 120461;
    val_t value;
    data_t input;
    input.content = program;
    input.size = sizeof(program);

    result_t result = txCreate(from, gas, value, input);
    evmFinalize();
    assert(UPPER(UPPER(result.status)) == 0);
    assert(LOWER(UPPER(result.status)) == 0x80d9b122);
    assert(UPPER(LOWER(result.status)) == 0xdc3a16fdc41f96cf);
    assert(LOWER(LOWER(result.status)) == 0x010ffe7e38d227c3);
    assert(result.returnData.size == 0);
    assert(result.gasRemaining == 25853);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movb $0x0, %al
callq 0xcfc0
leaq -0x30(%rbp), %rdi
leaq 0x1a5b3(%rip), %rsi     # 0x1f800
movl $0x21, %edx
callq 0x30c0
leaq -0x48(%rbp), %rdi
leaq 0x15da2(%rip), %rsi     # 0x1b004
addq $0x2, %rsi
callq 0x3380
movq $0x1d68d, -0x50(%rbp)   # imm = 0x1D68D
leaq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x21, -0x70(%rbp)
movq -0x50(%rbp), %rsi
leaq -0x5c(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %r8
leaq -0xb0(%rbp), %rdi
leaq -0x48(%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
movb $0x0, %al
callq 0xd4d0
cmpq $0x0, -0xa0(%rbp)
jne 0x52cd
jmp 0x52ec
leaq 0x15d5b(%rip), %rdi     # 0x1b02f
leaq 0x15d75(%rip), %rsi     # 0x1b050
movl $0x357, %edx            # imm = 0x357
leaq 0x163c7(%rip), %rcx     # 0x1b6ae
callq 0x3040
movl $0x80d9b122, %eax       # imm = 0x80D9B122
cmpq %rax, -0x98(%rbp)
jne 0x52fc
jmp 0x531b
leaq 0x15d68(%rip), %rdi     # 0x1b06b
leaq 0x15d46(%rip), %rsi     # 0x1b050
movl $0x358, %edx            # imm = 0x358
leaq 0x16398(%rip), %rcx     # 0x1b6ae
callq 0x3040
movabsq $-0x23c5e9023be06931, %rax # imm = 0xDC3A16FDC41F96CF
cmpq %rax, -0x90(%rbp)
jne 0x5330
jmp 0x534f
leaq 0x15d5e(%rip), %rdi     # 0x1b095
leaq 0x15d12(%rip), %rsi     # 0x1b050
movl $0x359, %edx            # imm = 0x359
leaq 0x16364(%rip), %rcx     # 0x1b6ae
callq 0x3040
movabsq $0x10ffe7e38d227c3, %rax # imm = 0x10FFE7E38D227C3
cmpq %rax, -0x88(%rbp)
jne 0x5364
jmp 0x5383
leaq 0x15d5c(%rip), %rdi     # 0x1b0c7
leaq 0x15cde(%rip), %rsi     # 0x1b050
movl $0x35a, %edx            # imm = 0x35A
leaq 0x16330(%rip), %rcx     # 0x1b6ae
callq 0x3040
cmpq $0x0, -0xb0(%rbp)
jne 0x538f
jmp 0x53ae
leaq 0x15d63(%rip), %rdi     # 0x1b0f9
leaq 0x15cb3(%rip), %rsi     # 0x1b050
movl $0x35b, %edx            # imm = 0x35B
leaq 0x16305(%rip), %rcx     # 0x1b6ae
callq 0x3040
cmpq $0x64fd, -0x80(%rbp)    # imm = 0x64FD
jne 0x53ba
jmp 0x53d9
leaq 0x16309(%rip), %rdi     # 0x1b6ca
leaq 0x15c88(%rip), %rsi     # 0x1b050
movl $0x35c, %edx            # imm = 0x35C
leaq 0x162da(%rip), %rcx     # 0x1b6ae
callq 0x3040
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)