// File: /workspace/github_cpp_makefile_star2_O3/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 0xc710(%rip), %rsi      # 0xf2f6
leaq 0xc70c(%rip), %rdx      # 0xf2f9
leaq 0xc0(%rsp), %rdi
callq 0x290e
leaq 0xc0(%rsp), %rsi
movss 0xc676(%rip), %xmm0     # 0xf280
movq %r14, %rdi
callq 0xde4c
movq 0x8(%rsp), %rax
movq %r14, 0x90(%rax)
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x2c3b
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x8(%rsp), %rax
leaq 0x98(%rax), %r14
movslq (%rax), %rsi
movq %r14, %rdi
callq 0x64ca
movl $0xc0, %edi
callq 0x2200
movq %rax, %r15
leaq 0xb0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc6e8(%rip), %rsi      # 0xf35b
leaq 0xc6e6(%rip), %rdx      # 0xf360
leaq 0xa0(%rsp), %rdi
callq 0x290e
leaq 0xa0(%rsp), %rsi
movss 0xc5e9(%rip), %xmm0     # 0xf280
movq %r15, %rdi
callq 0xb6e8
movq (%r14), %rax
movq %r15, (%rax)
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cc2
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 0xc635(%rip), %rsi      # 0xf318
leaq 0xc63e(%rip), %rdx      # 0xf328
leaq 0x80(%rsp), %rdi
callq 0x290e
leaq 0x80(%rsp), %rsi
movss 0xc57d(%rip), %xmm0     # 0xf284
movq %r15, %rdi
callq 0xb6e8
movq (%r14), %rax
movq %r15, 0x8(%rax)
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d33
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 0xc5e5(%rip), %rsi      # 0xf336
leaq 0xc5e2(%rip), %rdx      # 0xf33a
leaq 0x60(%rsp), %rdi
callq 0x290e
leaq 0x60(%rsp), %rsi
movss 0xc511(%rip), %xmm0     # 0xf280
movq %r15, %rdi
callq 0xb6e8
movq (%r14), %rax
movq %r15, 0x10(%rax)
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d95
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 0xc595(%rip), %rsi      # 0xf348
leaq 0xc593(%rip), %rdx      # 0xf34d
leaq 0x40(%rsp), %rdi
callq 0x290e
leaq 0x40(%rsp), %rsi
movss 0xc4b7(%rip), %xmm0     # 0xf288
movq %r15, %rdi
callq 0xb6e8
movq (%r14), %rax
movq %r15, 0x18(%rax)
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2df7
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
xorl %r15d, %r15d
leaq 0x18(%rsp), %rdx
movq %r15, (%rdx)
leaq 0xe0(%rsp), %r14
leaq 0x7(%rsp), %rcx
movq %r14, %rdi
callq 0x64fc
movq 0xe0(%rbx), %rdi
movq 0xf0(%rbx), %rsi
movaps (%r14), %xmm0
movups %xmm0, 0xe0(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0xf0(%rbx)
movq %r15, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
testq %rdi, %rdi
je 0x2e86
subq %rdi, %rsi
callq 0x2210
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x2e86
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 0x662a
movq 0xb0(%rbx), %rdi
movq 0xc0(%rbx), %rsi
movaps (%r14), %xmm0
movups %xmm0, 0xb0(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0xc0(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
testq %rdi, %rdi
je 0x2f0b
subq %rdi, %rsi
callq 0x2210
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x2f0b
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movups 0xc5e6(%rip), %xmm0     # 0xf4f8
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 0x6cb2
movslq (%rbx), %r13
leaq 0x2(%r13), %r15
leaq 0xf8(%rbx), %rdi
movq %r15, %rsi
callq 0x67a6
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc393(%rip), %rsi      # 0xf2fa
leaq 0xc39c(%rip), %rdx      # 0xf30a
leaq 0xe0(%rsp), %r14
movq %r14, %rdi
callq 0x290e
leaq 0x100(%rsp), %r12
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc372(%rip), %rsi      # 0xf30b
leaq 0xc388(%rip), %rdx      # 0xf328
movq %r12, %rdi
callq 0x290e
leaq 0x120(%rsp), %r12
leaq 0x130(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc366(%rip), %rsi      # 0xf329
leaq 0xc370(%rip), %rdx      # 0xf33a
movq %r12, %rdi
callq 0x290e
leaq 0x140(%rsp), %r12
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc34e(%rip), %rsi      # 0xf33b
leaq 0xc359(%rip), %rdx      # 0xf34d
movq %r12, %rdi
callq 0x290e
leaq 0x160(%rsp), %r12
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc337(%rip), %rsi      # 0xf34e
leaq 0xc342(%rip), %rdx      # 0xf360
movq %r12, %rdi
callq 0x290e
leaq 0x180(%rsp), %r12
leaq 0x190(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc320(%rip), %rsi      # 0xf361
leaq 0xc320(%rip), %rdx      # 0xf368
movq %r12, %rdi
callq 0x290e
leaq 0x1a0(%rsp), %r12
leaq 0x1b0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xc2fe(%rip), %rsi      # 0xf369
leaq 0xc30f(%rip), %rdx      # 0xf381
movq %r12, %rdi
callq 0x290e
movq 0x8(%rsp), %rax
leaq 0x110(%rax), %rdi
leaq 0x1c0(%rsp), %r14
leaq 0xe0(%rsp), %rsi
movq %r14, %rdx
callq 0x6fd0
movq $-0xe0, %r14
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x30ba
movq (%rbp), %rsi
incq %rsi
callq 0x2210
addq $-0x20, %rbp
addq $0x20, %r14
jne 0x30a5
cmpl $-0x1, %r13d
jl 0x3172
leaq 0x30(%rsp), %rcx
movl %r15d, %eax
movq %rax, 0x10(%rsp)
movl $0x8, %r13d
xorl %ebp, %ebp
leaq 0x20(%rsp), %r14
movq 0x8(%rsp), %r12
movslq (%r12), %rbx
movq 0x110(%r12), %rax
movq %rcx, 0x20(%rsp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
movq %rcx, %r15
callq 0x6a38
cmpq %rbx, %rbp
movq 0xf8(%r12), %rax
leaq -0x8(%rax,%r13), %r8
movl $0x7c, %esi
movl $0x3d, %eax
cmovll %eax, %esi
movq %r12, %rdi
movq %r14, %rcx
xorl %r9d, %r9d
callq 0x3992
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
movq %r15, %rcx
je 0x3160
movq 0x30(%rsp), %rsi
incq %rsi
movq %rcx, %rbx
callq 0x2210
movq %rbx, %rcx
incq %rbp
addq $0x20, %r13
cmpq %rbp, 0x10(%rsp)
jne 0x30ed
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xe0(%rsp), %rsi
movq %r14, %rdi
callq 0x23f0
jmp 0x32a1
jmp 0x31a6
jmp 0x31a6
jmp 0x31a6
jmp 0x31a6
jmp 0x31a6
movq %rax, %rbx
addq $-0x10, %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x31c3
movq (%r12), %rsi
incq %rsi
callq 0x2210
leaq -0x20(%r12), %rax
addq $-0x10, %r12
cmpq %r14, %r12
movq %rax, %r12
jne 0x31ad
jmp 0x32a1
movq %rax, %rbx
jmp 0x32a1
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x324e
movq 0x50(%rsp), %rsi
jmp 0x3241
jmp 0x324b
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x324e
movq 0x70(%rsp), %rsi
jmp 0x3241
jmp 0x324b
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x324e
movq 0x90(%rsp), %rsi
jmp 0x3241
jmp 0x324b
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x324e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x324e
movq %rax, %rbx
movl $0xc0, %esi
movq %r15, %rdi
jmp 0x329c
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x327d
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x327d
movq %rax, %rbx
movl $0xc0, %esi
movq %r14, %rdi
jmp 0x329c
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x32a1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
nop