// File: /workspace/github_cpp_makefile_star2_O3/soybin[P]idyll/src/config.cpp
// Function: config::getInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int getInt(std::string name) {
		// file handle
		std::ifstream file("config.txt");

		// create file in case it doesn't exist
		if (!file.good()) {
			std::cout << "[-] Couldn't find 'config.txt' file.\n";
			file.close();
			reset();
			return getInt(name);
		}

		for (std::string line; std::getline(file, line); ) {
			if (line[0] == '#') continue;
			size_t found = line.find(name);
			if (found != std::string::npos) {
				try {
					// check to see if there's any non-numeric character
					for (auto& c : line.substr(found + name.size())) {
						if ((c < '0' || c > '9') && c != ' ') {
							throw 1;
						}
					}
					// get int from line substring
					return std::stoi(line.substr(found + name.size()));
				} catch (...) {
					std::cout << "[-] Invalid value for variable '" << name << "' in config.txt file.\n";
					file.close();
					reset();
					return getInt(name);
				}
			}
		}

		std::cout << "[-] Variable '" << name << "' was not found in 'config.txt' file.\n";
		file.close();
		reset();
		return getInt(name);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, %rbx
leaq 0x8b4f(%rip), %rsi      # 0xe36d
leaq -0x2f8(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x34c0
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x2d8(%rbp,%rax)
je 0x58a8
movq 0xd766(%rip), %rdi      # 0x12fb0
leaq 0x8b27(%rip), %rsi      # 0xe378
movl $0x25, %edx
callq 0x3310
leaq -0x2f8(%rbp), %rdi
callq 0x3070
callq 0x5d0a
leaq -0xe0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x52c8
leaq -0xf0(%rbp), %rdi
callq 0x5800
movl %eax, %r15d
movq -0xf0(%rbp), %rdi
jmp 0x5c36
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq -0xa8(%rbp), %r15
movq %rax, -0x38(%rbp)
movq -0x2f8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x34d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x20(%rax,%rcx), %r12d
testb $0x5, %r12b
jne 0x5b86
movq -0xa8(%rbp), %rax
cmpb $0x23, (%rax)
je 0x58cb
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x3470
cmpq $-0x1, %rax
je 0x5a3c
movq 0x8(%rbx), %rdx
addq %rax, %rdx
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
movq $-0x1, %rcx
movq %rax, %r13
movq %rbx, -0x68(%rbp)
movq %rax, -0x60(%rbp)
callq 0x32e0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
testq %rax, %rax
je 0x5987
xorl %ecx, %ecx
movb (%rdi,%rcx), %dl
leal -0x30(%rdx), %esi
cmpb $0xa, %sil
setb %sil
cmpb $0x20, %dl
sete %dl
orb %sil, %dl
je 0x5a4b
incq %rcx
cmpq %rcx, %rax
jne 0x5962
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x599c
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x32d0
movq 0x8(%rbx), %rdx
addq %r13, %rdx
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x32e0
movq -0x58(%rbp), %rbx
callq 0x3040
movq %rax, %r13
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r13)
movq %rbx, %rdi
leaq -0xb0(%rbp), %rsi
movl $0xa, %edx
callq 0x3370
cmpq %rbx, -0xb0(%rbp)
je 0x5a71
movslq %eax, %rcx
movq %rax, -0x38(%rbp)
cmpq %rax, %rcx
jne 0x5a82
movl (%r13), %eax
cmpl $0x22, %eax
je 0x5a82
testl %eax, %eax
jne 0x5a14
movl -0x2c(%rbp), %eax
movl %eax, (%r13)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5a2d
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x32d0
movq -0x68(%rbp), %rbx
leaq -0x98(%rbp), %r13
movq -0x60(%rbp), %rax
cmpq $-0x1, %rax
je 0x58cb
jmp 0x5b86
movl $0x4, %edi
callq 0x3130
movl $0x1, (%rax)
movq %rax, %rdi
movq 0xd503(%rip), %rsi      # 0x12f68
xorl %edx, %edx
callq 0x3450
jmp 0x5c67
leaq 0x8bf3(%rip), %rdi      # 0xe66b
callq 0x3180
jmp 0x5c67
leaq 0x8be2(%rip), %rdi      # 0xe66b
callq 0x3390
jmp 0x5c67
jmp 0x5a95
movq %rax, %rbx
jmp 0x5ac9
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x5ab0
movl -0x2c(%rbp), %eax
movl %eax, (%r13)
jmp 0x5ab0
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5ac9
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x30f0
movl $0x20, %edx
movq 0xd4d3(%rip), %rdi      # 0x12fb0
leaq 0x88ba(%rip), %rsi      # 0xe39e
callq 0x3310
movq -0x68(%rbp), %rax
movq (%rax), %rsi
movq %rax, %rbx
movq 0x8(%rax), %rdx
movq 0xd4b2(%rip), %rdi      # 0x12fb0
callq 0x3310
movl $0x16, %edx
movq %rax, %rdi
leaq 0x88ad(%rip), %rsi      # 0xe3bf
callq 0x3310
movq %r14, %rdi
callq 0x3070
callq 0x5d0a
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x52c8
leaq -0x88(%rbp), %rdi
callq 0x5800
movq %rax, -0x38(%rbp)
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x5b71
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x32d0
leaq -0x98(%rbp), %r13
callq 0x3400
movq -0x60(%rbp), %rax
jmp 0x5a3c
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x5ba1
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x32d0
testb $0x5, %r12b
movq -0x38(%rbp), %r15
je 0x5c46
movq 0xd3fa(%rip), %rdi      # 0x12fb0
leaq 0x8819(%rip), %rsi      # 0xe3d6
movl $0xe, %edx
callq 0x3310
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0xd3db(%rip), %rdi      # 0x12fb0
callq 0x3310
leaq 0x8804(%rip), %rsi      # 0xe3e5
movl $0x26, %edx
movq %rax, %rdi
callq 0x3310
leaq -0x2f8(%rbp), %rdi
callq 0x3070
callq 0x5d0a
leaq -0xc0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x52c8
leaq -0xd0(%rbp), %rdi
callq 0x5800
movl %eax, %r15d
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5c46
movq (%r14), %rsi
incq %rsi
callq 0x32d0
leaq -0x2f8(%rbp), %rdi
callq 0x3090
movl %r15d, %eax
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5cd1
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x5c8d
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x32d0
jmp 0x5c8d
movq %rax, %rbx
callq 0x3400
jmp 0x5cd4
movq %rax, %rdi
callq 0x52ba
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5cf6
movq -0xc0(%rbp), %rsi
jmp 0x5cee
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5cf6
movq -0xe0(%rbp), %rsi
jmp 0x5cee
movq %rax, %rbx
jmp 0x5cf6
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x5cf6
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x32d0
leaq -0x2f8(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3490