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

    // 335f555f545952595ff3
    op_t program[] = {
        CALLER, PUSH0, SSTORE,
        PUSH0, SLOAD, MSIZE, MSTORE,
        MSIZE, PUSH0, RETURN,
    };
    address_t from = AddressFromHex42("0x4a6f6B9fF1fc974096f9063a45Fd12bD5B928AD1");
    uint64_t gas = 81780;
    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 == 32);
    for (int i = 0; i < 12; i++) {
        assert(result.returnData.content[i] == 0);
    }
    assert(memcmp(result.returnData.content + 12, from.address, 20) == 0);
    assert(result.gasRemaining == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb $0x0, %al
callq 0xcfc0
movq 0x1a4f7(%rip), %rax     # 0x1f350
movq %rax, -0xa(%rbp)
movw 0x1a4f4(%rip), %ax      # 0x1f358
movw %ax, -0x2(%rbp)
leaq -0x20(%rbp), %rdi
leaq 0x16191(%rip), %rsi     # 0x1b004
addq $0x2, %rsi
callq 0x3380
movq $0x13f74, -0x28(%rbp)   # imm = 0x13F74
leaq -0xa(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0xa, -0x48(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x34(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
leaq -0x88(%rbp), %rdi
leaq -0x20(%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, -0x78(%rbp)
jne 0x4edb
jmp 0x4efa
leaq 0x1614d(%rip), %rdi     # 0x1b02f
leaq 0x16167(%rip), %rsi     # 0x1b050
movl $0x318, %edx            # imm = 0x318
leaq 0x16720(%rip), %rcx     # 0x1b615
callq 0x3040
movl $0x80d9b122, %eax       # imm = 0x80D9B122
cmpq %rax, -0x70(%rbp)
jne 0x4f07
jmp 0x4f26
leaq 0x1615d(%rip), %rdi     # 0x1b06b
leaq 0x1613b(%rip), %rsi     # 0x1b050
movl $0x319, %edx            # imm = 0x319
leaq 0x166f4(%rip), %rcx     # 0x1b615
callq 0x3040
movabsq $-0x23c5e9023be06931, %rax # imm = 0xDC3A16FDC41F96CF
cmpq %rax, -0x68(%rbp)
jne 0x4f38
jmp 0x4f57
leaq 0x16156(%rip), %rdi     # 0x1b095
leaq 0x1610a(%rip), %rsi     # 0x1b050
movl $0x31a, %edx            # imm = 0x31A
leaq 0x166c3(%rip), %rcx     # 0x1b615
callq 0x3040
movabsq $0x10ffe7e38d227c3, %rax # imm = 0x10FFE7E38D227C3
cmpq %rax, -0x60(%rbp)
jne 0x4f69
jmp 0x4f88
leaq 0x16157(%rip), %rdi     # 0x1b0c7
leaq 0x160d9(%rip), %rsi     # 0x1b050
movl $0x31b, %edx            # imm = 0x31B
leaq 0x16692(%rip), %rcx     # 0x1b615
callq 0x3040
cmpq $0x20, -0x88(%rbp)
jne 0x4f94
jmp 0x4fb3
leaq 0x161ac(%rip), %rdi     # 0x1b147
leaq 0x160ae(%rip), %rsi     # 0x1b050
movl $0x31c, %edx            # imm = 0x31C
leaq 0x16667(%rip), %rcx     # 0x1b615
callq 0x3040
movl $0x0, -0x8c(%rbp)
cmpl $0xc, -0x8c(%rbp)
jge 0x500e
movq -0x80(%rbp), %rax
movslq -0x8c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x4fdc
jmp 0x4ffb
leaq 0x165ed(%rip), %rdi     # 0x1b5d0
leaq 0x16066(%rip), %rsi     # 0x1b050
movl $0x31e, %edx            # imm = 0x31E
leaq 0x1661f(%rip), %rcx     # 0x1b615
callq 0x3040
jmp 0x4ffd
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x4fbd
movq -0x80(%rbp), %rdi
addq $0xc, %rdi
leaq -0x20(%rbp), %rsi
movl $0x14, %edx
callq 0x3090
cmpl $0x0, %eax
jne 0x502b
jmp 0x504a
leaq 0x165fc(%rip), %rdi     # 0x1b62e
leaq 0x16017(%rip), %rsi     # 0x1b050
movl $0x320, %edx            # imm = 0x320
leaq 0x165d0(%rip), %rcx     # 0x1b615
callq 0x3040
cmpq $0x0, -0x58(%rbp)
jne 0x5053
jmp 0x5072
leaq 0x160bb(%rip), %rdi     # 0x1b115
leaq 0x15fef(%rip), %rsi     # 0x1b050
movl $0x321, %edx            # imm = 0x321
leaq 0x165a8(%rip), %rcx     # 0x1b615
callq 0x3040
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)