// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
xorl %eax, %eax
callq 0xca4d
movabsq $0x595259545f555f33, %rax # imm = 0x595259545F555F33
movq %rax, 0x20(%rsp)
movw $0xf35f, 0x28(%rsp)     # imm = 0xF35F
movq $-0x2, %r14
leaq 0x30(%rsp), %r15
leaq 0xe6d7(%rip), %r12      # 0x14070
movq 0x18658(%rip), %r13     # 0x1dff8
leaq 0x11736(%rip), %rbx     # 0x170dd
movzbl 0x4(%r14,%r12), %ecx
leal -0x30(%rcx), %ebp
cmpb $0xa, %bpl
jb 0x59ce
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x59c2
addb $-0x57, %cl
jmp 0x59cc
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x5a0c
addb $-0x37, %cl
movl %ecx, %ebp
movzbl 0x5(%r14,%r12), %ecx
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x59f3
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x59e7
addb $-0x57, %cl
jmp 0x59f1
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x5a21
addb $-0x37, %cl
movl %ecx, %eax
shlb $0x4, %bpl
addb %al, %bpl
movb %bpl, (%r15)
addq $0x2, %r14
incq %r15
cmpq $0x26, %r14
jb 0x59a7
jmp 0x5a35
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %bpl
jmp 0x59ce
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %al
jmp 0x59f3
movl 0x40(%rsp), %eax
movl %eax, 0x10(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x48(%rsp), %rbx
leaq 0x8c(%rsp), %rdx
leaq 0x20(%rsp), %r8
movl $0x13f74, %esi          # imm = 0x13F74
movl $0xa, %ecx
movq %rbx, %rdi
callq 0xd683
xorl %eax, %eax
callq 0xcd49
cmpq $0x0, 0x10(%rbx)
jne 0x5b46
movl $0x80d9b122, %eax       # imm = 0x80D9B122
cmpq %rax, 0x60(%rsp)
jne 0x5b65
movabsq $-0x23c5e9023be06931, %rax # imm = 0xDC3A16FDC41F96CF
cmpq %rax, 0x68(%rsp)
jne 0x5b84
movabsq $0x10ffe7e38d227c3, %rax # imm = 0x10FFE7E38D227C3
cmpq %rax, 0x70(%rsp)
jne 0x5ba3
cmpq $0x20, 0x48(%rsp)
jne 0x5bc2
movq 0x50(%rsp), %rax
xorl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x5b27
incq %rcx
cmpq $0xc, %rcx
jne 0x5ac9
movdqu 0xc(%rax), %xmm0
movdqu 0x30(%rsp), %xmm1
pcmpeqb %xmm0, %xmm1
movd 0x1c(%rax), %xmm0
movd 0x40(%rsp), %xmm2
pcmpeqb %xmm0, %xmm2
pand %xmm1, %xmm2
pmovmskb %xmm2, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x5be1
cmpq $0x0, 0x78(%rsp)
jne 0x5c00
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xeb0e(%rip), %rdi      # 0x1463c
leaq 0xe587(%rip), %rsi      # 0x140bc
leaq 0xeb45(%rip), %rcx      # 0x14681
movl $0x31e, %edx            # imm = 0x31E
callq 0x3040
leaq 0xe54e(%rip), %rdi      # 0x1409b
leaq 0xe568(%rip), %rsi      # 0x140bc
leaq 0xeb26(%rip), %rcx      # 0x14681
movl $0x318, %edx            # imm = 0x318
callq 0x3040
leaq 0xe56b(%rip), %rdi      # 0x140d7
leaq 0xe549(%rip), %rsi      # 0x140bc
leaq 0xeb07(%rip), %rcx      # 0x14681
movl $0x319, %edx            # imm = 0x319
callq 0x3040
leaq 0xe576(%rip), %rdi      # 0x14101
leaq 0xe52a(%rip), %rsi      # 0x140bc
leaq 0xeae8(%rip), %rcx      # 0x14681
movl $0x31a, %edx            # imm = 0x31A
callq 0x3040
leaq 0xe589(%rip), %rdi      # 0x14133
leaq 0xe50b(%rip), %rsi      # 0x140bc
leaq 0xeac9(%rip), %rcx      # 0x14681
movl $0x31b, %edx            # imm = 0x31B
callq 0x3040
leaq 0xe5ea(%rip), %rdi      # 0x141b3
leaq 0xe4ec(%rip), %rsi      # 0x140bc
leaq 0xeaaa(%rip), %rcx      # 0x14681
movl $0x31c, %edx            # imm = 0x31C
callq 0x3040
leaq 0xeab2(%rip), %rdi      # 0x1469a
leaq 0xe4cd(%rip), %rsi      # 0x140bc
leaq 0xea8b(%rip), %rcx      # 0x14681
movl $0x320, %edx            # imm = 0x320
callq 0x3040
leaq 0xe57a(%rip), %rdi      # 0x14181
leaq 0xe4ae(%rip), %rsi      # 0x140bc
leaq 0xea6c(%rip), %rcx      # 0x14681
movl $0x321, %edx            # imm = 0x321
callq 0x3040