// File: sagardoshi[P]NegotiationsEncounter/src/Encounter.cpp
// Function: Encounter::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 Encounter::centerText(string title, string &toAdd) {
    const int WIDTH = 80;
    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 %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rsi, -0x1a8(%rbp)
movq %rdi, %rax
movq -0x1a8(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x50, -0x1c(%rbp)
callq 0x3470
movl %eax, -0x20(%rbp)
movl $0x50, %eax
subl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x50, -0x20(%rbp)
jle 0xeed4
jmp 0xf321
movl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0xf0f6
movl -0x24(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
cltq
movq %rax, -0x1b8(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x3520
movq -0x1b8(%rbp), %rsi
movq -0x1b0(%rbp), %rcx
leaq -0xa8(%rbp), %rdi
movl $0x20, %edx
callq 0x85b0
jmp 0xef31
movq -0x1a0(%rbp), %rdx
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x8560
jmp 0xef4d
movl -0x24(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
cltq
movq %rax, -0x1c8(%rbp)
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x3520
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rcx
leaq -0xe0(%rbp), %rdi
movl $0x20, %edx
callq 0x85b0
jmp 0xef96
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x8490
jmp 0xefaf
leaq 0xd411(%rip), %rdx      # 0x1c3c7
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x8440
jmp 0xefc5
movq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x33e0
jmp 0xefd4
leaq -0x48(%rbp), %rdi
callq 0x3200
leaq -0x68(%rbp), %rdi
callq 0x3200
leaq -0xe0(%rbp), %rdi
callq 0x3200
leaq -0xe1(%rbp), %rdi
callq 0x3350
leaq -0x88(%rbp), %rdi
callq 0x3200
leaq -0xa8(%rbp), %rdi
callq 0x3200
leaq -0xa9(%rbp), %rdi
callq 0x3350
jmp 0xf321
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf0e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf0d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf0c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf0b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf0ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3200
leaq -0x68(%rbp), %rdi
callq 0x3200
leaq -0xe0(%rbp), %rdi
callq 0x3200
leaq -0xe1(%rbp), %rdi
callq 0x3350
leaq -0x88(%rbp), %rdi
callq 0x3200
leaq -0xa8(%rbp), %rdi
callq 0x3200
leaq -0xa9(%rbp), %rdi
callq 0x3350
jmp 0xf32a
movl -0x24(%rbp), %eax
decl %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
cltq
movq %rax, -0x1d8(%rbp)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x3520
movq -0x1d8(%rbp), %rsi
movq -0x1d0(%rbp), %rcx
leaq -0x168(%rbp), %rdi
movl $0x20, %edx
callq 0x85b0
jmp 0xf147
movq -0x1a0(%rbp), %rdx
leaq -0x148(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x8560
jmp 0xf163
movl -0x24(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
cltq
movq %rax, -0x1e8(%rbp)
leaq -0x191(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x3520
movq -0x1e8(%rbp), %rsi
movq -0x1e0(%rbp), %rcx
leaq -0x190(%rbp), %rdi
movl $0x20, %edx
callq 0x85b0
jmp 0xf1ac
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
leaq -0x190(%rbp), %rdx
callq 0x8490
jmp 0xf1c8
leaq 0xd17f(%rip), %rdx      # 0x1c34e
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x8440
jmp 0xf1e4
movq -0x18(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x33e0
jmp 0xf1f6
leaq -0x108(%rbp), %rdi
callq 0x3200
leaq -0x128(%rbp), %rdi
callq 0x3200
leaq -0x190(%rbp), %rdi
callq 0x3200
leaq -0x191(%rbp), %rdi
callq 0x3350
leaq -0x148(%rbp), %rdi
callq 0x3200
leaq -0x168(%rbp), %rdi
callq 0x3200
leaq -0x169(%rbp), %rdi
callq 0x3350
jmp 0xf321
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf313
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf307
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf2ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf2e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xf2d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x3200
leaq -0x128(%rbp), %rdi
callq 0x3200
leaq -0x190(%rbp), %rdi
callq 0x3200
leaq -0x191(%rbp), %rdi
callq 0x3350
leaq -0x148(%rbp), %rdi
callq 0x3200
leaq -0x168(%rbp), %rdi
callq 0x3200
leaq -0x169(%rbp), %rdi
callq 0x3350
jmp 0xf32a
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0xb8(%rbp), %rdi
callq 0x3510
nopw %cs:(%rax,%rax)