// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/mapper.cpp
// Function: pairedMatch4(sparseSA const&, read_t&, read_t&, align_opt const&, paired_opt const&)
void pairedMatch4(const sparseSA& sa, read_t & mate1, read_t & mate2, const align_opt & alnOptions, const paired_opt & pairedOpt){
    //FIND CANDIDATE REGIONS FOR BOTH MATES
    vector<lis_t>  lisIntervals1;
    vector<lis_t>  lisIntervals2;
    if(alnOptions.print >= 3) cerr << "calculate LIS of both mates"  << endl;
    calculateCandRegions(sa, mate1, alnOptions, lisIntervals1, alnOptions.errorPercent);
    calculateCandRegions(sa, mate2, alnOptions, lisIntervals2, alnOptions.errorPercent);
    //SORT ALL LIS
    vector<alnScoreInfo_t> pairedOrder;
    pairedOrder.reserve(lisIntervals1.size()+lisIntervals2.size());
    for(size_t i = 0; i < lisIntervals1.size(); i++)
        pairedOrder.push_back(alnScoreInfo_t(true, i,lisIntervals1[i].score));
    for(size_t i = 0; i < lisIntervals2.size(); i++)
        pairedOrder.push_back(alnScoreInfo_t(false, i,lisIntervals2[i].score));
    sort(pairedOrder.begin(),pairedOrder.end(),compAlnScorePaired);
    //TRY TO EXTEND LIS
    int Plength1 = mate1.sequence.length();
    int editDist1 = (int)(alnOptions.errorPercent*Plength1)+1;
    int minScore1 = (int) (Plength1*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*editDist1);
    int Plength2 = mate2.sequence.length();
    int editDist2 = (int)(alnOptions.errorPercent*Plength2)+1;
    int minScore2 = (int) (Plength2*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*editDist2);
    if(alnOptions.print >= 3) cerr << "process LIS in sorted order of both paires"  << endl;
    processLisIntervalsPaired(sa, mate1, mate2, alnOptions, lisIntervals1, lisIntervals2, 
    pairedOrder, alnOptions.maxAlnCount, alnOptions.minCoverage, minScore1, minScore2);
    if(mate1.alignments.empty() && !mate2.alignments.empty() && alnOptions.rescue){
        if(alnOptions.print >= 2) cerr << "#RESCUE" << endl;
        minScore1 = max(0,(int)(Plength1*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*Plength1));
        int maxAlignmentCount = 20;
        int minCoverage = Plength1*0.01;
        processLisIntervals(sa, mate1, alnOptions, lisIntervals1, editDist1, maxAlignmentCount, minCoverage, minScore1);
    }
    else if(mate2.alignments.empty() && !mate1.alignments.empty() && alnOptions.rescue){
        if(alnOptions.print >= 2) cerr << "#RESCUE" << endl;
        minScore2 = max(0,(int)(Plength2*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*Plength2));
        int maxAlignmentCount = 20;
        int minCoverage = Plength1*0.01;
        processLisIntervals(sa, mate2, alnOptions, lisIntervals2, editDist2, maxAlignmentCount, minCoverage, minScore2);
    }
    if(alnOptions.print >= 3) cerr << "first  mate resulted in " << mate1.alignments.size() << " alignments" << endl;
    if(alnOptions.print >= 3) cerr << "second mate resulted in " << mate2.alignments.size() << " alignments" << endl;
    if(mate1.alignments.empty() && mate2.alignments.empty() && pairedOpt.pairedRescue){
        minScore1 = max(0,(int)(Plength1*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*Plength1));
        minScore2 = max(0,(int)(Plength2*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*Plength2));
        processLisIntervalsPaired(sa, mate1, mate2, alnOptions, lisIntervals1, lisIntervals2, 
    pairedOrder, 20, 0.01, minScore1, minScore2);
    }
    if(alnOptions.print >= 3) cerr << "first mate resulted in " << mate1.alignments.size() << " alignments" << endl;
    if(alnOptions.print >= 3) cerr << "second mate resulted in " << mate2.alignments.size() << " alignments" << endl;
    int alnCount1 = mate1.alignmentCount();
    int alnCount2 = mate2.alignmentCount();
    int alnCount = 0;
    int maxPairedAlignments = alnOptions.alignmentCount+1;
    //ORDER ALIGNMENTS ACCORDING TO SCORE
    pairedOrder.clear();
    pairedOrder.reserve(alnCount1+alnCount2);
    for(size_t i = 0; i < mate1.alignments.size(); i++)
        pairedOrder.push_back(alnScoreInfo_t(true, i,mate1.alignments[i]->alignmentScore ));
    for(size_t i = 0; i < mate2.alignments.size(); i++)
        pairedOrder.push_back(alnScoreInfo_t(false, i,mate2.alignments[i]->alignmentScore ));
    sort(pairedOrder.begin(),pairedOrder.end(),compAlnScorePaired);
    //TRY AND PAIR THE ALIGNMENTS
    if(alnCount1>0 && alnCount2>0){
        if(alnOptions.print >= 3) cerr << "search concordant alignments" << endl;
        pairAlignmentsOrdered(sa, mate1, mate2, alnOptions, pairedOpt, 
        pairedOrder, alnCount, maxPairedAlignments);
    }
    //RESCUE PROCEDURE IF NO CONCORDANT ALIGNMENTS WERE FOUND
    if(pairedOpt.pairedRescue && alnCount < maxPairedAlignments && max(alnCount1,alnCount2)>0){
        if(alnOptions.print >= 2) cerr << "#PAIREDRESCUE" << endl;
        vector<alnScoreInfo_t> newAlnFromWindow;
        pairAlignmentToWindow(sa, mate1, mate2, alnOptions, pairedOpt, pairedOrder, 
        newAlnFromWindow, alnCount, maxPairedAlignments);
    }
    //FIND DISCORDANT ALIGNMENTS AMONGST HIGHEST SCORING UNPAIRED ALIGNMENTS
    int pairedAlignments = mate1.pairedAlignmentCount;
    if(alnOptions.print >= 2) cerr << "#CONCORDANTCOUNT " << pairedAlignments << endl;
    if(pairedOpt.discordant && alnCount < maxPairedAlignments){
        if(alnOptions.print >= 3) cerr << "search discordant alignments" << endl;
        calculateDiscordantAlignments(sa, mate1, mate2);
    }
    if(alnOptions.print >= 2) cerr << "#DISCORDANTCOUNT " << mate1.pairedAlignmentCount-pairedAlignments << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, 0x68(%rsp)
movq %rcx, %r14
movq %rdx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, 0x30(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
xorl %eax, %eax
movq %rax, 0xa0(%rsp)
movq %rax, 0x80(%rsp)
movapd %xmm0, 0x70(%rsp)
cmpl $0x3, 0x78(%rcx)
jl 0x28c80
movq 0x2b3a8(%rip), %r13     # 0x53fe8
leaq 0x1c982(%rip), %rsi     # 0x455c9
movl $0x1b, %edx
movq %r13, %rdi
callq 0x7340
movq (%r13), %rax
addq -0x18(%rax), %r13
movq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2b375(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movsd 0x30(%r14), %xmm0
leaq 0x90(%rsp), %rcx
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x24e89
movsd 0x30(%r14), %xmm0
leaq 0x70(%rsp), %rcx
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x24e89
movq %r14, 0xb8(%rsp)
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x98(%rsp), %rax
subq 0x90(%rsp), %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %r14 # imm = 0x6DB6DB6DB6DB6DB7
movq 0x78(%rsp), %rsi
subq 0x70(%rsp), %rsi
imulq %r14, %rax
sarq $0x3, %rsi
imulq %r14, %rsi
addq %rax, %rsi
callq 0x2c7aa
movq 0x90(%rsp), %rax
cmpq %rax, 0x98(%rsp)
je 0x28d9d
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
leaq 0x40(%rsp), %rbp
xorl %r15d, %r15d
movl (%rax,%r12), %eax
movb $0x1, 0x40(%rsp)
movl %r15d, 0x44(%rsp)
movl %eax, 0x48(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x28d6b
movl 0x48(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x18(%rsp)
jmp 0x28d76
movq %r13, %rdi
movq %rbp, %rdx
callq 0x319e2
incq %r15
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r14, %rcx
addq $0x38, %r12
cmpq %rcx, %r15
jb 0x28d36
movq 0x70(%rsp), %rax
cmpq %rax, 0x78(%rsp)
je 0x28e1a
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
leaq 0x40(%rsp), %rbp
xorl %r15d, %r15d
movl (%rax,%r12), %eax
movb $0x0, 0x40(%rsp)
movl %r15d, 0x44(%rsp)
movl %eax, 0x48(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x28dee
movl 0x48(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x18(%rsp)
jmp 0x28df9
movq %r13, %rdi
movq %rbp, %rdx
callq 0x319e2
incq %r15
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r14, %rcx
addq $0x38, %r12
cmpq %rcx, %r15
jb 0x28db9
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
cmpq %rbp, %r13
je 0x28e72
movq %rbp, %rax
subq %r13, %rax
sarq $0x2, %rax
imulq %rcx, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x2ddf(%rip), %rcx     # 0x26076
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31b71
leaq -0x2df1(%rip), %rdx     # 0x26076
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31ccc
movl 0x28(%rbx), %eax
movl %eax, 0x64(%rsp)
movq 0xb8(%rsp), %r15
movsd 0x30(%r15), %xmm0
movsd %xmm0, 0xc0(%rsp)
movl (%r15), %r12d
movl 0x4(%r15), %r14d
movq 0x8(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0x58(%rsp)
cmpl $0x3, 0x78(%r15)
jl 0x28ef1
movq 0x2b137(%rip), %r13     # 0x53fe8
leaq 0x1c81f(%rip), %rsi     # 0x456d7
movl $0x2a, %edx
movq %r13, %rdi
callq 0x7340
movq (%r13), %rax
addq -0x18(%rax), %r13
movq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2b104(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl 0x64(%rsp), %eax
cvtsi2sd %eax, %xmm1
movsd 0xc0(%rsp), %xmm2
movapd %xmm2, %xmm0
movsd %xmm1, 0xa8(%rsp)
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %r13d
incl %r13d
movl %r12d, %ecx
imull %eax, %ecx
subl %r12d, %r14d
movl %r13d, %eax
imull %r14d, %eax
addl %ecx, %eax
movl 0x58(%rsp), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0xb0(%rsp)
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %ebp
incl %ebp
imull %ecx, %r12d
imull %ebp, %r14d
addl %r12d, %r14d
movl 0x60(%r15), %r10d
movsd 0x68(%r15), %xmm0
leaq 0x90(%rsp), %r8
leaq 0x70(%rsp), %r9
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rcx
pushq %r14
pushq %rax
pushq %r10
leaq 0x28(%rsp), %rax
pushq %rax
callq 0x2d3ef
addq $0x20, %rsp
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
cmpq %rcx, %rax
je 0x2909f
cmpq %rcx, %rax
je 0x2918b
movq 0x8(%rsp), %rcx
movq 0xb8(%rcx), %rax
cmpq %rax, 0xb0(%rcx)
jne 0x2918b
cmpb $0x1, 0x71(%r15)
jne 0x2918b
cmpl $0x2, 0x78(%r15)
jl 0x29023
movq 0x2b005(%rip), %r13     # 0x53fe8
leaq 0x1c24c(%rip), %rsi     # 0x45236
movl $0x7, %edx
movq %r13, %rdi
callq 0x7340
movq (%r13), %rax
addq -0x18(%rax), %r13
movq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2afd2(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl (%r15), %eax
movl 0x4(%r15), %ecx
subl %eax, %ecx
imull 0x58(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
cvtsi2sd %ecx, %xmm1
mulsd 0x1bb44(%rip), %xmm1    # 0x44b88
mulsd 0xb0(%rsp), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
xorl %r10d, %r10d
testl %eax, %eax
cmovgl %eax, %r10d
movsd 0x1783a(%rip), %xmm0    # 0x408a0
mulsd 0xa8(%rsp), %xmm0
cvttsd2si %xmm0, %eax
leaq 0x70(%rsp), %rcx
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movl %ebp, %r8d
movl $0x14, %r9d
pushq %r10
pushq %rax
callq 0x243ca
addq $0x10, %rsp
jmp 0x2918b
movq 0x8(%rsp), %rsi
movq 0xb0(%rsi), %rdx
cmpq 0xb8(%rsi), %rdx
je 0x28fa8
cmpb $0x1, 0x71(%r15)
jne 0x28fa8
cmpl $0x2, 0x78(%r15)
jl 0x29111
movq 0x2af17(%rip), %rbp     # 0x53fe8
leaq 0x1c15e(%rip), %rsi     # 0x45236
movl $0x7, %edx
movq %rbp, %rdi
callq 0x7340
movq (%rbp), %rax
addq -0x18(%rax), %rbp
movq %rbp, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2aee4(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl (%r15), %eax
movl 0x4(%r15), %ecx
subl %eax, %ecx
imull 0x64(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0x1ba53(%rip), %xmm1    # 0x44b88
movsd 0xa8(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
xorl %r10d, %r10d
testl %eax, %eax
cmovgl %eax, %r10d
movsd 0x17745(%rip), %xmm0    # 0x408a0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
leaq 0x90(%rsp), %rcx
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r13d, %r8d
movl $0x14, %r9d
pushq %r10
pushq %rax
callq 0x243ca
addq $0x10, %rsp
cmpl $0x3, 0x78(%r15)
jl 0x29207
movq 0x2ae4f(%rip), %rdi     # 0x53fe8
leaq 0x1c4bd(%rip), %rsi     # 0x4565d
movl $0x18, %edx
callq 0x7340
movq 0xb8(%rbx), %rsi
subq 0xb0(%rbx), %rsi
sarq $0x3, %rsi
movq 0x2ae25(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
leaq 0x1c4b5(%rip), %rsi     # 0x45687
movl $0xb, %edx
movq %rax, %rdi
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
cmpl $0x3, 0x78(%r15)
jl 0x29288
movq 0x2add3(%rip), %rdi     # 0x53fe8
leaq 0x1c2a4(%rip), %rsi     # 0x454c0
movl $0x18, %edx
callq 0x7340
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %rsi
subq 0xb0(%rax), %rsi
sarq $0x3, %rsi
movq 0x2ada4(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
leaq 0x1c434(%rip), %rsi     # 0x45687
movl $0xb, %edx
movq %rax, %rdi
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 0xb0(%rbx), %rax
cmpq 0xb8(%rbx), %rax
jne 0x29366
movq 0x8(%rsp), %rcx
movq 0xb0(%rcx), %rax
cmpq 0xb8(%rcx), %rax
jne 0x29366
movq 0x68(%rsp), %rax
cmpb $0x1, 0x14(%rax)
jne 0x29366
movl (%r15), %ecx
movl 0x4(%r15), %eax
movl 0x64(%rsp), %edx
imull %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
subl %ecx, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x1b89e(%rip), %xmm1    # 0x44b88
movsd 0xa8(%rsp), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
cvttsd2si %xmm2, %eax
xorl %r10d, %r10d
testl %eax, %eax
cmovlel %r10d, %eax
movl 0x58(%rsp), %edx
imull %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
mulsd 0xb0(%rsp), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
testl %ecx, %ecx
cmovgl %ecx, %r10d
leaq 0x90(%rsp), %r8
leaq 0x70(%rsp), %r9
movsd 0x1755e(%rip), %xmm0    # 0x408a0
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rcx
pushq %r10
pushq %rax
pushq $0x14
leaq 0x28(%rsp), %rax
pushq %rax
callq 0x2d3ef
addq $0x20, %rsp
cmpl $0x3, 0x78(%r15)
jl 0x293e2
movq 0x2ac74(%rip), %rdi     # 0x53fe8
leaq 0x1c114(%rip), %rsi     # 0x4548f
movl $0x17, %edx
callq 0x7340
movq 0xb8(%rbx), %rsi
subq 0xb0(%rbx), %rsi
sarq $0x3, %rsi
movq 0x2ac4a(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
leaq 0x1c2da(%rip), %rsi     # 0x45687
movl $0xb, %edx
movq %rax, %rdi
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
cmpl $0x3, 0x78(%r15)
jl 0x29463
movq 0x2abf8(%rip), %rdi     # 0x53fe8
leaq 0x1c0c9(%rip), %rsi     # 0x454c0
movl $0x18, %edx
callq 0x7340
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %rsi
subq 0xb0(%rax), %rsi
sarq $0x3, %rsi
movq 0x2abc9(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %r13
leaq 0x1c259(%rip), %rsi     # 0x45687
movl $0xb, %edx
movq %rax, %rdi
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 0xb8(%rbx), %r14
subq 0xb0(%rbx), %r14
shrq $0x3, %r14
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %r12
subq 0xb0(%rax), %r12
shrq $0x3, %r12
movl $0x0, 0x3c(%rsp)
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x294a5
movq %rax, 0x18(%rsp)
movl 0x50(%r15), %eax
movq %rax, 0x58(%rsp)
leal (%r12,%r14), %eax
movslq %eax, %rsi
leaq 0x10(%rsp), %rdi
callq 0x2c7aa
movq 0xb0(%rbx), %rax
cmpq %rax, 0xb8(%rbx)
je 0x2953c
xorl %r15d, %r15d
leaq 0x10(%rsp), %r13
leaq 0x40(%rsp), %rbp
movq (%rax,%r15,8), %rax
movl 0x70(%rax), %eax
movb $0x1, 0x40(%rsp)
movl %r15d, 0x44(%rsp)
movl %eax, 0x48(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x29514
movl 0x48(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x18(%rsp)
jmp 0x2951f
movq %r13, %rdi
movq %rbp, %rdx
callq 0x319e2
incq %r15
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r15
jb 0x294dc
movq 0x8(%rsp), %rcx
movq 0xb0(%rcx), %rax
cmpq %rax, 0xb8(%rcx)
je 0x295c3
xorl %r15d, %r15d
leaq 0x10(%rsp), %r13
leaq 0x40(%rsp), %rbp
movq (%rax,%r15,8), %rax
movl 0x70(%rax), %eax
movb $0x0, 0x40(%rsp)
movl %r15d, 0x44(%rsp)
movl %eax, 0x48(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x29596
movl 0x48(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x18(%rsp)
jmp 0x295a1
movq %r13, %rdi
movq %rbp, %rdx
callq 0x319e2
incq %r15
movq 0x8(%rsp), %rcx
movq 0xb0(%rcx), %rax
movq 0xb8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r15
jb 0x2955e
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
cmpq %rbp, %r13
movq 0xb8(%rsp), %r15
je 0x29623
movq %rbp, %rax
subq %r13, %rax
sarq $0x2, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x3590(%rip), %rcx     # 0x26076
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31b71
leaq -0x35a2(%rip), %rdx     # 0x26076
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31ccc
movq 0x58(%rsp), %rax
leal 0x1(%rax), %ebp
testl %r14d, %r14d
jle 0x296ad
testl %r12d, %r12d
jle 0x296ad
cmpl $0x3, 0x78(%r15)
jl 0x29683
movq 0x2a9a5(%rip), %r13     # 0x53fe8
leaq 0x1c02c(%rip), %rsi     # 0x45676
movl $0x1c, %edx
movq %r13, %rdi
callq 0x7340
movq (%r13), %rax
addq -0x18(%rax), %r13
movq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2a972(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
leaq 0x3c(%rsp), %rax
leaq 0x10(%rsp), %r9
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rcx
movq 0x68(%rsp), %r8
pushq %rbp
pushq %rax
callq 0x26902
addq $0x10, %rsp
cmpl %r12d, %r14d
cmovgl %r14d, %r12d
movq 0x68(%rsp), %rax
cmpb $0x1, 0x14(%rax)
jne 0x29785
movq 0x58(%rsp), %rax
cmpl %eax, 0x3c(%rsp)
jg 0x29785
testl %r12d, %r12d
jle 0x29785
cmpl $0x2, 0x78(%r15)
jl 0x29729
movq 0x2a8ff(%rip), %r13     # 0x53fe8
leaq 0x1be11(%rip), %rsi     # 0x45501
movl $0xd, %edx
movq %r13, %rdi
callq 0x7340
movq (%r13), %rax
addq -0x18(%rax), %r13
movq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2a8cc(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
xorpd %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movapd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
subq $0x8, %rsp
leaq 0x44(%rsp), %r10
leaq 0x18(%rsp), %r9
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
movq 0x70(%rsp), %r8
pushq %rbp
pushq %r10
pushq %rax
callq 0x2610c
addq $0x20, %rsp
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x29785
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movl 0xc8(%rbx), %ebp
cmpl $0x2, 0x78(%r15)
jl 0x297e2
movq 0x2a84f(%rip), %rdi     # 0x53fe8
leaq 0x1bdc1(%rip), %rsi     # 0x45561
movl $0x11, %edx
callq 0x7340
movq 0x2a837(%rip), %rdi     # 0x53fe8
movl %ebp, %esi
callq 0x75d0
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
movq 0x68(%rsp), %rax
cmpb $0x1, 0x9(%rax)
jne 0x29858
movq 0x58(%rsp), %rax
cmpl %eax, 0x3c(%rsp)
jg 0x29858
cmpl $0x3, 0x78(%r15)
jl 0x29846
movq 0x2a7e2(%rip), %r13     # 0x53fe8
leaq 0x1be86(%rip), %rsi     # 0x45693
movl $0x1c, %edx
movq %r13, %rdi
callq 0x7340
movq (%r13), %rax
addq -0x18(%rax), %r13
movq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2a7af(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
callq 0x25b75
cmpl $0x2, 0x78(%r15)
jl 0x298b5
movq 0x2a782(%rip), %rdi     # 0x53fe8
leaq 0x1bd06(%rip), %rsi     # 0x45573
movl $0x11, %edx
callq 0x7340
movl 0xc8(%rbx), %esi
subl %ebp, %esi
movq 0x2a762(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x298cc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
leaq 0x70(%rsp), %rdi
callq 0x2c768
leaq 0x90(%rsp), %rdi
callq 0x2c768
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29928
jmp 0x29928
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x2992b
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
jmp 0x2992b
jmp 0x29928
movq %rax, %rbx
jmp 0x29942
jmp 0x29928
jmp 0x29928
jmp 0x29928
jmp 0x29928
jmp 0x29928
jmp 0x29928
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x29942
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
leaq 0x70(%rsp), %rdi
callq 0x2c768
leaq 0x90(%rsp), %rdi
callq 0x2c768
movq %rbx, %rdi
callq 0x7600