// File: /workspace/github_cpp_makefile_star2_O2/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 $0x668, %rsp            # imm = 0x668
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x10(%rsp)
andq $0x0, 0x10(%rdi)
leaq 0x58(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2350
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x78(%rsp,%rax)
jne 0x3674
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%rsp), %r14
leaq 0x18(%rsp), %r15
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x260(%rsp), %rbp
leaq 0x38(%rsp), %r13
leaq 0xf(%rsp), %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x364e
movq 0x18(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x35f7
movq %r14, %rdi
movq %r12, %rsi
pushq $0xa
popq %rdx
callq 0x2150
jmp 0x35c4
movq %r14, %rdi
movq %r12, %rsi
pushq $0x3d
popq %rdx
callq 0x2150
movq %r14, %rdi
movq %r12, %rsi
pushq $0x20
popq %rdx
callq 0x2150
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
movq %rbp, %rsi
callq 0x2070
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x3c66
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x3ca2
movq %r13, %rdi
callq 0x20c0
jmp 0x35c4
leaq 0x18(%rsp), %rdi
callq 0x20c0
leaq 0x58(%rsp), %rdi
callq 0x2040
addq $0x668, %rsp            # imm = 0x668
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2100
movq %rax, %r14
leaq 0xa46(%rip), %rsi       # 0x40cc
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3c66
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %rbx, %rdx
callq 0x3c46
leaq 0x260(%rsp), %rdi
leaq 0x18(%rsp), %rsi
pushq $0x27
popq %rdx
callq 0x3c24
movb $0x1, %bl
leaq 0x260(%rsp), %rsi
movq %r14, %rdi
callq 0x22c0
xorl %ebx, %ebx
movq 0x3919(%rip), %rsi      # 0x6ff0
movq 0x38ea(%rip), %rdx      # 0x6fc8
movq %r14, %rdi
callq 0x2300
movq %rax, %r15
leaq 0x260(%rsp), %rdi
callq 0x20c0
jmp 0x36fd
movq %rax, %r15
movb $0x1, %bl
leaq 0x18(%rsp), %rdi
callq 0x20c0
jmp 0x370e
movq %rax, %r15
movb $0x1, %bl
leaq 0x38(%rsp), %rdi
callq 0x20c0
testb %bl, %bl
jne 0x3721
jmp 0x374e
movq %rax, %r15
movq %r14, %rdi
callq 0x2170
jmp 0x374e
movq %rax, %r15
jmp 0x3758
jmp 0x3741
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x20c0
jmp 0x3744
movq %rax, %r15
leaq 0x18(%rsp), %rdi
callq 0x20c0
leaq 0x58(%rsp), %rdi
callq 0x2040
movq 0x10(%rsp), %rdi
callq 0x2cf6
movq %r15, %rdi
callq 0x2330