// File: /workspace/github_cpp_makefile_star2_O1/Kyle-Alvares[P]SQA1/session.cpp
// Function: Session::prompt()
void Session::prompt() {
    int max = user.isAdmin() ? 8 : 4;
    while(true) {
        int option;
        bool validOption = false;
        cout << endl << "===========OPTIONS============" << endl;
        cout << "[0] Logout" << endl;
        cout << "[1] Withdraw" << endl;
        cout << "[2] Transfer" << endl;
        cout << "[3] Pay-Bill" << endl;
        cout << "[4] Deposit" << endl;
        if(user.isAdmin()) {
            cout << "[5] Create Account" << endl;
            cout << "[6] Delete Account" << endl;
            cout << "[7] Disable Account" << endl;
            cout << "[8] Change Plan" << endl;
        }
        while(!validOption) {
            validOption = true;
            cout << "Option: ";
            cin >> option;
            if(option < 0 || option > max) { validOption = false; } 
        }
        if(option == 0) {
            break;
        } else if (option == 1) {
            withdraw(500, true);
        } else if (option == 2) {
            transfer();
        } else if (option == 3) {
            payBill();
        } else if (option == 4) {
            deposit();
        } else if (option == 5) {
            createAccount();
        } else if (option == 6) {
            deleteAccount();
        } else if (option == 7) {
            disableAccount();
        } else if (option == 8) {
            changePlan();
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
callq 0x3e2c
movzbl %al, %eax
leal 0x4(,%rax,4), %ebx
movq 0x8a7d(%rip), %r14      # 0xdfc8
leaq 0x5152(%rip), %r13      # 0xa6a4
movq 0x8a7f(%rip), %rbp      # 0xdfd8
leaq 0x14(%rsp), %r15
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq %rax, %r12
movl $0x1e, %edx
movq %rax, %rdi
leaq 0x5066(%rip), %rsi      # 0xa5fd
callq 0x2270
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0xa, %edx
movq %r14, %rdi
leaq 0x5049(%rip), %rsi      # 0xa61c
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0xc, %edx
movq %r14, %rdi
leaq 0x5019(%rip), %rsi      # 0xa627
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0xc, %edx
movq %r14, %rdi
leaq 0x4feb(%rip), %rsi      # 0xa634
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0xc, %edx
movq %r14, %rdi
leaq 0x4fbd(%rip), %rsi      # 0xa641
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0xb, %edx
movq %r14, %rdi
leaq 0x4f8f(%rip), %rsi      # 0xa64e
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq 0x8(%rsp), %rdi
callq 0x3e2c
testb %al, %al
je 0x57e9
movl $0x12, %edx
movq %r14, %rdi
leaq 0x4f4e(%rip), %rsi      # 0xa65a
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0x12, %edx
movq %r14, %rdi
leaq 0x4f26(%rip), %rsi      # 0xa66d
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0x13, %edx
movq %r14, %rdi
leaq 0x4efe(%rip), %rsi      # 0xa680
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0xf, %edx
movq %r14, %rdi
leaq 0x4ed7(%rip), %rsi      # 0xa694
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movl $0x8, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x2270
movq %rbp, %rdi
movq %r15, %rsi
callq 0x2160
movl 0x14(%rsp), %eax
cmpl %ebx, %eax
ja 0x57e9
cmpl $0x8, %eax
ja 0x555e
movl %eax, %eax
leaq 0x4af2(%rip), %rcx      # 0xa310
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rdi
movsd 0x4abc(%rip), %xmm0     # 0xa2f0
movl $0x1, %esi
callq 0x58ca
jmp 0x555e
movq 0x8(%rsp), %rdi
callq 0x739a
jmp 0x555e
movq 0x8(%rsp), %rdi
callq 0x64b4
jmp 0x555e
movq 0x8(%rsp), %rdi
callq 0x6c22
jmp 0x555e
movq 0x8(%rsp), %rdi
callq 0x7e98
jmp 0x555e
movq 0x8(%rsp), %rdi
callq 0x5f6c
jmp 0x555e
movq 0x8(%rsp), %rdi
callq 0x783c
jmp 0x555e
movq 0x8(%rsp), %rdi
callq 0x7b6a
jmp 0x555e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop