// File: /workspace/github_cpp_makefile_star2_O1/aaronpuchert[P]throttle/src/conf.cpp
// Function: Conf::Conf(char const*)
Conf::Conf(const char *config_fn) {
	// open the file
	std::ifstream conf_file(config_fn);
	if (!conf_file)
		throw std::runtime_error(std::string("Couldn't open config file '") + config_fn + '\'');

	// Read every line and put it in the list.
	char line[LINE_LENGTH];
	std::string name;

	// parse: first comes the name of the command
	while (conf_file >> name) {
		// if line starts with '#', ignore it
		if (name[0] == '#') {
			conf_file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
			continue;
		}

		conf_file.ignore(std::numeric_limits<std::streamsize>::max(), '=');
		conf_file.ignore(std::numeric_limits<std::streamsize>::max(), ' ');
		conf_file.getline(line, LINE_LENGTH);

		DEBUG_PRINT("[Conf] " << name << " = " << line);

		// Write into attribute list
		attributes.emplace_back(name, std::string(line));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x658, %rsp            # imm = 0x658
movq %rsi, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x20(%rsp)
movq $0x0, 0x10(%rdi)
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x2350
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x68(%rsp,%rax)
jne 0x3833
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x38(%rsp), %rbx
movq %rsp, %r15
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x250(%rsp), %r13
leaq 0x28(%rsp), %rbp
movq %r14, %rdi
movq %r15, %rsi
callq 0x2230
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movq (%rsp), %rdi
jne 0x3800
cmpb $0x23, (%rdi)
jne 0x3764
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x2140
jmp 0x372c
movq %r14, %rdi
movq %r12, %rsi
movl $0x3d, %edx
callq 0x2140
movq %r14, %rdi
movq %r12, %rsi
movl $0x20, %edx
callq 0x2140
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %ecx
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
movq %r13, %rsi
callq 0x2380
movq %rbx, 0x28(%rsp)
movq %r13, %rdi
callq 0x20c0
leaq (%rsp,%rax), %rdx
addq $0x250, %rdx            # imm = 0x250
movq %rbp, %rdi
movq %r13, %rsi
callq 0x408a
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x404e
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x372c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x372c
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3817
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x48(%rsp), %rdi
callq 0x2040
addq $0x658, %rsp            # imm = 0x658
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20f0
movq %rax, %r14
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x18a5(%rip), %rsi      # 0x50f6
leaq 0x18b9(%rip), %rdx      # 0x5111
leaq 0x28(%rsp), %rdi
callq 0x408a
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x2370
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3891
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x389d
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x250(%rsp), %rdi
movl $0x27, %edx
callq 0x3fec
movb $0x1, %bl
leaq 0x250(%rsp), %rsi
movq %r14, %rdi
callq 0x22c0
xorl %ebx, %ebx
movq 0x470c(%rip), %rsi      # 0x7ff0
movq 0x46dd(%rip), %rdx      # 0x7fc8
movq %r14, %rdi
callq 0x2300
movq %rax, %r15
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x391e
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x391e
movq %rax, %r15
movb $0x1, %bl
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x393b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x393b
movq %rax, %r15
movb $0x1, %bl
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3959
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x3959
movq %rax, %r15
movb $0x1, %bl
testb %bl, %bl
je 0x39a8
movq %r14, %rdi
callq 0x2160
jmp 0x39a8
movq %rax, %r15
jmp 0x39b2
jmp 0x398a
movq %rax, %r15
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x398d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x398d
movq %rax, %r15
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x39a8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x48(%rsp), %rdi
callq 0x2040
movq 0x20(%rsp), %rdi
callq 0x2f0a
movq %r15, %rdi
callq 0x2330