// File: /workspace/github_c_makefile_star2_O2/wjmelements[P]evm/src/dio.c
// Function: loadConfig
void loadConfig(const char *_configFile, int updateConfigFile) {
    if (_configFile != NULL) {
        int fd = open(_configFile, O_RDONLY);
        if (fd == -1) {
            perror(_configFile);
            _exit(1);
        }

        struct stat fstatus;
        int fstatSuccess = fstat(fd, &fstatus);
        if (fstatSuccess == -1) {
            perror(_configFile);
            _exit(1);
        }
        char *configContents = mmap(NULL, fstatus.st_size, PROT_READ, MAP_PRIVATE | MAP_FILE, fd, 0);
        {
            uint64_t prevLineNumber = lineNumber;
            struct testResults results = testResults;

            applyConfig(configContents);
            if (updateConfigFile) {
                updateConfig(configContents, _configFile);
            }

            lineNumber = prevLineNumber;
            testResults = results;
        }
        munmap(configContents, fstatus.st_size);
        close(fd);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
testq %rdi, %rdi
je 0x58d3
movl %esi, %ebx
movq %rdi, %r14
xorl %esi, %esi
xorl %eax, %eax
callq 0x3250
cmpl $-0x1, %eax
je 0x58e5
movl %eax, %ebp
leaq 0x58(%rsp), %rsi
movl %eax, %edi
callq 0x32a0
cmpl $-0x1, %eax
je 0x58e5
movq 0x88(%rsp), %r15
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
xorl %edi, %edi
movq %r15, %rsi
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x30d0
movq %rax, %r12
movq 0x1934c(%rip), %r13     # 0x1ea48
movups 0x19335(%rip), %xmm0    # 0x1ea38
movaps %xmm0, 0x40(%rsp)
movq %rax, %rdi
callq 0x3c08
testl %ebx, %ebx
je 0x58ae
movq %r13, 0x20(%rsp)
movq %r15, 0x30(%rsp)
movl %ebp, 0x1c(%rsp)
movq %r14, 0x38(%rsp)
movq %rsp, %rbx
andq $0x0, (%rbx)
movq $0x7a120, 0x10(%rbx)    # imm = 0x7A120
pushq $0x1
popq %rsi
movl $0x7a120, %edi          # imm = 0x7A120
callq 0x31b0
movq %rax, %r14
movq %rax, 0x8(%rbx)
leaq 0x192e3(%rip), %rbp     # 0x1ea38
xorl %ebx, %ebx
movq %r12, 0x28(%rsp)
movq %r12, %r15
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x583d
movq 0x10(%rbp), %r13
movq %r13, %r14
subq %r15, %r14
addq %r14, %rbx
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x62c8
movq (%rsp), %rbx
movq 0x8(%rsp), %rdi
addq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x31f0
addq %rbx, %r14
movq %r14, (%rsp)
movq 0x18(%rbp), %r15
cmpq %r13, %r15
jne 0x57e3
movq %r12, %rdi
movq %r14, %rsi
callq 0x62c8
movq (%rsp), %r14
movq 0x8(%rsp), %rax
movaps 0x9d47(%rip), %xmm0     # 0xf510
movups %xmm0, 0x10(%rax,%r14)
movaps 0x9d2a(%rip), %xmm0     # 0xf500
movups %xmm0, (%rax,%r14)
addq $0x20, %r14
movq %r14, (%rsp)
addq $0x12, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x62c8
movq (%rsp), %r12
movq 0x8(%rsp), %r14
leaq (%r14,%r12), %rdi
movq 0x10(%rsp), %rsi
subq %r12, %rsi
movq 0x8(%rbp), %rcx
leaq 0x9ce4(%rip), %rdx      # 0xf4f6
xorl %eax, %eax
callq 0x3110
movslq %eax, %rbx
addq %r12, %rbx
movq %rbx, (%rsp)
cmpq %r13, %r15
jne 0x575f
movb $0x22, (%r14,%rbx)
incq %rbx
movq %rbx, (%rsp)
jmp 0x575f
movq %r15, %rdi
callq 0x30c0
movq %rax, %r12
leaq (%r14,%rbx), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x31f0
pushq $0x1
popq %rsi
movq 0x38(%rsp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x3250
cmpl $-0x1, %eax
je 0x58f5
movl %eax, %r15d
addq %rbx, %r12
movl %eax, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x30b0
cmpq $-0x1, %rax
je 0x58f5
movl %r15d, %edi
callq 0x3160
movq %r14, %rdi
callq 0x3040
movl 0x1c(%rsp), %ebp
movq 0x30(%rsp), %r15
movq 0x28(%rsp), %r12
movq 0x20(%rsp), %r13
movq %r13, 0x19193(%rip)     # 0x1ea48
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x19177(%rip)    # 0x1ea38
movq %r12, %rdi
movq %r15, %rsi
callq 0x3230
movl %ebp, %edi
callq 0x3160
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x3260
pushq $0x1
popq %rdi
callq 0x3080
movq %r13, %rdi
callq 0x3260
pushq $0x1
popq %rdi
callq 0x3280