// File: /workspace/github_cpp_makefile_star2_O1/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::setUpGameVars()
void GameMaster::setUpGameVars() {
    const float FRIENDLY = 0.8;
    const float GRUFF    = 0.2;
    const float MODERATE = 0.5;

    player    =  new PlayerCharacter("You", MODERATE);

    // Manual, but most straightforward way of allocating mem for negotiators
    opponents.resize(NUM_LEVELS);
    opponents[0] = new Negotiator("Lepha",            MODERATE);
    opponents[1] = new Negotiator("Mosta and Pepita", FRIENDLY);
    opponents[2] = new Negotiator("Toto",             MODERATE);
    opponents[3] = new Negotiator("Burro",            GRUFF);
    opponents[4] = opponents[0];

    levels       = vector<Encounter*>(NUM_LEVELS, nullptr);
    turns        = vector<int> (NUM_LEVELS, 3);
    keyPrices    = {40.0, 20.0, 30.0, 40.0, 40.0};


    bool doPrint = false;
    const int NUM_TITLES = NUM_LEVELS + 1 + 1; // For game title and "the end"
    titles.resize(NUM_TITLES);
    titleText    = {"Prologue: Caught",
                    "Level 1 / 4: Mosta and Pepita",
                    "Level 2 / 4: Toto",
                    "Level 3 / 4: Burro",
                    "Level 4 / 4: Lepha",
                    "The End",
                    "DEALING WITH THE SPIRITS"};


    char ch;
    for (int i = 0; i < NUM_TITLES; i++) {
        ((i < NUM_LEVELS) ? ch = '=' : ch = '|');
        createTitle(ch, WIDTH, titleText[i], titles[i], doPrint);
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, 0x8(%rsp)
movl $0xc0, %edi
callq 0x2200
movq %rax, %r14
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc6d0(%rip), %rsi      # 0xf2b2
leaq 0xc6cc(%rip), %rdx      # 0xf2b5
leaq 0xc0(%rsp), %rdi
callq 0x290e
leaq 0xc0(%rsp), %rsi
movss 0xc67a(%rip), %xmm0     # 0xf280
movq %r14, %rdi
callq 0xdd10
movq 0x8(%rsp), %rax
movq %r14, 0x90(%rax)
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x2c37
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x8(%rsp), %rax
leaq 0x98(%rax), %r14
movslq (%rax), %rsi
movq %r14, %rdi
callq 0x64bc
movl $0xc0, %edi
callq 0x2200
movq %rax, %r15
leaq 0xb0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc6a8(%rip), %rsi      # 0xf317
leaq 0xc6a6(%rip), %rdx      # 0xf31c
leaq 0xa0(%rsp), %rdi
callq 0x290e
leaq 0xa0(%rsp), %rsi
movss 0xc5ed(%rip), %xmm0     # 0xf280
movq %r15, %rdi
callq 0xb5bc
movq (%r14), %rax
movq %r15, (%rax)
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cbe
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2210
movl $0xc0, %edi
callq 0x2200
movq %rax, %r15
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc5f5(%rip), %rsi      # 0xf2d4
leaq 0xc5fe(%rip), %rdx      # 0xf2e4
leaq 0x80(%rsp), %rdi
callq 0x290e
leaq 0x80(%rsp), %rsi
movss 0xc581(%rip), %xmm0     # 0xf284
movq %r15, %rdi
callq 0xb5bc
movq (%r14), %rax
movq %r15, 0x8(%rax)
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d2f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2210
movl $0xc0, %edi
callq 0x2200
movq %rax, %r15
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc5a5(%rip), %rsi      # 0xf2f2
leaq 0xc5a2(%rip), %rdx      # 0xf2f6
leaq 0x60(%rsp), %rdi
callq 0x290e
leaq 0x60(%rsp), %rsi
movss 0xc515(%rip), %xmm0     # 0xf280
movq %r15, %rdi
callq 0xb5bc
movq (%r14), %rax
movq %r15, 0x10(%rax)
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d91
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2210
movl $0xc0, %edi
callq 0x2200
movq %rax, %r15
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc555(%rip), %rsi      # 0xf304
leaq 0xc553(%rip), %rdx      # 0xf309
leaq 0x40(%rsp), %rdi
callq 0x290e
leaq 0x40(%rsp), %rsi
movss 0xc4bb(%rip), %xmm0     # 0xf288
movq %r15, %rdi
callq 0xb5bc
movq (%r14), %rax
movq %r15, 0x18(%rax)
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2df3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x8(%rsp), %rbx
movq 0x98(%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x20(%rax)
movslq (%rbx), %rsi
leaq 0x18(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0xe0(%rsp), %r14
leaq 0x7(%rsp), %rcx
movq %r14, %rdi
callq 0x64ee
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x6ad0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2e51
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x8(%rsp), %rbx
movslq (%rbx), %rsi
leaq 0x18(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0xe0(%rsp), %r14
leaq 0x7(%rsp), %rcx
movq %r14, %rdi
callq 0x656c
leaq 0xb0(%rbx), %rdi
movq %r14, %rsi
callq 0x6b2c
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2ea0
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movups 0xc60d(%rip), %xmm0     # 0xf4b4
leaq 0xf4(%rsp), %rdx
movaps %xmm0, -0x14(%rdx)
movl $0x42200000, -0x4(%rdx) # imm = 0x42200000
movq 0x8(%rsp), %rbx
leaq 0xc8(%rbx), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x6b6c
movslq (%rbx), %rbp
leaq 0x2(%rbp), %r12
leaq 0xf8(%rbx), %rdi
movq %r12, %rsi
callq 0x65ea
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc3ba(%rip), %rsi      # 0xf2b6
leaq 0xc3c3(%rip), %rdx      # 0xf2c6
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
callq 0x290e
leaq 0x100(%rsp), %r14
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc399(%rip), %rsi      # 0xf2c7
leaq 0xc3af(%rip), %rdx      # 0xf2e4
movq %r14, %rdi
callq 0x290e
leaq 0x120(%rsp), %r14
leaq 0x130(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc38d(%rip), %rsi      # 0xf2e5
leaq 0xc397(%rip), %rdx      # 0xf2f6
movq %r14, %rdi
callq 0x290e
leaq 0x140(%rsp), %r14
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc375(%rip), %rsi      # 0xf2f7
leaq 0xc380(%rip), %rdx      # 0xf309
movq %r14, %rdi
callq 0x290e
leaq 0x160(%rsp), %r14
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc35e(%rip), %rsi      # 0xf30a
leaq 0xc369(%rip), %rdx      # 0xf31c
movq %r14, %rdi
callq 0x290e
movq %r15, %rbx
leaq 0x180(%rsp), %r14
leaq 0x190(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc344(%rip), %rsi      # 0xf31d
leaq 0xc344(%rip), %rdx      # 0xf324
movq %r14, %rdi
callq 0x290e
leaq 0x1a0(%rsp), %r14
leaq 0x1b0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc322(%rip), %rsi      # 0xf325
leaq 0xc333(%rip), %rdx      # 0xf33d
movq %r14, %rdi
callq 0x290e
movq 0x8(%rsp), %rax
leaq 0x110(%rax), %rdi
leaq 0x1c0(%rsp), %r13
leaq 0xe0(%rsp), %rsi
movq %r13, %rdx
callq 0x6e80
movq $-0xe0, %r14
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x3051
movq (%r15), %rsi
incq %rsi
callq 0x2210
addq $-0x20, %r15
addq $0x20, %r14
jne 0x303d
cmpl $-0x1, %ebp
jl 0x3101
leaq 0x30(%rsp), %rcx
movl %r12d, %eax
movq %rax, 0x10(%rsp)
movl $0x8, %r13d
xorl %ebp, %ebp
leaq 0x20(%rsp), %r14
movq 0x8(%rsp), %r15
movslq (%r15), %rbx
movq 0x110(%r15), %rax
movq %rcx, 0x20(%rsp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
movq %rcx, %r12
callq 0x687c
cmpq %rbx, %rbp
movq 0xf8(%r15), %rax
leaq -0x8(%rax,%r13), %r8
movl $0x7c, %esi
movl $0x3d, %eax
cmovll %eax, %esi
movq %r15, %rdi
movq %r14, %rcx
xorl %r9d, %r9d
callq 0x3944
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
movq %r12, %rcx
je 0x30f3
movq 0x30(%rsp), %rsi
incq %rsi
movq %rcx, %rbx
callq 0x2210
movq %rbx, %rcx
incq %rbp
addq $0x20, %r13
cmpq %rbp, 0x10(%rsp)
jne 0x3083
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
leaq 0xe0(%rsp), %rsi
movq %r13, %rdi
callq 0x23f0
movb $0x1, %al
jmp 0x313c
jmp 0x3137
jmp 0x3137
jmp 0x3134
jmp 0x3134
jmp 0x3134
movq %r15, %rbx
movq %rax, %rbp
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0x324c
addq $-0x10, %r14
leaq 0xe0(%rsp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x316a
movq (%r14), %rsi
incq %rsi
callq 0x2210
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x3156
jmp 0x324c
movq %rax, %rbp
xorl %eax, %eax
movq %r15, %rbx
movq %r15, %r14
jmp 0x313c
movq %rax, %rbp
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x31f9
movq 0x50(%rsp), %rsi
jmp 0x31ec
jmp 0x31f6
movq %rax, %rbp
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x31f9
movq 0x70(%rsp), %rsi
jmp 0x31ec
jmp 0x31f6
movq %rax, %rbp
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x31f9
movq 0x90(%rsp), %rsi
jmp 0x31ec
jmp 0x31f6
movq %rax, %rbp
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x31f9
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x31f9
movq %rax, %rbp
movl $0xc0, %esi
movq %r15, %rdi
jmp 0x3247
movq %rax, %rbp
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3228
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x3228
movq %rax, %rbp
movl $0xc0, %esi
movq %r14, %rdi
jmp 0x3247
movq %rax, %rbp
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x324c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbp, %rdi
callq 0x2390