// File: venGaza[P]starwars/src/DetentionBlock.cpp
// Function: DetentionBlock::getChoice[abi:cxx11]()
string DetentionBlock::getChoice() {
    if (!doorOpen) {
        cout << "Please select a choice (enter integer): ";
        int choice = getInteger();
        validate(choice, 1, 4);
        cout << endl;
        
        if (choice == 1) {
            return "north";
        } else if (choice == 2) {
            return "items";
        } else if (choice == 3){
            return "look";
        } else {
            doorOpen = true;
            return "open";
        }
    } else {
        cout << "Please select a choice (enter integer): ";
        int choice = getInteger();
        validate(choice, 1, 4);
        cout << endl;
        
        if (choice == 1) {
            return "north";
        } else if (choice == 2) {
            return "items";
        } else {
            return "look";
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0x68(%rax)
jne 0xa087
movq 0x70c9(%rip), %rdi      # 0x10fd0
leaq 0x12ed(%rip), %rsi      # 0xb1fb
callq 0x31a0
callq 0x95d0
movl %eax, -0x14(%rbp)
leaq -0x14(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x5b40
movq 0x709b(%rip), %rdi      # 0x10fd0
movq 0x7084(%rip), %rsi      # 0x10fc0
callq 0x31d0
cmpl $0x1, -0x14(%rbp)
jne 0x9f92
leaq -0x15(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x3300
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
leaq 0x12c1(%rip), %rsi      # 0xb224
callq 0x3f00
jmp 0x9f6a
leaq -0x15(%rbp), %rdi
callq 0x31f0
jmp 0xa1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x15(%rbp), %rdi
callq 0x31f0
jmp 0xa1b6
cmpl $0x2, -0x14(%rbp)
jne 0x9fe3
leaq -0x25(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3300
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0x1281(%rip), %rsi      # 0xb235
callq 0x3f00
jmp 0x9fbb
leaq -0x25(%rbp), %rdi
callq 0x31f0
jmp 0xa1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x25(%rbp), %rdi
callq 0x31f0
jmp 0xa1b6
cmpl $0x3, -0x14(%rbp)
jne 0xa034
leaq -0x26(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x3300
movq -0x48(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0x1236(%rip), %rsi      # 0xb23b
callq 0x3f00
jmp 0xa00c
leaq -0x26(%rbp), %rdi
callq 0x31f0
jmp 0xa1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x31f0
jmp 0xa1b6
movq -0x38(%rbp), %rax
movb $0x1, 0x68(%rax)
leaq -0x27(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x3300
movq -0x48(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0x1b47(%rip), %rsi      # 0xbb9f
callq 0x3f00
jmp 0xa05f
leaq -0x27(%rbp), %rdi
callq 0x31f0
jmp 0xa1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x27(%rbp), %rdi
callq 0x31f0
jmp 0xa1b6
movq 0x6f42(%rip), %rdi      # 0x10fd0
leaq 0x1166(%rip), %rsi      # 0xb1fb
callq 0x31a0
callq 0x95d0
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x5b40
movq 0x6f14(%rip), %rdi      # 0x10fd0
movq 0x6efd(%rip), %rsi      # 0x10fc0
callq 0x31d0
cmpl $0x1, -0x2c(%rbp)
jne 0xa119
leaq -0x2d(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x3300
movq -0x48(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq 0x113a(%rip), %rsi      # 0xb224
callq 0x3f00
jmp 0xa0f1
leaq -0x2d(%rbp), %rdi
callq 0x31f0
jmp 0xa1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2d(%rbp), %rdi
callq 0x31f0
jmp 0xa1b6
cmpl $0x2, -0x2c(%rbp)
jne 0xa164
leaq -0x2e(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x3300
movq -0x48(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x10fa(%rip), %rsi      # 0xb235
callq 0x3f00
jmp 0xa142
leaq -0x2e(%rbp), %rdi
callq 0x31f0
jmp 0xa1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2e(%rbp), %rdi
callq 0x31f0
jmp 0xa1b6
leaq -0x2f(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x3300
movq -0x48(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0x10bb(%rip), %rsi      # 0xb23b
callq 0x3f00
jmp 0xa187
leaq -0x2f(%rbp), %rdi
callq 0x31f0
jmp 0xa1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2f(%rbp), %rdi
callq 0x31f0
jmp 0xa1b6
movq -0x40(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x32f0
nop