// File: /workspace/github_cpp_makefile_star2_O1/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::centerText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void GameMaster::centerText(string title, string &toAdd) {
    int len = title.length();
    int gap = WIDTH - len;

    if (len > WIDTH) return; // Not applicable in this case

    if (gap % 2 == 0) { // If even
        toAdd += string(gap/2, ' ') + title + string(gap/2, ' ') + "\n";
    } else { // If odd, add a space after title, and use decremented gap
        gap--;
        toAdd += string(gap/2, ' ') + title + string(gap/2, ' ') + " \n";
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movl 0x4(%rdi), %eax
subl 0x8(%rsi), %eax
jl 0x40d3
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x90(%rsp), %r12
testb $0x1, %al
jne 0x3d5c
sarl %eax
movslq %eax, %r14
leaq 0x80(%rsp), %rdi
movq %r12, (%rdi)
movq %r14, %rsi
movl $0x20, %edx
callq 0x2270
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x80(%rsp), %rdi
callq 0x20d0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3dbd
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x3dc4
decl %eax
sarl %eax
movslq %eax, %r14
leaq 0x80(%rsp), %rdi
movq %r12, (%rdi)
movq %r14, %rsi
movl $0x20, %edx
callq 0x2270
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x80(%rsp), %rdi
callq 0x20d0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3e4c
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x3e53
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movl $0x20, %edx
callq 0x2270
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x48(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x3e19
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3e38
movl $0xf, %esi
cmpq %r13, 0x40(%rsp)
je 0x3e2f
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3edb
movq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x20d0
jmp 0x3ee9
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movl $0x20, %edx
callq 0x2270
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x48(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x3ea8
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3ec7
movl $0xf, %esi
cmpq %r13, 0x40(%rsp)
je 0x3ebe
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3f9b
movq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x20d0
jmp 0x3fa9
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2250
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x3f0c
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3f12
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xb481(%rip), %rsi      # 0xf3b7
movq %rsp, %rdi
callq 0x23d0
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3f65
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x3f6c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x20d0
jmp 0x4056
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2250
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x3fcc
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3fd2
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xb348(%rip), %rsi      # 0xf33e
movq %rsp, %rdi
callq 0x23d0
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4025
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x402c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x20d0
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x406d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4088
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x409f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x40b6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x40d3
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x40e6
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x4107
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x4107
jmp 0x4104
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4129
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x4129
jmp 0x4126
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x4147
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x4147
jmp 0x4144
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x4165
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x4165
jmp 0x4162
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x4189
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x4189
jmp 0x4186
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2390
nop