// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: checkSummary(samCheckOptions_t&)
void checkSummary(samCheckOptions_t & opt){
    //fields: input
    ifstream queryFile(opt.querySam.c_str());
    string queryLine = "";
    streampos queryPos = queryFile.tellg();
    long readCount = 0;
    if(queryFile.good())
        getlijn2(queryFile,queryLine);//first line
    //fields: output
    int qualValCount = opt.qualityValues.size();
    summaryLine_t * results = new summaryLine_t[qualValCount+2];
    cerr << "summary: summary of alignments found (including pairing info and mapped/mapping quality" << endl;
    //print header of both files
    cerr << "header of SAM file: " << endl;
    while(queryFile.good() && !queryLine.empty() && queryLine[0]=='@'){
        cerr << queryLine << endl;
        queryPos = queryFile.tellg();
        getlijn2(queryFile,queryLine);
    }
    cerr << endl;
    cerr << "extra lines containing only alignments with minimal quality values of: " << printVector(opt.qualityValues) << endl;    
    cerr << "compiling summary: ..." << endl;
    if(!queryLine.empty() && queryLine[0]!='@'){
        string qnamePrev = "";
        int flagPrev = 0;
        string rnextPrev = "";
        string qname = "";
        int flag = 0;
        int mapq = 0;
        string rnext = "";
        int tabPos = 0;
        char delimeter = '\t';
        do{
            //set prev to current
            qnamePrev = qname;
            flagPrev = flag;
            rnextPrev = rnext;
            //translate current line to information
            tabPos = 0;
            //qname
            qname = nextField(queryLine, delimeter, tabPos);
            if(qname.length() > 2 && qname[qname.length()-2]=='/')
              qname.erase(qname.length()-2);
            //flag
            flag = atoi(nextField(queryLine, delimeter, tabPos).c_str());
            //skip fields rname, pos
            tabPos = queryLine.find(delimeter,tabPos)+1;//behind rname
            tabPos = queryLine.find(delimeter,tabPos)+1;//behind pos
            //mapq
            mapq = atoi(nextField(queryLine, delimeter, tabPos).c_str());
            //skip CIGAR
            tabPos = queryLine.find(delimeter,tabPos)+1;//behind cigar
            rnext = nextField(queryLine, delimeter, tabPos);
            //fill in the fields
            if(qname.compare(qnamePrev)!=0 && !qnamePrev.empty()){
                readCount++;
                if(results[0].tempAlnCount==1 || (opt.paired && results[0].tempAlnCount==2))
                    results[1].addAlignment(flagPrev, rnextPrev.compare("*")!=0);
                results[0].finishRead();
                results[1].finishRead();
                for(int i=0; i < qualValCount; i++)
                    results[2+i].finishRead();
            }
            if(flag!=4){
                results[0].addAlignment(flag, rnext.compare("*")!=0);
                for(int i=0; i < qualValCount; i++)
                    if(mapq >= opt.qualityValues[i])
                        results[2+i].addAlignment(flag, rnext.compare("*")!=0);
            }
            getlijn2(queryFile,queryLine);//next line
        }while(queryFile.good());
        if(!qnamePrev.empty()){
            readCount++;
            if(results[0].tempAlnCount==1 || (opt.paired && results[0].tempAlnCount==2))
                results[1].addAlignment(flagPrev, rnextPrev.compare("*")!=0);
            results[0].finishRead();
            results[1].finishRead();
            for(int i=0; i < qualValCount; i++)
                results[2+i].finishRead();
        }
    }
    cerr << "compiling summary: done" << endl;
    queryFile.close();
    cerr << endl;
    cerr << "printing results" << endl;
    cerr << "Warning, these results only make sense if the query file is sorted according to query name." << endl;
    long maxReads = opt.numReads;
    if(maxReads==0){
        maxReads = readCount;
        cerr << "Warning, these number of reads is taken from the result and might differ from the number of reads that were given to the aligner." << endl;
    }
    if(!opt.outputFile.empty()){
        ofstream outfile ( opt.outputFile.c_str() );
        outfile << "##ALFALFA summary of alignment accuracy" << endl;
        outfile << "##" << endl;
        outfile << "##Warning: these results only make sense if the query file is sorted according to query name." << endl;
        outfile << "##" << endl;
        outfile << "##SAM file containing alignments: " << opt.querySam << endl;
        outfile << "##Results will be presented for all alignments in the file, unique alignments and for the \
        fraction of reads for which the mapping quality is at least: " << printVector(opt.qualityValues)  << endl;
        outfile << "##For every category, the fraction of alignments/reads mapped (and paired correctly) will be shown." << endl;
        outfile << "##Furthermore, a list is given of number of alignments per read." << endl;
        outfile << "##" << endl;
        outfile << "##" << endl;
        outfile << "##Results" << endl;
        outfile << "##" << endl;
        outfile << "##Number of reads: " << maxReads << endl;
        outfile << "##Reads are paired?: " << opt.paired << endl;
        outfile << "##" << endl;
        outfile << "##All alignments:" << endl;
        outfile << results[0].printLine(maxReads, opt.paired);
        outfile << "##" << endl;
        outfile << "##Unique alignments:" << endl;
        outfile << results[1].printLine(maxReads, opt.paired);
        for(int j=0; j< qualValCount; j++){
            outfile << "##Alignments with min Q-value " << opt.qualityValues[j] << endl;
            outfile << results[2+j].printLine(maxReads, opt.paired);
        }
        outfile.close();
    }
    else{
        cout << "##ALFALFA summary of alignment accuracy" << endl;
        cout << "##" << endl;
        cout << "##Warning: these results only make sense if the query file is sorted according to query name." << endl;
        cout << "##" << endl;
        cout << "##SAM file containing alignments: " << opt.querySam << endl;
        cout << "##Results will be presented for all alignments in the file, unique alignments and for the \
        fraction of reads for which the mapping quality is at least: " << printVector(opt.qualityValues)  << endl;
        cout << "##For every category, the fraction of alignments/reads mapped (and paired correctly) will be shown." << endl;
        cout << "##Furthermore, a list is given of number of alignments per read." << endl;
        cout << "##" << endl;
        cout << "##" << endl;
        cout << "##Results" << endl;
        cout << "##" << endl;
        cout << "##Number of reads: " << maxReads << endl;
        cout << "##Reads are paired?: " << opt.paired << endl;
        cout << "##" << endl;
        cout << "##All alignments:" << endl;
        cout << results[0].printLine(maxReads, opt.paired);
        cout << "##" << endl;
        cout << "##Unique alignments:" << endl;
        cout << results[1].printLine(maxReads, opt.paired);
        for(int j=0; j< qualValCount; j++){
            cout << "##Alignments with min Q-value " << opt.qualityValues[j] << endl;
            cout << results[2+j].printLine(maxReads, opt.paired);
        }
    }
    delete [] results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x548, %rsp            # imm = 0x548
movq %rdi, %rbp
movq 0x70(%rdi), %rsi
leaq 0x340(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x7620
leaq 0x46e1(%rip), %rsi      # 0x32a9e
leaq 0x78(%rsp), %rdi
leaq 0x140(%rsp), %rdx
callq 0x91c4
leaq 0x340(%rsp), %rdi
callq 0x75d0
movq 0x340(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x360(%rsp,%rax)
jne 0x2e404
leaq 0x340(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2a355
movq 0xb0(%rbp), %rax
subq 0xa8(%rbp), %rax
movq %rax, 0x28(%rsp)
shlq $0x1e, %rax
movabsq $0x200000000, %r14      # imm = 0x200000000
addq %rax, %r14
movq %r14, %rbx
sarq $0x20, %rbx
movl $0x1e0, %ecx            # imm = 0x1E0
movq %rbx, %rax
mulq %rcx
pushq $-0x1
popq %rdi
cmovnoq %rax, %rdi
callq 0x7030
movq %rax, 0x10(%rsp)
testq %r14, %r14
je 0x2e474
imulq $0x1e0, %rbx, %r14      # imm = 0x1E0
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2f5b4
addq $0x1e0, %rbx            # imm = 0x1E0
addq $-0x1e0, %r14           # imm = 0xFE20
jne 0x2e45c
movq 0x1bb6d(%rip), %rdi     # 0x49fe8
leaq 0xa202(%rip), %rsi      # 0x38684
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1bb52(%rip), %rdi     # 0x49fe8
leaq 0xa07e(%rip), %rsi      # 0x3851b
callq 0x72b0
movq %rax, %rdi
callq 0x7160
shrq $0x2, 0x28(%rsp)
leaq 0x70(%rbp), %r12
leaq 0xa8(%rbp), %rax
movq %rax, 0x20(%rsp)
movq 0x1bb21(%rip), %rbx     # 0x49fe8
leaq 0x78(%rsp), %r14
leaq 0x340(%rsp), %r15
movq 0x340(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x360(%rsp,%rax)
jne 0x2e527
cmpq $0x0, 0x80(%rsp)
je 0x2e527
movq 0x78(%rsp), %rax
cmpb $0x40, (%rax)
jne 0x2e527
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7280
movq %rax, %rdi
callq 0x7160
movq %r15, %rdi
callq 0x75d0
movq %r15, %rdi
movq %r14, %rsi
callq 0x2a355
jmp 0x2e4d4
movq 0x1baba(%rip), %rdi     # 0x49fe8
callq 0x7160
movq 0x1baae(%rip), %rdi     # 0x49fe8
leaq 0x98a6(%rip), %rsi      # 0x37de7
callq 0x72b0
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x2f482
leaq 0x140(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x2f3cd
leaq 0x140(%rsp), %rsi
movq %rbx, %rdi
callq 0x7280
movq %rax, %rdi
callq 0x7160
leaq 0x140(%rsp), %rdi
callq 0x76a8
leaq 0x108(%rsp), %rdi
callq 0xa268
movq 0x1ba3f(%rip), %rdi     # 0x49fe8
leaq 0xa12c(%rip), %rsi      # 0x386dc
callq 0x72b0
movq %rax, %rdi
callq 0x7160
cmpq $0x0, 0x80(%rsp)
je 0x2e5d2
movq 0x78(%rsp), %rax
cmpb $0x40, (%rax)
jne 0x2e5d9
xorl %ebx, %ebx
jmp 0x2ea07
leaq 0x44be(%rip), %rsi      # 0x32a9e
leaq 0x140(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x91c4
leaq 0x44a5(%rip), %rsi      # 0x32a9e
leaq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x91c4
leaq 0x448c(%rip), %rsi      # 0x32a9e
leaq 0x98(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x91c4
movq %r12, 0x70(%rsp)
movq %rbp, 0x58(%rsp)
leaq 0x4466(%rip), %rsi      # 0x32a9e
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rdx
callq 0x91c4
movq 0x10(%rsp), %rax
leaq 0x1e0(%rax), %rcx
movq %rcx, 0x30(%rsp)
addq $0x3c0, %rax            # imm = 0x3C0
movq %rax, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x28(%rsp), %rax
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
leaq 0x98(%rsp), %r14
leaq 0xb8(%rsp), %rbp
leaq 0x78(%rsp), %rbx
xorl %r15d, %r15d
movl %r15d, 0x18(%rsp)
leaq 0x140(%rsp), %rdi
movq %r14, %rsi
callq 0x7180
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
callq 0x7180
andl $0x0, 0xc(%rsp)
leaq 0x120(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x9
popq %rdx
leaq 0xc(%rsp), %rcx
callq 0x2a2b8
movq %r14, %rdi
movq %r15, %rsi
callq 0x73a0
movq %r15, %rdi
callq 0x76a8
movq 0xa0(%rsp), %rsi
cmpq $0x3, %rsi
jb 0x2e71c
movq 0x98(%rsp), %rax
cmpb $0x2f, -0x2(%rax,%rsi)
jne 0x2e71c
addq $-0x2, %rsi
movq %r14, %rdi
pushq $-0x1
popq %rdx
callq 0x70c0
leaq 0x120(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
pushq $0x9
popq %rbp
movl %ebp, %edx
leaq 0xc(%rsp), %r14
movq %r14, %rcx
callq 0x2a2b8
movq 0x120(%rsp), %rdi
callq 0x7520
movl %eax, %r15d
movq %r12, %rdi
callq 0x76a8
movslq 0xc(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7410
incl %eax
movslq %eax, %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7410
incl %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x2a2b8
movq %r12, %r14
movq 0x120(%rsp), %rdi
callq 0x7520
movl %eax, %r12d
movq %r14, %rdi
callq 0x76a8
movslq 0xc(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7410
incl %eax
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
leaq 0xc(%rsp), %rcx
callq 0x2a2b8
leaq 0xb8(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x73a0
movq %r14, %rdi
callq 0x76a8
leaq 0x98(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x7040
testl %eax, %eax
je 0x2e88b
cmpq $0x0, 0x148(%rsp)
je 0x2e88b
movq 0x10(%rsp), %rax
movl 0x1dc(%rax), %eax
cmpl $0x1, %eax
je 0x2e82d
cmpl $0x2, %eax
jne 0x2e853
movq 0x58(%rsp), %rax
cmpb $0x0, 0x68(%rax)
je 0x2e853
leaq 0x38(%rsp), %rdi
leaq 0x3849(%rip), %rsi      # 0x32082
callq 0x7100
xorl %edx, %edx
testl %eax, %eax
setne %dl
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x28f14
incq 0x60(%rsp)
movq 0x10(%rsp), %rdi
callq 0x28f64
movq 0x30(%rsp), %rdi
callq 0x28f64
movq 0x68(%rsp), %rbx
movq %r13, %r14
subq $0x1, %r14
jb 0x2e88b
movq %rbx, %rdi
callq 0x28f64
addq $0x1e0, %rbx            # imm = 0x1E0
jmp 0x2e874
cmpl $0x4, %r15d
jne 0x2e8ca
leaq 0x340(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, %rsi
callq 0x2a355
leaq 0x98(%rsp), %r14
movq 0x340(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x360(%rsp,%rax)
je 0x2e69b
jmp 0x2e935
movq %rbp, %rdi
leaq 0x37ae(%rip), %rsi      # 0x32082
callq 0x7100
xorl %edx, %edx
testl %eax, %eax
setne %dl
movq 0x10(%rsp), %rdi
movl %r15d, %esi
callq 0x28f14
movq 0x68(%rsp), %rbx
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x2e891
movq 0x20(%rsp), %rax
movq (%rax), %rax
cmpl (%rax,%r14,4), %r12d
jl 0x2e929
movq %rbp, %rdi
leaq 0x3770(%rip), %rsi      # 0x32082
callq 0x7100
xorl %edx, %edx
testl %eax, %eax
setne %dl
movq %rbx, %rdi
movl %r15d, %esi
callq 0x28f14
incq %r14
addq $0x1e0, %rbx            # imm = 0x1E0
jmp 0x2e8f5
cmpq $0x0, 0x148(%rsp)
je 0x2e9c7
movq 0x10(%rsp), %rax
movl 0x1dc(%rax), %eax
cmpl $0x1, %eax
movq 0x58(%rsp), %rbp
movq 0x70(%rsp), %r12
movq 0x60(%rsp), %rbx
je 0x2e96e
cmpl $0x2, %eax
jne 0x2e994
cmpb $0x0, 0x68(%rbp)
je 0x2e994
leaq 0x370d(%rip), %rsi      # 0x32082
leaq 0x38(%rsp), %rdi
callq 0x7100
xorl %edx, %edx
testl %eax, %eax
setne %dl
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x28f14
incq %rbx
movq 0x10(%rsp), %rdi
callq 0x28f64
movq 0x30(%rsp), %rdi
callq 0x28f64
movq 0x68(%rsp), %r14
subq $0x1, %r13
jb 0x2e9d6
movq %r14, %rdi
callq 0x28f64
addq $0x1e0, %r14            # imm = 0x1E0
jmp 0x2e9b0
movq 0x58(%rsp), %rbp
movq 0x70(%rsp), %r12
movq 0x60(%rsp), %rbx
leaq 0xb8(%rsp), %rdi
callq 0x76a8
leaq 0x98(%rsp), %rdi
callq 0x76a8
leaq 0x38(%rsp), %rdi
callq 0x76a8
leaq 0x140(%rsp), %rdi
callq 0x76a8
movq 0x1b5da(%rip), %rdi     # 0x49fe8
leaq 0x9cde(%rip), %rsi      # 0x386f3
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x340(%rsp), %rdi
callq 0x70b0
movq 0x1b5b2(%rip), %rdi     # 0x49fe8
callq 0x7160
movq 0x1b5a6(%rip), %rdi     # 0x49fe8
leaq 0x9444(%rip), %rsi      # 0x37e8d
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1b58b(%rip), %rdi     # 0x49fe8
leaq 0x9ca7(%rip), %rsi      # 0x3870b
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x118(%rbp), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
jne 0x2eaa2
movq 0x1b55f(%rip), %rdi     # 0x49fe8
leaq 0x9cd7(%rip), %rsi      # 0x38767
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq %rbx, 0x18(%rsp)
cmpq $0x0, 0x10(%rbp)
je 0x2ee70
movq 0x8(%rbp), %rsi
leaq 0x140(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x7310
leaq 0x9d21(%rip), %rsi      # 0x387e9
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x94aa(%rip), %rsi      # 0x37f8e
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9d11(%rip), %rsi      # 0x38811
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9472(%rip), %rsi      # 0x37f8e
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9503(%rip), %rsi      # 0x3803b
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x7280
movq %rax, %rdi
callq 0x7160
leaq 0x95b2(%rip), %rsi      # 0x38111
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x2f482
leaq 0x38(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x2f3cd
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x7280
movq %rax, %rdi
callq 0x7160
leaq 0x38(%rsp), %rdi
callq 0x76a8
leaq 0xf0(%rsp), %rdi
callq 0xa268
leaq 0x9ca9(%rip), %rsi      # 0x3886f
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9cf1(%rip), %rsi      # 0x388d3
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9390(%rip), %rsi      # 0x37f8e
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9374(%rip), %rsi      # 0x37f8e
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9715(%rip), %rsi      # 0x3834b
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x933c(%rip), %rsi      # 0x37f8e
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x96e7(%rip), %rsi      # 0x38355
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x72a0
movq %rax, %rdi
callq 0x7160
leaq 0x96d2(%rip), %rsi      # 0x38369
leaq 0x140(%rsp), %rdi
callq 0x72b0
movzbl 0x68(%rbp), %esi
movq %rax, %rdi
callq 0x75a0
movq %rax, %rdi
callq 0x7160
leaq 0x92cf(%rip), %rsi      # 0x37f8e
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9c39(%rip), %rsi      # 0x38914
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movzbl 0x68(%rbp), %ecx
leaq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x28fae
leaq 0x140(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x7280
leaq 0x38(%rsp), %rdi
callq 0x76a8
leaq 0x9263(%rip), %rsi      # 0x37f8e
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x9bdf(%rip), %rsi      # 0x38926
leaq 0x140(%rsp), %rdi
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x10(%rsp), %rax
leaq 0x1e0(%rax), %rsi
movzbl 0x68(%rbp), %ecx
leaq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rdx
callq 0x28fae
movq %rbp, %r12
leaq 0x140(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x7280
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x76a8
movq 0x10(%rsp), %r14
addq $0x3c0, %r14            # imm = 0x3C0
xorl %ebp, %ebp
movq 0x28(%rsp), %r15
testl %r15d, %r15d
cmovlel %ebp, %r15d
leaq 0x140(%rsp), %r13
cmpq %rbp, %r15
je 0x2ee23
movq %r13, %rdi
leaq 0x9b6d(%rip), %rsi      # 0x3893b
callq 0x72b0
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rbp,4), %esi
movq %rax, %rdi
callq 0x75c0
movq %rax, %rdi
callq 0x7160
movzbl 0x68(%r12), %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
callq 0x28fae
movq %r13, %rdi
movq %rbx, %rsi
callq 0x7280
movq %rbx, %rdi
callq 0x76a8
incq %rbp
addq $0x1e0, %r14            # imm = 0x1E0
jmp 0x2edbf
leaq 0x140(%rsp), %rdi
callq 0x7470
leaq 0x140(%rsp), %rdi
callq 0x74d0
movq 0x10(%rsp), %rdi
callq 0x73f0
leaq 0x78(%rsp), %rdi
callq 0x76a8
leaq 0x340(%rsp), %rdi
callq 0x70e0
addq $0x548, %rsp            # imm = 0x548
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1b149(%rip), %rdi     # 0x49fc0
leaq 0x996b(%rip), %rsi      # 0x387e9
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1b12e(%rip), %rdi     # 0x49fc0
leaq 0x90f5(%rip), %rsi      # 0x37f8e
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1b113(%rip), %rdi     # 0x49fc0
leaq 0x995d(%rip), %rsi      # 0x38811
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1b0f8(%rip), %rdi     # 0x49fc0
leaq 0x90bf(%rip), %rsi      # 0x37f8e
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1b0dd(%rip), %rdi     # 0x49fc0
leaq 0x9151(%rip), %rsi      # 0x3803b
callq 0x72b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x7280
movq %rax, %rdi
callq 0x7160
movq 0x1b0b7(%rip), %rdi     # 0x49fc0
leaq 0x9201(%rip), %rsi      # 0x38111
callq 0x72b0
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x2f482
leaq 0x140(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x2f3cd
leaq 0x140(%rsp), %rsi
movq %rbx, %rdi
callq 0x7280
movq %rax, %rdi
callq 0x7160
leaq 0x140(%rsp), %rdi
callq 0x76a8
leaq 0xd8(%rsp), %rdi
callq 0xa268
movq 0x1b048(%rip), %rdi     # 0x49fc0
leaq 0x98f0(%rip), %rsi      # 0x3886f
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1b02d(%rip), %rdi     # 0x49fc0
leaq 0x9939(%rip), %rsi      # 0x388d3
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1b012(%rip), %rdi     # 0x49fc0
leaq 0x8fd9(%rip), %rsi      # 0x37f8e
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1aff7(%rip), %rdi     # 0x49fc0
leaq 0x8fbe(%rip), %rsi      # 0x37f8e
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1afdc(%rip), %rdi     # 0x49fc0
leaq 0x9360(%rip), %rsi      # 0x3834b
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1afc1(%rip), %rdi     # 0x49fc0
leaq 0x8f88(%rip), %rsi      # 0x37f8e
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1afa6(%rip), %rdi     # 0x49fc0
leaq 0x9334(%rip), %rsi      # 0x38355
callq 0x72b0
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x72a0
movq %rax, %rdi
callq 0x7160
movq 0x1af7e(%rip), %rdi     # 0x49fc0
leaq 0x9320(%rip), %rsi      # 0x38369
callq 0x72b0
movzbl 0x68(%rbp), %esi
movq %rax, %rdi
callq 0x75a0
movq %rax, %rdi
callq 0x7160
movq 0x1af57(%rip), %rdi     # 0x49fc0
leaq 0x8f1e(%rip), %rsi      # 0x37f8e
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1af3c(%rip), %rdi     # 0x49fc0
leaq 0x9889(%rip), %rsi      # 0x38914
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movzbl 0x68(%rbp), %ecx
leaq 0x140(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x28fae
movq 0x1af06(%rip), %rdi     # 0x49fc0
leaq 0x140(%rsp), %rsi
callq 0x7280
leaq 0x140(%rsp), %rdi
callq 0x76a8
movq 0x1aee5(%rip), %rdi     # 0x49fc0
leaq 0x8eac(%rip), %rsi      # 0x37f8e
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x1aeca(%rip), %rdi     # 0x49fc0
leaq 0x9829(%rip), %rsi      # 0x38926
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x10(%rsp), %rax
leaq 0x1e0(%rax), %rsi
movzbl 0x68(%rbp), %ecx
leaq 0x140(%rsp), %rdi
movq 0x18(%rsp), %rdx
callq 0x28fae
movq %rbp, %r12
movq 0x1ae8a(%rip), %rdi     # 0x49fc0
leaq 0x140(%rsp), %rsi
callq 0x7280
leaq 0x140(%rsp), %rbx
movq %rbx, %rdi
callq 0x76a8
movq 0x10(%rsp), %r14
addq $0x3c0, %r14            # imm = 0x3C0
xorl %ebp, %ebp
movq 0x28(%rsp), %r13
testl %r13d, %r13d
cmovlel %ebp, %r13d
movq 0x1ae4c(%rip), %r15     # 0x49fc0
cmpq %rbp, %r13
je 0x2ee3d
movq %r15, %rdi
leaq 0x97b4(%rip), %rsi      # 0x3893b
callq 0x72b0
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rbp,4), %esi
movq %rax, %rdi
callq 0x75c0
movq %rax, %rdi
callq 0x7160
movzbl 0x68(%r12), %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
callq 0x28fae
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7280
movq %rbx, %rdi
callq 0x76a8
incq %rbp
addq $0x1e0, %r14            # imm = 0x1E0
jmp 0x2f174
movq %rax, %rbx
jmp 0x2f2e5
movq %rax, %rbx
jmp 0x2f2f2
jmp 0x2f2b5
jmp 0x2f30b
jmp 0x2f2b5
jmp 0x2f30b
jmp 0x2f2b5
jmp 0x2f30b
movq %rax, %rbx
jmp 0x2f24c
jmp 0x2f30b
jmp 0x2f30b
jmp 0x2f2c2
jmp 0x2f310
jmp 0x2f2c2
jmp 0x2f310
movq %rax, %rbx
jmp 0x2f27a
jmp 0x2f310
jmp 0x2f30b
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x76a8
leaq 0xd8(%rsp), %rdi
jmp 0x2f2a4
movq %rax, %rbx
jmp 0x2f29c
jmp 0x2f30b
jmp 0x2f30b
movq %rax, %rbx
jmp 0x2f32a
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x76a8
leaq 0xf0(%rsp), %rdi
callq 0xa268
jmp 0x2f313
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x76a8
leaq 0x108(%rsp), %rdi
callq 0xa268
jmp 0x2f320
jmp 0x2f2d5
jmp 0x2f2d5
jmp 0x2f2d5
jmp 0x2f2d5
jmp 0x2f30b
movq %rax, %rbx
jmp 0x2f2fc
jmp 0x2f30b
jmp 0x2f30b
jmp 0x2f30b
jmp 0x2f310
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x76a8
jmp 0x2f313
jmp 0x2f310
jmp 0x2f30b
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x76a8
leaq 0x98(%rsp), %rdi
callq 0x76a8
leaq 0x38(%rsp), %rdi
callq 0x76a8
leaq 0x140(%rsp), %rdi
callq 0x76a8
jmp 0x2f320
movq %rax, %rbx
jmp 0x2f320
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x74d0
leaq 0x78(%rsp), %rdi
callq 0x76a8
leaq 0x340(%rsp), %rdi
callq 0x70e0
movq %rbx, %rdi
callq 0x75e0
nop