// File: /workspace/github_c_makefile_star2_O3/kobolt[P]curses-collection/cgame/cgame.c
// Function: main.cold.1
static void init_game(void)
{
  int i;

  money_collected  = 0;
  steps_taken      = 0;
  enemy_idle_count = 0;

  srandom(time(NULL));

  player.symbol = '@';
  player.attributes = 0;
  find_empty_spot(&player.y, &player.x);
  draw_object(&player);

  enemy.symbol = 'M';
  enemy.attributes = A_BOLD | COLOR_PAIR(PAIR_YELLOW);
  find_empty_spot(&enemy.y, &enemy.x);
  draw_object(&enemy);

  for (i = 0; i < AMOUNT_OF_MONEY; i++) {
    money[i].symbol = '$';
    money[i].attributes = A_BOLD;
    money[i].taken = 0;
    find_empty_spot(&money[i].y, &money[i].x);
    draw_object(&money[i]);
  }

  for (i = 0; i < AMOUNT_OF_MINES; i++) {
    mines[i].symbol = '*';
    mines[i].attributes = COLOR_PAIR(PAIR_CYAN);
    find_empty_spot(&mines[i].y, &mines[i].x);
    draw_object(&mines[i]);
  }

  for (i = 0; i < AMOUNT_OF_CRATES; i++) {
    crates[i].symbol = '#';
    crates[i].attributes = COLOR_PAIR(PAIR_YELLOW);
    find_empty_spot(&crates[i].y, &crates[i].x);
    draw_object(&crates[i]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
andl $0x0, 0x30fe(%rip)      # 0x4280
andl $0x0, 0x2f5b(%rip)      # 0x40e4
andl $0x0, 0x3108(%rip)      # 0x4298
xorl %edi, %edi
callq 0x10f0
movl %eax, %edi
callq 0x1060
movb $0x40, 0x2f33(%rip)     # 0x40d8
leaq 0x2f24(%rip), %rbx      # 0x40d0
andl $0x0, 0x2f29(%rip)      # 0x40dc
leaq 0x2f1a(%rip), %rsi      # 0x40d4
movq %rbx, %rdi
callq 0x19c1
movq %rbx, %rdi
callq 0x1a85
movb $0x4d, 0x30bb(%rip)     # 0x428c
leaq 0x30ac(%rip), %rbx      # 0x4284
movl $0x200100, 0x30ae(%rip) # imm = 0x200100
leaq 0x309f(%rip), %rsi      # 0x4288
movq %rbx, %rdi
callq 0x19c1
movq %rbx, %rdi
callq 0x1a85
pushq $0x14
popq %r14
leaq 0x2eec(%rip), %rbx      # 0x40f0
movb $0x24, 0x8(%rbx)
movq $0x200000, 0xc(%rbx)    # imm = 0x200000
leaq 0x4(%rbx), %rsi
movq %rbx, %rdi
callq 0x19c1
movq %rbx, %rdi
callq 0x1a85
addq $0x14, %rbx
decq %r14
jne 0x1204
pushq $0xa
popq %r14
leaq 0x3068(%rip), %rbx      # 0x42a0
movb $0x2a, 0x8(%rbx)
movl $0x200, 0xc(%rbx)       # imm = 0x200
leaq 0x4(%rbx), %rsi
movq %rbx, %rdi
callq 0x19c1
movq %rbx, %rdi
callq 0x1a85
addq $0x14, %rbx
decq %r14
jne 0x1238
pushq $0x5
popq %r14
leaq 0x3105(%rip), %rbx      # 0x4370
movb $0x23, 0x8(%rbx)
movl $0x100, 0xc(%rbx)       # imm = 0x100
leaq 0x4(%rbx), %rsi
movq %rbx, %rdi
callq 0x19c1
movq %rbx, %rdi
callq 0x1a85
addq $0x14, %rbx
decq %r14
jne 0x126b
leaq 0x2e36(%rip), %rbx      # 0x40d0
leaq 0x2fe3(%rip), %r14      # 0x4284
leaq 0xe9b(%rip), %r13       # 0x2143
leaq 0xde5(%rip), %rbp       # 0x2094
leaq 0x2e3a(%rip), %r12      # 0x40f0
callq 0x16c1
movq 0x2d16(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
callq 0x1080
leal -0x102(%rax), %ecx
cmpl $0x3, %ecx
jbe 0x12f6
cmpl $0x1b, %eax
je 0x130a
cmpl $0x51, %eax
je 0x130a
cmpl $0x71, %eax
je 0x130a
xorl %esi, %esi
cmpl $0x19a, %eax            # imm = 0x19A
jne 0x1320
leaq 0xdcd(%rip), %r15       # 0x20c1
jmp 0x1323
leaq 0xd87(%rip), %rdx       # 0x2084
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
pushq $0x4
jmp 0x131f
xorl %esi, %esi
leaq 0xdd1(%rip), %r15       # 0x20e4
jmp 0x1323
pushq $0x1
jmp 0x131f
pushq $0x2
jmp 0x131f
pushq $0x3
popq %rsi
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x17a1
cmpl $0x4, %eax
ja 0x1395
movl %eax, %eax
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
incl 0x2da2(%rip)            # 0x40e4
jmp 0x1395
movl 0x2d86(%rip), %eax      # 0x40d0
movl 0x2f30(%rip), %ecx      # 0x4280
movl 0x2d7e(%rip), %edx      # 0x40d4
xorl %esi, %esi
cmpl (%rsi,%r12), %eax
jne 0x1376
cmpl 0x4(%rsi,%r12), %edx
jne 0x1376
incl %ecx
movl %ecx, 0x2f13(%rip)      # 0x4280
movl $0x1, 0x10(%rsi,%r12)
addq $0x14, %rsi
cmpq $0x190, %rsi            # imm = 0x190
jne 0x1358
jmp 0x1395
leaq 0xd64(%rip), %r15       # 0x20f0
jmp 0x1395
leaq 0xd76(%rip), %r15       # 0x210b
callq 0x16c1
movl 0x2ee4(%rip), %eax      # 0x4284
subl 0x2d2a(%rip), %eax      # 0x40d0
movl 0x2edc(%rip), %ecx      # 0x4288
subl 0x2d22(%rip), %ecx      # 0x40d4
js 0x13e1
je 0x13fa
cmpl %eax, %ecx
setg %sil
movl %eax, %edx
negl %edx
cmpl %edx, %ecx
setl %dil
testb %dil, %sil
jne 0x13fa
xorl %esi, %esi
cmpl %eax, %ecx
setl %sil
cmpl %edx, %ecx
leal 0x1(%rsi,%rsi), %esi
pushq $0x1
popq %rax
cmovlel %eax, %esi
jmp 0x1409
movl %eax, %edx
negl %edx
cmpl %edx, %ecx
setg %sil
cmpl %eax, %ecx
setl %dil
testb %dil, %sil
je 0x148b
pushq $0x3
popq %rsi
testl %eax, %eax
jg 0x1409
shrl $0x1d, %eax
andl $-0x4, %eax
movl %eax, %esi
movq %r14, %rdi
callq 0x17a1
cmpl $0x1, %eax
jne 0x1459
movl 0x2e7c(%rip), %eax      # 0x4298
leal 0x1(%rax), %ecx
movl %ecx, 0x2e73(%rip)      # 0x4298
cmpl $0x2, %eax
jle 0x1459
callq 0x1100
cqto
pushq $0x4
popq %rcx
idivq %rcx
leal 0x1(%rdx), %esi
cmpq $0x4, %rdx
movl $0x0, %eax
cmovael %eax, %esi
movq %r14, %rdi
callq 0x17a1
testl %eax, %eax
jne 0x1459
andl $0x0, 0x2e3f(%rip)      # 0x4298
movl 0x2c71(%rip), %eax      # 0x40d0
cmpl 0x2e1f(%rip), %eax      # 0x4284
jne 0x1475
movl 0x2c67(%rip), %eax      # 0x40d4
cmpl 0x2e15(%rip), %eax      # 0x4288
je 0x14a7
cmpl $0x14, 0x2e04(%rip)     # 0x4280
cmoveq %r13, %r15
testq %r15, %r15
je 0x12b6
jmp 0x14ae
cmpl %eax, %ecx
setg %dil
cmpl %edx, %ecx
setl %cl
pushq $0x2
popq %rsi
testb %cl, %dil
jne 0x1401
jmp 0x1409
leaq 0xc77(%rip), %r15       # 0x2125
callq 0x16c1
callq 0x1150
movq 0x2b39(%rip), %rbx      # 0x3ff8
movq (%rbx), %rdi
leaq 0xc9a(%rip), %rsi       # 0x2163
movq %r15, %rdx
xorl %eax, %eax
callq 0x10e0
movq (%rbx), %rdi
movl 0x2da4(%rip), %edx      # 0x4280
leaq 0xc84(%rip), %rsi       # 0x2167
pushq $0x14
popq %rcx
xorl %eax, %eax
callq 0x10e0
movq (%rbx), %rdi
movl 0x2bee(%rip), %edx      # 0x40e4
cmpl $0x1, %edx
leaq 0xbc0(%rip), %rax       # 0x20c0
leaq 0xc92(%rip), %rcx       # 0x2199
cmoveq %rax, %rcx
leaq 0xc70(%rip), %rsi       # 0x2182
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10e0