// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x288, %rsp            # imm = 0x288
leaq 0x1682c(%rip), %rsi     # 0x1a318
leaq -0x38(%rbp), %rdi
callq 0x33f0
leaq 0x1683c(%rip), %rdi     # 0x1a338
callq 0x4731
testb %al, %al
je 0x3b15
leaq 0x1682c(%rip), %rsi     # 0x1a338
leaq -0x38(%rbp), %rdi
callq 0x31f0
movq 0x164b4(%rip), %rdi     # 0x19fd0
leaq -0x38(%rbp), %rsi
callq 0x32b0
movq %rax, %rdi
callq 0x31b0
leaq -0x288(%rbp), %rdi
leaq -0x38(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3490
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
leaq -0x18(%rbp), %rdi
leaq -0x288(%rbp), %rsi
pushq $0x1
popq %rcx
movl %ecx, %r8d
callq 0x479c
leaq -0x60(%rbp), %rdi
callq 0x4886
leaq 0xbab3(%rip), %rsi      # 0xf627
leaq -0x18(%rbp), %rdi
callq 0x48a6
movb (%rax), %al
addb $-0x5, %al
cmpb $0x2, %al
ja 0x3be1
leaq 0xba9b(%rip), %rsi      # 0xf627
leaq -0x18(%rbp), %rdi
callq 0x48a6
pushq $0x1
popq %rdi
movq %rax, %rsi
callq 0x48fb
testb %al, %al
je 0x3be1
leaq 0xba7c(%rip), %rsi      # 0xf627
leaq -0x18(%rbp), %rdi
callq 0x48a6
pushq $0x78
popq %rsi
movq %rax, %rdi
callq 0x493b
testb %al, %al
je 0x3be1
leaq 0xba5d(%rip), %rsi      # 0xf627
leaq -0x18(%rbp), %rdi
callq 0x48a6
movq %rax, %rdi
callq 0xe604
movl %eax, 0x166f7(%rip)     # 0x1a2d8
leaq 0xba4c(%rip), %rsi      # 0xf634
leaq -0x18(%rbp), %rdi
callq 0x48a6
movb (%rax), %al
addb $-0x5, %al
cmpb $0x2, %al
ja 0x3c55
leaq 0xba34(%rip), %rsi      # 0xf634
leaq -0x18(%rbp), %rdi
callq 0x48a6
pushq $0x1
popq %rdi
movq %rax, %rsi
callq 0x48fb
testb %al, %al
je 0x3c55
leaq 0xba15(%rip), %rsi      # 0xf634
leaq -0x18(%rbp), %rdi
callq 0x48a6
pushq $0x78
popq %rsi
movq %rax, %rdi
callq 0x493b
testb %al, %al
je 0x3c55
leaq 0xb9f6(%rip), %rsi      # 0xf634
leaq -0x18(%rbp), %rdi
callq 0x48a6
movq %rax, %rdi
callq 0xe604
movl %eax, 0x16687(%rip)     # 0x1a2dc
leaq 0xb9e1(%rip), %rsi      # 0xf63d
leaq -0x18(%rbp), %rdi
callq 0x48a6
cmpb $0x3, (%rax)
jne 0x3ca1
leaq 0xb9cc(%rip), %rsi      # 0xf63d
leaq -0x18(%rbp), %rdi
callq 0x48a6
leaq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0xe876
leaq 0x1666b(%rip), %rdi     # 0x1a2f8
leaq -0x80(%rbp), %rbx
movq %rbx, %rsi
callq 0x33a0
movq %rbx, %rdi
callq 0x3598
xorl %eax, %eax
subl 0x1662f(%rip), %eax     # 0x1a2d8
movl %eax, 0x166c5(%rip)     # 0x1a374
leaq -0x18(%rbp), %rdi
callq 0x497e
leaq -0x288(%rbp), %rdi
callq 0x30b0
leaq -0x38(%rbp), %rdi
callq 0x3598
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %rbp
retq
jmp 0x3cee
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4886
jmp 0x3cfa
jmp 0x3ce9
movq %rax, %rbx
jmp 0x3d06
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x497e
leaq -0x288(%rbp), %rdi
callq 0x30b0
leaq -0x38(%rbp), %rdi
callq 0x3598
movq %rbx, %rdi
callq 0x3520