// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
leaq 0x201ce(%rip), %rax     # 0x28a50
movq %rax, 0x20441c7(%rip)   # 0x204ca50
movq 0x20441d0(%rip), %rax   # 0x204ca60
movq %rax, %rcx
addq $-0x50, %rcx
movq %rcx, 0x20441c2(%rip)   # 0x204ca60
leaq 0x20441cb(%rip), %rcx   # 0x204ca70
cmpq %rcx, %rax
jbe 0x898b
movq 0x20441ab(%rip), %rax   # 0x204ca60
movq 0x40(%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x88e3
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3040
jmp 0x88bd
movq 0x2044176(%rip), %rax   # 0x204ca60
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8918
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3040
jmp 0x88f2
movq 0x2044141(%rip), %rax   # 0x204ca60
movq $0x0, 0x40(%rax)
movq 0x2044132(%rip), %rax   # 0x204ca60
movq $0x0, 0x48(%rax)
movq 0x2044123(%rip), %rax   # 0x204ca60
movq $0x0, 0x38(%rax)
movq 0x2044114(%rip), %rdi   # 0x204ca60
xorl %esi, %esi
movl $0x14, %edx
callq 0x3140
movq 0x2044101(%rip), %rax   # 0x204ca60
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8977
movq -0x28(%rbp), %rdi
callq 0x3040
movq 0x20440e2(%rip), %rax   # 0x204ca60
movq $0x0, 0x28(%rax)
jmp 0x8889
leaq 0x20440de(%rip), %rax   # 0x204ca70
movq %rax, 0x20440c7(%rip)   # 0x204ca60
movq 0x20580d0(%rip), %rax   # 0x2060a70
addq $0x1, %rax
movq %rax, 0x20580c5(%rip)   # 0x2060a70
movq $0x0, 0x20580c2(%rip) # 0x2060a78
movw $0x0, 0x20580c1(%rip)   # 0x2060a80
leaq -0x3c(%rbp), %rdi
leaq 0x12102(%rip), %rsi     # 0x1aacc
addq $0x2, %rsi
callq 0x8a60
movq -0x3c(%rbp), %rax
movq %rax, 0x20580a4(%rip)   # 0x2060a82
movq -0x34(%rbp), %rax
movq %rax, 0x20580a1(%rip)   # 0x2060a8a
movl -0x2c(%rbp), %eax
movl %eax, 0x20580a0(%rip)   # 0x2060a92
movq 0x2058089(%rip), %rax   # 0x2060a82
movq %rax, -0x60(%rbp)
movq 0x2058086(%rip), %rax   # 0x2060a8a
movq %rax, -0x58(%rbp)
movl 0x2058084(%rip), %eax   # 0x2060a92
movl %eax, -0x50(%rbp)
leaq -0x60(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0x8ac0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x48(%rbp), %rax
movl $0xd82f5899, 0x18(%rax) # imm = 0xD82F5899
movq -0x48(%rbp), %rax
movl $0x461084bd, 0x1c(%rax) # imm = 0x461084BD
addq $0x80, %rsp
popq %rbp
retq
nop