// File: /workspace/github_cpp_makefile_star2_O1/Agusyc[P]CTRPG/src/main.cpp
// Function: main
int main() {
    init();

    while (true) {
        bool goodEnemy = false;
        while (!goodEnemy) {
            enemy = parseEnemy(rand() % getEnemiesNumber());
            // Check if the player's level is right for the enemy. Otherwise, get another one (Run loop again).
            if (player.level >= enemy.minLevel && player.level <= enemy.maxLevel) {
                goodEnemy = true; // Exit the while loop
            }
        }

        Battle testBattle(enemy, player);

        player =testBattle.start("Are you ready?");
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
callq 0xaf20
leaq -0x278(%rbp), %rbx
leaq -0x298(%rbp), %r13
xorl %r14d, %r14d
callq 0x3090
movl %eax, %r12d
callq 0x927d
movl %eax, %ecx
movl %r12d, %eax
cltd
idivl %ecx
movq %r13, %rdi
movl %edx, %esi
callq 0x9a2d
leaq 0x429a(%rip), %rdi      # 0xf338
movq %r13, %rsi
callq 0x3330
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm0, 0x42a4(%rip)     # 0xf358
movups %xmm1, 0x42ad(%rip)     # 0xf368
movq 0x20(%rbx), %rax
movq %rax, 0x42b2(%rip)      # 0xf378
xorps %xmm0, %xmm0
movaps %xmm0, -0xc0(%rbp)
movups 0x42a9(%rip), %xmm0     # 0xf380
movq 0x42b2(%rip), %rax      # 0xf390
movups -0x250(%rbp), %xmm1
movups %xmm1, 0x4294(%rip)     # 0xf380
movq -0x240(%rbp), %rcx
movq %rcx, 0x4296(%rip)      # 0xf390
movaps -0xc0(%rbp), %xmm1
movaps %xmm0, -0xc0(%rbp)
movq %rax, -0xb0(%rbp)
movups %xmm1, -0x250(%rbp)
movq $0x0, -0x240(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x86aa
leaq -0x250(%rbp), %rdi
callq 0x86aa
movq -0x298(%rbp), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
je 0xb151
callq 0x3260
movl 0x41a1(%rip), %eax      # 0xf2f8
cmpl 0x421f(%rip), %eax      # 0xf37c
movzbl %r14b, %ecx
movl $0x1, %r14d
cmovgl %ecx, %r14d
cmpl 0x4207(%rip), %eax      # 0xf378
cmovll %ecx, %r14d
testb $0x1, %r14b
je 0xb078
leaq -0x1a8(%rbp), %r14
movq %r14, -0x1b8(%rbp)
movq 0x41a4(%rip), %rsi      # 0xf338
movq 0x41a5(%rip), %rdx      # 0xf340
addq %rsi, %rdx
leaq -0x1b8(%rbp), %r12
movq %r12, %rdi
callq 0x88b0
movq 0x41c4(%rip), %rax      # 0xf378
movq %rax, 0x30(%r14)
movups 0x41a9(%rip), %xmm0     # 0xf368
movups %xmm0, 0x20(%r14)
movups 0x418d(%rip), %xmm0     # 0xf358
movups %xmm0, 0x10(%r14)
leaq -0x170(%rbp), %rdi
leaq 0x41a2(%rip), %rsi      # 0xf380
callq 0x8746
leaq -0x148(%rbp), %r15
movq %r15, -0x158(%rbp)
movq 0x40c8(%rip), %rsi      # 0xf2c0
movq 0x40c9(%rip), %rdx      # 0xf2c8
addq %rsi, %rdx
leaq -0x158(%rbp), %rdi
callq 0x88b0
movl 0x40ec(%rip), %eax      # 0xf300
movl %eax, 0x30(%r15)
movups 0x40d1(%rip), %xmm0     # 0xf2f0
movups %xmm0, 0x20(%r15)
movups 0x40b5(%rip), %xmm0     # 0xf2e0
movups %xmm0, 0x10(%r15)
leaq -0x110(%rbp), %rdi
leaq 0x40ca(%rip), %rsi      # 0xf308
callq 0x8746
leaq -0xf8(%rbp), %rdi
leaq 0x40cf(%rip), %rsi      # 0xf320
callq 0x87d4
movq %r13, %rdi
movq %r12, %rsi
leaq -0x158(%rbp), %rdx
callq 0x381c
leaq -0xf8(%rbp), %rdi
callq 0x86f8
leaq -0x110(%rbp), %rdi
callq 0x86aa
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0xb298
callq 0x3260
leaq -0x170(%rbp), %rdi
callq 0x86aa
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
leaq -0xc0(%rbp), %r12
je 0xb2bc
callq 0x3260
leaq -0xd0(%rbp), %r14
movq %r14, -0xe0(%rbp)
leaq -0xe0(%rbp), %r15
movq %r15, %rdi
leaq 0x132f(%rip), %rsi      # 0xc60a
leaq 0x1336(%rip), %rdx      # 0xc618
callq 0x894a
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3928
leaq 0x3fc4(%rip), %rdi      # 0xf2c0
movq %r12, %rsi
callq 0x3330
leaq -0xa0(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm0, 0x3fc7(%rip)     # 0xf2e0
movups %xmm1, 0x3fd0(%rip)     # 0xf2f0
movl 0x20(%rax), %eax
movl %eax, 0x3fd7(%rip)      # 0xf300
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movups 0x3fd1(%rip), %xmm0     # 0xf308
movq 0x3fda(%rip), %rax      # 0xf318
movups -0x78(%rbp), %xmm1
movups %xmm1, 0x3fbf(%rip)     # 0xf308
movq -0x68(%rbp), %rcx
movq %rcx, 0x3fc4(%rip)      # 0xf318
movaps -0x40(%rbp), %xmm1
movaps %xmm0, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movups %xmm1, -0x78(%rbp)
xorl %r12d, %r12d
movq %r12, -0x68(%rbp)
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x86aa
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movups 0x3f9b(%rip), %xmm0     # 0xf320
movq 0x3fa4(%rip), %rax      # 0xf330
movups -0x60(%rbp), %xmm1
movups %xmm1, 0x3f89(%rip)     # 0xf320
movq -0x50(%rbp), %rcx
movq %rcx, 0x3f8e(%rip)      # 0xf330
movaps -0x40(%rbp), %xmm1
movaps %xmm0, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movups %xmm1, -0x60(%rbp)
movq %r12, -0x50(%rbp)
movq %r15, %rdi
callq 0x86f8
leaq -0x60(%rbp), %rdi
callq 0x86f8
leaq -0x78(%rbp), %rdi
callq 0x86aa
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0xb3e8
callq 0x3260
movq -0xe0(%rbp), %rdi
cmpq %r14, %rdi
je 0xb3f9
callq 0x3260
leaq -0x1d8(%rbp), %rdi
callq 0x86aa
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0xb41d
callq 0x3260
leaq -0x238(%rbp), %rdi
callq 0x86f8
leaq -0x250(%rbp), %rdi
callq 0x86aa
movq -0x298(%rbp), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
je 0xb075
callq 0x3260
jmp 0xb075
movq %rax, %r12
movq -0xe0(%rbp), %rdi
cmpq %r14, %rdi
je 0xb46f
callq 0x3260
jmp 0xb46f
movq %rax, %r12
leaq -0x1d8(%rbp), %r14
movq %r14, %rdi
callq 0x86aa
movq -0x48(%r14), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0xb493
callq 0x3260
leaq -0x238(%rbp), %rdi
callq 0x86f8
leaq -0x250(%rbp), %r14
movq %r14, %rdi
callq 0x86aa
movq -0x48(%r14), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
jne 0xb51f
jmp 0xb524
movq %rax, %r12
leaq -0xf8(%rbp), %rdi
callq 0x86f8
jmp 0xb4d4
movq %rax, %r12
leaq -0x110(%rbp), %rdi
callq 0x86aa
jmp 0xb4e5
movq %rax, %r12
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0xb502
callq 0x3260
jmp 0xb502
movq %rax, %r12
leaq -0x170(%rbp), %rdi
callq 0x86aa
jmp 0xb513
movq %rax, %r12
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0xb524
callq 0x3260
movq %r12, %rdi
callq 0x34d0