// File: /workspace/github_cpp_makefile_star2_O1/aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::createFromConfig(char const*, char const*)
Throttle Throttle::createFromConfig(const char *config_fn, const char* pipe_fn)
{
	// open the configuration file
	Conf conf(config_fn);

	// read all variables
	std::string temp_fn = conf.GetAttr("temp_file");
	std::vector<int> freqs = conf.ParseAttr<std::vector<int>>("freq_list");
	std::sort(freqs.begin(), freqs.end());

	Throttle ret(std::move(temp_fn),
	             FreqFilenames(conf.GetAttr("freq_set_prefix"),
	                           conf.GetAttr("freq_set_suffix"),
	                           conf.ParseAttr<unsigned>("cores")),
	             std::move(freqs), pipe_fn, conf.ParseAttr<int>("wait"));
	ret.setMinTemp(conf.ParseAttr<int>("temp_min"));
	ret.setMaxTemp(conf.ParseAttr<int>("temp_max"));
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x36ac
leaq 0x274a(%rip), %rsi      # 0x5030
movq %r15, %rdi
callq 0x39c4
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x2f92
leaq 0x2728(%rip), %rsi      # 0x503a
leaq 0x8(%rsp), %rdi
callq 0x39c4
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x303e
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %r12
cmpq %r12, %r15
je 0x2965
movq %r12, %rax
subq %r15, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3259
movq %r15, %rdi
movq %r12, %rsi
callq 0x333c
leaq 0x26d8(%rip), %rsi      # 0x5044
leaq 0x8(%rsp), %rdi
callq 0x39c4
movq %rax, %r15
leaq 0x26d4(%rip), %rsi      # 0x5054
leaq 0x8(%rsp), %rdi
callq 0x39c4
movq %rax, %r12
leaq 0x26d0(%rip), %rsi      # 0x5064
leaq 0x8(%rsp), %rdi
callq 0x39c4
movq %rax, %rdi
callq 0x35ac
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0x2744
leaq 0x26ab(%rip), %rsi      # 0x506a
leaq 0x8(%rsp), %rdi
callq 0x39c4
movq %rax, %rdi
callq 0x362c
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %r8
movl %eax, %r9d
callq 0x2af4
leaq 0x60(%rsp), %rdi
callq 0x26e6
leaq 0x2670(%rip), %rsi      # 0x506f
leaq 0x8(%rsp), %rdi
callq 0x39c4
movq %rax, %rdi
callq 0x362c
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, 0x4c(%rbx)
leaq 0x2657(%rip), %rsi      # 0x5078
leaq 0x8(%rsp), %rdi
callq 0x39c4
movq %rax, %rdi
callq 0x362c
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, 0x48(%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2a53
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a6a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
callq 0x2f0a
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2ab0
movq %rax, %r14
jmp 0x2aca
movq %rax, %r14
jmp 0x2ae1
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x26e6
jmp 0x2ab3
movq %rax, %r14
movq %rbx, %rdi
callq 0x2696
jmp 0x2ab3
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2aca
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ae1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
callq 0x2f0a
movq %r14, %rdi
callq 0x2330
nop