// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbx
movl $0xc0, %edi
callq 0x3220
movq %rax, %r14
leaq 0x87f2(%rip), %rsi      # 0xc2b2
leaq 0x90(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x3860
leaq 0x90(%rsp), %rsi
movss 0x879b(%rip), %xmm0     # 0xc280
movq %r14, %rdi
callq 0xb430
movq %r14, 0x90(%rbx)
leaq 0x90(%rsp), %rdi
callq 0x3130
leaq 0x98(%rbx), %r14
movslq (%rbx), %rsi
movq %r14, %rdi
callq 0x596a
movl $0xc0, %edi
callq 0x3220
movq %rax, %r15
leaq 0x87f0(%rip), %rsi      # 0xc317
leaq 0x70(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x3860
leaq 0x70(%rsp), %rsi
movss 0x873a(%rip), %xmm0     # 0xc280
movq %r15, %rdi
callq 0x9678
movq (%r14), %rax
movq %r15, (%rax)
leaq 0x70(%rsp), %rdi
callq 0x3130
movl $0xc0, %edi
callq 0x3220
movq %rax, %r15
leaq 0x8762(%rip), %rsi      # 0xc2d4
leaq 0x50(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x3860
leaq 0x50(%rsp), %rsi
movss 0x86f3(%rip), %xmm0     # 0xc284
movq %r15, %rdi
callq 0x9678
movq (%r14), %rax
movq %r15, 0x8(%rax)
leaq 0x50(%rsp), %rdi
callq 0x3130
movl $0xc0, %edi
callq 0x3220
movq %rax, %r15
leaq 0x8734(%rip), %rsi      # 0xc2f2
leaq 0x30(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x3860
leaq 0x30(%rsp), %rsi
movss 0x86a3(%rip), %xmm0     # 0xc280
movq %r15, %rdi
callq 0x9678
movq (%r14), %rax
movq %r15, 0x10(%rax)
leaq 0x30(%rsp), %rdi
callq 0x3130
movl $0xc0, %edi
callq 0x3220
movq %rax, %r14
leaq 0x86fa(%rip), %rsi      # 0xc304
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x3860
leaq 0x10(%rsp), %rsi
movss 0x865f(%rip), %xmm0     # 0xc288
movq %r14, %rdi
callq 0x9678
movq 0x98(%rbx), %rax
movq %r14, 0x18(%rax)
leaq 0x10(%rsp), %rdi
callq 0x3130
movq 0x98(%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x20(%rax)
movslq (%rbx), %rsi
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
leaq 0xb0(%rsp), %r15
leaq 0x2(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rdx
callq 0x599c
leaq 0xe0(%rbx), %rdi
movq %r15, %rsi
callq 0x62e8
movq %r15, %rdi
callq 0x5fea
movslq (%rbx), %rsi
movl $0x3, (%r14)
leaq 0xb0(%rsp), %r14
leaq 0x8(%rsp), %rdx
leaq 0x2(%rsp), %rcx
movq %r14, %rdi
callq 0x59f2
leaq 0xb0(%rbx), %rdi
movq %r14, %rsi
callq 0x63ee
movq %r14, %rdi
callq 0x5f82
movups 0x87e3(%rip), %xmm0     # 0xc4b4
movaps %xmm0, (%r14)
movl $0x42200000, 0x10(%r14) # imm = 0x42200000
leaq 0xc8(%rbx), %rdi
leaq 0xc4(%rsp), %rdx
leaq 0xb0(%rsp), %rsi
callq 0x6440
movslq (%rbx), %rsi
addq $0x2, %rsi
leaq 0xf8(%rbx), %rdi
movq %rsi, %r13
callq 0x5a48
leaq 0x85a0(%rip), %rsi      # 0xc2b6
leaq 0xb0(%rsp), %r14
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x3860
leaq 0xd0(%rsp), %r15
leaq 0x858d(%rip), %rsi      # 0xc2c7
leaq 0x2(%rsp), %rdx
movq %r15, %rdi
callq 0x3860
leaq 0xf0(%rsp), %r15
leaq 0x858f(%rip), %rsi      # 0xc2e5
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0x3860
leaq 0x110(%rsp), %r15
leaq 0x8585(%rip), %rsi      # 0xc2f7
leaq 0x6(%rsp), %rdx
movq %r15, %rdi
callq 0x3860
leaq 0x130(%rsp), %r15
leaq 0x857c(%rip), %rsi      # 0xc30a
leaq 0x5(%rsp), %rdx
movq %r15, %rdi
callq 0x3860
leaq 0x150(%rsp), %r15
leaq 0x8573(%rip), %rsi      # 0xc31d
leaq 0x4(%rsp), %rdx
movq %r15, %rdi
callq 0x3860
leaq 0x170(%rsp), %r15
leaq 0x855f(%rip), %rsi      # 0xc325
leaq 0x3(%rsp), %rdx
movq %r15, %rdi
callq 0x3860
leaq 0x110(%rbx), %rdi
leaq 0x190(%rsp), %rdx
leaq 0xb0(%rsp), %rsi
callq 0x67c8
movl $0xc0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xb0, %rdi
callq 0x3130
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x3df5
xorl %r15d, %r15d
testl %r13d, %r13d
cmovlel %r15d, %r13d
leaq 0x198(%rsp), %r14
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x3e73
movslq (%rbx), %rbp
movq 0x110(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x32b0
movq 0xf8(%rbx), %r8
addq %r15, %r8
cmpq %rbp, %r12
pushq $0x7c
popq %rsi
pushq $0x3d
popq %rax
cmovll %eax, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %r9d, %r9d
callq 0x42aa
movq %r14, %rdi
callq 0x3130
incq %r12
addq $0x20, %r15
jmp 0x3e24
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xc0, %r12d
leaq (%rsp,%r12), %rdi
addq $0xb0, %rdi
callq 0x3130
addq $-0x20, %r12
cmpq $-0x20, %r12
jne 0x3e8e
movb $0x1, %al
jmp 0x3ebb
jmp 0x3eb6
jmp 0x3eb6
jmp 0x3eb6
jmp 0x3eb6
jmp 0x3eb6
movq %rax, %rbx
xorl %eax, %eax
cmpq %r15, %r14
sete %cl
testb %al, %al
jne 0x3f5d
testb %cl, %cl
jne 0x3f5d
addq $-0x20, %r15
movq %r15, %rdi
callq 0x3130
cmpq %r14, %r15
jne 0x3ed1
jmp 0x3f5d
movq %rax, %rbx
jmp 0x3f5d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x3f34
jmp 0x3f3b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x3f15
jmp 0x3f1c
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x3f15
jmp 0x3f1c
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3130
jmp 0x3f1f
movq %rax, %rbx
movl $0xc0, %esi
movq %r15, %rdi
jmp 0x3f46
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x3130
jmp 0x3f3e
movq %rax, %rbx
movl $0xc0, %esi
movq %r14, %rdi
callq 0x3230
jmp 0x3f5d
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3380
nop