// File: /workspace/github_cpp_makefile_star2_O1/dnegovan[P]Intruder-On-Donnar-V/dansLibrary.cpp
// Function: getInteger()
int getInteger()
{
    int input;
	std::string stringNumber;

    while(true)
	{
        std::getline(std::cin, stringNumber); //get string input
		std::stringstream convert(stringNumber); //turns the string into stream

		if(convert >> input) //Try to convert to a number
		{
			std::string leftovers;
			std::getline(convert,leftovers); //Reads the rest from the input

			if(leftovers == "") //If leftovers is empty, we have a correct number
			{
                //std::cin.ignore(std::numeric_limits<std::streamsize>::max());
				return input;
			}
            else
            {
				std::cout << "Please enter a valid integer." << std::endl;
			}
		}
        else
        {
			std::cout << "Please enter a valid integer." << std::endl;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xc6b0(%rip), %r14      # 0x1bfd8
leaq -0x70(%rbp), %r12
leaq -0x1f8(%rbp), %r13
movq 0xc68e(%rip), %rbx      # 0x1bfc8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3350
movq %r13, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x32b0
movq %r13, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0xf9c9
movl $0x1d, %edx
movq %rbx, %rdi
leaq 0x6b56(%rip), %rsi      # 0x164eb
callq 0x3210
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movb $0x1, %r15b
movq %rax, %rdi
callq 0x3140
jmp 0xfa71
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
movq -0x1f8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %edx
movq %r13, %rdi
leaq -0x50(%rbp), %rsi
callq 0x3350
leaq -0x50(%rbp), %rdi
leaq 0x6f36(%rip), %rsi      # 0x16945
callq 0x3070
testl %eax, %eax
setne %r15b
je 0xfa59
movl $0x1d, %edx
movq %rbx, %rdi
leaq 0x6ac0(%rip), %rsi      # 0x164eb
callq 0x3210
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
jmp 0xfa5f
movl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfa71
callq 0x31c0
movq %r13, %rdi
movq 0xc525(%rip), %rsi      # 0x1bfa0
callq 0x3170
leaq -0x178(%rbp), %rdi
callq 0x3090
testb %r15b, %r15b
jne 0xf93a
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xfaa7
callq 0x31c0
movl -0x2c(%rbp), %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfad5
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfae1
callq 0x31c0
jmp 0xfae1
movq %rax, %rbx
leaq -0x60(%rbp), %r14
jmp 0xfb04
movq %rax, %rbx
leaq -0x60(%rbp), %r14
movq 0xc4b4(%rip), %rsi      # 0x1bfa0
leaq -0x1f8(%rbp), %rdi
callq 0x3170
leaq -0x178(%rbp), %rdi
callq 0x3090
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xfb12
callq 0x31c0
movq %rbx, %rdi
callq 0x3320