// File: /workspace/github_cpp_makefile_star2_O3/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 0x23e5b
movq %rax, 0x38(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x23e5b
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 0x2e4c3
movsd 0x17127(%rip), %xmm0    # 0x44d10
movapd 0xc0(%rsp), %xmm3
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movapd 0x17123(%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 0x2e4c3
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 0x23eea
movl %eax, %r13d
cmpb $0x0, 0x4(%r14,%r12)
movl 0x28(%rsp), %r14d
cmovnel 0x80(%rsp), %r14d
testb %al, %al
jne 0x2dd42
movq 0x8(%rsp), %rax
cmpl 0x54(%rax), %r14d
jl 0x2dd42
xorl %r12d, %r12d
jmp 0x2dd76
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 0x2df8e
movl $0x6, %edx
movq 0x26257(%rip), %rdi     # 0x53fe8
leaq 0x17307(%rip), %rsi     # 0x4509f
callq 0x7340
movq 0x26244(%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 0x26206(%rip), %rdi     # 0x53fe8
leaq 0x172bd(%rip), %rsi     # 0x450a6
callq 0x7340
movzbl %r13b, %esi
movq 0x261ef(%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 0x261b4(%rip), %rdi     # 0x53fe8
leaq 0x17274(%rip), %rsi     # 0x450af
callq 0x7340
movq 0x261a1(%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 0x26163(%rip), %rdi     # 0x53fe8
leaq 0x1722b(%rip), %rsi     # 0x450b7
callq 0x7340
testb %r12b, %r12b
je 0x2dea1
movq (%rsp), %rax
movb 0x18(%rax), %al
xorb $0x1, %al
jmp 0x2dea3
xorl %eax, %eax
movzbl %al, %esi
movq 0x2613b(%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 0x26100(%rip), %rdi     # 0x53fe8
leaq 0x171d1(%rip), %rsi     # 0x450c0
callq 0x7340
movq (%rsp), %rax
movq 0x28(%rax), %rsi
subq 0x20(%rax), %rsi
sarq $0x4, %rsi
movq 0x260dd(%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 0x260a2(%rip), %rdi     # 0x53fe8
leaq 0x1717d(%rip), %rsi     # 0x450ca
callq 0x7340
movq (%rsp), %rax
movl (%rax), %esi
movq 0x26089(%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 0x2e4ab
movq (%rsp), %r14
cmpb $0x0, 0x18(%r14)
jne 0x2e4ab
movq 0x20(%r14), %rax
movq (%rax), %rsi
movq 0x70(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x2c5ce
addq $0x20, %r14
movq 0x128(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movl 0x78(%rax), %eax
cmpb $0x1, (%rcx,%rbx,4)
jne 0x2e1fd
cmpl $0x5, %eax
jl 0x2e037
movl $0x1c, %edx
movq 0x25fef(%rip), %rdi     # 0x53fe8
leaq 0x177fe(%rip), %rsi     # 0x457fe
callq 0x7340
movq 0x25fdc(%rip), %rcx     # 0x53fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x25fbe(%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 0x22769
addq $0x30, %rsp
movl %eax, %r14d
movq %rbx, %r12
sarq $0x3, %r12
movq 0x8(%rsp), %rax
cmpl $0x5, 0x78(%rax)
jl 0x2e138
movl $0x27, %edx
movq 0x25f21(%rip), %rdi     # 0x53fe8
leaq 0x1774d(%rip), %rsi     # 0x4581b
callq 0x7340
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rsi
subq 0xb0(%rax), %rsi
sarq $0x3, %rsi
subq %r12, %rsi
movq 0x25ef4(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
movl $0xb, %edx
movq %rax, %rdi
leaq 0x1757c(%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 0x2e40a
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 0x2e19c
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x1c(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x58(%rsp)
jmp 0x2e1ab
leaq 0x50(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x3185c
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 0x2e7cb
addq $0x20, %rsp
decq %r13
jne 0x2e158
jmp 0x2e40a
cmpl $0x5, %eax
jl 0x2e24c
movl $0x1d, %edx
movq 0x25dda(%rip), %rdi     # 0x53fe8
leaq 0x1762e(%rip), %rsi     # 0x45843
callq 0x7340
movq 0x25dc7(%rip), %rcx     # 0x53fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x25da9(%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 0x22769
addq $0x30, %rsp
movl %eax, %r14d
movq %rbx, %r12
sarq $0x3, %r12
movq 0x8(%rsp), %rax
cmpl $0x5, 0x78(%rax)
jl 0x2e34d
movl $0x27, %edx
movq 0x25d0c(%rip), %rdi     # 0x53fe8
leaq 0x1757e(%rip), %rsi     # 0x45861
callq 0x7340
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rsi
subq 0xb0(%rax), %rsi
sarq $0x3, %rsi
subq %r12, %rsi
movq 0x25cdf(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
movl $0xb, %edx
movq %rax, %rdi
leaq 0x17367(%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 0x2e40a
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 0x2e3b6
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x1c(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x58(%rsp)
leaq 0x50(%rsp), %rbp
jmp 0x2e3c8
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0x1c(%rsp), %rdx
callq 0x3185c
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 0x2e7cb
addq $0x20, %rsp
decq %r13
jne 0x2e36d
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 0x2e460
movq 0x8(%rsp), %rdx
cmpb $0x1, 0x5c(%rdx)
jne 0x2e43f
cmpl %r14d, 0x18(%rsp)
jge 0x2e460
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 0x2dca7
movq 0x38(%rsp), %r14
testq %r14, %r14
je 0x2e5bc
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
movl (%r14), %ecx
testb $0x1, %cl
jne 0x2e520
movq %r14, %rdi
callq 0x7380
leaq -0x8(%r12), %rax
cmpq %rbx, %r12
movq %rax, %r12
jne 0x2e4fa
jmp 0x2e5be
testl %ecx, %ecx
js 0x2e5a9
movq 0x38(%rsp), %rax
movl 0xc(%rax), %eax
movq $-0x1, %r13
movslq %eax, %rdx
addq %r14, %rdx
cmpq $0x0, 0x8(%rdx,%r13,8)
je 0x2e59a
movq %r12, %rcx
subq %rbx, %rcx
sarq $0x3, %rcx
movslq %r15d, %rdx
cmpq %rdx, %rcx
jne 0x2e584
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
movq 0x38(%rsp), %rax
movl 0xc(%rax), %eax
movl %ebp, %r15d
movslq %eax, %rcx
addq %r14, %rcx
movq 0x8(%rcx,%r13,8), %rcx
movq %rcx, (%r12)
addq $0x8, %r12
movl (%r14), %ecx
movl %ecx, %edx
sarl %edx
movslq %edx, %rdx
incq %r13
cmpq %rdx, %r13
jl 0x2e537
movq %r14, %rdi
callq 0x7380
cmpq %rbx, %r12
jne 0x2e4f6
jmp 0x2e5be
xorl %ebx, %ebx
movq 0x38(%rsp), %rdi
callq 0x7380
movq %rbx, %rdi
callq 0x7380
movq 0x40(%rsp), %r14
testq %r14, %r14
je 0x2e6c9
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
movl (%r14), %ecx
testb $0x1, %cl
jne 0x2e62d
movq %r14, %rdi
callq 0x7380
leaq -0x8(%r12), %rax
cmpq %rbx, %r12
movq %rax, %r12
jne 0x2e607
jmp 0x2e6cb
testl %ecx, %ecx
js 0x2e6b6
movq 0x40(%rsp), %rax
movl 0xc(%rax), %eax
movq $-0x1, %r13
movslq %eax, %rdx
addq %r14, %rdx
cmpq $0x0, 0x8(%rdx,%r13,8)
je 0x2e6a7
movq %r12, %rcx
subq %rbx, %rcx
sarq $0x3, %rcx
movslq %r15d, %rdx
cmpq %rdx, %rcx
jne 0x2e691
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
movq 0x40(%rsp), %rax
movl 0xc(%rax), %eax
movl %ebp, %r15d
movslq %eax, %rcx
addq %r14, %rcx
movq 0x8(%rcx,%r13,8), %rcx
movq %rcx, (%r12)
addq $0x8, %r12
movl (%r14), %ecx
movl %ecx, %edx
sarl %edx
movslq %edx, %rdx
incq %r13
cmpq %rdx, %r13
jl 0x2e644
movq %r14, %rdi
callq 0x7380
cmpq %rbx, %r12
jne 0x2e603
jmp 0x2e6cb
xorl %ebx, %ebx
movq 0x40(%rsp), %rdi
callq 0x7380
movq %rbx, %rdi
callq 0x7380
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2e6fa
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2e711
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 0x2e72f
jmp 0x2e72f
jmp 0x2e72f
jmp 0x2e72f
jmp 0x2e72f
jmp 0x2e72f
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2e74f
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2e766
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq %rbx, %rdi
callq 0x7600