// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x88, %rsp
xorl %eax, %eax
callq 0xaa8d
movabsq $0x595259545f555f33, %rax # imm = 0x595259545F555F33
leaq 0x70(%rsp), %rbx
movq %rax, (%rbx)
movw $0xf35f, 0x8(%rbx)      # imm = 0xF35F
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x332c
movl 0x10(%r14), %eax
movl %eax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
leaq 0x18(%rsp), %r14
leaq 0x7c(%rsp), %rdx
pushq $0xa
popq %rcx
movl $0x13f74, %esi          # imm = 0x13F74
movq %r14, %rdi
movq %rbx, %r8
callq 0xb68f
xorl %eax, %eax
callq 0xada8
cmpq $0x0, 0x10(%r14)
jne 0x48fb
movl $0x80d9b122, %eax       # imm = 0x80D9B122
cmpq %rax, 0x30(%rsp)
jne 0x491a
movabsq $-0x23c5e9023be06931, %rax # imm = 0xDC3A16FDC41F96CF
cmpq %rax, 0x38(%rsp)
jne 0x4939
movabsq $0x10ffe7e38d227c3, %rax # imm = 0x10FFE7E38D227C3
cmpq %rax, 0x40(%rsp)
jne 0x4958
cmpq $0x20, 0x18(%rsp)
jne 0x4977
movq 0x20(%rsp), %rdi
xorl %eax, %eax
cmpq $0xc, %rax
je 0x48cb
cmpb $0x0, (%rdi,%rax)
leaq 0x1(%rax), %rax
je 0x489c
leaq 0xcd1d(%rip), %rdi      # 0x115d0
leaq 0xc796(%rip), %rsi      # 0x11050
leaq 0xcd54(%rip), %rcx      # 0x11615
movl $0x31e, %edx            # imm = 0x31E
callq 0x3040
addq $0xc, %rdi
leaq 0x58(%rsp), %rsi
pushq $0x14
popq %rdx
callq 0x30d0
testl %eax, %eax
jne 0x4996
cmpq $0x0, 0x48(%rsp)
jne 0x49b5
addq $0x88, %rsp
popq %rbx
popq %r14
retq
leaq 0xc72d(%rip), %rdi      # 0x1102f
leaq 0xc747(%rip), %rsi      # 0x11050
leaq 0xcd05(%rip), %rcx      # 0x11615
movl $0x318, %edx            # imm = 0x318
callq 0x3040
leaq 0xc74a(%rip), %rdi      # 0x1106b
leaq 0xc728(%rip), %rsi      # 0x11050
leaq 0xcce6(%rip), %rcx      # 0x11615
movl $0x319, %edx            # imm = 0x319
callq 0x3040
leaq 0xc755(%rip), %rdi      # 0x11095
leaq 0xc709(%rip), %rsi      # 0x11050
leaq 0xccc7(%rip), %rcx      # 0x11615
movl $0x31a, %edx            # imm = 0x31A
callq 0x3040
leaq 0xc768(%rip), %rdi      # 0x110c7
leaq 0xc6ea(%rip), %rsi      # 0x11050
leaq 0xcca8(%rip), %rcx      # 0x11615
movl $0x31b, %edx            # imm = 0x31B
callq 0x3040
leaq 0xc7c9(%rip), %rdi      # 0x11147
leaq 0xc6cb(%rip), %rsi      # 0x11050
leaq 0xcc89(%rip), %rcx      # 0x11615
movl $0x31c, %edx            # imm = 0x31C
callq 0x3040
leaq 0xcc91(%rip), %rdi      # 0x1162e
leaq 0xc6ac(%rip), %rsi      # 0x11050
leaq 0xcc6a(%rip), %rcx      # 0x11615
movl $0x320, %edx            # imm = 0x320
callq 0x3040
leaq 0xc759(%rip), %rdi      # 0x11115
leaq 0xc68d(%rip), %rsi      # 0x11050
leaq 0xcc4b(%rip), %rcx      # 0x11615
movl $0x321, %edx            # imm = 0x321
callq 0x3040