// File: /workspace/github_cpp_makefile_star2_O1/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 0x88b0
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x86ca(%rip), %rsi      # 0xc040
leaq 0x86c8(%rip), %rdx      # 0xc045
leaq -0xc8(%rbp), %rdi
callq 0x894a
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0xb52c
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 0x7dfb
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 0x894a
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x80(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x3a7a
movq -0x58(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x3a96
movl $0xf, %esi
cmpq %r12, -0x88(%rbp)
je 0x3a91
movq -0x78(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x3aa8
movq -0x88(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x30b0
jmp 0x3ab8
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 0x3ad9
movq %rsi, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x3adf
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 0x853f(%rip), %rsi      # 0xc04c
leaq 0x853d(%rip), %rdx      # 0xc051
leaq -0xa8(%rbp), %rdi
callq 0x894a
leaq -0x48(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0xb52c
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x3b51
callq 0x3260
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b63
callq 0x3260
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x3b74
callq 0x3260
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3b82
callq 0x3260
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b97
callq 0x3260
xorl %edi, %edi
callq 0x3250
movl %eax, %edi
callq 0x3270
movq %r14, %rdi
callq 0x3ccc
leaq 0x10(%rbx), %r12
movq %r12, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x88b0
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 0x8746
leaq 0x60(%rbx), %rdi
addq $0x60, %r14
movq %r14, %rsi
callq 0x87d4
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 0x86aa
jmp 0x3c24
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
jne 0x3c97
jmp 0x3c9c
movq %rax, %r14
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x3c47
callq 0x3260
jmp 0x3c47
movq %rax, %r14
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c5e
callq 0x3260
jmp 0x3c5e
movq %rax, %r14
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x3c74
callq 0x3260
jmp 0x3c74
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3c87
callq 0x3260
jmp 0x3c87
movq %rax, %r14
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c9c
callq 0x3260
movq %r14, %rdi
callq 0x34d0
movq %rax, %r14
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x3cbd
callq 0x3260
jmp 0x3cbd
movq %rax, %r14
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x3c97
jmp 0x3c9c
nop