// File: 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
subq $0x220, %rsp            # imm = 0x220
leaq -0x28(%rbp), %rdi
callq 0x3300
jmp 0x175d6
movq 0x119fb(%rip), %rdi     # 0x28fd8
leaq -0x28(%rbp), %rsi
callq 0x3050
jmp 0x175e8
movl $0x10, %edi
movl $0x8, %esi
callq 0x18b70
movl %eax, -0x1e8(%rbp)
jmp 0x175ff
movl -0x1e8(%rbp), %edx
leaq -0x1c0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3350
jmp 0x17617
leaq -0x1c0(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x3140
movq %rax, -0x1f0(%rbp)
jmp 0x17630
movq -0x1f0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3280
movb %al, -0x1f1(%rbp)
jmp 0x1764e
movb -0x1f1(%rbp), %al
testb $0x1, %al
jne 0x1765d
jmp 0x17754
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x3300
movq -0x200(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x3050
jmp 0x17685
leaq 0x82b9(%rip), %rsi      # 0x1f945
leaq -0x1e0(%rbp), %rdi
callq 0x18b90
movb %al, -0x201(%rbp)
jmp 0x176a0
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x176ac
jmp 0x176fd
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x1e4(%rbp)
jmp 0x1773a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x177d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x177ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3448
jmp 0x177ae
movq 0x118c4(%rip), %rdi     # 0x28fc8
leaq 0x7de0(%rip), %rsi      # 0x1f4eb
callq 0x3210
movq %rax, -0x210(%rbp)
jmp 0x17719
movq -0x210(%rbp), %rdi
movq 0x11889(%rip), %rsi     # 0x28fb0
callq 0x3240
jmp 0x1772e
jmp 0x17730
movl $0x0, -0x1e4(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3448
movl -0x1e4(%rbp), %eax
testl %eax, %eax
jne 0x17791
jmp 0x17752
jmp 0x17787
movq 0x1186d(%rip), %rdi     # 0x28fc8
leaq 0x7d89(%rip), %rsi      # 0x1f4eb
callq 0x3210
movq %rax, -0x218(%rbp)
jmp 0x17770
movq -0x218(%rbp), %rdi
movq 0x11832(%rip), %rsi     # 0x28fb0
callq 0x3240
jmp 0x17785
jmp 0x17787
movl $0x0, -0x1e4(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x3190
movl -0x1e4(%rbp), %eax
testl %eax, %eax
jne 0x177bc
jmp 0x177a9
jmp 0x175d4
leaq -0x1c0(%rbp), %rdi
callq 0x3190
jmp 0x177d1
leaq -0x28(%rbp), %rdi
callq 0x3448
movl -0x4(%rbp), %eax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x3448
movq -0x30(%rbp), %rdi
callq 0x33c0
nopw %cs:(%rax,%rax)