// File: /workspace/github_cpp_makefile_star2_O2/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::startScreen()
void GameMaster::startScreen() {
    string loadSave    = "load";
    string newGame     = "new";
    string savePrompt  = "Previous save detected. Type \"" + loadSave + "\" ";
           savePrompt += "to launch it or \"" + newGame + "\" to start fresh.";

    ///////////// First print game title /////////////
    clearScreen();


    int requestedLevel = getStartingLevel();         // Based on separate file

    ///////////// Next change behaviour if previous save detected /////////////
    if (requestedLevel > 0) {
        setUInput(savePrompt, loadSave, newGame);
        if (uInput == "quit") return; // For every new entry, check for quit

        // Previous save detected and loaded
        if (uInput == loadSave) {
            currLevel = requestedLevel;              // Change level
            loadPlayerSavedInventory();              // Adjusts player inv
        }
        // Previous save detected, but ignored
        else if (uInput == newGame) currLevel = 0;   // Start at beginning
        cout << endl;
    }
    ///////////// Or continue as normal if no save detected /////////////
    else {
        currLevel = 0;
        checkpoint();                                // Opportunity for skip
        if (uInput == "quit") return; // For every new entry, check for quit
    }

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0x7a5e(%rip), %rsi      # 0xc341
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x3860
leaq 0x7a4d(%rip), %rsi      # 0xc346
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x3860
leaq 0x7a3b(%rip), %rsi      # 0xc34a
movq %rsp, %rdi
leaq 0x60(%rsp), %rdx
callq 0x5c1a
leaq 0x7a46(%rip), %rdx      # 0xc369
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x5a9a
movq %rsp, %rdi
callq 0x3130
leaq 0x7a2d(%rip), %rsi      # 0xc36c
leaq 0xe0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x5c1a
leaq 0x7a26(%rip), %rdx      # 0xc37e
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x5a9a
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x33d0
movq %rsp, %rdi
callq 0x3130
leaq 0xe0(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x442e
movq %rbx, %rdi
callq 0x468a
movl %eax, %ebp
testl %eax, %eax
jle 0x4a56
leaq 0xc0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x32b0
leaq 0xa0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x32b0
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x32b0
leaq 0xc0(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
leaq 0x80(%rsp), %rcx
movq %rbx, %rdi
callq 0x4b52
leaq 0x80(%rsp), %rdi
callq 0x3130
leaq 0xa0(%rsp), %rdi
callq 0x3130
leaq 0xc0(%rsp), %rdi
callq 0x3130
leaq 0x70(%rbx), %r14
leaq 0x7964(%rip), %rsi      # 0xc390
movq %r14, %rdi
callq 0x5c90
testb %al, %al
jne 0x4a98
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0x5c9d
testb %al, %al
je 0x4a77
movl %ebp, 0x68(%rbx)
movq %rbx, %rdi
callq 0x472c
jmp 0x4a8c
andl $0x0, 0x68(%rbx)
movq %rbx, %rdi
callq 0x4d78
addq $0x70, %rbx
leaq 0x7923(%rip), %rsi      # 0xc390
movq %rbx, %rdi
callq 0x5c90
jmp 0x4a98
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x5c9d
testb %al, %al
je 0x4a8c
andl $0x0, 0x68(%rbx)
movq 0xe535(%rip), %rdi      # 0x12fc8
callq 0x3150
leaq 0x40(%rsp), %rdi
callq 0x3130
leaq 0x20(%rsp), %rdi
callq 0x3130
leaq 0x60(%rsp), %rdi
callq 0x3130
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x3130
jmp 0x4ad7
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x3130
jmp 0x4ae9
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x4b0d
jmp 0x4b28
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3130
jmp 0x4b05
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x3130
jmp 0x4b2b
jmp 0x4b28
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x4b30
movq %rax, %rbx
jmp 0x4b35
movq %rax, %rbx
jmp 0x4b3f
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3130
leaq 0x20(%rsp), %rdi
callq 0x3130
leaq 0x60(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3380
nop