// File: sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::setUInput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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 GameMaster::setUInput(string prompt, string goal1, string goal2) {

    // Simplify goals
    lower(goal1);
    lower(goal2);
    removeWS(goal1);
    removeWS(goal2);

    string output = "\n";
    createTitle('=', WIDTH, prompt, output);
    fillCleanUInput();
    if (uInput == "quit") return; // For every new entry, check for quit

    // Only worry about invalidity if goals not empty
    if (goal1 != "" || goal2 != "") {
        // Must remove situation of XOR, or else empty inputs will be accepted
        if (goal1 == "" && goal2 != "") goal1 = goal2;
        if (goal1 != "" && goal2 == "") goal2 = goal1;

        // Then if wrong input, note invalidity, and re-print prompt
        while (uInput != goal1 && uInput != goal2) {
            clearScreen();
            cout << "\nInvalid input. Try again.\n\n\n";
            output = ""; // Reset output
            createTitle('=', WIDTH, prompt, output);
            fillCleanUInput();
            if (uInput == "quit") return; // For every new entry, check for quit
        }
    }
    clearScreen();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdx, -0xd0(%rbp)
movq %rsi, %rax
movq -0xd0(%rbp), %rsi
movq %rax, -0xc8(%rbp)
movq %rsi, -0xc0(%rbp)
movq %rcx, -0xb0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x6a80
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x6a80
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0x6af0
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x6af0
leaq -0x41(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x3520
movq -0xa8(%rbp), %rdx
leaq 0x15eef(%rip), %rsi     # 0x1c3c7
leaq -0x40(%rbp), %rdi
callq 0x3b80
jmp 0x64e3
leaq -0x41(%rbp), %rdi
callq 0x3350
movq -0xb8(%rbp), %rax
movq -0xc8(%rbp), %rsi
movl 0x4(%rax), %eax
movl %eax, -0xd4(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3170
jmp 0x650e
movl -0xd4(%rbp), %edx
movq -0xb8(%rbp), %rdi
movl $0x3d, %esi
leaq -0x78(%rbp), %rcx
leaq -0x40(%rbp), %r8
movl $0x1, %r9d
callq 0x5350
jmp 0x6535
leaq -0x78(%rbp), %rdi
callq 0x3200
movq -0xb8(%rbp), %rdi
callq 0x6b80
jmp 0x654c
movq -0xb8(%rbp), %rdi
addq $0x70, %rdi
leaq 0x15e42(%rip), %rsi     # 0x1c3a0
callq 0x8a80
movb %al, -0xd5(%rbp)
jmp 0x656b
movb -0xd5(%rbp), %al
testb $0x1, %al
jne 0x6577
jmp 0x65c8
movl $0x1, -0x7c(%rbp)
jmp 0x6841
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x3350
jmp 0x685c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6853
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3200
jmp 0x6853
movq -0xc0(%rbp), %rdi
leaq 0x15df2(%rip), %rsi     # 0x1c3c8
callq 0x8bd0
movb %al, -0xd6(%rbp)
jmp 0x65e3
movb -0xd6(%rbp), %al
testb $0x1, %al
jne 0x6619
jmp 0x65ef
movq -0xb0(%rbp), %rdi
leaq 0x15dcb(%rip), %rsi     # 0x1c3c8
callq 0x8bd0
movb %al, -0xd7(%rbp)
jmp 0x660a
movb -0xd7(%rbp), %al
testb $0x1, %al
jne 0x6619
jmp 0x682c
movq -0xc0(%rbp), %rdi
leaq 0x15da1(%rip), %rsi     # 0x1c3c8
callq 0x8a80
movb %al, -0xd8(%rbp)
jmp 0x6634
movb -0xd8(%rbp), %al
testb $0x1, %al
jne 0x6640
jmp 0x667e
movq -0xb0(%rbp), %rdi
leaq 0x15d7a(%rip), %rsi     # 0x1c3c8
callq 0x8bd0
movb %al, -0xd9(%rbp)
jmp 0x665b
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x6667
jmp 0x667e
movq -0xb0(%rbp), %rsi
movq -0xc0(%rbp), %rdi
callq 0x3050
jmp 0x667c
jmp 0x667e
movq -0xc0(%rbp), %rdi
leaq 0x15d3c(%rip), %rsi     # 0x1c3c8
callq 0x8bd0
movb %al, -0xda(%rbp)
jmp 0x6699
movb -0xda(%rbp), %al
testb $0x1, %al
jne 0x66a5
jmp 0x66e3
movq -0xb0(%rbp), %rdi
leaq 0x15d15(%rip), %rsi     # 0x1c3c8
callq 0x8a80
movb %al, -0xdb(%rbp)
jmp 0x66c0
movb -0xdb(%rbp), %al
testb $0x1, %al
jne 0x66cc
jmp 0x66e3
movq -0xc0(%rbp), %rsi
movq -0xb0(%rbp), %rdi
callq 0x3050
jmp 0x66e1
jmp 0x66e3
jmp 0x66e5
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
addq $0x70, %rdi
callq 0x8c00
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xdc(%rbp)
jne 0x670d
jmp 0x672a
movq -0xb0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
addq $0x70, %rdi
callq 0x8c00
movb %al, -0xdc(%rbp)
movb -0xdc(%rbp), %al
testb $0x1, %al
jne 0x6739
jmp 0x682a
movq -0xb8(%rbp), %rdi
callq 0x5670
jmp 0x6747
movq 0x20872(%rip), %rdi     # 0x26fc0
leaq 0x15c56(%rip), %rsi     # 0x1c3ab
callq 0x32e0
jmp 0x675c
leaq 0x15c65(%rip), %rsi     # 0x1c3c8
leaq -0x40(%rbp), %rdi
callq 0x3400
jmp 0x676e
movq -0xc8(%rbp), %rsi
movq -0xb8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xe0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x3170
jmp 0x6793
movl -0xe0(%rbp), %edx
movq -0xb8(%rbp), %rdi
movl $0x3d, %esi
leaq -0xa0(%rbp), %rcx
leaq -0x40(%rbp), %r8
movl $0x1, %r9d
callq 0x5350
jmp 0x67bd
leaq -0xa0(%rbp), %rdi
callq 0x3200
movq -0xb8(%rbp), %rdi
callq 0x6b80
jmp 0x67d7
movq -0xb8(%rbp), %rdi
addq $0x70, %rdi
leaq 0x15bb7(%rip), %rsi     # 0x1c3a0
callq 0x8a80
movb %al, -0xe1(%rbp)
jmp 0x67f6
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x6802
jmp 0x6825
movl $0x1, -0x7c(%rbp)
jmp 0x6841
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x3200
jmp 0x6853
jmp 0x66e5
jmp 0x682c
movq -0xb8(%rbp), %rdi
callq 0x5670
jmp 0x683a
movl $0x0, -0x7c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3200
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x3200
movq -0x50(%rbp), %rdi
callq 0x3510
nopw %cs:(%rax,%rax)