// File: /workspace/github_cpp_makefile_star2_O3/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 0x3694
leaq 0x274e(%rip), %rsi      # 0x5030
movq %r15, %rdi
callq 0x39be
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x2f96
leaq 0x272c(%rip), %rsi      # 0x503a
leaq 0x8(%rsp), %rdi
callq 0x39be
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x3048
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %r12
cmpq %r12, %r15
je 0x2961
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 0x3263
movq %r15, %rdi
movq %r12, %rsi
callq 0x3346
leaq 0x26dc(%rip), %rsi      # 0x5044
leaq 0x8(%rsp), %rdi
callq 0x39be
movq %rax, %r15
leaq 0x26d8(%rip), %rsi      # 0x5054
leaq 0x8(%rsp), %rdi
callq 0x39be
movq %rax, %r12
leaq 0x26d4(%rip), %rsi      # 0x5064
leaq 0x8(%rsp), %rdi
callq 0x39be
movq %rax, %rdi
callq 0x3592
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0x2740
leaq 0x26af(%rip), %rsi      # 0x506a
leaq 0x8(%rsp), %rdi
callq 0x39be
movq %rax, %rdi
callq 0x3612
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %r8
movl %eax, %r9d
callq 0x2af0
leaq 0x60(%rsp), %rdi
callq 0x26e2
leaq 0x2674(%rip), %rsi      # 0x506f
leaq 0x8(%rsp), %rdi
callq 0x39be
movq %rax, %rdi
callq 0x3612
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, 0x4c(%rbx)
leaq 0x265b(%rip), %rsi      # 0x5078
leaq 0x8(%rsp), %rdi
callq 0x39be
movq %rax, %rdi
callq 0x3612
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, 0x48(%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2a4f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a66
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
callq 0x2f0e
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2aac
movq %rax, %r14
jmp 0x2ac6
movq %rax, %r14
jmp 0x2add
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x26e2
jmp 0x2aaf
movq %rax, %r14
movq %rbx, %rdi
callq 0x2692
jmp 0x2aaf
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2ac6
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x2add
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
callq 0x2f0e
movq %r14, %rdi
callq 0x2330
nop