// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/mapper.cpp
// Function: processLisIntervalsAndPair(sparseSA const&, read_t&, read_t&, align_opt const&, paired_opt const&, std::vector<lis_t, std::allocator<lis_t>>&, std::vector<lis_t, std::allocator<lis_t>>&, std::vector<alnScoreInfo_t, std::allocator<alnScoreInfo_t>> const&, int, double, int, int)
inline void processLisIntervalsAndPair(const sparseSA& sa, read_t & mate1, read_t & mate2, 
        const align_opt & alnOptions, const paired_opt & pairedOpt, vector<lis_t> & lisIntervals1, 
        vector<lis_t> & lisIntervals2, const vector<alnScoreInfo_t> & pairedOrder, 
        int maxAlnCount, double minCoveragePercent, int minScore1, int minScore2){
    int minCoverage1 = mate1.sequence.length()*minCoveragePercent;
    int minCoverage2 = mate2.sequence.length()*minCoveragePercent;
    int editDist1 = (int)(alnOptions.errorPercent*mate1.sequence.length())+1;
    int editDist2 = (int)(alnOptions.errorPercent*mate2.sequence.length())+1;
    //for every interval, try to align
    size_t lisIndex = 0;
    //trial parameter for performance reasons
    int trialF = 0;
    int trialR = 0;
    //////////////////////
    //MAIN ALIGNMENT LOOP
    //////////////////////
    //tree containing information for uniqueness option
    kbtree_t(qCov) *treeF;
    kbtree_t(qCov) *treeR;
    treeF = kb_init(qCov, KB_DEFAULT_SIZE);
    treeR = kb_init(qCov, KB_DEFAULT_SIZE);
    int maxAlnScore = 0;
    int alnCount = 0;
    vector<alnScoreInfo_t>  mate1Alns;
    vector<alnScoreInfo_t>  mate2Alns;
    while(alnCount < maxAlnCount && lisIndex < pairedOrder.size()){
        lis_t & cluster = pairedOrder[lisIndex].firstMate ? lisIntervals1[pairedOrder[lisIndex].position] : lisIntervals2[pairedOrder[lisIndex].position];
        bool unique = hasUnique(cluster, cluster.fw ? treeF : treeR);
        bool extend = unique;
        int trial = cluster.fw ? trialF : trialR;
        bool highCoverage = pairedOrder[lisIndex].firstMate ? cluster.score >= minCoverage1 : cluster.score >= minCoverage2;
        bool extensionCriterium = (trial < alnOptions.maxTrial || extend) && (cluster.matches.size() > 1 || highCoverage);        
        if(alnOptions.print >=2 ){
            cerr << "#LISI " << lisIndex << endl;
            cerr << "#UNIQUE " << unique << endl;
            cerr << "#TRIAL " << trial << endl;
            cerr << "#EXTEND " << (extensionCriterium && !cluster.extended) << endl;
            cerr << "#LISMEMS " << cluster.matches.size() << endl;
            cerr << "#LISSCORE " << cluster.score << endl;
        }
        if(extensionCriterium && !cluster.extended){
            //sort matches in this interval according to query position
            const vector<match_t> & matchVector = cluster.matches;
            long chrStart, chrEnd;
            sa.getChromBounds(matchVector[0].ref, chrStart, chrEnd);
            int returnedAlnScore;
            size_t extendCount;
            if(pairedOrder[lisIndex].firstMate){
                if(alnOptions.print >= 5) cerr << "extend cluster on first mate" << endl;
                extendCount = mate1.alignments.size();
                returnedAlnScore = extendAlignmentChain(sa.S, cluster.fw ? mate1.sequence : mate1.rcSequence, matchVector, editDist1, minScore1, minCoverage1, alnOptions, chrStart, chrEnd, mate1, cluster.fw);
                //NEW PART FOR THIS METHOD: TRY TO FIND A MATE FOR THE ALIGNMENTS THAT WERE FOUND HERE
                if(alnOptions.print >= 5) cerr << "alignment of lis in mate 1 resulted in " << (mate1.alignments.size()-extendCount) << " alignments" << endl;
                size_t lastAln = mate1.alignments.size();
                for(size_t i = extendCount; i < lastAln; i++){
                    mate1Alns.push_back(alnScoreInfo_t(true, extendCount, mate1.alignments[extendCount]->alignmentScore));
                    findOrAlignMateToAlignment(sa, mate1, mate2, true, alnOptions, 
                            pairedOpt, lisIntervals2, minScore2, mate2Alns, extendCount);
                }
            }
            else{
                if(alnOptions.print >= 5) cerr << "extend cluster on second mate" << endl;
                extendCount = mate2.alignments.size();
                returnedAlnScore = extendAlignmentChain(sa.S, cluster.fw ? mate2.sequence : mate2.rcSequence, matchVector, editDist2, minScore2, minCoverage2, alnOptions, chrStart, chrEnd, mate2, cluster.fw);
                if(alnOptions.print >= 5) cerr << "alignment of lis in mate 2 resulted in " << (mate1.alignments.size()-extendCount) << " alignments" << endl;
                size_t lastAln = mate2.alignments.size();
                for(size_t i = extendCount; i < lastAln; i++){
                    mate1Alns.push_back(alnScoreInfo_t(false, extendCount, mate2.alignments[extendCount]->alignmentScore));
                    findOrAlignMateToAlignment(sa, mate2, mate1, false, alnOptions, 
                            pairedOpt, lisIntervals1, minScore1, mate1Alns, extendCount);
                }
            }
            //deal with new alignments
            cluster.extended = true;
            if(cluster.fw) trialF++;
            else trialR++;
            if(returnedAlnScore >= 0 && (!alnOptions.maxTrialBest || maxAlnScore < returnedAlnScore)){
                if(cluster.fw) trialF = 0;
                else trialR = 0;
            }
            alnCount = mate1.alignments.size() + mate2.alignments.size();
            maxAlnScore = max(maxAlnScore, returnedAlnScore);
        }
        lisIndex++;
    }  
    kb_destroy(qCov, treeF);
    kb_destroy(qCov, treeR);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movsd %xmm0, (%rsp)
movq %r9, 0xa0(%rsp)
movq %r8, 0xa8(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x10(%rsp)
movsd 0x28(%rsi), %xmm0
movaps %xmm0, 0xc0(%rsp)
movq %rdx, 0x30(%rsp)
movsd 0x28(%rdx), %xmm0
movaps %xmm0, 0x80(%rsp)
movq %rcx, 0x8(%rsp)
movsd 0x30(%rcx), %xmm0
movsd %xmm0, 0x28(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x2410b
movq %rax, 0x38(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x2410b
movq %rax, 0x40(%rsp)
xorl %eax, %eax
movq %rax, 0x60(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movq %rax, 0xe0(%rsp)
movapd %xmm0, 0xd0(%rsp)
cmpl $0x0, 0x130(%rsp)
jle 0x2e5c4
movsd 0x17026(%rip), %xmm0    # 0x44d10
movapd 0xc0(%rsp), %xmm3
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movapd 0x17022(%rip), %xmm1    # 0x44d20
subpd %xmm1, %xmm3
movapd %xmm3, %xmm2
unpckhpd %xmm3, %xmm2            # xmm2 = xmm2[1],xmm3[1]
addsd %xmm3, %xmm2
movsd 0x28(%rsp), %xmm5
movapd %xmm5, %xmm3
mulsd %xmm2, %xmm3
movsd (%rsp), %xmm4
mulsd %xmm4, %xmm2
cvttsd2si %xmm2, %eax
movl %eax, 0x4c(%rsp)
movapd 0x80(%rsp), %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
subpd %xmm1, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
mulsd %xmm0, %xmm4
cvttsd2si %xmm4, %eax
movl %eax, 0x48(%rsp)
cvttsd2si %xmm3, %eax
incl %eax
movl %eax, 0x7c(%rsp)
mulsd %xmm5, %xmm0
cvttsd2si %xmm0, %eax
incl %eax
movl %eax, 0x78(%rsp)
movq 0x70(%rsp), %rax
addq $0x50, %rax
movq %rax, 0x98(%rsp)
xorl %r15d, %r15d
movl $0x0, 0x80(%rsp)
movl $0x0, 0x28(%rsp)
movq $0x0, 0xc0(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x128(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rcx, %r15
jae 0x2e5c4
leaq (%r15,%r15,2), %rbx
cmpb $0x0, (%rax,%rbx,4)
movslq 0x4(%rax,%rbx,4), %rax
movq 0x120(%rsp), %rcx
cmovneq 0xa0(%rsp), %rcx
movq (%rcx), %r14
imulq $0x38, %rax, %r12
cmpb $0x0, 0x4(%r14,%r12)
leaq (%r14,%r12), %rdi
movq 0x40(%rsp), %rsi
cmovneq 0x38(%rsp), %rsi
movq %rdi, (%rsp)
callq 0x24196
movl %eax, %r13d
cmpb $0x0, 0x4(%r14,%r12)
movl 0x28(%rsp), %r14d
cmovnel 0x80(%rsp), %r14d
testb %al, %al
jne 0x2de43
movq 0x8(%rsp), %rax
cmpl 0x54(%rax), %r14d
jl 0x2de43
xorl %r12d, %r12d
jmp 0x2de77
movq 0x128(%rsp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax,%rbx,4)
movl 0x48(%rsp), %eax
cmovnel 0x4c(%rsp), %eax
movq (%rsp), %rdx
cmpl %eax, (%rdx)
setge %al
movq 0x28(%rdx), %rcx
subq 0x20(%rdx), %rcx
cmpq $0x11, %rcx
setae %r12b
orb %al, %r12b
movq 0x8(%rsp), %rax
cmpl $0x2, 0x78(%rax)
jl 0x2e08f
movl $0x6, %edx
movq 0x26156(%rip), %rdi     # 0x53fe8
leaq 0x17206(%rip), %rsi     # 0x4509f
callq 0x7340
movq 0x26143(%rip), %rdi     # 0x53fe8
movq %r15, %rsi
callq 0x71c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0x8, %edx
movq 0x26105(%rip), %rdi     # 0x53fe8
leaq 0x171bc(%rip), %rsi     # 0x450a6
callq 0x7340
movzbl %r13b, %esi
movq 0x260ee(%rip), %rdi     # 0x53fe8
callq 0x75a0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0x7, %edx
movq 0x260b3(%rip), %rdi     # 0x53fe8
leaq 0x17173(%rip), %rsi     # 0x450af
callq 0x7340
movq 0x260a0(%rip), %rdi     # 0x53fe8
movl %r14d, %esi
callq 0x75d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0x8, %edx
movq 0x26062(%rip), %rdi     # 0x53fe8
leaq 0x1712a(%rip), %rsi     # 0x450b7
callq 0x7340
testb %r12b, %r12b
je 0x2dfa2
movq (%rsp), %rax
movb 0x18(%rax), %al
xorb $0x1, %al
jmp 0x2dfa4
xorl %eax, %eax
movzbl %al, %esi
movq 0x2603a(%rip), %rdi     # 0x53fe8
callq 0x75a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0x9, %edx
movq 0x25fff(%rip), %rdi     # 0x53fe8
leaq 0x170d0(%rip), %rsi     # 0x450c0
callq 0x7340
movq (%rsp), %rax
movq 0x28(%rax), %rsi
subq 0x20(%rax), %rsi
sarq $0x4, %rsi
movq 0x25fdc(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0xa, %edx
movq 0x25fa1(%rip), %rdi     # 0x53fe8
leaq 0x1707c(%rip), %rsi     # 0x450ca
callq 0x7340
movq (%rsp), %rax
movl (%rax), %esi
movq 0x25f88(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
testb %r12b, %r12b
je 0x2e5ac
movq (%rsp), %r14
cmpb $0x0, 0x18(%r14)
jne 0x2e5ac
movq 0x20(%r14), %rax
movq (%rax), %rsi
movq 0x70(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x2c6f4
addq $0x20, %r14
movq 0x128(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movl 0x78(%rax), %eax
cmpb $0x1, (%rcx,%rbx,4)
jne 0x2e2fe
cmpl $0x5, %eax
jl 0x2e138
movl $0x1c, %edx
movq 0x25eee(%rip), %rdi     # 0x53fe8
leaq 0x176fd(%rip), %rsi     # 0x457fe
callq 0x7340
movq 0x25edb(%rip), %rcx     # 0x53fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x25ebd(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x10(%rsp), %r10
movq 0xb8(%r10), %rbx
subq 0xb0(%r10), %rbx
movq (%rsp), %rax
movzbl 0x4(%rax), %eax
movl %eax, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
shll $0x6, %ecx
leaq (%r10,%rcx), %rsi
addq $0x20, %rsi
subq $0x8, %rsp
movq 0xa0(%rsp), %rdi
movq %r14, %rdx
movl 0x84(%rsp), %ecx
movl 0x140(%rsp), %r8d
movl 0x54(%rsp), %r9d
pushq %rax
pushq %r10
pushq 0xc8(%rsp)
pushq 0xd8(%rsp)
pushq 0x30(%rsp)
callq 0x22a63
addq $0x30, %rsp
movl %eax, %r14d
movq %rbx, %r12
sarq $0x3, %r12
movq 0x8(%rsp), %rax
cmpl $0x5, 0x78(%rax)
jl 0x2e239
movl $0x27, %edx
movq 0x25e20(%rip), %rdi     # 0x53fe8
leaq 0x1764c(%rip), %rsi     # 0x4581b
callq 0x7340
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rsi
subq 0xb0(%rax), %rsi
sarq $0x3, %rsi
subq %r12, %rsi
movq 0x25df3(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
movl $0xb, %edx
movq %rax, %rdi
leaq 0x1747b(%rip), %rsi     # 0x45687
callq 0x7340
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %r13
subq 0xb0(%rax), %r13
sarq $0x3, %r13
subq %r12, %r13
jbe 0x2e50b
movq 0x10(%rsp), %rax
movq 0xb0(%rax), %rax
movq (%rax,%rbx), %rax
movl 0x70(%rax), %eax
movb $0x1, 0x1c(%rsp)
movl %r12d, 0x20(%rsp)
movl %eax, 0x24(%rsp)
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x2e29d
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x1c(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x58(%rsp)
jmp 0x2e2ac
leaq 0x50(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x319e2
movq 0x70(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
movl $0x1, %ecx
movq 0x8(%rsp), %r8
movq 0xa8(%rsp), %r9
pushq %r12
leaq 0xd8(%rsp), %rax
pushq %rax
movl 0x150(%rsp), %eax
pushq %rax
pushq 0x138(%rsp)
callq 0x2e8b7
addq $0x20, %rsp
decq %r13
jne 0x2e259
jmp 0x2e50b
cmpl $0x5, %eax
jl 0x2e34d
movl $0x1d, %edx
movq 0x25cd9(%rip), %rdi     # 0x53fe8
leaq 0x1752d(%rip), %rsi     # 0x45843
callq 0x7340
movq 0x25cc6(%rip), %rcx     # 0x53fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x25ca8(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x30(%rsp), %r10
movq 0xb8(%r10), %rbx
subq 0xb0(%r10), %rbx
movq (%rsp), %rax
movzbl 0x4(%rax), %eax
movl %eax, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
shll $0x6, %ecx
leaq (%r10,%rcx), %rsi
addq $0x20, %rsi
subq $0x8, %rsp
movq 0xa0(%rsp), %rdi
movq %r14, %rdx
movl 0x80(%rsp), %ecx
movl 0x148(%rsp), %r8d
movl 0x50(%rsp), %r9d
pushq %rax
pushq %r10
pushq 0xc8(%rsp)
pushq 0xd8(%rsp)
pushq 0x30(%rsp)
callq 0x22a63
addq $0x30, %rsp
movl %eax, %r14d
movq %rbx, %r12
sarq $0x3, %r12
movq 0x8(%rsp), %rax
cmpl $0x5, 0x78(%rax)
jl 0x2e44e
movl $0x27, %edx
movq 0x25c0b(%rip), %rdi     # 0x53fe8
leaq 0x1747d(%rip), %rsi     # 0x45861
callq 0x7340
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rsi
subq 0xb0(%rax), %rsi
sarq $0x3, %rsi
subq %r12, %rsi
movq 0x25bde(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
movl $0xb, %edx
movq %rax, %rdi
leaq 0x17266(%rip), %rsi     # 0x45687
callq 0x7340
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x30(%rsp), %rax
movq 0xb8(%rax), %r13
subq 0xb0(%rax), %r13
sarq $0x3, %r13
subq %r12, %r13
jbe 0x2e50b
movq 0x30(%rsp), %rax
movq 0xb0(%rax), %rax
movq (%rax,%rbx), %rax
movl 0x70(%rax), %eax
movb $0x0, 0x1c(%rsp)
movl %r12d, 0x20(%rsp)
movl %eax, 0x24(%rsp)
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x2e4b7
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x1c(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x58(%rsp)
leaq 0x50(%rsp), %rbp
jmp 0x2e4c9
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0x1c(%rsp), %rdx
callq 0x319e2
movq 0x70(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x10(%rsp), %rdx
xorl %ecx, %ecx
movq 0x8(%rsp), %r8
movq 0xa8(%rsp), %r9
pushq %r12
pushq %rbp
movl 0x148(%rsp), %eax
pushq %rax
pushq 0xb8(%rsp)
callq 0x2e8b7
addq $0x20, %rsp
decq %r13
jne 0x2e46e
movq (%rsp), %rax
movb $0x1, 0x18(%rax)
movzbl 0x4(%rax), %ecx
movl %ecx, %eax
xorb $0x1, %al
movzbl %al, %eax
addl 0x28(%rsp), %eax
addl %ecx, 0x80(%rsp)
testl %r14d, %r14d
js 0x2e561
movq 0x8(%rsp), %rdx
cmpb $0x1, 0x5c(%rdx)
jne 0x2e540
cmpl %r14d, 0x18(%rsp)
jge 0x2e561
testb %cl, %cl
movl $0x0, %eax
movl 0x28(%rsp), %edx
cmovel %eax, %edx
movl 0x80(%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, 0x80(%rsp)
movl %edx, %eax
movq 0x10(%rsp), %rdx
movq 0xb8(%rdx), %rcx
subq 0xb0(%rdx), %rcx
shrq $0x3, %rcx
movq 0x30(%rsp), %rdx
movq 0xb8(%rdx), %rsi
subq 0xb0(%rdx), %rsi
shrq $0x3, %rsi
addl %ecx, %esi
movq %rsi, 0xc0(%rsp)
movl 0x18(%rsp), %ecx
cmpl %r14d, %ecx
cmovlel %r14d, %ecx
movl %ecx, 0x18(%rsp)
movl %eax, 0x28(%rsp)
incq %r15
movq 0xc0(%rsp), %rax
cmpl 0x130(%rsp), %eax
jl 0x2dda8
movq 0x38(%rsp), %r14
testq %r14, %r14
je 0x2e6b2
movl $0x8, %edi
movl $0x8, %esi
callq 0x71a0
movq %rax, %rbx
movq (%r14), %rax
movq %rax, (%rbx)
movq %rbx, %r12
addq $0x8, %r12
movl $0x8, %r15d
addq $-0x8, %r12
movq (%r12), %r14
testb $0x1, (%r14)
jne 0x2e61f
movq %r14, %rdi
callq 0x7380
leaq -0x8(%r12), %rax
cmpq %rbx, %r12
movq %rax, %r12
jne 0x2e5fb
jmp 0x2e6b4
cmpl $0x0, (%r14)
movq 0x38(%rsp), %rdx
js 0x2e69f
movq $-0x1, %r13
movslq 0xc(%rdx), %rax
addq %r14, %rax
cmpq $0x0, 0x8(%rax,%r13,8)
je 0x2e690
movq %r12, %rax
subq %rbx, %rax
sarq $0x3, %rax
movslq %r15d, %rcx
cmpq %rcx, %rax
jne 0x2e67c
leal (%r15,%r15), %ebp
movslq %ebp, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x7590
movq 0x38(%rsp), %rdx
movq %rax, %rbx
shlq $0x21, %r15
sarq $0x21, %r15
leaq (%rax,%r15,8), %r12
movl %ebp, %r15d
movslq 0xc(%rdx), %rax
addq %r14, %rax
movq 0x8(%rax,%r13,8), %rax
movq %rax, (%r12)
addq $0x8, %r12
movl (%r14), %eax
sarl %eax
cltq
incq %r13
cmpq %rax, %r13
jl 0x2e631
movq %r14, %rdi
callq 0x7380
cmpq %rbx, %r12
jne 0x2e5f7
jmp 0x2e6b4
xorl %ebx, %ebx
movq 0x38(%rsp), %rdi
callq 0x7380
movq %rbx, %rdi
callq 0x7380
movq 0x40(%rsp), %r14
testq %r14, %r14
je 0x2e7b4
movl $0x8, %edi
movl $0x8, %esi
callq 0x71a0
movq %rax, %rbx
movq (%r14), %rax
movq %rax, (%rbx)
movq %rbx, %r12
addq $0x8, %r12
movl $0x8, %r15d
addq $-0x8, %r12
movq (%r12), %r14
testb $0x1, (%r14)
jne 0x2e721
movq %r14, %rdi
callq 0x7380
leaq -0x8(%r12), %rax
cmpq %rbx, %r12
movq %rax, %r12
jne 0x2e6fd
jmp 0x2e7b6
cmpl $0x0, (%r14)
movq 0x40(%rsp), %rcx
js 0x2e7a1
movq $-0x1, %r13
movslq 0xc(%rcx), %rax
addq %r14, %rax
cmpq $0x0, 0x8(%rax,%r13,8)
je 0x2e792
movq %r12, %rax
subq %rbx, %rax
sarq $0x3, %rax
movslq %r15d, %rcx
cmpq %rcx, %rax
jne 0x2e779
leal (%r15,%r15), %ebp
movslq %ebp, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x7590
movq %rax, %rbx
shlq $0x21, %r15
sarq $0x21, %r15
leaq (%rax,%r15,8), %r12
movl %ebp, %r15d
movq 0x40(%rsp), %rcx
movslq 0xc(%rcx), %rax
addq %r14, %rax
movq 0x8(%rax,%r13,8), %rax
movq %rax, (%r12)
addq $0x8, %r12
movl (%r14), %eax
sarl %eax
cltq
incq %r13
cmpq %rax, %r13
jl 0x2e733
movq %r14, %rdi
callq 0x7380
cmpq %rbx, %r12
jne 0x2e6f9
jmp 0x2e7b6
xorl %ebx, %ebx
movq 0x40(%rsp), %rdi
callq 0x7380
movq %rbx, %rdi
callq 0x7380
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2e7e5
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2e7fc
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e81a
jmp 0x2e81a
jmp 0x2e81a
jmp 0x2e81a
jmp 0x2e81a
jmp 0x2e81a
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2e83a
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2e851
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq %rbx, %rdi
callq 0x7600
nop