// File: /workspace/github_c_makefile_star2_O3/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 0x4ece
cmpl $0x1, %ebp
jne 0x4ee6
movq 0xd191(%rip), %rbx      # 0x11fd0
leaq 0x827c(%rip), %rsi      # 0xd0c2
movl $0x2f, %edx
movq %rbx, %rdi
callq 0x3340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31b0
movq %rax, %rbx
leaq 0x826e(%rip), %rsi      # 0xd0f2
movl $0x8, %edx
movq %rax, %rdi
callq 0x3340
leaq 0x8263(%rip), %rsi      # 0xd0fb
movl $0x5, %edx
movq %rbx, %rdi
callq 0x3340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31b0
jmp 0x4ee6
movq 0x8(%r14), %rdi
leaq 0x8228(%rip), %rsi      # 0xd101
callq 0x33c0
testl %eax, %eax
je 0x5618
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 0x850c(%rip), %rsi      # 0xd45c
leaq 0x8508(%rip), %rdx      # 0xd45f
leaq 0x118(%rsp), %rdi
callq 0x4ce4
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8191(%rip), %rsi      # 0xd106
leaq 0x8199(%rip), %rdx      # 0xd115
leaq 0x8(%rsp), %rdi
callq 0x4ce4
leaq 0x108(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8bb2(%rip), %rdx      # 0xdb4b
leaq 0xf8(%rsp), %rdi
movq %rdx, %rsi
callq 0x4ce4
leaq 0x2a0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x8(%rsp), %rcx
leaq 0xf8(%rsp), %r9
movl $0x69, %edx
movl $0x1, %r8d
callq 0x5788
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ff3
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x500a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5027
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x118(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x844c(%rip), %rsi      # 0xd485
leaq 0x8448(%rip), %rdx      # 0xd488
callq 0x4ce4
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x80c2(%rip), %rsi      # 0xd116
leaq 0x80ca(%rip), %rdx      # 0xd125
callq 0x4ce4
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8ad8(%rip), %rdx      # 0xdb4b
leaq 0xd8(%rsp), %rdi
movq %rdx, %rsi
callq 0x4ce4
leaq 0x2a0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x8(%rsp), %rcx
leaq 0xd8(%rsp), %r9
movl $0x49, %edx
movl $0x1, %r8d
callq 0x5788
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x50cd
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x50e4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5101
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x118(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x8031(%rip), %rsi      # 0xd144
leaq 0x802e(%rip), %rdx      # 0xd148
callq 0x4ce4
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7ff8(%rip), %rsi      # 0xd126
leaq 0x8006(%rip), %rdx      # 0xd13b
callq 0x4ce4
leaq 0xc8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7fef(%rip), %rsi      # 0xd13c
leaq 0x7ff4(%rip), %rdx      # 0xd148
leaq 0xb8(%rsp), %rdi
callq 0x4ce4
leaq 0x2a0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x8(%rsp), %rcx
leaq 0xb8(%rsp), %r9
movl $0x6a, %edx
movl $0x1, %r8d
callq 0x5788
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x51ab
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x51c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x51df
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x2a0(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x586a
leaq 0x118(%rsp), %rdi
callq 0x31d0
testl %ebp, %ebp
jle 0x5266
movl %ebp, %ebp
xorl %r13d, %r13d
leaq 0x7ff3(%rip), %r15      # 0xd201
movq (%r14,%r13,8), %r12
testq %r12, %r12
je 0x522f
movq %r12, %rdi
callq 0x3140
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x524e
movq 0x128(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x148(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x34c0
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3340
incq %r13
cmpq %r13, %rbp
jne 0x520e
leaq 0x130(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3470
leaq 0xd069(%rip), %rdi      # 0x122e8
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x3380
movq (%rbx), %rdi
leaq 0x18(%rsp), %r13
cmpq %r13, %rdi
je 0x52a6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
xorl %edi, %edi
callq 0x3270
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8da8
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8192(%rip), %rsi      # 0xd45c
leaq 0x818e(%rip), %rdx      # 0xd45f
leaq 0x68(%rsp), %rdi
callq 0x4ce4
leaq 0x2a0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x59c8
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x3190
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x5311
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x68(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x8165(%rip), %rsi      # 0xd485
leaq 0x8161(%rip), %rdx      # 0xd488
callq 0x4ce4
leaq 0x2a0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x59c8
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x3190
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x5362
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x68(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x7dd3(%rip), %rsi      # 0xd144
leaq 0x7dd0(%rip), %rdx      # 0xd148
callq 0x4ce4
leaq 0x2a0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x59c8
leaq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x3190
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x53b3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x8(%rsp), %rdi
callq 0x9112
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x92d8
leaq 0x68(%rsp), %rdi
callq 0x9300
xorl %edi, %edi
callq 0x3270
movq %rax, %r14
movq 0xcc09(%rip), %rdi      # 0x11ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq 0xcbee(%rip), %r15      # 0x11ff0
movq %r15, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31b0
movq %rax, %r12
leaq 0x7d2d(%rip), %rsi      # 0xd149
movl $0xd, %edx
movq %rax, %rdi
callq 0x3340
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r12, %rdi
callq 0x3340
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r12, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31b0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq 0xcb6d(%rip), %rdi      # 0x11ff0
callq 0x3050
movq %rax, %rdi
callq 0x31b0
movq 0xce51(%rip), %rsi      # 0x122e8
movq 0xce52(%rip), %rdx      # 0x122f0
movq %rax, %rdi
callq 0x3340
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r15, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31b0
movq 0xcb19(%rip), %rdi      # 0x11ff0
leaq 0x7c79(%rip), %rsi      # 0xd157
movl $0x9, %edx
callq 0x3340
movq 0xcb01(%rip), %rdi      # 0x11ff0
leaq 0x7c05(%rip), %rsi      # 0xd0fb
movl $0x5, %edx
callq 0x3340
movq 0xcae9(%rip), %rdi      # 0x11ff0
leaq 0x7c53(%rip), %rsi      # 0xd161
movl $0xd, %edx
callq 0x3340
subq %rbx, %r14
movq 0xcace(%rip), %rdi      # 0x11ff0
movq %r14, %rsi
callq 0x3280
movq %rax, %rbx
leaq 0x7c3b(%rip), %rsi      # 0xd16f
movl $0x8, %edx
movq %rax, %rdi
callq 0x3340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31b0
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5589
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x55a4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x55bf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x55d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xc9bb(%rip), %rsi      # 0x11f98
leaq 0x118(%rsp), %rdi
callq 0x3200
leaq 0x198(%rsp), %rdi
callq 0x30f0
leaq 0x2a0(%rsp), %rdi
callq 0x5be8
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 0xcc28
movq %rbx, %rdi
callq 0xcc2a
jmp 0x5604
jmp 0x571f
jmp 0x563f
jmp 0x563f
jmp 0x563f
jmp 0x563f
movq %rax, %r14
jmp 0x5743
jmp 0x574f
jmp 0x574f
jmp 0x5702
jmp 0x5702
movq %rax, %r14
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x56c3
movq 0xc8(%rsp), %rsi
jmp 0x56b6
jmp 0x56c0
jmp 0x56dc
jmp 0x5702
movq %rax, %r14
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x56c3
movq 0xe8(%rsp), %rsi
jmp 0x56b6
jmp 0x56c0
jmp 0x56dc
jmp 0x5702
movq %rax, %r14
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x56c3
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x56c3
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x56df
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x56df
movq %rax, %r14
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5773
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x5773
movq %rax, %r14
jmp 0x5773
jmp 0x570b
jmp 0x570b
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x5743
movq 0x78(%rsp), %rsi
jmp 0x573b
movq %rax, %r14
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5743
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x8(%rsp), %rdi
callq 0x5b9a
jmp 0x5752
movq %rax, %r14
movq 0xc83f(%rip), %rsi      # 0x11f98
leaq 0x118(%rsp), %rdi
callq 0x3200
leaq 0x198(%rsp), %rdi
callq 0x30f0
leaq 0x2a0(%rsp), %rdi
callq 0x5be8
movq %r14, %rdi
callq 0x3500