// File: /workspace/github_c_makefile_star2_O1/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 0x1994c(%rip), %rax     # 0x21a60
movq %rax, 0x2024000(%rax)
movq 0x203d94e(%rip), %rax   # 0x2045a70
leaq -0x50(%rax), %rcx
movq %rcx, 0x203d943(%rip)   # 0x2045a70
leaq 0x203d94c(%rip), %rbx   # 0x2045a80
cmpq %rbx, %rax
jbe 0x81c8
movq -0x10(%rax), %rdi
testq %rdi, %rdi
je 0x8157
movq 0x68(%rdi), %r14
callq 0x3040
movq %r14, %rdi
testq %r14, %r14
jne 0x8146
movq 0x203d912(%rip), %rax   # 0x2045a70
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x8178
movq 0x48(%rdi), %r14
callq 0x3040
movq %r14, %rdi
testq %r14, %r14
jne 0x8167
movq 0x203d8f1(%rip), %r14   # 0x2045a70
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movups %xmm0, 0x38(%r14)
movq $0x0, 0x48(%r14)
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x81a9
callq 0x3040
movq $0x0, 0x28(%r14)
movq 0x203d8b8(%rip), %rax   # 0x2045a70
leaq -0x50(%rax), %rcx
movq %rcx, 0x203d8ad(%rip)   # 0x2045a70
jmp 0x8134
incq 0x20518b1(%rip)         # 0x2059a80
movq %rbx, 0x203d89a(%rip)   # 0x2045a70
movq $0x0, 0x20518a7(%rip) # 0x2059a88
movw $0x0, 0x20518a6(%rip)   # 0x2059a90
movq $-0x2, %r14
leaq 0x20(%rsp), %r15
leaq 0xa7bf(%rip), %r12      # 0x129bc
movq 0x10df4(%rip), %r13     # 0x18ff8
leaq 0x9fa0(%rip), %rbx      # 0x121ab
movzbl 0x4(%r14,%r12), %ecx
leal -0x30(%rcx), %ebp
cmpb $0xa, %bpl
jb 0x8232
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x8226
addb $-0x57, %cl
jmp 0x8230
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x8270
addb $-0x37, %cl
movl %ecx, %ebp
movzbl 0x5(%r14,%r12), %ecx
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x8257
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x824b
addb $-0x57, %cl
jmp 0x8255
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x8285
addb $-0x37, %cl
movl %ecx, %eax
shlb $0x4, %bpl
addb %al, %bpl
movb %bpl, (%r15)
addq $0x2, %r14
incq %r15
cmpq $0x26, %r14
jb 0x820b
jmp 0x8299
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x31d0
movb $-0x1, %bpl
jmp 0x8232
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x31d0
movb $-0x1, %al
jmp 0x8257
movl 0x30(%rsp), %eax
movl %eax, 0x2051805(%rip)   # 0x2059aa8
movups 0x20(%rsp), %xmm0
movups %xmm0, 0x20517e9(%rip)  # 0x2059a98
movl 0x20517f3(%rip), %eax   # 0x2059aa8
movl %eax, 0x10(%rsp)
movups 0x20517d8(%rip), %xmm0  # 0x2059a98
movups %xmm0, (%rsp)
callq 0x82ed
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