// File: /workspace/github_cpp_makefile_star2_O3/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 $0x268, %rsp            # imm = 0x268
callq 0xaeec
leaq -0x210(%rbp), %rbx
leaq -0x1e8(%rbp), %r14
leaq -0x230(%rbp), %r12
callq 0x3090
movl %eax, %r13d
callq 0x922d
movl %eax, %ecx
movl %r13d, %eax
cltd
idivl %ecx
movq %r12, %rdi
movl %edx, %esi
callq 0x99dd
leaq 0x42da(%rip), %rdi      # 0xf338
movq %r12, %rsi
callq 0x3330
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm0, 0x42e4(%rip)     # 0xf358
movups %xmm1, 0x42ed(%rip)     # 0xf368
movq 0x20(%rbx), %rax
movq %rax, 0x42f2(%rip)      # 0xf378
movups 0x42f3(%rip), %xmm0     # 0xf380
movq 0x42fc(%rip), %rax      # 0xf390
movups -0x1e8(%rbp), %xmm1
movups %xmm1, 0x42de(%rip)     # 0xf380
movq -0x1d8(%rbp), %rcx
movq %rcx, 0x42e0(%rip)      # 0xf390
movups %xmm0, -0x150(%rbp)
movq %rax, -0x140(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
leaq -0x150(%rbp), %rdi
callq 0x864a
movq %r14, %rdi
callq 0x864a
movq -0x230(%rbp), %rdi
leaq -0x220(%rbp), %rax
cmpq %rax, %rdi
je 0xb0f9
callq 0x3260
movl 0x41f9(%rip), %eax      # 0xf2f8
cmpl 0x4273(%rip), %eax      # 0xf378
jl 0xb038
cmpl 0x426b(%rip), %eax      # 0xf37c
jg 0xb038
leaq -0x280(%rbp), %r13
movq %r13, -0x290(%rbp)
movq 0x420c(%rip), %rsi      # 0xf338
movq 0x420d(%rip), %rdx      # 0xf340
addq %rsi, %rdx
leaq -0x290(%rbp), %r14
movq %r14, %rdi
callq 0x886e
movq 0x422c(%rip), %rax      # 0xf378
movq %rax, 0x30(%r13)
movups 0x4211(%rip), %xmm0     # 0xf368
movups %xmm0, 0x20(%r13)
movups 0x41f5(%rip), %xmm0     # 0xf358
movups %xmm0, 0x10(%r13)
leaq -0x248(%rbp), %rdi
leaq 0x420a(%rip), %rsi      # 0xf380
callq 0x86fa
leaq -0xc8(%rbp), %rbx
movq %rbx, -0xd8(%rbp)
movq 0x4130(%rip), %rsi      # 0xf2c0
movq 0x4131(%rip), %rdx      # 0xf2c8
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x886e
movl 0x4154(%rip), %eax      # 0xf300
movl %eax, 0x30(%rbx)
movups 0x413a(%rip), %xmm0     # 0xf2f0
movups %xmm0, 0x20(%rbx)
movups 0x411f(%rip), %xmm0     # 0xf2e0
movups %xmm0, 0x10(%rbx)
leaq -0x90(%rbp), %rdi
leaq 0x4135(%rip), %rsi      # 0xf308
callq 0x86fa
leaq -0x78(%rbp), %rdi
leaq 0x413d(%rip), %rsi      # 0xf320
callq 0x8788
movq %r12, %rdi
movq %r14, %rsi
leaq -0xd8(%rbp), %rdx
callq 0x381c
leaq -0x78(%rbp), %rdi
callq 0x86a2
leaq -0x90(%rbp), %rdi
callq 0x864a
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0xb227
callq 0x3260
leaq -0x248(%rbp), %rdi
callq 0x864a
movq -0x290(%rbp), %rdi
cmpq %r13, %rdi
leaq -0x150(%rbp), %r14
je 0xb24b
callq 0x3260
leaq -0x50(%rbp), %r13
movq %r13, -0x60(%rbp)
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
leaq 0x13a9(%rip), %rsi      # 0xc60a
leaq 0x13b0(%rip), %rdx      # 0xc618
callq 0x890c
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3928
leaq 0x403e(%rip), %rdi      # 0xf2c0
movq %r14, %rsi
callq 0x3330
leaq -0x130(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm0, 0x4041(%rip)     # 0xf2e0
movups %xmm1, 0x404a(%rip)     # 0xf2f0
movl 0x20(%rax), %eax
movl %eax, 0x4051(%rip)      # 0xf300
movups 0x4052(%rip), %xmm0     # 0xf308
movq 0x405b(%rip), %rax      # 0xf318
movups -0x108(%rbp), %xmm1
movups %xmm1, 0x403d(%rip)     # 0xf308
movq -0xf8(%rbp), %rcx
movq %rcx, 0x403f(%rip)      # 0xf318
movups %xmm0, -0x40(%rbp)
movq %rax, -0x30(%rbp)
leaq -0x108(%rbp), %rbx
xorl %r15d, %r15d
movq %r15, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x864a
movups 0x4018(%rip), %xmm0     # 0xf320
movq 0x4021(%rip), %rax      # 0xf330
movups -0xf0(%rbp), %xmm1
movups %xmm1, 0x4003(%rip)     # 0xf320
movq -0xe0(%rbp), %rcx
movq %rcx, 0x4005(%rip)      # 0xf330
movups %xmm0, -0x40(%rbp)
movq %rax, -0x30(%rbp)
leaq -0xf0(%rbp), %r12
movq %r15, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq %r14, %rdi
callq 0x86a2
movq %r12, %rdi
callq 0x86a2
movq %rbx, %rdi
callq 0x864a
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0xb377
callq 0x3260
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0xb385
callq 0x3260
leaq -0x170(%rbp), %rdi
callq 0x864a
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x210(%rbp), %rbx
leaq -0x230(%rbp), %r12
je 0xb3b7
callq 0x3260
leaq -0x1d0(%rbp), %rdi
callq 0x86a2
leaq -0x1e8(%rbp), %rdi
callq 0x864a
movq -0x230(%rbp), %rdi
leaq -0x220(%rbp), %rax
cmpq %rax, %rdi
leaq -0x1e8(%rbp), %r14
je 0xb038
callq 0x3260
jmp 0xb038
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0xb40d
callq 0x3260
jmp 0xb40d
movq %rax, %r14
leaq -0x170(%rbp), %rdi
callq 0x864a
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0xb431
callq 0x3260
leaq -0x1d0(%rbp), %rdi
callq 0x86a2
leaq -0x1e8(%rbp), %rdi
callq 0x864a
movq -0x230(%rbp), %rdi
leaq -0x220(%rbp), %rax
cmpq %rax, %rdi
jne 0xb4ba
jmp 0xb4bf
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x86a2
jmp 0xb46f
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x864a
jmp 0xb480
movq %rax, %r14
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0xb49d
callq 0x3260
jmp 0xb49d
movq %rax, %r14
leaq -0x248(%rbp), %rdi
callq 0x864a
jmp 0xb4ae
movq %rax, %r14
movq -0x290(%rbp), %rdi
cmpq %r13, %rdi
je 0xb4bf
callq 0x3260
movq %r14, %rdi
callq 0x34d0
nop