// File: /workspace/github_c_makefile_star2_O1/OpenGene[P]pecheck/src/main.cpp
// Function: main
int main(int argc, char* argv[]){
    // display version info if no argument is given
    if(argc == 1) {
        cout << "A tool to check paired-end FASTQ data integrity" << endl << "version " << VERSION_NUM << endl;
    }
    if (argc == 2 && strcmp(argv[1], "test")==0){
        UnitTest tester;
        tester.run();
        return 0;
    }
    cmdline::parser cmd;
    // input/output
    cmd.add<string>("in1", 'i', "read1 file name", true, "");
    cmd.add<string>("in2", 'I', "read2 file name", true, "");
    cmd.add<string>("json", 'j', "json report file name", true, "pecheck.json");

    cmd.parse_check(argc, argv);
    
    stringstream ss;
    for(int i=0;i<argc;i++){
        ss << argv[i] << " ";
    }
    command = ss.str();

    time_t t1 = time(NULL);

    Options opt;

    opt.in1 = cmd.get<string>("in1");
    opt.in2 = cmd.get<string>("in2");
    opt.jsonFile = cmd.get<string>("json");

    opt.validate();

    PECheck pecheck(&opt);
    pecheck.run();

    time_t t2 = time(NULL);

    cerr << endl << "JSON report: " << opt.jsonFile << endl;
    cerr << endl << command << endl;
    cerr << "pecheck v" << VERSION_NUM << ", time used: " << (t2)-t1 << " seconds" << endl;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
movq %rsi, %r14
movl %edi, %ebp
cmpl $0x2, %edi
je 0x4fee
cmpl $0x1, %ebp
jne 0x5006
movq 0xd071(%rip), %rbx      # 0x11fd0
leaq 0x815c(%rip), %rsi      # 0xd0c2
movl $0x2f, %edx
movq %rbx, %rdi
callq 0x3350
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31c0
movq %rax, %rbx
leaq 0x814e(%rip), %rsi      # 0xd0f2
movl $0x8, %edx
movq %rax, %rdi
callq 0x3350
leaq 0x8143(%rip), %rsi      # 0xd0fb
movl $0x5, %edx
movq %rbx, %rdi
callq 0x3350
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31c0
jmp 0x5006
movq 0x8(%r14), %rdi
leaq 0x8108(%rip), %rsi      # 0xd101
callq 0x33d0
testl %eax, %eax
je 0x5738
leaq 0x2a8(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
leaq 0x2f8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x30(%rax)
movups %xmm0, -0x20(%rax)
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x318(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
leaq 0x128(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x83ec(%rip), %rsi      # 0xd45c
leaq 0x83e8(%rip), %rdx      # 0xd45f
leaq 0x118(%rsp), %rdi
callq 0x4e10
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8071(%rip), %rsi      # 0xd106
leaq 0x8079(%rip), %rdx      # 0xd115
leaq 0x8(%rsp), %rdi
callq 0x4e10
leaq 0x108(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8a92(%rip), %rdx      # 0xdb4b
leaq 0xf8(%rsp), %rdi
movq %rdx, %rsi
callq 0x4e10
leaq 0x2a0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x8(%rsp), %rcx
leaq 0xf8(%rsp), %r9
movl $0x69, %edx
movl $0x1, %r8d
callq 0x58a8
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5113
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x512a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5147
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x118(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x832c(%rip), %rsi      # 0xd485
leaq 0x8328(%rip), %rdx      # 0xd488
callq 0x4e10
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7fa2(%rip), %rsi      # 0xd116
leaq 0x7faa(%rip), %rdx      # 0xd125
callq 0x4e10
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x89b8(%rip), %rdx      # 0xdb4b
leaq 0xd8(%rsp), %rdi
movq %rdx, %rsi
callq 0x4e10
leaq 0x2a0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x8(%rsp), %rcx
leaq 0xd8(%rsp), %r9
movl $0x49, %edx
movl $0x1, %r8d
callq 0x58a8
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x51ed
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5204
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5221
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x118(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x7f11(%rip), %rsi      # 0xd144
leaq 0x7f0e(%rip), %rdx      # 0xd148
callq 0x4e10
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7ed8(%rip), %rsi      # 0xd126
leaq 0x7ee6(%rip), %rdx      # 0xd13b
callq 0x4e10
leaq 0xc8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7ecf(%rip), %rsi      # 0xd13c
leaq 0x7ed4(%rip), %rdx      # 0xd148
leaq 0xb8(%rsp), %rdi
callq 0x4e10
leaq 0x2a0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x8(%rsp), %rcx
leaq 0xb8(%rsp), %r9
movl $0x6a, %edx
movl $0x1, %r8d
callq 0x58a8
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x52cb
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x52e2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x52ff
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x2a0(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x598a
leaq 0x118(%rsp), %rdi
callq 0x31e0
testl %ebp, %ebp
jle 0x5386
movl %ebp, %ebp
xorl %r13d, %r13d
leaq 0x7ed3(%rip), %r15      # 0xd201
movq (%r14,%r13,8), %r12
testq %r12, %r12
je 0x534f
movq %r12, %rdi
callq 0x3140
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3350
jmp 0x536e
movq 0x128(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x148(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x34d0
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3350
incq %r13
cmpq %r13, %rbp
jne 0x532e
leaq 0x130(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3480
leaq 0xcf51(%rip), %rdi      # 0x122f0
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x3390
movq (%rbx), %rdi
leaq 0x18(%rsp), %r13
cmpq %r13, %rdi
je 0x53c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
xorl %edi, %edi
callq 0x3280
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8ef0
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8072(%rip), %rsi      # 0xd45c
leaq 0x806e(%rip), %rdx      # 0xd45f
leaq 0x68(%rsp), %rdi
callq 0x4e10
leaq 0x2a0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5ae8
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x31a0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x5431
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x68(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x8045(%rip), %rsi      # 0xd485
leaq 0x8041(%rip), %rdx      # 0xd488
callq 0x4e10
leaq 0x2a0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5ae8
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x31a0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x5482
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x68(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x7cb3(%rip), %rsi      # 0xd144
leaq 0x7cb0(%rip), %rdx      # 0xd148
callq 0x4e10
leaq 0x2a0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5ae8
leaq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x31a0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x54d3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x8(%rsp), %rdi
callq 0x92ec
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x94b4
leaq 0x68(%rsp), %rdi
callq 0x94dc
xorl %edi, %edi
callq 0x3280
movq %rax, %r14
movq 0xcae9(%rip), %rdi      # 0x11ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq 0xcace(%rip), %r15      # 0x11ff0
movq %r15, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31c0
movq %rax, %r12
leaq 0x7c0d(%rip), %rsi      # 0xd149
movl $0xd, %edx
movq %rax, %rdi
callq 0x3350
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r12, %rdi
callq 0x3350
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31c0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq 0xca4d(%rip), %rdi      # 0x11ff0
callq 0x3050
movq %rax, %rdi
callq 0x31c0
movq 0xcd39(%rip), %rsi      # 0x122f0
movq 0xcd3a(%rip), %rdx      # 0x122f8
movq %rax, %rdi
callq 0x3350
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31c0
movq 0xc9f9(%rip), %rdi      # 0x11ff0
leaq 0x7b59(%rip), %rsi      # 0xd157
movl $0x9, %edx
callq 0x3350
movq 0xc9e1(%rip), %rdi      # 0x11ff0
leaq 0x7ae5(%rip), %rsi      # 0xd0fb
movl $0x5, %edx
callq 0x3350
movq 0xc9c9(%rip), %rdi      # 0x11ff0
leaq 0x7b33(%rip), %rsi      # 0xd161
movl $0xd, %edx
callq 0x3350
subq %rbx, %r14
movq 0xc9ae(%rip), %rdi      # 0x11ff0
movq %r14, %rsi
callq 0x3290
movq %rax, %rbx
leaq 0x7b1b(%rip), %rsi      # 0xd16f
movl $0x8, %edx
movq %rax, %rdi
callq 0x3350
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31c0
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x56a9
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x56c4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x56df
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x56f6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xc89b(%rip), %rsi      # 0x11f98
leaq 0x118(%rsp), %rdi
callq 0x3210
leaq 0x198(%rsp), %rdi
callq 0x30f0
leaq 0x2a0(%rsp), %rdi
callq 0x5cf6
xorl %eax, %eax
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x118(%rsp), %rbx
movq %rbx, %rdi
callq 0xcf60
movq %rbx, %rdi
callq 0xcf62
jmp 0x5724
jmp 0x583f
jmp 0x575f
jmp 0x575f
jmp 0x575f
jmp 0x575f
movq %rax, %r14
jmp 0x5863
jmp 0x586f
jmp 0x586f
jmp 0x5822
jmp 0x5822
movq %rax, %r14
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x57e3
movq 0xc8(%rsp), %rsi
jmp 0x57d6
jmp 0x57e0
jmp 0x57fc
jmp 0x5822
movq %rax, %r14
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x57e3
movq 0xe8(%rsp), %rsi
jmp 0x57d6
jmp 0x57e0
jmp 0x57fc
jmp 0x5822
movq %rax, %r14
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x57e3
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x57e3
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x57ff
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x57ff
movq %rax, %r14
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5893
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x5893
movq %rax, %r14
jmp 0x5893
jmp 0x582b
jmp 0x582b
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x5863
movq 0x78(%rsp), %rsi
jmp 0x585b
movq %rax, %r14
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5863
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x8(%rsp), %rdi
callq 0x5ca8
jmp 0x5872
movq %rax, %r14
movq 0xc71f(%rip), %rsi      # 0x11f98
leaq 0x118(%rsp), %rdi
callq 0x3210
leaq 0x198(%rsp), %rdi
callq 0x30f0
leaq 0x2a0(%rsp), %rdi
callq 0x5cf6
movq %r14, %rdi
callq 0x3510