// File: /workspace/github_cpp_makefile_star2_O1/cfiutak1[P]HPyC-KD-Tree/main.cpp
// Function: main
int main(int argc, char** argv) {
    if (argc != 4) {
        printf("Error: Invalid number of arguments (got %d, expected 44)\n", argc);

        return 1;
    }

    std::string training_file_name = argv[1];
    if (!file_exists(training_file_name)) {
        printf("Error: Could not find training file <%s>\n", training_file_name.c_str());

        return 1;
    }

    std::string query_file_name = argv[2];
    if (!file_exists(query_file_name)) {
        printf("Error: Could not find query file <%s>\n", query_file_name.c_str());

        return 1;
    }

    std::string result_file_name = argv[3];

    TrainingFileProcessor training_file_processor(training_file_name);
    QueryFileProcessor query_file_processor(query_file_name);

    runNearestNeighbors(training_file_processor, query_file_processor, result_file_name);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x528, %rsp            # imm = 0x528
cmpl $0x4, %edi
jne 0x25e6
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq 0x28(%rsp), %r14
leaq 0xc8(%rsp), %rdx
movq %r14, %rdi
callq 0x309c
movq (%r14), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x2110
testl %eax, %eax
je 0x2600
movq 0x28(%rsp), %rsi
leaq 0x2abd(%rip), %rdi      # 0x5092
xorl %eax, %eax
callq 0x2040
movl $0x1, %ebx
jmp 0x27fa
movl %edi, %esi
leaq 0x2a69(%rip), %rdi      # 0x5058
xorl %eax, %eax
callq 0x2040
movl $0x1, %ebx
jmp 0x2815
movq 0x10(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
callq 0x309c
movq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x2110
testl %eax, %eax
je 0x2649
movq 0x8(%rsp), %rsi
leaq 0x2a84(%rip), %rdi      # 0x50bc
xorl %eax, %eax
callq 0x2040
movl $0x1, %ebx
jmp 0x27df
movq 0x18(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
callq 0x309c
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x32f6
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x30da
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x26ba
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x32f6
leaq 0x2f8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x3154
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x2703
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x32f6
leaq 0xc8(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x2378
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x275a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x318(%rsp), %rbx
movq %rbx, %rdi
callq 0x2060
movq -0x20(%rbx), %rdi
leaq 0x308(%rsp), %rax
cmpq %rax, %rdi
je 0x278b
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2060
movq -0x20(%rbx), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x27bc
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27dd
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2130
xorl %ebx, %ebx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27fa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2815
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
movl %ebx, %eax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x2841
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x2841
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
callq 0x31ce
jmp 0x286f
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x286f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x286f
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x31ce
jmp 0x28a3
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x28a3
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x28a3
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28c9
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x28c9
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28e9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x28e9
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2904
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
callq 0x21b0