// File: /workspace/github_cpp_makefile_star2_O1/Juve45[P]batstat/main.cpp
// Function: load_config()
void load_config() {

	string configfile = CONFIG;
	if(checkfile(LOCAL_CONFIG)) 
		configfile = LOCAL_CONFIG;

	cout << configfile << endl;
	ifstream jsonf(configfile);
	json config = json::parse(jsonf, nullptr, true, true);

	if(config["refresh_rate"].is_number() && 1 <= config["refresh_rate"] && config["refresh_rate"] <= 120) 
		refreshRate = config["refresh_rate"];

	if(config["log_rate"].is_number() && 1 <= config["log_rate"] && config["log_rate"] <= 120)
		LOG_P = config["log_rate"];

	if(config["power_supply_path"].is_string())
		PATH = config["power_supply_path"];

	timeElapsed = -refreshRate;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x16439(%rip), %rsi     # 0x1a320
movq 0x1643a(%rip), %rdx     # 0x1a328
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x518a
movq 0x1643f(%rip), %rdi     # 0x1a340
leaq 0xe5e9(%rip), %rsi      # 0x124f1
callq 0x33b0
testq %rax, %rax
je 0x3f2a
movq %rax, %rdi
callq 0x3310
leaq 0x1641f(%rip), %rsi     # 0x1a340
leaq -0x48(%rbp), %rdi
callq 0x31f0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x16097(%rip), %rdi     # 0x19fd0
callq 0x3370
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3300
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3220
leaq -0x298(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x8, %edx
callq 0x34a0
xorps %xmm0, %xmm0
leaq -0x90(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
leaq -0x28(%rbp), %rdi
leaq -0x298(%rbp), %rsi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x4e84
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x3fc3
leaq -0x90(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xd66d(%rip), %rsi      # 0x11637
leaq -0x28(%rbp), %rdi
callq 0x4fda
movb (%rax), %al
addb $-0x5, %al
cmpb $0x2, %al
ja 0x4048
leaq 0xd655(%rip), %rsi      # 0x11637
leaq -0x28(%rbp), %rdi
callq 0x4fda
movl $0x1, %edi
movq %rax, %rsi
callq 0x5041
testb %al, %al
je 0x4048
leaq 0xd634(%rip), %rsi      # 0x11637
leaq -0x28(%rbp), %rdi
callq 0x4fda
movq %rax, %rdi
movl $0x78, %esi
callq 0x509c
testb %al, %al
je 0x4048
leaq 0xd613(%rip), %rsi      # 0x11637
leaq -0x28(%rbp), %rdi
callq 0x4fda
leaq -0x68(%rbp), %rsi
movl $0x0, (%rsi)
movq %rax, %rdi
callq 0xfb1d
movl -0x68(%rbp), %eax
movl %eax, 0x16298(%rip)     # 0x1a2e0
leaq 0xd5f5(%rip), %rsi      # 0x11644
leaq -0x28(%rbp), %rdi
callq 0x4fda
movb (%rax), %al
addb $-0x5, %al
cmpb $0x2, %al
ja 0x40cd
leaq 0xd5dd(%rip), %rsi      # 0x11644
leaq -0x28(%rbp), %rdi
callq 0x4fda
movl $0x1, %edi
movq %rax, %rsi
callq 0x5041
testb %al, %al
je 0x40cd
leaq 0xd5bc(%rip), %rsi      # 0x11644
leaq -0x28(%rbp), %rdi
callq 0x4fda
movq %rax, %rdi
movl $0x78, %esi
callq 0x509c
testb %al, %al
je 0x40cd
leaq 0xd59b(%rip), %rsi      # 0x11644
leaq -0x28(%rbp), %rdi
callq 0x4fda
leaq -0x68(%rbp), %rsi
movl $0x0, (%rsi)
movq %rax, %rdi
callq 0xfb1d
movl -0x68(%rbp), %eax
movl %eax, 0x16217(%rip)     # 0x1a2e4
leaq 0xd579(%rip), %rsi      # 0x1164d
leaq -0x28(%rbp), %rdi
callq 0x4fda
cmpb $0x3, (%rax)
jne 0x4122
leaq 0xd564(%rip), %rsi      # 0x1164d
leaq -0x28(%rbp), %rdi
callq 0x4fda
leaq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0xfe1a
leaq 0x161fb(%rip), %rdi     # 0x1a300
leaq -0x68(%rbp), %rbx
movq %rbx, %rsi
callq 0x33d0
movq (%rbx), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4122
callq 0x32f0
xorl %eax, %eax
subl 0x161b6(%rip), %eax     # 0x1a2e0
movl %eax, 0x1624c(%rip)     # 0x1a37c
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x52be
movq %rbx, %rdi
callq 0x5396
leaq -0x298(%rbp), %rdi
callq 0x30c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x4160
callq 0x32f0
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4191
jmp 0x41a0
movq %rax, %rbx
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x41b9
leaq -0x90(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x41b9
movq %rax, %rdi
callq 0x517b
jmp 0x419b
movq %rax, %rbx
jmp 0x41c5
movq %rax, %rbx
leaq -0x28(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x52be
movq %r14, %rdi
callq 0x5396
leaq -0x298(%rbp), %rdi
callq 0x30c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x41d3
callq 0x32f0
movq %rbx, %rdi
callq 0x3530