// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: processLisIntervalsSimultaneous(sparseSA const&, read_t&, read_t&, align_opt const&, paired_opt const&, std::vector<lis_t, std::allocator<lis_t>> const&, std::vector<lis_t, std::allocator<lis_t>> const&, std::vector<LIScouple_t, std::allocator<LIScouple_t>> const&, int, double, int, int)
inline void processLisIntervalsSimultaneous(const sparseSA& sa, read_t & mate1, read_t & mate2, 
        const align_opt & alnOptions, const paired_opt & pairedOpt, const vector<lis_t> & lisIntervals1, 
        const vector<lis_t> & lisIntervals2, const vector<LIScouple_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 trial = 0;
    //////////////////////
    //MAIN ALIGNMENT LOOP
    //////////////////////
    //tree containing information for uniqueness option
    int maxAlnScore = 0;
    int alnCount = 0;
    while(alnCount < maxAlnCount && lisIndex < pairedOrder.size()){
        const lis_t & cluster1 = lisIntervals1[pairedOrder[lisIndex].firstPosition];
        const lis_t & cluster2 = lisIntervals2[pairedOrder[lisIndex].secondPosition];
        bool extensionCriterium = (trial < alnOptions.maxTrial);        
        if(alnOptions.print >=2 ){
            cerr << "#LISI " << lisIndex << endl;
            cerr << "#TRIAL " << trial << endl;
            cerr << "#EXTEND " << extensionCriterium << endl;
            cerr << "#LISMEMS " << (cluster1.matches.size()+cluster2.matches.size()) << endl;
            cerr << "#LISSCORE " << pairedOrder[lisIndex].score << endl;
        }
        if(extensionCriterium){
            const vector<match_t> & matchVector1 = cluster1.matches;
            const vector<match_t> & matchVector2 = cluster2.matches;
            long chrStart1, chrEnd1, chrStart2, chrEnd2;
            sa.getChromBounds(matchVector1[0].ref, chrStart1, chrEnd1);
            sa.getChromBounds(matchVector2[0].ref, chrStart2, chrEnd2);
            int returnedAlnScore, returnedAlnScore1, returnedAlnScore2;
            size_t baseAln1 = mate1.alignments.size();
            size_t baseAln2 = mate2.alignments.size();
            //extend cluster1
            if(alnOptions.print >=5) cerr << "try cluster " << pairedOrder[lisIndex].firstPosition << " with " << matchVector1.size() << " seeds on " << (cluster1.fw ? "forward" : "reverse complemented") << " strand." << endl;
            returnedAlnScore1 = extendAlignmentChain(sa.S, cluster1.fw ? mate1.sequence : mate1.rcSequence, matchVector1, editDist1, minScore1, minCoverage1, alnOptions, chrStart1, chrEnd1, mate1, cluster1.fw);
            //extend cluster2
            if(alnOptions.print >=5) cerr << "try cluster " << pairedOrder[lisIndex].secondPosition << " with " << matchVector2.size() << " seeds on " << (cluster2.fw ? "forward" : "reverse complemented") << " strand." << endl;
            returnedAlnScore2 = extendAlignmentChain(sa.S, cluster2.fw ? mate2.sequence : mate2.rcSequence, matchVector2, editDist2, minScore2, minCoverage2, alnOptions, chrStart2, chrEnd2, mate2, cluster2.fw);
            //rescue cluster1 or 2
            if(baseAln1 == mate1.alignments.size() && baseAln2 < mate2.alignments.size() && alnOptions.rescue){
                if(alnOptions.print >= 2) cerr << "#RESCUE" << endl;
                minScore1 = max(0,(int)(mate1.sequence.length()*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*mate1.sequence.length()));
                returnedAlnScore1 = extendAlignmentChain(sa.S, cluster1.fw ? mate1.sequence : mate1.rcSequence, matchVector1, editDist1, minScore1, minCoverage1, alnOptions, chrStart1, chrEnd1, mate1, cluster1.fw);
            }
            else if(baseAln1 < mate1.alignments.size() && baseAln2 == mate2.alignments.size() && alnOptions.rescue){
                if(alnOptions.print >= 2) cerr << "#RESCUE" << endl;
                minScore2 = max(0,(int)(mate2.sequence.length()*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*mate2.sequence.length()));
                returnedAlnScore2 = extendAlignmentChain(sa.S, cluster2.fw ? mate2.sequence : mate2.rcSequence, matchVector2, editDist2, minScore2, minCoverage2, alnOptions, chrStart2, chrEnd2, mate2, cluster2.fw);
            }
            //pair if possible
            if(baseAln1 < mate1.alignments.size() && baseAln2 < mate2.alignments.size()){
                size_t mate1MaxSize = mate1.alignments.size();
                size_t mate2MaxSize = mate2.alignments.size();
                for(size_t i = baseAln1; i < mate1MaxSize; i++){
                    for(size_t j = baseAln2; j < mate2MaxSize; j++){
                        alignment_t * aln1 = mate1.alignments[i];
                        aln1->setLocalPos(sa);
                        alignment_t * aln2 = mate2.alignments[j];
                        aln2->setLocalPos(sa);
                        if(isConcordant(aln1, aln2, pairedOpt, alnOptions.print)){
                            if(alnOptions.print >= 4) cerr << "found concordancy between aln " << i << " of mate 1 and aln " << j << " of mate 2" << endl;
                            setPaired(sa, mate1, mate2,i,j, true);
                            alnCount++;
                        }
                    }
                }
            }
            //deal with new alignments
            trial++;
            returnedAlnScore = returnedAlnScore1 + returnedAlnScore2;
            if(returnedAlnScore >= 0 && (!alnOptions.maxTrialBest || maxAlnScore < returnedAlnScore))
                trial = 0;
            maxAlnScore = max(maxAlnScore, returnedAlnScore);
        }
        lisIndex++;
    }  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, 0xb8(%rsp)
movq %r8, 0xc0(%rsp)
movq %rcx, %r15
movl 0x120(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x118(%rsp), %eax
movl %eax, 0x44(%rsp)
leaq 0x20(%rsi), %rax
movq %rax, 0x88(%rsp)
movsd 0x28(%rsi), %xmm1
movsd 0x13e9b(%rip), %xmm3    # 0x36bb0
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x13ea0(%rip), %xmm4    # 0x36bc0
subpd %xmm4, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
movapd %xmm2, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movl %eax, 0x4c(%rsp)
movsd 0x28(%rdx), %xmm1
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm4, %xmm1
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
addsd %xmm1, %xmm3
movsd 0x30(%rcx), %xmm1
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
mulsd %xmm3, %xmm0
mulsd %xmm1, %xmm3
cvttsd2si %xmm3, %ecx
incl %eax
movl %eax, 0x48(%rsp)
incl %ecx
movl %ecx, 0x40(%rsp)
leaq 0x20(%rdx), %rax
movq %rax, 0x78(%rsp)
cvttsd2si %xmm0, %eax
movl %eax, 0x38(%rsp)
movq %rdi, 0x68(%rsp)
leaq 0x50(%rdi), %rax
movq %rax, 0x60(%rsp)
movq %rsi, 0x20(%rsp)
leaq 0x60(%rsi), %rax
movq %rax, 0x80(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x60(%rdx), %rax
movq %rax, 0x70(%rsp)
movl $0x0, 0x58(%rsp)
movl $0x0, 0x5c(%rsp)
movl $0x0, 0xc(%rsp)
xorl %r12d, %r12d
movq %r15, 0x30(%rsp)
movl 0x5c(%rsp), %eax
cmpl 0x110(%rsp), %eax
jge 0x235bb
movq 0x108(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
cqto
pushq $0xc
popq %rsi
idivq %rsi
cmpq %rax, %r12
jae 0x235bb
imulq $0xc, %r12, %rdx
movslq (%rcx,%rdx), %rax
imulq $0x38, %rax, %r13
movq 0xb8(%rsp), %rax
addq (%rax), %r13
movq %rdx, 0x28(%rsp)
movslq 0x4(%rcx,%rdx), %rax
imulq $0x38, %rax, %rbp
movl 0x54(%r15), %edx
movq 0x100(%rsp), %rcx
addq (%rcx), %rbp
cmpl $0x2, 0x78(%r15)
jl 0x22f48
xorl %ebx, %ebx
movl 0xc(%rsp), %r14d
cmpl %edx, %r14d
setl %bl
movq %r13, %r15
movq %rbp, %r13
movq 0x27180(%rip), %rbp     # 0x49fe8
movq %rbp, %rdi
leaq 0x141ed(%rip), %rsi     # 0x3705f
movl %edx, 0x18(%rsp)
callq 0x72b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x71d0
movq %rax, %rdi
callq 0x7160
movq %rbp, %rdi
leaq 0x141d7(%rip), %rsi     # 0x3706f
callq 0x72b0
movq %rax, %rdi
movl %r14d, %esi
callq 0x75c0
movq %rax, %rdi
callq 0x7160
movq %rbp, %rdi
leaq 0x141bd(%rip), %rsi     # 0x37077
callq 0x72b0
movq %rax, %rdi
movl %ebx, %esi
callq 0x75a0
movq %rax, %rdi
callq 0x7160
movq %rbp, %rdi
leaq 0x141a5(%rip), %rsi     # 0x37080
callq 0x72b0
movq 0x28(%r15), %rcx
subq 0x20(%r15), %rcx
sarq $0x4, %rcx
movq 0x28(%r13), %rsi
subq 0x20(%r13), %rsi
sarq $0x4, %rsi
addq %rcx, %rsi
movq %rax, %rdi
callq 0x71d0
movq %rax, %rdi
callq 0x7160
movq %rbp, %rdi
movq %r13, %rbp
movq %r15, %r13
leaq 0x1416f(%rip), %rsi     # 0x3708a
callq 0x72b0
movq 0x108(%rsp), %rcx
movq (%rcx), %rcx
movq 0x28(%rsp), %rdx
movl 0x8(%rcx,%rdx), %esi
movq %rax, %rdi
callq 0x75c0
movq %rax, %rdi
callq 0x7160
movl 0x18(%rsp), %edx
cmpl %edx, 0xc(%rsp)
jge 0x232fb
movq %r12, 0xb0(%rsp)
movq 0x20(%r13), %rax
movq (%rax), %rsi
movq 0x68(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa8(%rsp), %rdx
leaq 0xa0(%rsp), %rcx
callq 0x22b12
movq 0x20(%rbp), %rax
movq (%rax), %rsi
movq %rbx, %rdi
leaq 0x98(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x22b12
movq 0x20(%rsp), %rax
movq 0xb8(%rax), %rbx
subq 0xb0(%rax), %rbx
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rcx
subq 0xb0(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %r15
cmpl $0x5, 0x78(%r15)
jl 0x2306e
movq 0x27009(%rip), %rdi     # 0x49fe8
leaq 0x140af(%rip), %rsi     # 0x37095
callq 0x72b0
movq 0x108(%rsp), %rcx
movq (%rcx), %rcx
movq 0x28(%rsp), %rdx
movl (%rcx,%rdx), %esi
movq %rax, %rdi
callq 0x75c0
movq %rax, %rdi
leaq 0x13ecc(%rip), %rsi     # 0x36edc
callq 0x72b0
movq 0x28(%r13), %rsi
subq 0x20(%r13), %rsi
sarq $0x4, %rsi
movq %rax, %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x1406f(%rip), %rsi     # 0x370a2
callq 0x72b0
cmpb $0x0, 0x4(%r13)
leaq 0x14069(%rip), %rsi     # 0x370ad
leaq 0x10e9a(%rip), %rcx     # 0x33ee5
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
leaq 0x10ec4(%rip), %rsi     # 0x33f25
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x20(%r13), %r12
movzbl 0x4(%r13), %eax
testl %eax, %eax
movq 0x80(%rsp), %rsi
cmovneq 0x88(%rsp), %rsi
subq $0x8, %rsp
movq 0x68(%rsp), %rdi
movq %r12, %rdx
movl 0x50(%rsp), %ecx
movl 0x4c(%rsp), %r8d
movl 0x54(%rsp), %r9d
pushq %rax
pushq 0x30(%rsp)
pushq 0xb8(%rsp)
pushq 0xc8(%rsp)
pushq %r15
callq 0x1b714
addq $0x30, %rsp
movl %eax, 0x54(%rsp)
cmpl $0x5, 0x78(%r15)
jl 0x23167
movq 0x26f10(%rip), %rdi     # 0x49fe8
leaq 0x13fb6(%rip), %rsi     # 0x37095
callq 0x72b0
movq 0x108(%rsp), %rcx
movq (%rcx), %rcx
movq 0x28(%rsp), %rdx
movl 0x4(%rcx,%rdx), %esi
movq %rax, %rdi
callq 0x75c0
movq %rax, %rdi
leaq 0x13dd2(%rip), %rsi     # 0x36edc
callq 0x72b0
movq 0x28(%rbp), %rsi
subq 0x20(%rbp), %rsi
sarq $0x4, %rsi
movq %rax, %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x13f75(%rip), %rsi     # 0x370a2
callq 0x72b0
cmpb $0x0, 0x4(%rbp)
leaq 0x13f70(%rip), %rsi     # 0x370ad
leaq 0x10da1(%rip), %rcx     # 0x33ee5
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
leaq 0x10dcb(%rip), %rsi     # 0x33f25
callq 0x72b0
movq %rax, %rdi
callq 0x7160
leaq 0x20(%rbp), %rdx
sarq $0x3, %rbx
movzbl 0x4(%rbp), %eax
testl %eax, %eax
movq 0x70(%rsp), %rsi
cmovneq 0x78(%rsp), %rsi
subq $0x8, %rsp
movq 0x68(%rsp), %rdi
movq %rdx, %r14
movl 0x48(%rsp), %ecx
movl 0x44(%rsp), %r8d
movl 0x40(%rsp), %r9d
pushq %rax
pushq 0x20(%rsp)
pushq 0xa8(%rsp)
pushq 0xb8(%rsp)
pushq %r15
callq 0x1b714
addq $0x30, %rsp
movl %eax, 0x50(%rsp)
movq 0x20(%rsp), %rcx
movq 0xb8(%rcx), %rax
subq 0xb0(%rcx), %rax
sarq $0x3, %rax
cmpq %rax, %rbx
jne 0x23305
movq 0x10(%rsp), %rdx
movq 0xb8(%rdx), %rcx
subq 0xb0(%rdx), %rcx
cmpq %rcx, 0x18(%rsp)
jae 0x23305
cmpb $0x1, 0x71(%r15)
jne 0x23305
cmpl $0x2, 0x78(%r15)
jl 0x23227
movq 0x26dd5(%rip), %rdi     # 0x49fe8
leaq 0x13fdc(%rip), %rsi     # 0x371f6
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x20(%rsp), %r10
movq 0x28(%r10), %rax
movslq (%r15), %rcx
movl 0x4(%r15), %edx
subl %ecx, %edx
imulq %rax, %rcx
movq %rcx, %xmm0
movq 0x13966(%rip), %xmm3    # 0x36bb0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x1396a(%rip), %xmm4    # 0x36bc0
subpd %xmm4, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
cvtsi2sd %edx, %xmm2
addsd %xmm0, %xmm1
mulsd 0x13916(%rip), %xmm2    # 0x36b88
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm4, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm1, %xmm3
cvttsd2si %xmm3, %r8d
testl %r8d, %r8d
movl $0x0, %eax
cmovlel %eax, %r8d
movzbl 0x4(%r13), %eax
testl %eax, %eax
movq 0x80(%rsp), %rsi
cmovneq 0x88(%rsp), %rsi
subq $0x8, %rsp
movq 0x68(%rsp), %rdi
movq %r12, %rdx
movl 0x50(%rsp), %ecx
movl %r8d, 0x4c(%rsp)
movl 0x54(%rsp), %r9d
pushq %rax
pushq %r10
pushq 0xb8(%rsp)
pushq 0xc8(%rsp)
pushq %r15
callq 0x1b714
addq $0x30, %rsp
movl %eax, 0x54(%rsp)
jmp 0x23421
movq 0x30(%rsp), %r15
jmp 0x235b3
cmpq %rax, %rbx
jae 0x23421
movq 0x10(%rsp), %rcx
movq 0xb8(%rcx), %rax
subq 0xb0(%rcx), %rax
cmpq %rax, 0x18(%rsp)
jne 0x23421
cmpb $0x1, 0x71(%r15)
jne 0x23421
cmpl $0x2, 0x78(%r15)
jl 0x23359
movq 0x26ca3(%rip), %rdi     # 0x49fe8
leaq 0x13eaa(%rip), %rsi     # 0x371f6
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x10(%rsp), %r10
movq 0x28(%r10), %rax
movslq (%r15), %rcx
movl 0x4(%r15), %edx
subl %ecx, %edx
imulq %rax, %rcx
movq %rcx, %xmm0
movq 0x13834(%rip), %xmm3    # 0x36bb0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x13838(%rip), %xmm4    # 0x36bc0
subpd %xmm4, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
cvtsi2sd %edx, %xmm2
addsd %xmm0, %xmm1
mulsd 0x137e4(%rip), %xmm2    # 0x36b88
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm4, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm1, %xmm3
cvttsd2si %xmm3, %r8d
testl %r8d, %r8d
movl $0x0, %eax
cmovlel %eax, %r8d
movzbl 0x4(%rbp), %eax
testl %eax, %eax
movq 0x70(%rsp), %rsi
cmovneq 0x78(%rsp), %rsi
subq $0x8, %rsp
movq 0x68(%rsp), %rdi
movq %r14, %rdx
movl 0x48(%rsp), %ecx
movl %r8d, 0x44(%rsp)
movl 0x40(%rsp), %r9d
pushq %rax
pushq %r10
pushq 0xa8(%rsp)
pushq 0xb8(%rsp)
pushq %r15
callq 0x1b714
addq $0x30, %rsp
movl %eax, 0x50(%rsp)
movq 0x20(%rsp), %rax
movq 0xb8(%rax), %rcx
subq 0xb0(%rax), %rcx
sarq $0x3, %rcx
movq %rcx, 0x28(%rsp)
cmpq %rcx, %rbx
jae 0x23572
movq 0x18(%rsp), %r14
sarq $0x3, %r14
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %r15
subq 0xb0(%rax), %r15
sarq $0x3, %r15
movq %r14, 0x18(%rsp)
cmpq %r15, %r14
jae 0x2356d
cmpq 0x28(%rsp), %rbx
jae 0x2356d
movq 0x18(%rsp), %r14
cmpq %r15, %r14
jae 0x23565
movq 0x20(%rsp), %rax
movq 0xb0(%rax), %rax
movq (%rax,%rbx,8), %r12
movq %r12, %rdi
movq 0x68(%rsp), %rbp
movq %rbp, %rsi
callq 0x21f20
movq 0x10(%rsp), %rax
movq 0xb0(%rax), %rax
movq (%rax,%r14,8), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x21f20
movq 0x30(%rsp), %rbp
movl 0x78(%rbp), %ecx
movq %r12, %rdi
movq %r13, %rsi
movq 0xc0(%rsp), %rdx
callq 0x1d78a
testb %al, %al
je 0x2355d
cmpl $0x4, 0x78(%rbp)
jl 0x2353c
movq 0x26af4(%rip), %rdi     # 0x49fe8
leaq 0x13efe(%rip), %rsi     # 0x373f9
callq 0x72b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x71d0
movq %rax, %rdi
leaq 0x13f03(%rip), %rsi     # 0x37418
callq 0x72b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x71d0
movq %rax, %rdi
leaq 0x13efd(%rip), %rsi     # 0x3742c
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq 0x68(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movl %ebx, %ecx
movl %r14d, %r8d
pushq $0x1
popq %r9
callq 0x1dc1e
incl 0x5c(%rsp)
incq %r14
jmp 0x23484
incq %rbx
jmp 0x23474
movq 0x30(%rsp), %r15
movl 0xc(%rsp), %edx
incl %edx
movl 0x54(%rsp), %esi
addl 0x50(%rsp), %esi
movl 0x58(%rsp), %ecx
cmpl %esi, %ecx
movl $0x0, %eax
cmovgel %edx, %eax
cmovlel %esi, %ecx
movl %ecx, 0x58(%rsp)
testb $0x1, 0x5c(%r15)
movl $0x0, %ecx
cmovel %ecx, %eax
testl %esi, %esi
cmovnsl %eax, %edx
movl %edx, 0xc(%rsp)
movq 0xb0(%rsp), %r12
incq %r12
jmp 0x22ddb
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq