// File: /workspace/github_cpp_makefile_star2_O1/BGI-Qingdao[P]ExtractNGSReads/filterPairFQ.cpp
// Function: main
int main(int argc , char ** argv )
{
    
    START_PARSE_ARGS
        DEFINE_ARG_REQUIRED(std::string,input_r1,"the input read1");
        DEFINE_ARG_REQUIRED(std::string,input_r2,"the input read2");
        DEFINE_ARG_REQUIRED(std::string,output_r1,"the output read1");
        DEFINE_ARG_REQUIRED(std::string,output_r2,"the output read2");
        DEFINE_ARG_REQUIRED(std::string,output_rs,"the output singlenton reads");
    END_PARSE_ARGS

    auto i_r1 = BGIQD::FILES::FileReaderFactory::GenerateReaderFromFileName(input_r1.to_string());
    auto i_r2 = BGIQD::FILES::FileReaderFactory::GenerateReaderFromFileName(input_r2.to_string());
    auto o_r1 = BGIQD::FILES::FileWriterFactory::GenerateWriterFromFileName(output_r1.to_string());
    auto o_r2 = BGIQD::FILES::FileWriterFactory::GenerateWriterFromFileName(output_r2.to_string());
    auto o_rs = BGIQD::FILES::FileWriterFactory::GenerateWriterFromFileName(output_rs.to_string());
    if( i_r1 == NULL )
        FATAL("input_r1 failed to open !!");
    if( ! o_r1 || !o_r2 || ! o_rs )
        FATAL("open output file failed !! ");
    if( i_r2 == NULL )
        FATAL("input_r2 failed to open !!");

    std::vector<Read> buffer;
    // Load read1
    Reader reader1;
    reader1.LoadAllFastq(*i_r1,buffer);
    std::cerr<<" Load "<<buffer.size()<<" reads from read1. "<<std::endl;
    for( const auto & r : buffer )
    {
        reads1[r.head.readName] = r ;
    }
    buffer.clear();
    delete i_r1 ;
    // Load read2
    Reader reader2;
    reader2.LoadAllFastq(*i_r2,buffer);
    std::cerr<<" Load "<<buffer.size()<<" reads from read2. "<<std::endl;
    for( const auto & r : buffer )
    {
        reads2[r.head.readName] = r ;
    }
    buffer.clear();
    delete i_r2 ;
    // find common ;
    std::set<std::string> common ;
    for( const auto & pair : reads1 )
    {
        if( reads2.find( pair.first ) != reads2.end() )
        {
            common.insert(pair.first) ;
        }
    }
    
    std::cerr<<" Total "<<common.size()<<" read pair detected. "<<std::endl;
    auto print_stlfr_reads = []( const Read & r , std::ostream & ost ) {
            ost<<r.head.Head()<<'\n'<<r.seq.atcgs<<"\n+\n"<<std::string(r.seq.atcgs.size() , 'F')<<'\n';
    };
    std::cerr<<"Start print read1 ... "<<std::endl;
    // print read1 
    for( const auto & pair : reads1 )
        if( common.find(pair.first) != common.end() )
            print_stlfr_reads(pair.second , *o_r1);
    delete o_r1 ;
    std::cerr<<"Start print read2 ... "<<std::endl;
    // print read2 
    for( const auto & pair : reads2 )
        if( common.find(pair.first) != common.end() )
            print_stlfr_reads(pair.second , *o_r2);
    delete o_r2 ;
    std::cerr<<"Start print singleton ... "<<std::endl;
    // print singleton
    for( const auto & pair : reads1 )
        if( common.find(pair.first) == common.end() )
            print_stlfr_reads(pair.second , *o_rs);
    for( const auto & pair : reads2 )
        if( common.find(pair.first) == common.end() )
            print_stlfr_reads(pair.second , *o_rs);
    delete o_rs ;
    std::cerr<<"Done ! "<<std::endl;
    return 0 ;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rsi, -0x60(%rbp)
movl %edi, -0x68(%rbp)
leaq 0xba9a(%rip), %rdi      # 0x10298
callq 0x7610
movl $0x0, 0xbb1b(%rip)      # 0x10328
leaq -0x2e0(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x6825(%rip), %rsi      # 0xb044
leaq 0x6826(%rip), %rdx      # 0xb04c
leaq -0x2f0(%rbp), %rdi
callq 0x7576
leaq -0x248(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x68aa(%rip), %rdx      # 0xb0ee
leaq -0x258(%rbp), %rdi
movq %rdx, %rsi
callq 0x7576
leaq -0x1d0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x67e7(%rip), %rsi      # 0xb04d
leaq 0x67ef(%rip), %rdx      # 0xb05c
leaq -0x1e0(%rbp), %rdi
callq 0x7576
leaq -0x368(%rbp), %r15
leaq -0x2f0(%rbp), %rdx
leaq -0x258(%rbp), %r8
leaq -0x1e0(%rbp), %r9
movq %r15, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x5ff0
movq -0x1e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x48b5
callq 0x4240
movq -0x258(%rbp), %rdi
cmpq %r14, %rdi
je 0x48c6
callq 0x4240
movq -0x2f0(%rbp), %rdi
cmpq %r13, %rdi
je 0x48d7
callq 0x4240
leaq 0xb9ba(%rip), %rdi      # 0x10298
leaq 0xba43(%rip), %rsi      # 0x10328
callq 0x6160
movq %r15, (%rax)
incl 0xba35(%rip)            # 0x10328
leaq -0x258(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x6759(%rip), %rsi      # 0xb05d
leaq 0x675a(%rip), %rdx      # 0xb065
callq 0x7576
leaq -0x1e0(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x67cd(%rip), %rdx      # 0xb0ee
movq %rdx, %rsi
callq 0x7576
leaq -0x158(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x672b(%rip), %rsi      # 0xb066
leaq 0x6733(%rip), %rdx      # 0xb075
leaq -0x168(%rbp), %rdi
callq 0x7576
leaq -0x2f0(%rbp), %r15
leaq -0x258(%rbp), %rdx
leaq -0x1e0(%rbp), %r8
leaq -0x168(%rbp), %r9
movq %r15, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x5ff0
movq -0x168(%rbp), %rdi
cmpq %r13, %rdi
je 0x498a
callq 0x4240
movq -0x1e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x499b
callq 0x4240
movq -0x258(%rbp), %rdi
cmpq %r14, %rdi
je 0x49ac
callq 0x4240
leaq 0xb8e5(%rip), %rdi      # 0x10298
leaq 0xb96e(%rip), %rsi      # 0x10328
callq 0x6160
movq %r15, (%rax)
incl 0xb960(%rip)            # 0x10328
leaq -0x1e0(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x669d(%rip), %rsi      # 0xb076
leaq 0x669f(%rip), %rdx      # 0xb07f
callq 0x7576
leaq -0x168(%rbp), %rdi
movq %r13, (%rdi)
leaq 0x66f8(%rip), %rdx      # 0xb0ee
movq %rdx, %rsi
callq 0x7576
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x6673(%rip), %rsi      # 0xb080
leaq 0x667c(%rip), %rdx      # 0xb090
leaq -0x58(%rbp), %rdi
callq 0x7576
leaq -0x258(%rbp), %r15
leaq -0x1e0(%rbp), %rdx
leaq -0x168(%rbp), %r8
leaq -0x58(%rbp), %r9
movq %r15, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x5ff0
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x4a57
callq 0x4240
movq -0x168(%rbp), %rdi
cmpq %r13, %rdi
je 0x4a68
callq 0x4240
movq -0x1e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x4a79
callq 0x4240
leaq 0xb818(%rip), %rdi      # 0x10298
leaq 0xb8a1(%rip), %rsi      # 0x10328
callq 0x6160
movq %r15, (%rax)
incl 0xb893(%rip)            # 0x10328
leaq -0x168(%rbp), %rdi
movq %r13, (%rdi)
leaq 0x65eb(%rip), %rsi      # 0xb091
leaq 0x65ed(%rip), %rdx      # 0xb09a
callq 0x7576
leaq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
movq %rax, (%rdi)
leaq 0x662a(%rip), %rdx      # 0xb0ee
movq %rdx, %rsi
callq 0x7576
leaq -0xa8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x65bc(%rip), %rsi      # 0xb09b
leaq 0x65c5(%rip), %rdx      # 0xb0ab
leaq -0xb8(%rbp), %rdi
callq 0x7576
leaq -0x1e0(%rbp), %r15
leaq -0x168(%rbp), %rdx
leaq -0x58(%rbp), %r8
leaq -0xb8(%rbp), %r9
movq %r15, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x5ff0
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4b2b
callq 0x4240
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x4b3d
callq 0x4240
movq -0x168(%rbp), %rdi
cmpq %r13, %rdi
je 0x4b4e
callq 0x4240
leaq 0xb743(%rip), %rdi      # 0x10298
leaq 0xb7cc(%rip), %rsi      # 0x10328
callq 0x6160
movq %r15, (%rax)
incl 0xb7be(%rip)            # 0x10328
leaq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
movq %rax, (%rdi)
leaq 0x6530(%rip), %rsi      # 0xb0ac
leaq 0x6532(%rip), %rdx      # 0xb0b5
callq 0x7576
leaq -0xb8(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x6555(%rip), %rdx      # 0xb0ee
movq %rdx, %rsi
callq 0x7576
leaq -0xc8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x6503(%rip), %rsi      # 0xb0b6
leaq 0x6517(%rip), %rdx      # 0xb0d1
leaq -0xd8(%rbp), %rdi
callq 0x7576
leaq -0x168(%rbp), %r15
leaq -0x58(%rbp), %rdx
leaq -0xb8(%rbp), %r8
leaq -0xd8(%rbp), %r9
movq %r15, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x5ff0
movq -0xd8(%rbp), %rdi
cmpq %r13, %rdi
je 0x4bff
callq 0x4240
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4c10
callq 0x4240
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x4c22
callq 0x4240
leaq 0xb66f(%rip), %rdi      # 0x10298
leaq 0xb6f8(%rip), %rsi      # 0x10328
callq 0x6160
movq %r15, (%rax)
incl 0xb6ea(%rip)            # 0x10328
movb $0x1, %bl
cmpl $0x2, -0x68(%rbp)
jl 0x4ce3
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0xb8(%rbp), %rdi
leaq -0x6b(%rbp), %rdx
callq 0x4100
leaq 0x6469(%rip), %rsi      # 0xb0d2
leaq -0xb8(%rbp), %rdi
callq 0x4090
testl %eax, %eax
je 0x4ce3
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0xd8(%rbp), %rdi
leaq -0x6a(%rbp), %rdx
callq 0x4100
leaq 0x643d(%rip), %rsi      # 0xb0d5
leaq -0xd8(%rbp), %rdi
callq 0x4090
testl %eax, %eax
je 0x5995
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x278(%rbp), %rdi
leaq -0x69(%rbp), %rdx
callq 0x4100
leaq 0x640c(%rip), %rsi      # 0xb0d7
leaq -0x278(%rbp), %rdi
callq 0x4090
testl %eax, %eax
sete %bl
movb $0x1, %al
movb $0x1, %r14b
jmp 0x4ce8
xorl %eax, %eax
xorl %r14d, %r14d
testb %al, %al
je 0x4d01
leaq -0x268(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d01
callq 0x4240
testb %r14b, %r14b
je 0x4d17
movq -0xd8(%rbp), %rdi
cmpq %r13, %rdi
je 0x4d17
callq 0x4240
cmpl $0x2, -0x68(%rbp)
jl 0x4d2e
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4d2e
callq 0x4240
testb %bl, %bl
je 0x4d7c
movq 0xb2b7(%rip), %r14      # 0xfff0
leaq 0x639c(%rip), %rsi      # 0xb0dc
movl $0x8, %edx
movq %r14, %rdi
callq 0x42d0
movq -0x60(%rbp), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x4fb7
movq %rbx, %rdi
callq 0x4120
movq 0xb284(%rip), %rdi      # 0xfff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x42d0
jmp 0x4fcf
movq 0xb52d(%rip), %rax      # 0x102b0
leaq 0xb516(%rip), %rbx      # 0x102a0
cmpq %rbx, %rax
je 0x4dd8
leaq 0xb59a(%rip), %r15      # 0x10330
movslq 0x20(%rax), %r14
movq 0x28(%rax), %rcx
movq 0x28(%rcx), %rdx
movq %r14, %rsi
shlq $0x5, %rsi
movq %rdx, (%rsi,%r15)
xorl %edx, %edx
cmpl $0x0, 0x68(%rcx)
setne %dl
movl %edx, 0x8(%rsi,%r15)
movq $0x0, 0x10(%rsi,%r15)
movl %r14d, 0x18(%rsi,%r15)
movq %rax, %rdi
callq 0x41d0
cmpq %rbx, %rax
jne 0x4d96
jmp 0x4ddb
xorl %r14d, %r14d
cmpl $0x8, %r14d
jg 0x4e12
movslq %r14d, %rcx
leaq -0x9(%rcx), %rax
shlq $0x5, %rcx
leaq 0xb53d(%rip), %rdx      # 0x10330
addq %rdx, %rcx
addq $0x38, %rcx
xorl %edx, %edx
movq %rdx, -0x18(%rcx)
movl %edx, -0x10(%rcx)
movq %rdx, -0x8(%rcx)
movl %edx, (%rcx)
addq $0x20, %rcx
incq %rax
jne 0x4dfc
leaq -0x94(%rbp), %r8
movl $0x0, (%r8)
leaq 0x62c7(%rip), %rdx      # 0xb0ee
leaq 0xb502(%rip), %rcx      # 0x10330
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x4070
cmpl $-0x1, %eax
je 0x4ecb
leaq 0x62a4(%rip), %r15      # 0xb0ee
leaq 0xb4df(%rip), %r12      # 0x10330
leaq -0x94(%rbp), %r13
movq 0xb151(%rip), %r14      # 0xffb0
movq 0xb442(%rip), %rdx      # 0x102a8
movq %rbx, %rcx
testq %rdx, %rdx
je 0x4e88
movq %rbx, %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x4e71
movq %rbx, %rdx
cmpq %rbx, %rcx
je 0x4e9a
cmpl 0x20(%rcx), %eax
cmovlq %rbx, %rcx
movq %rcx, %rdx
cmpq %rbx, %rdx
je 0x4eb1
movq 0x28(%rdx), %rdi
movb $0x1, 0x1(%rdi)
movq (%r14), %rsi
xorl %edx, %edx
callq 0x6272
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x4070
cmpl $-0x1, %eax
jne 0x4e5f
movq 0xb3de(%rip), %r14      # 0x102b0
leaq 0xb3c7(%rip), %r12      # 0x102a0
cmpq %r12, %r14
je 0x4f88
movb $0x1, %bl
movq 0xb105(%rip), %r15      # 0xfff0
movq 0x28(%r14), %rax
cmpb $0x0, (%rax)
jne 0x4f4e
cmpb $0x0, 0x1(%rax)
jne 0x4f4e
movl $0x20, %edx
movq %r15, %rdi
leaq 0x620a(%rip), %rsi      # 0xb113
callq 0x42d0
movq 0x28(%r14), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq %r15, %rdi
callq 0x42d0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r13, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
xorl %ebx, %ebx
movq 0x28(%r14), %rdi
cmpb $0x1, (%rdi)
jne 0x4f6b
cmpb $0x0, 0x1(%rdi)
jne 0x4f6b
movq 0x48(%rdi), %rsi
movl $0x1, %edx
callq 0x6272
movq %r14, %rdi
callq 0x41d0
movq %rax, %r14
cmpq %r12, %rax
jne 0x4eeb
testb $0x1, %bl
je 0x5196
movq -0x60(%rbp), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x51e0
movq %rbx, %rdi
callq 0x4120
movq 0xb049(%rip), %rdi      # 0xfff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x42d0
jmp 0x51fe
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x4420
movq 0xb01a(%rip), %rbx      # 0xfff0
leaq 0x6108(%rip), %rsi      # 0xb0e5
movl $0x6, %edx
movq %rbx, %rdi
callq 0x42d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq 0xafe8(%rip), %rbx      # 0xfff0
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq 0xb291(%rip), %r14      # 0x102b0
leaq 0xb27a(%rip), %r12      # 0x102a0
cmpq %r12, %r14
je 0x5b72
leaq 0x60b7(%rip), %r13      # 0xb0ed
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x60a7(%rip), %rsi      # 0xb0ec
callq 0x42d0
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x60dc(%rip), %rsi      # 0xb135
callq 0x42d0
movq 0x28(%r14), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq %rbx, %rdi
callq 0x42d0
movq 0x28(%r14), %rax
movb (%rax), %r15b
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x42d0
testb %r15b, %r15b
leaq 0x6067(%rip), %rsi      # 0xb0fa
leaq 0x6055(%rip), %rax      # 0xb0ef
cmovneq %rax, %rsi
movl $0xa, %edx
movq %rbx, %rdi
callq 0x42d0
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x42d0
movq 0x28(%r14), %rax
movl 0x68(%rax), %esi
leaq -0x58(%rbp), %rdi
callq 0x61c8
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %rbx, %rdi
callq 0x42d0
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x50ed
callq 0x4240
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x42d0
movq 0x28(%r14), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
callq 0x42d0
movq 0x28(%r14), %rax
cmpb $0x1, (%rax)
jne 0x5156
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x5fdc(%rip), %rsi      # 0xb105
callq 0x42d0
movq 0x28(%r14), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
movq %rbx, %rdi
callq 0x42d0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x617c(%rip), %rsi      # 0xb2cd
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq %r14, %rdi
callq 0x41d0
movq %rax, %r14
cmpq %r12, %rax
jne 0x5036
jmp 0x5b72
movq 0xae53(%rip), %r14      # 0xfff0
leaq 0x5f38(%rip), %rsi      # 0xb0dc
movl $0x8, %edx
movq %r14, %rdi
callq 0x42d0
movq -0x60(%rbp), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x599f
movq %rbx, %rdi
callq 0x4120
movq 0xae20(%rip), %rdi      # 0xfff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x42d0
jmp 0x59b7
movq 0xae09(%rip), %rax      # 0xfff0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x4420
movq 0xb0ab(%rip), %rbx      # 0x102b0
cmpq %r12, %rbx
je 0x52a4
movq 0xaddb(%rip), %r14      # 0xfff0
leaq -0x58(%rbp), %r13
movq 0x28(%rbx), %rax
cmpb $0x1, 0x1(%rax)
jne 0x5290
movl $0x3, %edx
movq %r14, %rdi
leaq 0x5f02(%rip), %rsi      # 0xb134
callq 0x42d0
movq 0x28(%rbx), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq %r14, %rdi
callq 0x42d0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x6006(%rip), %rsi      # 0xb263
callq 0x42d0
movq 0x28(%rbx), %rsi
movq %r13, %rdi
callq 0x6526
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r15, %rdi
callq 0x42d0
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5290
callq 0x4240
movq %rbx, %rdi
callq 0x41d0
movq %rax, %rbx
cmpq %r12, %rax
jne 0x5219
movq 0xad45(%rip), %rdi      # 0xfff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq 0xad2a(%rip), %rdi      # 0xfff0
callq 0x4030
movq %rax, %rdi
callq 0x41c0
leaq -0x58(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x67c6
leaq -0x58(%rbp), %rdi
callq 0x8b14
movq %rax, %r12
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5301
callq 0x4240
leaq -0x58(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0x67c6
leaq -0x58(%rbp), %rdi
callq 0x8b14
movq %rax, %r14
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x532f
callq 0x4240
leaq -0x58(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x67c6
leaq -0x58(%rbp), %rdi
callq 0x8fbc
movq %rax, %r15
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x535d
callq 0x4240
leaq -0x58(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x67c6
leaq -0x58(%rbp), %rdi
callq 0x8fbc
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x538c
callq 0x4240
leaq -0x58(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x67c6
leaq -0x58(%rbp), %rdi
callq 0x8fbc
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x53ba
callq 0x4240
testq %r12, %r12
je 0x5bc2
testq %r15, %r15
je 0x5be1
cmpq $0x0, -0x60(%rbp)
je 0x5be1
testq %rbx, %rbx
je 0x5be1
testq %r14, %r14
je 0x5c00
movq %r14, -0x68(%rbp)
movq %rbx, -0xe8(%rbp)
xorps %xmm0, %xmm0
leaq -0x90(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %r12, -0xf0(%rbp)
movq %r12, %rdi
callq 0x681e
movq 0xabd1(%rip), %rdi      # 0xfff0
leaq 0x5da1(%rip), %rsi      # 0xb1c7
movl $0x6, %edx
callq 0x42d0
movq -0x88(%rbp), %rsi
subq -0x90(%rbp), %rsi
sarq $0x3, %rsi
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rsi
movq 0xab99(%rip), %rdi      # 0xfff0
callq 0x41b0
movq %rax, %r14
leaq 0x5d68(%rip), %rsi      # 0xb1ce
movl $0x13, %edx
movq %rax, %rdi
callq 0x42d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq -0x90(%rbp), %rbx
movq -0x88(%rbp), %r13
cmpq %r13, %rbx
je 0x54ff
leaq 0xae14(%rip), %r12      # 0x102c8
leaq 0x38(%rbx), %rsi
movq %r12, %rdi
callq 0x6b36
movq %rax, %r14
movq (%rbx), %rax
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
leaq 0x8(%rbx), %rsi
callq 0x74c4
leaq 0x58(%r14), %rdi
leaq 0x58(%rbx), %rsi
callq 0x4160
addq $0x78, %r14
leaq 0x78(%rbx), %rsi
movq %r14, %rdi
callq 0x4160
addq $0x98, %rbx
cmpq %r13, %rbx
jne 0x54b4
movq %r15, -0xe0(%rbp)
leaq -0x90(%rbp), %rbx
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x82ce
movq -0xf0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x681e
movq 0xaab8(%rip), %rdi      # 0xfff0
leaq 0x5c88(%rip), %rsi      # 0xb1c7
movl $0x6, %edx
callq 0x42d0
movq -0x88(%rbp), %rsi
subq -0x90(%rbp), %rsi
sarq $0x3, %rsi
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rsi
movq 0xaa80(%rip), %rdi      # 0xfff0
callq 0x41b0
movq %rax, %r14
leaq 0x5c63(%rip), %rsi      # 0xb1e2
movl $0x13, %edx
movq %rax, %rdi
callq 0x42d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq -0x90(%rbp), %rbx
movq -0x88(%rbp), %r13
cmpq %r13, %rbx
je 0x5618
leaq 0xad2b(%rip), %r12      # 0x102f8
leaq 0x38(%rbx), %rsi
movq %r12, %rdi
callq 0x6b36
movq %rax, %r14
movq (%rbx), %rax
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
leaq 0x8(%rbx), %rsi
callq 0x74c4
leaq 0x58(%r14), %rdi
leaq 0x58(%rbx), %rsi
callq 0x4160
addq $0x78, %r14
leaq 0x78(%rbx), %rsi
movq %r14, %rdi
callq 0x4160
addq $0x98, %rbx
cmpq %r13, %rbx
jne 0x55cd
leaq -0x90(%rbp), %rdi
movq (%rdi), %rsi
callq 0x82ce
movq -0x68(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x50(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0xac8c(%rip), %r12      # 0x102e0
leaq 0xac75(%rip), %rax      # 0x102d0
cmpq %rax, %r12
je 0x56a9
leaq 0xac91(%rip), %r13      # 0x102f8
leaq 0xac92(%rip), %r15      # 0x10300
leaq -0x58(%rbp), %r14
leaq 0x20(%r12), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x82fe
cmpq %r15, %rax
je 0x5692
movq %r14, %rdi
movq %rbx, %rsi
callq 0x834e
movq %r12, %rdi
callq 0x41d0
movq %rax, %r12
leaq 0xac2c(%rip), %rax      # 0x102d0
cmpq %rax, %r12
jne 0x5672
movq 0xa940(%rip), %rdi      # 0xfff0
leaq 0x5b3f(%rip), %rsi      # 0xb1f6
movl $0x7, %edx
callq 0x42d0
movq -0x30(%rbp), %rsi
movq 0xa924(%rip), %rdi      # 0xfff0
callq 0x41b0
movq %rax, %r14
leaq 0x5b23(%rip), %rsi      # 0xb1fe
movl $0x15, %edx
movq %rax, %rdi
callq 0x42d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq 0xa8da(%rip), %rbx      # 0xfff0
leaq 0x5af7(%rip), %rsi      # 0xb214
movl $0x16, %edx
movq %rbx, %rdi
callq 0x42d0
movq -0xe0(%rbp), %r14
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq 0xa8a1(%rip), %rdi      # 0xfff0
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq 0xab7d(%rip), %r12      # 0x102e0
leaq 0xab66(%rip), %rax      # 0x102d0
cmpq %rax, %r12
je 0x57ad
leaq -0x58(%rbp), %r13
leaq 0x20(%r12), %rsi
movq %r13, %rdi
callq 0x8518
leaq -0x50(%rbp), %rcx
cmpq %rcx, %rax
je 0x5796
leaq 0x40(%r12), %rdi
movq %r14, %rsi
callq 0x5ed4
movq %r12, %rdi
callq 0x41d0
movq %rax, %r12
leaq 0xab28(%rip), %rax      # 0x102d0
cmpq %rax, %r12
jne 0x5773
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq 0xa833(%rip), %rbx      # 0xfff0
leaq 0x5a67(%rip), %rsi      # 0xb22b
movl $0x16, %edx
movq %rbx, %rdi
callq 0x42d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq 0xa801(%rip), %rdi      # 0xfff0
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq 0xab0d(%rip), %r15      # 0x10310
leaq 0xaaf6(%rip), %r13      # 0x10300
cmpq %r13, %r15
je 0x5845
leaq -0x58(%rbp), %r12
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x8518
leaq -0x50(%rbp), %rcx
cmpq %rcx, %rax
je 0x5835
leaq 0x40(%r15), %rdi
movq -0x60(%rbp), %rsi
callq 0x5ed4
movq %r15, %rdi
callq 0x41d0
movq %rax, %r15
cmpq %r13, %rax
jne 0x5813
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xa79a(%rip), %rbx      # 0xfff0
leaq 0x59e5(%rip), %rsi      # 0xb242
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x42d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq 0xa768(%rip), %rdi      # 0xfff0
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq 0xaa44(%rip), %r14      # 0x102e0
leaq 0xaa2d(%rip), %rax      # 0x102d0
cmpq %rax, %r14
movq -0xe8(%rbp), %rbx
je 0x58eb
leaq -0x58(%rbp), %r15
leaq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x8518
leaq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0x58d4
leaq 0x40(%r14), %rdi
movq %rbx, %rsi
callq 0x5ed4
movq %r14, %rdi
callq 0x41d0
movq %rax, %r14
leaq 0xa9ea(%rip), %rax      # 0x102d0
cmpq %rax, %r14
jne 0x58b3
movq 0xaa1e(%rip), %r14      # 0x10310
cmpq %r13, %r14
je 0x592c
leaq -0x58(%rbp), %r15
leaq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x8518
leaq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0x591c
leaq 0x40(%r14), %rdi
movq %rbx, %rsi
callq 0x5ed4
movq %r14, %rdi
callq 0x41d0
movq %rax, %r14
cmpq %r13, %rax
jne 0x58fb
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq 0xa6b4(%rip), %rbx      # 0xfff0
leaq 0x591a(%rip), %rsi      # 0xb25d
movl $0x7, %edx
movq %rbx, %rdi
callq 0x42d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq 0xa682(%rip), %rdi      # 0xfff0
callq 0x4030
movq %rax, %rdi
callq 0x41c0
leaq -0x58(%rbp), %rdi
callq 0x750c
leaq -0x90(%rbp), %rdi
callq 0x6bb6
jmp 0x5b72
movb $0x1, %r14b
xorl %eax, %eax
jmp 0x4ce8
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x4420
movq 0xa632(%rip), %rbx      # 0xfff0
leaq 0x5720(%rip), %rsi      # 0xb0e5
movl $0x6, %edx
movq %rbx, %rdi
callq 0x42d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq 0xa600(%rip), %rbx      # 0xfff0
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq 0xa8a9(%rip), %r14      # 0x102b0
cmpq %r12, %r14
je 0x5b72
leaq 0x56d6(%rip), %r13      # 0xb0ed
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x56c6(%rip), %rsi      # 0xb0ec
callq 0x42d0
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x56fb(%rip), %rsi      # 0xb135
callq 0x42d0
movq 0x28(%r14), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq %rbx, %rdi
callq 0x42d0
movq 0x28(%r14), %rax
movb (%rax), %r15b
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x42d0
testb %r15b, %r15b
leaq 0x5686(%rip), %rsi      # 0xb0fa
leaq 0x5674(%rip), %rax      # 0xb0ef
cmovneq %rax, %rsi
movl $0xa, %edx
movq %rbx, %rdi
callq 0x42d0
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x42d0
movq 0x28(%r14), %rax
movl 0x68(%rax), %esi
leaq -0x58(%rbp), %rdi
callq 0x61c8
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %rbx, %rdi
callq 0x42d0
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5ace
callq 0x4240
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x42d0
movq 0x28(%r14), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
callq 0x42d0
movq 0x28(%r14), %rax
cmpb $0x1, (%rax)
jne 0x5b37
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x55fb(%rip), %rsi      # 0xb105
callq 0x42d0
movq 0x28(%r14), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
movq %rbx, %rdi
callq 0x42d0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x579b(%rip), %rsi      # 0xb2cd
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq %r14, %rdi
callq 0x41d0
movq %rax, %r14
cmpq %r12, %rax
jne 0x5a17
leaq -0x168(%rbp), %rdi
callq 0x6bea
leaq -0x1e0(%rbp), %rdi
callq 0x6bea
leaq -0x258(%rbp), %rdi
callq 0x6bea
leaq -0x2f0(%rbp), %rdi
callq 0x6bea
leaq -0x368(%rbp), %rdi
callq 0x6bea
xorl %eax, %eax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x556f(%rip), %rdi      # 0xb138
leaq 0x558a(%rip), %rsi      # 0xb15a
leaq 0x5594(%rip), %rcx      # 0xb16b
movl $0x21, %edx
callq 0x4190
leaq 0x559a(%rip), %rdi      # 0xb182
leaq 0x556b(%rip), %rsi      # 0xb15a
leaq 0x5575(%rip), %rcx      # 0xb16b
movl $0x23, %edx
callq 0x4190
leaq 0x559e(%rip), %rdi      # 0xb1a5
leaq 0x554c(%rip), %rsi      # 0xb15a
leaq 0x5556(%rip), %rcx      # 0xb16b
movl $0x25, %edx
callq 0x4190
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r13, %rdi
je 0x5c38
callq 0x4240
jmp 0x5c38
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
jne 0x5e6c
jmp 0x5e8f
jmp 0x5e5c
jmp 0x5e8c
jmp 0x5e5c
jmp 0x5e8c
jmp 0x5e5c
jmp 0x5e8c
jmp 0x5e5c
jmp 0x5e8c
jmp 0x5e5c
jmp 0x5e8c
jmp 0x5e8c
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r13, %rdi
je 0x5c9d
callq 0x4240
jmp 0x5c9d
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x5cb3
callq 0x4240
jmp 0x5cb3
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5e9b
callq 0x4240
jmp 0x5e9b
jmp 0x5cd0
movq %rax, %rbx
jmp 0x5e9b
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x5cf1
callq 0x4240
jmp 0x5cf1
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5d08
callq 0x4240
jmp 0x5d08
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r13, %rdi
je 0x5ea7
callq 0x4240
jmp 0x5ea7
jmp 0x5d24
movq %rax, %rbx
jmp 0x5ea7
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5d46
callq 0x4240
jmp 0x5d46
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r13, %rdi
je 0x5d5c
callq 0x4240
jmp 0x5d5c
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x5eb3
callq 0x4240
jmp 0x5eb3
jmp 0x5d78
movq %rax, %rbx
jmp 0x5eb3
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r13, %rdi
je 0x5d99
callq 0x4240
jmp 0x5d99
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x5daf
callq 0x4240
jmp 0x5daf
movq %rax, %rbx
movq -0x258(%rbp), %rdi
cmpq %r14, %rdi
je 0x5ebf
callq 0x4240
jmp 0x5ebf
jmp 0x5dcb
movq %rax, %rbx
jmp 0x5ebf
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x5dec
callq 0x4240
jmp 0x5dec
movq %rax, %rbx
movq -0x258(%rbp), %rdi
cmpq %r14, %rdi
je 0x5e02
callq 0x4240
jmp 0x5e02
movq %rax, %rbx
movq -0x2f0(%rbp), %rdi
cmpq %r13, %rdi
je 0x5ecb
callq 0x4240
jmp 0x5ecb
movq %rax, %rbx
jmp 0x5ecb
jmp 0x5e4c
jmp 0x5e8c
jmp 0x5e79
jmp 0x5e79
jmp 0x5e4c
jmp 0x5e4c
jmp 0x5e8c
jmp 0x5e5c
jmp 0x5e8c
jmp 0x5e5c
jmp 0x5e8c
jmp 0x5e4c
jmp 0x5e4c
jmp 0x5e4c
jmp 0x5e4c
jmp 0x5e8c
jmp 0x5e4c
jmp 0x5e4c
jmp 0x5e4c
jmp 0x5e4c
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x750c
jmp 0x5e7c
jmp 0x5e8c
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5e8f
callq 0x4240
jmp 0x5e8f
jmp 0x5e8c
jmp 0x5e8c
jmp 0x5e79
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x6bb6
jmp 0x5e8f
jmp 0x5e8c
movq %rax, %rbx
leaq -0x168(%rbp), %rdi
callq 0x6bea
leaq -0x1e0(%rbp), %rdi
callq 0x6bea
leaq -0x258(%rbp), %rdi
callq 0x6bea
leaq -0x2f0(%rbp), %rdi
callq 0x6bea
leaq -0x368(%rbp), %rdi
callq 0x6bea
movq %rbx, %rdi
callq 0x4450
nop