// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/src/evm.c
// Function: evmInit
void evmInit() {
    callstack.next = callstack.bottom;
    while (emptyAccount --> accounts) {
        storage_t *storage = emptyAccount->storage;
        while (storage != NULL) {
            void *toFree = storage;
            storage = storage->next;
            free(toFree);
        }
        tstorage_t *tstorage = emptyAccount->tstorage;
        while (tstorage != NULL) {
            void *toFree = tstorage;
            tstorage = tstorage->next;
            free(toFree);
        }
        emptyAccount->storage = NULL;
        emptyAccount->tstorage = NULL;
        emptyAccount->warm = 0;
        bzero(emptyAccount->address.address, 20);
        op_t *code = emptyAccount->code.content;
        if (code != NULL) {
            free(code);
        }
        emptyAccount->code.content = NULL;
    }
    emptyAccount = accounts;
    evmIteration++;
    refundCounter = 0;
    logIndex = 0;
    coinbase = AddressFromHex42("0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97");
    account_t *coinbaseAccount = getAccount(coinbase);
    coinbaseAccount->balance[0] = 0x1;
    coinbaseAccount->balance[1] = 0xd82f5899;
    coinbaseAccount->balance[2] = 0x461084bd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x1895e(%rip), %rax     # 0x20a60
movq %rax, 0x2024000(%rax)
movq 0x203c960(%rip), %rax   # 0x2044a70
leaq -0x50(%rax), %r14
movq %r14, 0x203c955(%rip)   # 0x2044a70
leaq 0x203c95e(%rip), %rbx   # 0x2044a80
cmpq %rbx, %rax
jbe 0x81b9
movq -0x10(%rax), %rdi
testq %rdi, %rdi
je 0x814c
movq 0x68(%rdi), %r14
callq 0x3040
movq %r14, %rdi
testq %r14, %r14
jne 0x8134
movq 0x203c924(%rip), %r14   # 0x2044a70
movq 0x48(%r14), %rdi
testq %rdi, %rdi
je 0x816d
movq 0x48(%rdi), %r14
callq 0x3040
movq %r14, %rdi
testq %r14, %r14
jne 0x8155
movq 0x203c903(%rip), %r14   # 0x2044a70
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movups %xmm0, 0x38(%r14)
movq $0x0, 0x48(%r14)
movq 0x28(%r14), %rdi
movq %r14, %rax
testq %rdi, %rdi
je 0x81a1
callq 0x3040
movq 0x203c8cf(%rip), %rax   # 0x2044a70
movq $0x0, 0x28(%r14)
leaq -0x50(%rax), %r14
movq %r14, 0x203c8bc(%rip)   # 0x2044a70
jmp 0x8122
incq 0x20508c0(%rip)         # 0x2058a80
movq %rbx, 0x203c8a9(%rip)   # 0x2044a70
movq $0x0, 0x20508b6(%rip) # 0x2058a88
movw $0x0, 0x20508b5(%rip)   # 0x2058a90
movq $-0x2, %r14
leaq 0x20(%rsp), %r15
leaq 0xa7ce(%rip), %r12      # 0x129bc
movq 0xfe03(%rip), %r13      # 0x17ff8
leaq 0x9faf(%rip), %rbx      # 0x121ab
movzbl 0x4(%r14,%r12), %ecx
leal -0x30(%rcx), %ebp
cmpb $0xa, %bpl
jb 0x8223
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x8217
addb $-0x57, %cl
jmp 0x8221
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x8261
addb $-0x37, %cl
movl %ecx, %ebp
movzbl 0x5(%r14,%r12), %ecx
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x8248
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x823c
addb $-0x57, %cl
jmp 0x8246
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x8276
addb $-0x37, %cl
movl %ecx, %eax
shlb $0x4, %bpl
addb %al, %bpl
movb %bpl, (%r15)
addq $0x2, %r14
incq %r15
cmpq $0x26, %r14
jb 0x81fc
jmp 0x828a
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x31d0
movb $-0x1, %bpl
jmp 0x8223
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x31d0
movb $-0x1, %al
jmp 0x8248
movl 0x30(%rsp), %eax
movl %eax, 0x2050814(%rip)   # 0x2058aa8
movups 0x20(%rsp), %xmm0
movups %xmm0, 0x20507f8(%rip)  # 0x2058a98
movl 0x2050802(%rip), %eax   # 0x2058aa8
movl %eax, 0x10(%rsp)
movups 0x20507e7(%rip), %xmm0  # 0x2058a98
movups %xmm0, (%rsp)
callq 0x82de
movabsq $-0x27d0a766ffffffff, %rcx # imm = 0xD82F589900000001
movq %rcx, 0x14(%rax)
movl $0x461084bd, 0x1c(%rax) # imm = 0x461084BD
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq