// File: /workspace/github_cpp_makefile_star2_O3/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 0x4109
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x90(%rsp), %r12
testb $0x1, %al
jne 0x3da4
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 0x3e05
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x3e0c
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 0x3e92
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x3e99
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, %edi
cmpq %r15, %rcx
je 0x3e61
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x3e83
movl $0xf, %edi
cmpq %r13, %rsi
je 0x3e7a
movq 0x50(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x3f1f
leaq 0x20(%rsp), %rdi
callq 0x20d0
jmp 0x3f2d
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, %edi
cmpq %r15, %rcx
je 0x3eee
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x3f10
movl $0xf, %edi
cmpq %r13, %rsi
je 0x3f07
movq 0x50(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x3fd8
leaq 0x20(%rsp), %rdi
callq 0x20d0
jmp 0x3fe6
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 0x3f50
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3f56
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      # 0xf3fb
movq %rsp, %rdi
callq 0x23d0
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3fa9
movq %rsi, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x3fb3
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %r14, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x20d0
jmp 0x408c
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 0x4009
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x400f
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 0xb34f(%rip), %rsi      # 0xf382
movq %rsp, %rdi
callq 0x23d0
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x4062
movq %rsi, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x406c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %r14, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x20d0
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x40a3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x40d5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x40ec
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x4109
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x411c
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x413d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x413d
jmp 0x413a
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x415f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x415f
jmp 0x415c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x417d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x417d
jmp 0x417a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x419b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x419b
jmp 0x4198
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x41bf
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x41bf
jmp 0x41bc
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2390
nop