// File: /workspace/github_cpp_makefile_star2_O1/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 0x8b77(%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 0x5880
movq 0xd796(%rip), %rdi      # 0x12fb8
leaq 0x8b4f(%rip), %rsi      # 0xe378
movl $0x25, %edx
callq 0x3310
leaq -0x2f8(%rbp), %rdi
callq 0x3070
callq 0x5ce2
leaq -0xe0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x52a8
leaq -0xf0(%rbp), %rdi
callq 0x57d8
movl %eax, %r15d
movq -0xf0(%rbp), %rdi
jmp 0x5c0e
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 0x5b5e
movq -0xa8(%rbp), %rax
cmpb $0x23, (%rax)
je 0x58a3
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x3470
cmpq $-0x1, %rax
je 0x5a14
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 0x595f
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 0x5a23
incq %rcx
cmpq %rcx, %rax
jne 0x593a
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5974
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 0x5a49
movslq %eax, %rcx
movq %rax, -0x38(%rbp)
cmpq %rax, %rcx
jne 0x5a5a
movl (%r13), %eax
cmpl $0x22, %eax
je 0x5a5a
testl %eax, %eax
jne 0x59ec
movl -0x2c(%rbp), %eax
movl %eax, (%r13)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5a05
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x32d0
movq -0x68(%rbp), %rbx
leaq -0x98(%rbp), %r13
movq -0x60(%rbp), %rax
cmpq $-0x1, %rax
je 0x58a3
jmp 0x5b5e
movl $0x4, %edi
callq 0x3130
movl $0x1, (%rax)
movq %rax, %rdi
movq 0xd533(%rip), %rsi      # 0x12f70
xorl %edx, %edx
callq 0x3450
jmp 0x5c3f
leaq 0x8c1b(%rip), %rdi      # 0xe66b
callq 0x3180
jmp 0x5c3f
leaq 0x8c0a(%rip), %rdi      # 0xe66b
callq 0x3390
jmp 0x5c3f
jmp 0x5a6d
movq %rax, %rbx
jmp 0x5aa1
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x5a88
movl -0x2c(%rbp), %eax
movl %eax, (%r13)
jmp 0x5a88
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5aa1
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x30f0
movl $0x20, %edx
movq 0xd503(%rip), %rdi      # 0x12fb8
leaq 0x88e2(%rip), %rsi      # 0xe39e
callq 0x3310
movq -0x68(%rbp), %rax
movq (%rax), %rsi
movq %rax, %rbx
movq 0x8(%rax), %rdx
movq 0xd4e2(%rip), %rdi      # 0x12fb8
callq 0x3310
movl $0x16, %edx
movq %rax, %rdi
leaq 0x88d5(%rip), %rsi      # 0xe3bf
callq 0x3310
movq %r14, %rdi
callq 0x3070
callq 0x5ce2
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x52a8
leaq -0x88(%rbp), %rdi
callq 0x57d8
movq %rax, -0x38(%rbp)
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x5b49
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x32d0
leaq -0x98(%rbp), %r13
callq 0x3400
movq -0x60(%rbp), %rax
jmp 0x5a14
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x5b79
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x32d0
testb $0x5, %r12b
movq -0x38(%rbp), %r15
je 0x5c1e
movq 0xd42a(%rip), %rdi      # 0x12fb8
leaq 0x8841(%rip), %rsi      # 0xe3d6
movl $0xe, %edx
callq 0x3310
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0xd40b(%rip), %rdi      # 0x12fb8
callq 0x3310
leaq 0x882c(%rip), %rsi      # 0xe3e5
movl $0x26, %edx
movq %rax, %rdi
callq 0x3310
leaq -0x2f8(%rbp), %rdi
callq 0x3070
callq 0x5ce2
leaq -0xc0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x52a8
leaq -0xd0(%rbp), %rdi
callq 0x57d8
movl %eax, %r15d
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5c1e
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 0x5ca9
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x5c65
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x32d0
jmp 0x5c65
movq %rax, %rbx
callq 0x3400
jmp 0x5cac
movq %rax, %rdi
callq 0x529a
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5cce
movq -0xc0(%rbp), %rsi
jmp 0x5cc6
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5cce
movq -0xe0(%rbp), %rsi
jmp 0x5cc6
movq %rax, %rbx
jmp 0x5cce
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x5cce
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x32d0
leaq -0x2f8(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3490