// File: /workspace/github_cpp_makefile_star2_O3/Agusyc[P]CTRPG/src/battle.cpp
// Function: Battle::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Player Battle::start(string message) {
    // Start the battle

    printMessage(message, YELLOW);

    printMessage(RED + enemy.name + WHITE + string(" wants to fight!"));

    // Seed the random number generator.
    srand(time(NULL));

    loop();

    return player;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xd8(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x886e
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x86ca(%rip), %rsi      # 0xc040
leaq 0x86c8(%rip), %rdx      # 0xc045
leaq -0xc8(%rbp), %rdi
callq 0x890c
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0xb4c8
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x39bd
callq 0x3260
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
je 0x39ce
callq 0x3260
leaq 0x78(%r14), %rdx
leaq 0x866d(%rip), %rsi      # 0xc046
leaq -0x108(%rbp), %r15
movq %r15, %rdi
callq 0x7d6f
leaq 0x865d(%rip), %rsi      # 0xc04c
movq %r15, %rdi
callq 0x3520
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3a1b
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x3a22
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x78(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x8609(%rip), %rsi      # 0xc052
leaq 0x8612(%rip), %rdx      # 0xc062
leaq -0x88(%rbp), %rdi
callq 0x890c
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x80(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x3a7a
movq -0x58(%rbp), %rdi
movq -0x88(%rbp), %rsi
cmpq %rdi, %rax
jbe 0x3a99
movl $0xf, %edi
cmpq %r12, %rsi
je 0x3a94
movq -0x78(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x3aa4
leaq -0x68(%rbp), %rdi
callq 0x30b0
jmp 0x3ab4
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32e0
leaq -0x38(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x3ad5
movq %rsi, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x3adb
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x8543(%rip), %rsi      # 0xc04c
leaq 0x8541(%rip), %rdx      # 0xc051
leaq -0xa8(%rbp), %rdi
callq 0x890c
leaq -0x48(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0xb4c8
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x3b4d
callq 0x3260
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b5f
callq 0x3260
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x3b70
callq 0x3260
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3b7e
callq 0x3260
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b93
callq 0x3260
xorl %edi, %edi
callq 0x3250
movl %eax, %edi
callq 0x3270
movq %r14, %rdi
callq 0x3cc8
leaq 0x10(%rbx), %r12
movq %r12, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x886e
movl 0x40(%r14), %eax
movl %eax, 0x40(%rbx)
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
movups %xmm1, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
leaq 0x48(%rbx), %r15
leaq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0x86fa
leaq 0x60(%rbx), %rdi
addq $0x60, %r14
movq %r14, %rsi
callq 0x8788
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x864a
jmp 0x3c20
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
jne 0x3c93
jmp 0x3c98
movq %rax, %r14
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x3c43
callq 0x3260
jmp 0x3c43
movq %rax, %r14
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c5a
callq 0x3260
jmp 0x3c5a
movq %rax, %r14
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x3c70
callq 0x3260
jmp 0x3c70
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3c83
callq 0x3260
jmp 0x3c83
movq %rax, %r14
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c98
callq 0x3260
movq %r14, %rdi
callq 0x34d0
movq %rax, %r14
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x3cb9
callq 0x3260
jmp 0x3cb9
movq %rax, %r14
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x3c93
jmp 0x3c98
nop