// File: /workspace/github_cpp_makefile_star2_O2/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 $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, %rbx
leaq 0x6f6f(%rip), %rsi      # 0xc36d
leaq -0x2e0(%rbp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x3490
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x2c0(%rbp,%rax)
je 0x5464
movq 0xcb88(%rip), %rdi      # 0x11fb0
leaq 0x6f49(%rip), %rsi      # 0xc378
callq 0x3290
leaq -0x2e0(%rbp), %rdi
callq 0x3080
callq 0x5711
leaq -0xd8(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3350
movq %r14, %rdi
callq 0x53e0
jmp 0x5683
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x78(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x20(%rax,%rcx), %r13d
testb $0x5, %r13b
jne 0x561c
movq -0x78(%rbp), %rax
cmpb $0x23, (%rax)
je 0x5478
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3500
cmpq $-0x1, %rax
je 0x5572
movq 0x8(%rbx), %rdx
movq %rax, -0x38(%rbp)
addq %rax, %rdx
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
pushq $-0x1
popq %rcx
movq %rbx, -0x30(%rbp)
callq 0x32c0
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x552c
movb (%rax,%rdx), %sil
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
setb %dil
cmpb $0x20, %sil
sete %sil
orb %dil, %sil
incq %rdx
testb %sil, %sil
jne 0x54e1
pushq $0x4
popq %rdi
callq 0x3130
movl $0x1, (%rax)
movq %rax, %rdi
movq 0xca48(%rip), %rsi      # 0x11f68
xorl %edx, %edx
callq 0x3430
jmp 0x56af
movq %rbx, %r12
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x3100
movq 0x8(%r12), %rdx
addq -0x38(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
pushq $-0x1
popq %rcx
callq 0x32c0
movq %rbx, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x5999
movl %eax, %r12d
movq %rbx, %rdi
callq 0x3100
movq -0x30(%rbp), %rbx
movq -0x38(%rbp), %rax
cmpq $-0x1, %rax
je 0x5478
jmp 0x561c
movq %rax, %r12
movq %rbx, %rdi
jmp 0x5597
jmp 0x558b
movq %rax, %r12
jmp 0x559c
movq %rax, %r12
leaq -0x58(%rbp), %rdi
callq 0x3100
movq %r12, %rdi
callq 0x30e0
movq 0xca05(%rip), %rdi      # 0x11fb0
leaq 0x6dec(%rip), %rsi      # 0xc39e
callq 0x3290
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x3260
movq %rax, %rdi
leaq 0x6df2(%rip), %rsi      # 0xc3bf
callq 0x3290
movq %r14, %rdi
callq 0x3080
callq 0x5711
leaq -0x98(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3350
leaq -0x98(%rbp), %rdi
callq 0x53e0
movl %eax, %r12d
leaq -0x98(%rbp), %rdi
callq 0x3100
callq 0x33f0
movq -0x30(%rbp), %rbx
movq -0x38(%rbp), %rax
jmp 0x5572
leaq -0x78(%rbp), %rdi
callq 0x3100
testb $0x5, %r13b
je 0x568e
movq 0xc97e(%rip), %rdi      # 0x11fb0
leaq 0x6d9d(%rip), %rsi      # 0xc3d6
callq 0x3290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3260
leaq 0x6d95(%rip), %rsi      # 0xc3e5
movq %rax, %rdi
callq 0x3290
leaq -0x2e0(%rbp), %rdi
callq 0x3080
callq 0x5711
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3350
movq %r14, %rdi
callq 0x53e0
movl %eax, %r12d
movq %r14, %rdi
callq 0x3100
leaq -0x2e0(%rbp), %rdi
callq 0x30a0
movl %r12d, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x56f1
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x3100
jmp 0x56c5
movq %rax, %rbx
callq 0x33f0
jmp 0x56f4
movq %rax, %rdi
callq 0x4b1a
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
jmp 0x56f8
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
jmp 0x56f8
movq %rax, %rbx
jmp 0x56fd
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x3100
leaq -0x2e0(%rbp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x3460