// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: output_stats
void output_stats(stats_t *stats)
{
    // Calculate average insert size and standard deviation (from the main bulk data only)
    int isize, ibulk=0;
    uint64_t nisize=0, nisize_inward=0, nisize_outward=0, nisize_other=0;
    for (isize=0; isize<stats->nisize; isize++)
    {
        // Each pair was counted twice
        stats->isize_inward[isize] *= 0.5;
        stats->isize_outward[isize] *= 0.5;
        stats->isize_other[isize] *= 0.5;

        nisize_inward += stats->isize_inward[isize];
        nisize_outward += stats->isize_outward[isize];
        nisize_other += stats->isize_other[isize];
        nisize += stats->isize_inward[isize] + stats->isize_outward[isize] + stats->isize_other[isize];
    }

    double bulk=0, avg_isize=0, sd_isize=0;
    for (isize=0; isize<stats->nisize; isize++)
    {
        bulk += stats->isize_inward[isize] + stats->isize_outward[isize] + stats->isize_other[isize];
        avg_isize += isize * (stats->isize_inward[isize] + stats->isize_outward[isize] + stats->isize_other[isize]);

        if ( bulk/nisize > stats->isize_main_bulk )
        {
            ibulk  = isize+1;
            nisize = bulk;
            break;
        }
    }
    avg_isize /= nisize ? nisize : 1;
    for (isize=1; isize<ibulk; isize++)
        sd_isize += (stats->isize_inward[isize] + stats->isize_outward[isize] + stats->isize_other[isize]) * (isize-avg_isize)*(isize-avg_isize) / nisize;
    sd_isize = sqrt(sd_isize);


    printf("# This file was produced by bamcheck (%s)\n",BAMCHECK_VERSION);
    printf("# The command line was:  %s",stats->argv[0]);
    int i;
    for (i=1; i<stats->argc; i++)
        printf(" %s",stats->argv[i]);
    printf("\n");
    printf("# Summary Numbers. Use `grep ^SN | cut -f 2-` to extract this part.\n");
    printf("SN\traw total sequences:\t%ld\n", (long)(stats->nreads_filtered+stats->nreads_1st+stats->nreads_2nd));
    printf("SN\tfiltered sequences:\t%ld\n", (long)stats->nreads_filtered);
    printf("SN\tsequences:\t%ld\n", (long)(stats->nreads_1st+stats->nreads_2nd));
    printf("SN\tis paired:\t%d\n", stats->nreads_1st&&stats->nreads_2nd ? 1 : 0);
    printf("SN\tis sorted:\t%d\n", stats->is_sorted ? 1 : 0);
    printf("SN\t1st fragments:\t%ld\n", (long)stats->nreads_1st);
    printf("SN\tlast fragments:\t%ld\n", (long)stats->nreads_2nd);
    printf("SN\treads mapped:\t%ld\n", (long)(stats->nreads_paired+stats->nreads_unpaired));
    printf("SN\treads unmapped:\t%ld\n", (long)stats->nreads_unmapped);
    printf("SN\treads unpaired:\t%ld\n", (long)stats->nreads_unpaired);
    printf("SN\treads paired:\t%ld\n", (long)stats->nreads_paired);
    printf("SN\treads duplicated:\t%ld\n", (long)stats->nreads_dup);
    printf("SN\treads MQ0:\t%ld\n", (long)stats->nreads_mq0);
    printf("SN\treads QC failed:\t%ld\n", (long)stats->nreads_QCfailed);
    printf("SN\tnon-primary alignments:\t%ld\n", (long)stats->nreads_secondary);
    printf("SN\ttotal length:\t%ld\n", (long)stats->total_len);
    printf("SN\tbases mapped:\t%ld\n", (long)stats->nbases_mapped);
    printf("SN\tbases mapped (cigar):\t%ld\n", (long)stats->nbases_mapped_cigar);
    printf("SN\tbases trimmed:\t%ld\n", (long)stats->nbases_trimmed);
    printf("SN\tbases duplicated:\t%ld\n", (long)stats->total_len_dup);
    printf("SN\tmismatches:\t%ld\n", (long)stats->nmismatches);
    printf("SN\terror rate:\t%e\n", (float)stats->nmismatches/stats->nbases_mapped_cigar);
    float avg_read_length = (stats->nreads_1st+stats->nreads_2nd)?stats->total_len/(stats->nreads_1st+stats->nreads_2nd):0;
    printf("SN\taverage length:\t%.0f\n", avg_read_length);
    printf("SN\tmaximum length:\t%d\n", stats->max_len);
    printf("SN\taverage quality:\t%.1f\n", stats->total_len?stats->sum_qual/stats->total_len:0);
    printf("SN\tinsert size average:\t%.1f\n", avg_isize);
    printf("SN\tinsert size standard deviation:\t%.1f\n", sd_isize);
    printf("SN\tinward oriented pairs:\t%ld\n", (long)nisize_inward);
    printf("SN\toutward oriented pairs:\t%ld\n", (long)nisize_outward);
    printf("SN\tpairs with other orientation:\t%ld\n", (long)nisize_other);
    printf("SN\tpairs on different chromosomes:\t%ld\n", (long)stats->nreads_anomalous/2);

    int ibase,iqual;
    if ( stats->max_len<stats->nbases ) stats->max_len++;
    if ( stats->max_qual+1<stats->nquals ) stats->max_qual++;
    printf("# First Fragment Qualitites. Use `grep ^FFQ | cut -f 2-` to extract this part.\n");
    printf("# Columns correspond to qualities and rows to cycles. First column is the cycle number.\n");
    for (ibase=0; ibase<stats->max_len; ibase++)
    {
        printf("FFQ\t%d",ibase+1);
        for (iqual=0; iqual<=stats->max_qual; iqual++)
        {
            printf("\t%ld", (long)stats->quals_1st[ibase*stats->nquals+iqual]);
        }
        printf("\n");
    }
    printf("# Last Fragment Qualitites. Use `grep ^LFQ | cut -f 2-` to extract this part.\n");
    printf("# Columns correspond to qualities and rows to cycles. First column is the cycle number.\n");
    for (ibase=0; ibase<stats->max_len; ibase++)
    {
        printf("LFQ\t%d",ibase+1);
        for (iqual=0; iqual<=stats->max_qual; iqual++)
        {
            printf("\t%ld", (long)stats->quals_2nd[ibase*stats->nquals+iqual]);
        }
        printf("\n");
    }
    if ( stats->mpc_buf )
    {
        printf("# Mismatches per cycle and quality. Use `grep ^MPC | cut -f 2-` to extract this part.\n");
        printf("# Columns correspond to qualities, rows to cycles. First column is the cycle number, second\n");
        printf("# is the number of N's and the rest is the number of mismatches\n");
        for (ibase=0; ibase<stats->max_len; ibase++)
        {
            printf("MPC\t%d",ibase+1);
            for (iqual=0; iqual<=stats->max_qual; iqual++)
            {
                printf("\t%ld", (long)stats->mpc_buf[ibase*stats->nquals+iqual]);
            }
            printf("\n");
        }
    }
    printf("# GC Content of first fragments. Use `grep ^GCF | cut -f 2-` to extract this part.\n");
    int ibase_prev = 0;
    for (ibase=0; ibase<stats->ngc; ibase++)
    {
        if ( stats->gc_1st[ibase]==stats->gc_1st[ibase_prev] ) continue;
        printf("GCF\t%.2f\t%ld\n", (ibase+ibase_prev)*0.5*100./(stats->ngc-1), (long)stats->gc_1st[ibase_prev]);
        ibase_prev = ibase;
    }
    printf("# GC Content of last fragments. Use `grep ^GCL | cut -f 2-` to extract this part.\n");
    ibase_prev = 0;
    for (ibase=0; ibase<stats->ngc; ibase++)
    {
        if ( stats->gc_2nd[ibase]==stats->gc_2nd[ibase_prev] ) continue;
        printf("GCL\t%.2f\t%ld\n", (ibase+ibase_prev)*0.5*100./(stats->ngc-1), (long)stats->gc_2nd[ibase_prev]);
        ibase_prev = ibase;
    }
    printf("# ACGT content per cycle. Use `grep ^GCC | cut -f 2-` to extract this part. The columns are: cycle, and A,C,G,T counts [%%]\n");
    for (ibase=0; ibase<stats->max_len; ibase++)
    {
        uint64_t *ptr = &(stats->acgt_cycles[ibase*4]);
        uint64_t  sum = ptr[0]+ptr[1]+ptr[2]+ptr[3];
        if ( ! sum ) continue;
        printf("GCC\t%d\t%.2f\t%.2f\t%.2f\t%.2f\n", ibase,100.*ptr[0]/sum,100.*ptr[1]/sum,100.*ptr[2]/sum,100.*ptr[3]/sum);
    }
    printf("# Insert sizes. Use `grep ^IS | cut -f 2-` to extract this part. The columns are: pairs total, inward oriented pairs, outward oriented pairs, other pairs\n");
    for (isize=0; isize<ibulk; isize++)
        printf("IS\t%d\t%ld\t%ld\t%ld\t%ld\n", isize, (long)(stats->isize_inward[isize]+stats->isize_outward[isize]+stats->isize_other[isize]),
            (long)stats->isize_inward[isize], (long)stats->isize_outward[isize], (long)stats->isize_other[isize]);

    printf("# Read lengths. Use `grep ^RL | cut -f 2-` to extract this part. The columns are: read length, count\n");
    int ilen;
    for (ilen=0; ilen<stats->max_len; ilen++)
    {
        if ( stats->read_lengths[ilen]>0 )
            printf("RL\t%d\t%ld\n", ilen, (long)stats->read_lengths[ilen]);
    }

    printf("# Indel distribution. Use `grep ^ID | cut -f 2-` to extract this part. The columns are: length, number of insertions, number of deletions\n");
    for (ilen=0; ilen<stats->nindels; ilen++)
    {
        if ( stats->insertions[ilen]>0 || stats->deletions[ilen]>0 )
            printf("ID\t%d\t%ld\t%ld\n", ilen+1, (long)stats->insertions[ilen], (long)stats->deletions[ilen]);
    }

    printf("# Indels per cycle. Use `grep ^IC | cut -f 2-` to extract this part. The columns are: cycle, number of insertions (fwd), .. (rev) , number of deletions (fwd), .. (rev)\n");
    for (ilen=0; ilen<=stats->nbases; ilen++)
    {
        // For deletions we print the index of the cycle before the deleted base (1-based) and for insertions
        //  the index of the cycle of the first inserted base (also 1-based)
        if ( stats->ins_cycles_1st[ilen]>0 || stats->ins_cycles_2nd[ilen]>0 || stats->del_cycles_1st[ilen]>0 || stats->del_cycles_2nd[ilen]>0 )
            printf("IC\t%d\t%ld\t%ld\t%ld\t%ld\n", ilen+1, (long)stats->ins_cycles_1st[ilen], (long)stats->ins_cycles_2nd[ilen], (long)stats->del_cycles_1st[ilen], (long)stats->del_cycles_2nd[ilen]);
    }

    printf("# Coverage distribution. Use `grep ^COV | cut -f 2-` to extract this part.\n");
    if  ( stats->cov[0] )
        printf("COV\t[<%d]\t%d\t%ld\n",stats->cov_min,stats->cov_min-1, (long)stats->cov[0]);
    int icov;
    for (icov=1; icov<stats->ncov-1; icov++)
        if ( stats->cov[icov] )
            printf("COV\t[%d-%d]\t%d\t%ld\n",stats->cov_min + (icov-1)*stats->cov_step, stats->cov_min + icov*stats->cov_step-1,stats->cov_min + icov*stats->cov_step-1, (long)stats->cov[icov]);
    if ( stats->cov[stats->ncov-1] )
        printf("COV\t[%d<]\t%d\t%ld\n",stats->cov_min + (stats->ncov-2)*stats->cov_step-1,stats->cov_min + (stats->ncov-2)*stats->cov_step-1, (long)stats->cov[stats->ncov-1]);

    // Calculate average GC content, then sort by GC and depth
    printf("# GC-depth. Use `grep ^GCD | cut -f 2-` to extract this part. The columns are: GC%%, unique sequence percentiles, 10th, 25th, 50th, 75th and 90th depth percentile\n");
    uint32_t igcd;
    for (igcd=0; igcd<stats->igcd; igcd++)
    {
        if ( stats->fai )
            stats->gcd[igcd].gc = round(100. * stats->gcd[igcd].gc);
        else
            if ( stats->gcd[igcd].depth ) 
                stats->gcd[igcd].gc = round(100. * stats->gcd[igcd].gc / stats->gcd[igcd].depth);
    }
    qsort(stats->gcd, stats->igcd+1, sizeof(gc_depth_t), gcd_cmp);
    igcd = 0;
    while ( igcd < stats->igcd )
    {
        // Calculate percentiles (10,25,50,75,90th) for the current GC content and print
        uint32_t nbins=0, itmp=igcd;
        float gc = stats->gcd[igcd].gc;
        while ( itmp<stats->igcd && fabs(stats->gcd[itmp].gc-gc)<0.1 )
        {
            nbins++;
            itmp++;
        }
        printf("GCD\t%.1f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\n", gc, (igcd+nbins+1)*100./(stats->igcd+1),
                gcd_percentile(&(stats->gcd[igcd]),nbins,10) *avg_read_length/stats->gcd_bin_size,
                gcd_percentile(&(stats->gcd[igcd]),nbins,25) *avg_read_length/stats->gcd_bin_size, 
                gcd_percentile(&(stats->gcd[igcd]),nbins,50) *avg_read_length/stats->gcd_bin_size, 
                gcd_percentile(&(stats->gcd[igcd]),nbins,75) *avg_read_length/stats->gcd_bin_size, 
                gcd_percentile(&(stats->gcd[igcd]),nbins,90) *avg_read_length/stats->gcd_bin_size 
              );
        igcd += nbins;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movslq 0xc(%rdi), %rcx
xorl %r13d, %r13d
xorpd %xmm0, %xmm0
testq %rcx, %rcx
jle 0x6494
movq 0x38(%rbx), %rdx
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdi
xorl %r8d, %r8d
movsd 0x13e76(%rip), %xmm1    # 0x1a130
movapd 0x13e7e(%rip), %xmm2    # 0x1a140
movsd 0x13f56(%rip), %xmm3    # 0x1a220
movsd 0x13f56(%rip), %xmm4    # 0x1a228
xorl %eax, %eax
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %r15d, %r15d
movsd (%rdx,%r8,8), %xmm5
unpcklps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
mulsd %xmm3, %xmm6
cvttsd2si %xmm6, %r9
movq %r9, %r10
sarq $0x3f, %r10
subsd %xmm4, %xmm6
cvttsd2si %xmm6, %r11
andq %r10, %r11
orq %r9, %r11
movq %r11, (%rdx,%r8,8)
movsd (%rsi,%r8,8), %xmm5
unpcklps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
mulsd %xmm3, %xmm6
cvttsd2si %xmm6, %r9
movq %r9, %r10
sarq $0x3f, %r10
subsd %xmm4, %xmm6
cvttsd2si %xmm6, %r11
andq %r10, %r11
orq %r9, %r11
movq %r11, (%rsi,%r8,8)
movsd (%rdi,%r8,8), %xmm5
unpcklps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
mulsd %xmm3, %xmm6
cvttsd2si %xmm6, %r9
movq %r9, %r10
sarq $0x3f, %r10
subsd %xmm4, %xmm6
cvttsd2si %xmm6, %r11
andq %r10, %r11
orq %r9, %r11
movq %r11, (%rdi,%r8,8)
movq (%rdx,%r8,8), %r9
addq %r9, %r12
movq (%rsi,%r8,8), %r10
addq %r10, %r15
addq %r11, %r14
addq %r9, %rax
addq %r10, %rax
addq %r11, %rax
incq %r8
cmpq %r8, %rcx
jne 0x62dd
testl %ecx, %ecx
jle 0x64a6
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdi
movq %rax, %xmm3
punpckldq 0x13d5c(%rip), %xmm3 # xmm3 = xmm3[0],mem[0],xmm3[1],mem[1]
subpd 0x13d64(%rip), %xmm3    # 0x1a140
movq 0x48(%rbx), %r8
movapd %xmm3, %xmm2
unpckhpd %xmm3, %xmm2            # xmm2 = xmm2[1],xmm3[1]
addsd %xmm3, %xmm2
xorps %xmm3, %xmm3
cvtss2sd 0x98(%rbx), %xmm3
xorpd %xmm10, %xmm10
xorl %edx, %edx
movdqa 0x13d4a(%rip), %xmm4    # 0x1a150
movdqa 0x13d52(%rip), %xmm5    # 0x1a160
movdqa 0x13d5a(%rip), %xmm6    # 0x1a170
movapd 0x13d62(%rip), %xmm7    # 0x1a180
movapd %xmm10, %xmm8
movq (%rdi,%rdx,8), %r9
addq (%rsi,%rdx,8), %r9
addq (%r8,%rdx,8), %r9
movq %r9, %xmm9
imulq %rdx, %r9
movq %r9, %xmm10
punpcklqdq %xmm9, %xmm10   # xmm10 = xmm10[0],xmm9[0]
movdqa %xmm10, %xmm9
pand %xmm4, %xmm9
por %xmm5, %xmm9
psrlq $0x20, %xmm10
por %xmm6, %xmm10
subpd %xmm7, %xmm10
addpd %xmm9, %xmm10
addpd %xmm8, %xmm10
movapd %xmm10, %xmm8
unpckhpd %xmm10, %xmm8           # xmm8 = xmm8[1],xmm10[1]
movapd %xmm8, %xmm9
divsd %xmm2, %xmm9
ucomisd %xmm3, %xmm9
ja 0x71ed
incq %rdx
cmpq %rdx, %rcx
jne 0x641e
jmp 0x64ab
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %r15d, %r15d
xorpd %xmm10, %xmm10
xorl %eax, %eax
jmp 0x64ab
xorpd %xmm10, %xmm10
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, %xmm1
punpckldq 0x13c70(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x13c78(%rip), %xmm1    # 0x1a140
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm10
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movq %r13, 0x10(%rsp)
movapd %xmm10, 0x20(%rsp)
jb 0x64f5
sqrtsd %xmm0, %xmm0
jmp 0x64fa
callq 0x3560
movsd %xmm0, 0x18(%rsp)
leaq 0x141a5(%rip), %rdi     # 0x1a6ac
leaq 0x141c9(%rip), %rsi     # 0x1a6d7
xorl %eax, %eax
callq 0x3210
movq 0x1e8(%rbx), %rax
movq (%rax), %rsi
leaq 0x141bc(%rip), %rdi     # 0x1a6e2
xorl %eax, %eax
callq 0x3210
cmpl $0x2, 0x1e0(%rbx)
jl 0x6566
movl $0x1, %ebp
leaq 0x141b8(%rip), %r13     # 0x1a6fa
movq 0x1e8(%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x3210
incq %rbp
movslq 0x1e0(%rbx), %rax
cmpq %rax, %rbp
jl 0x6542
movl $0xa, %edi
callq 0x3070
leaq 0x14f58(%rip), %rdi     # 0x1b4cf
callq 0x3100
movq 0xb0(%rbx), %rsi
addq 0xc0(%rbx), %rsi
addq 0xb8(%rbx), %rsi
leaq 0x14166(%rip), %rdi     # 0x1a6fe
xorl %eax, %eax
callq 0x3210
movq 0xc0(%rbx), %rsi
leaq 0x1416e(%rip), %rdi     # 0x1a71b
xorl %eax, %eax
callq 0x3210
movq 0xb8(%rbx), %rsi
addq 0xb0(%rbx), %rsi
leaq 0x1416e(%rip), %rdi     # 0x1a737
xorl %eax, %eax
callq 0x3210
cmpq $0x0, 0xb0(%rbx)
movl $0x0, %esi
je 0x65ed
xorl %esi, %esi
cmpq $0x0, 0xb8(%rbx)
setne %sil
leaq 0x14156(%rip), %rdi     # 0x1a74a
xorl %eax, %eax
callq 0x3210
xorl %esi, %esi
cmpl $0x0, 0x9c(%rbx)
setne %sil
leaq 0x1414d(%rip), %rdi     # 0x1a75c
xorl %eax, %eax
callq 0x3210
movq 0xb0(%rbx), %rsi
leaq 0x1414a(%rip), %rdi     # 0x1a76e
xorl %eax, %eax
callq 0x3210
movq 0xb8(%rbx), %rsi
leaq 0x1414c(%rip), %rdi     # 0x1a785
xorl %eax, %eax
callq 0x3210
movq 0xd8(%rbx), %rsi
addq 0xe0(%rbx), %rsi
leaq 0x14148(%rip), %rdi     # 0x1a79d
xorl %eax, %eax
callq 0x3210
movq 0xd0(%rbx), %rsi
leaq 0x14149(%rip), %rdi     # 0x1a7b3
xorl %eax, %eax
callq 0x3210
movq 0xd8(%rbx), %rsi
leaq 0x1414c(%rip), %rdi     # 0x1a7cb
xorl %eax, %eax
callq 0x3210
movq 0xe0(%rbx), %rsi
leaq 0x1414f(%rip), %rdi     # 0x1a7e3
xorl %eax, %eax
callq 0x3210
movq 0xc8(%rbx), %rsi
leaq 0x14150(%rip), %rdi     # 0x1a7f9
xorl %eax, %eax
callq 0x3210
movq 0xf0(%rbx), %rsi
leaq 0x14155(%rip), %rdi     # 0x1a813
xorl %eax, %eax
callq 0x3210
movq 0x118(%rbx), %rsi
leaq 0x14153(%rip), %rdi     # 0x1a826
xorl %eax, %eax
callq 0x3210
movq 0x120(%rbx), %rsi
leaq 0x14157(%rip), %rdi     # 0x1a83f
xorl %eax, %eax
callq 0x3210
movq 0xa0(%rbx), %rsi
leaq 0x14162(%rip), %rdi     # 0x1a85f
xorl %eax, %eax
callq 0x3210
movq 0xf8(%rbx), %rsi
leaq 0x14163(%rip), %rdi     # 0x1a875
xorl %eax, %eax
callq 0x3210
movq 0x100(%rbx), %rsi
leaq 0x14164(%rip), %rdi     # 0x1a88b
xorl %eax, %eax
callq 0x3210
movq 0x108(%rbx), %rsi
leaq 0x1416d(%rip), %rdi     # 0x1a8a9
xorl %eax, %eax
callq 0x3210
movq 0xa8(%rbx), %rsi
leaq 0x1416f(%rip), %rdi     # 0x1a8c0
xorl %eax, %eax
callq 0x3210
movq 0x110(%rbx), %rsi
leaq 0x14174(%rip), %rdi     # 0x1a8da
xorl %eax, %eax
callq 0x3210
movq 0x100(%rbx), %rax
movq 0x110(%rbx), %rcx
testq %rcx, %rcx
js 0x6787
cvtsi2ss %rcx, %xmm0
jmp 0x679c
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x67a8
cvtsi2ss %rax, %xmm1
jmp 0x67bd
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x14122(%rip), %rdi     # 0x1a8ee
movb $0x1, %al
callq 0x3210
movq 0xb8(%rbx), %rcx
addq 0xb0(%rbx), %rcx
je 0x67fe
movq 0xa0(%rbx), %rax
xorl %edx, %edx
divq %rcx
testq %rax, %rax
js 0x6803
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
jmp 0x681b
xorps %xmm0, %xmm0
jmp 0x681b
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
cvtss2sd %xmm0, %xmm0
leaq 0x140d5(%rip), %rdi     # 0x1a901
movb $0x1, %al
callq 0x3210
movl 0x90(%rbx), %esi
leaq 0x140da(%rip), %rdi     # 0x1a91a
xorl %eax, %eax
callq 0x3210
movq 0xa0(%rbx), %rax
testq %rax, %rax
je 0x6882
movsd 0x1c0(%rbx), %xmm0
movq %rax, %xmm1
punpckldq 0x138c8(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x138d0(%rip), %xmm1    # 0x1a140
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
jmp 0x6885
xorps %xmm0, %xmm0
leaq 0x140a5(%rip), %rdi     # 0x1a931
movb $0x1, %al
callq 0x3210
leaq 0x140b1(%rip), %rdi     # 0x1a94b
movaps 0x20(%rsp), %xmm0
movb $0x1, %al
callq 0x3210
leaq 0x140bc(%rip), %rdi     # 0x1a969
movsd 0x18(%rsp), %xmm0
movb $0x1, %al
callq 0x3210
leaq 0x140d1(%rip), %rdi     # 0x1a992
movq %r12, %rsi
xorl %eax, %eax
callq 0x3210
leaq 0x140df(%rip), %rdi     # 0x1a9b1
movq %r15, %rsi
xorl %eax, %eax
callq 0x3210
leaq 0x140ee(%rip), %rdi     # 0x1a9d1
movq %r14, %rsi
xorl %eax, %eax
callq 0x3210
movq 0xe8(%rbx), %rax
movq %rax, %rsi
shrq $0x3f, %rsi
addq %rax, %rsi
sarq %rsi
leaq 0x140ef(%rip), %rdi     # 0x1a9f7
xorl %eax, %eax
callq 0x3210
movl 0x90(%rbx), %eax
cmpl 0x8(%rbx), %eax
jge 0x6922
incl %eax
movl %eax, 0x90(%rbx)
movl 0x94(%rbx), %eax
incl %eax
cmpl 0x4(%rbx), %eax
jge 0x6935
movl %eax, 0x94(%rbx)
leaq 0x14bd7(%rip), %rdi     # 0x1b513
callq 0x3100
leaq 0x14c68(%rip), %rdi     # 0x1b5b0
callq 0x3100
cmpl $0x0, 0x90(%rbx)
jle 0x69c8
leaq 0x140c2(%rip), %r14     # 0x1aa1f
leaq 0x140c2(%rip), %r15     # 0x1aa26
xorl %r12d, %r12d
leal 0x1(%r12), %ebp
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x3210
cmpl $0x0, 0x94(%rbx)
js 0x69b3
movslq %r12d, %r12
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movslq 0x4(%rbx), %rcx
imulq %r12, %rcx
addq %r13, %rcx
movq (%rax,%rcx,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3210
incq %r13
leal -0x1(%r13), %eax
cmpl 0x94(%rbx), %eax
jl 0x6987
movl $0xa, %edi
callq 0x3070
movl %ebp, %r12d
cmpl 0x90(%rbx), %ebp
jl 0x6967
leaq 0x14b93(%rip), %rdi     # 0x1b562
callq 0x3100
leaq 0x14bd5(%rip), %rdi     # 0x1b5b0
callq 0x3100
cmpl $0x0, 0x90(%rbx)
jle 0x6a5b
leaq 0x1403b(%rip), %r14     # 0x1aa2b
leaq 0x1402f(%rip), %r15     # 0x1aa26
xorl %r12d, %r12d
leal 0x1(%r12), %ebp
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x3210
cmpl $0x0, 0x94(%rbx)
js 0x6a46
movslq %r12d, %r12
xorl %r13d, %r13d
movq 0x20(%rbx), %rax
movslq 0x4(%rbx), %rcx
imulq %r12, %rcx
addq %r13, %rcx
movq (%rax,%rcx,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3210
incq %r13
leal -0x1(%r13), %eax
cmpl 0x94(%rbx), %eax
jl 0x6a1a
movl $0xa, %edi
callq 0x3070
movl %ebp, %r12d
cmpl 0x90(%rbx), %ebp
jl 0x69fa
cmpq $0x0, 0x198(%rbx)
je 0x6b0b
leaq 0x14b98(%rip), %rdi     # 0x1b608
callq 0x3100
leaq 0x14be2(%rip), %rdi     # 0x1b65e
callq 0x3100
leaq 0x14c32(%rip), %rdi     # 0x1b6ba
callq 0x3100
cmpl $0x0, 0x90(%rbx)
jle 0x6b0b
leaq 0x13f95(%rip), %r14     # 0x1aa32
leaq 0x13f82(%rip), %r15     # 0x1aa26
xorl %r12d, %r12d
leal 0x1(%r12), %ebp
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x3210
cmpl $0x0, 0x94(%rbx)
js 0x6af6
movslq %r12d, %r12
xorl %r13d, %r13d
movq 0x198(%rbx), %rax
movslq 0x4(%rbx), %rcx
imulq %r12, %rcx
addq %r13, %rcx
movq (%rax,%rcx,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3210
incq %r13
leal -0x1(%r13), %eax
cmpl 0x94(%rbx), %eax
jl 0x6ac7
movl $0xa, %edi
callq 0x3070
movl %ebp, %r12d
cmpl 0x90(%rbx), %ebp
jl 0x6aa7
leaq 0x14be8(%rip), %rdi     # 0x1b6fa
callq 0x3100
movl 0x10(%rbx), %eax
testl %eax, %eax
movq 0x10(%rsp), %r13
jle 0x6b82
xorl %r15d, %r15d
leaq 0x13f0c(%rip), %r14     # 0x1aa39
xorl %ecx, %ecx
movq 0x28(%rbx), %rdx
movslq %ecx, %rsi
movq (%rdx,%rsi,8), %rsi
cmpq %rsi, (%rdx,%r15,8)
je 0x6b77
addl %r15d, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0x136ce(%rip), %xmm0    # 0x1a220
mulsd 0x136d6(%rip), %xmm0    # 0x1a230
decl %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x3210
movl 0x10(%rbx), %eax
movl %r15d, %ecx
incq %r15
movslq %eax, %rdx
cmpq %rdx, %r15
jl 0x6b2f
leaq 0x14bc4(%rip), %rdi     # 0x1b74d
callq 0x3100
movl 0x10(%rbx), %eax
testl %eax, %eax
jle 0x6bf4
xorl %r15d, %r15d
leaq 0x13ea8(%rip), %r14     # 0x1aa47
xorl %ecx, %ecx
movq 0x30(%rbx), %rdx
movslq %ecx, %rsi
movq (%rdx,%rsi,8), %rsi
cmpq %rsi, (%rdx,%r15,8)
je 0x6be9
addl %r15d, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0x1365c(%rip), %xmm0    # 0x1a220
mulsd 0x13664(%rip), %xmm0    # 0x1a230
decl %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x3210
movl 0x10(%rbx), %eax
movl %r15d, %ecx
incq %r15
movslq %eax, %rdx
cmpq %rdx, %r15
jl 0x6ba1
leaq 0x13e5a(%rip), %rdi     # 0x1aa55
xorl %eax, %eax
callq 0x3210
movl 0x90(%rbx), %ecx
testl %ecx, %ecx
jle 0x6d27
movl $0x18, %r12d
xorl %r14d, %r14d
leaq 0x13eb2(%rip), %r15     # 0x1aad2
movq 0x50(%rbx), %rax
movq -0x18(%rax,%r12), %r8
movq -0x10(%rax,%r12), %rsi
leaq (%rsi,%r8), %rdi
movq -0x8(%rax,%r12), %rdx
addq %rdx, %rdi
movq (%rax,%r12), %rax
addq %rax, %rdi
je 0x6d14
movq %r8, %xmm1
movq 0x134dc(%rip), %xmm6    # 0x1a130
punpckldq %xmm6, %xmm1    # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1]
movapd 0x134e0(%rip), %xmm7    # 0x1a140
subpd %xmm7, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd 0x135b7(%rip), %xmm8    # 0x1a230
mulsd %xmm8, %xmm0
movq %rdi, %xmm1
punpckldq %xmm6, %xmm1    # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1]
subpd %xmm7, %xmm1
movapd %xmm1, %xmm4
unpckhpd %xmm1, %xmm4            # xmm4 = xmm4[1],xmm1[1]
addsd %xmm1, %xmm4
divsd %xmm4, %xmm0
movq %rsi, %xmm2
punpckldq %xmm6, %xmm2    # xmm2 = xmm2[0],xmm6[0],xmm2[1],xmm6[1]
subpd %xmm7, %xmm2
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
mulsd %xmm8, %xmm1
divsd %xmm4, %xmm1
movq %rdx, %xmm3
punpckldq %xmm6, %xmm3    # xmm3 = xmm3[0],xmm6[0],xmm3[1],xmm6[1]
subpd %xmm7, %xmm3
movapd %xmm3, %xmm2
unpckhpd %xmm3, %xmm2            # xmm2 = xmm2[1],xmm3[1]
addsd %xmm3, %xmm2
mulsd %xmm8, %xmm2
divsd %xmm4, %xmm2
movq %rax, %xmm5
punpckldq %xmm6, %xmm5    # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
subpd %xmm7, %xmm5
movapd %xmm5, %xmm3
unpckhpd %xmm5, %xmm3            # xmm3 = xmm3[1],xmm5[1]
addsd %xmm5, %xmm3
mulsd %xmm8, %xmm3
divsd %xmm4, %xmm3
movq %r15, %rdi
movl %r14d, %esi
movb $0x4, %al
callq 0x3210
movl 0x90(%rbx), %ecx
incq %r14
movslq %ecx, %rax
addq $0x20, %r12
cmpq %rax, %r14
jl 0x6c20
leaq 0x14a71(%rip), %rdi     # 0x1b79f
callq 0x3100
testl %r13d, %r13d
jle 0x6d79
movl %r13d, %r12d
leaq 0x13dac(%rip), %r14     # 0x1aaee
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rdx
movq (%rax,%r15,8), %rcx
movq (%rdx,%r15,8), %r8
leaq (%r8,%rcx), %rdx
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %r9
addq %r9, %rdx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x3210
incq %r15
cmpq %r15, %r12
jne 0x6d45
leaq 0x14ab9(%rip), %rdi     # 0x1b839
callq 0x3100
movl 0x90(%rbx), %eax
testl %eax, %eax
jle 0x6dc4
leaq 0x13d6f(%rip), %r14     # 0x1ab05
xorl %r15d, %r15d
movq 0x58(%rbx), %rcx
movq (%rcx,%r15,8), %rdx
testq %rdx, %rdx
je 0x6db9
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x3210
movl 0x90(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x6d99
leaq 0x14ad3(%rip), %rdi     # 0x1b89e
callq 0x3100
movl 0x14(%rbx), %eax
testl %eax, %eax
jle 0x6e15
leaq 0x13d32(%rip), %r14     # 0x1ab10
xorl %r15d, %r15d
movq 0x60(%rbx), %rcx
movq 0x68(%rbx), %rsi
movq (%rcx,%r15,8), %rdx
movq (%rsi,%r15,8), %rcx
movq %rdx, %rsi
orq %rcx, %rsi
je 0x6e0a
leal 0x1(%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3210
movl 0x14(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x6de1
leaq 0x14b0c(%rip), %rdi     # 0x1b928
callq 0x3100
movl 0x8(%rbx), %eax
testl %eax, %eax
js 0x6eaf
leaq 0x13cec(%rip), %r14     # 0x1ab1f
xorl %r12d, %r12d
movq 0x70(%rbx), %rcx
movq 0x78(%rbx), %rsi
movq (%rcx,%r12,8), %rdx
movq (%rsi,%r12,8), %rcx
testq %rdx, %rdx
je 0x6e54
movq 0x80(%rbx), %rsi
jmp 0x6e77
movq 0x80(%rbx), %rsi
testq %rcx, %rcx
jne 0x6e77
cmpq $0x0, (%rsi,%r12,8)
jne 0x6e75
movq 0x88(%rbx), %rcx
cmpq $0x0, (%rcx,%r12,8)
je 0x6ea8
xorl %ecx, %ecx
leaq 0x1(%r12), %r15
movq (%rsi,%r12,8), %r8
movq 0x88(%rbx), %rax
movq (%rax,%r12,8), %r9
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x3210
movl 0x8(%rbx), %eax
movslq %eax, %rcx
cmpq %rcx, %r12
movq %r15, %r12
jl 0x6e36
jmp 0x6eaf
leaq 0x1(%r12), %r15
jmp 0x6e9b
leaq 0x14b1a(%rip), %rdi     # 0x1b9d0
callq 0x3100
movq 0x150(%rbx), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x6ee1
movl 0x158(%rbx), %esi
leal -0x1(%rsi), %edx
leaq 0x13c5c(%rip), %rdi     # 0x1ab36
xorl %eax, %eax
callq 0x3210
movslq 0x14c(%rbx), %rax
cmpq $0x2, %rax
jle 0x6f50
leaq 0x13c53(%rip), %r14     # 0x1ab48
xorl %r15d, %r15d
movq 0x150(%rbx), %rcx
movq 0x8(%rcx,%r15,8), %r8
testq %r8, %r8
je 0x6f38
movl 0x158(%rbx), %eax
movl 0x160(%rbx), %esi
leal 0x1(%r15), %ecx
imull %esi, %ecx
imull %r15d, %esi
addl %eax, %esi
addl %eax, %ecx
decl %ecx
movq %r14, %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3210
movl 0x14c(%rbx), %eax
leal -0x1(%rax), %ecx
movslq %ecx, %rcx
leaq 0x1(%r15), %rdx
addq $0x2, %r15
cmpq %rcx, %r15
movq %rdx, %r15
jl 0x6ef8
jmp 0x6f56
movq %rax, %rcx
decq %rcx
movq 0x150(%rbx), %rdx
movq (%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x6f8a
movl 0x158(%rbx), %edx
addl $-0x2, %eax
imull 0x160(%rbx), %eax
addl %eax, %edx
decl %edx
leaq 0x13bdb(%rip), %rdi     # 0x1ab5c
movl %edx, %esi
xorl %eax, %eax
callq 0x3210
leaq 0x13bdd(%rip), %rdi     # 0x1ab6e
xorl %eax, %eax
callq 0x3210
movl 0x12c(%rbx), %r14d
testq %r14, %r14
je 0x700e
movq 0x130(%rbx), %r15
movq 0x1d8(%rbx), %r12
xorl %r13d, %r13d
testq %r12, %r12
je 0x6fcd
xorps %xmm0, %xmm0
cvtss2sd (%r15,%r13,8), %xmm0
mulsd 0x13265(%rip), %xmm0    # 0x1a230
jmp 0x6ff5
movl 0x4(%r15,%r13,8), %eax
testl %eax, %eax
je 0x7004
xorps %xmm0, %xmm0
cvtss2sd (%r15,%r13,8), %xmm0
mulsd 0x13249(%rip), %xmm0    # 0x1a230
movl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x30a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%r13,8)
incq %r13
cmpq %r13, %r14
jne 0x6fb5
jmp 0x7015
movq 0x130(%rbx), %r15
incl %r14d
leaq 0x2b8(%rip), %rcx       # 0x72d7
movl $0x8, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3110
movl 0x12c(%rbx), %eax
testl %eax, %eax
je 0x71de
xorl %r13d, %r13d
movaps 0x13149(%rip), %xmm2    # 0x1a190
movsd 0x131e9(%rip), %xmm3    # 0x1a238
leaq 0x13bbc(%rip), %r14     # 0x1ac12
movq 0x130(%rbx), %rdx
movl %r13d, %ecx
leaq (%rdx,%rcx,8), %r15
movss (%r15), %xmm0
movl %eax, %eax
xorl %r12d, %r12d
movss (%r15,%r12,8), %xmm1
subss %xmm0, %xmm1
andps %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
jbe 0x7094
leaq (%rcx,%r12), %rdx
incq %rdx
incq %r12
cmpq %rax, %rdx
jb 0x706e
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
leal (%r12,%rcx), %r13d
addl %r12d, %ecx
incl %ecx
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
mulsd 0x13179(%rip), %xmm1    # 0x1a230
incl %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl $0xa, %edx
callq 0x6219
xorps %xmm1, %xmm1
cvtsi2ssl 0x138(%rbx), %xmm1
movss %xmm1, 0x10(%rsp)
mulss 0xc(%rsp), %xmm0
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl $0x19, %edx
callq 0x6219
mulss 0xc(%rsp), %xmm0
divss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl $0x32, %edx
callq 0x6219
mulss 0xc(%rsp), %xmm0
divss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl $0x4b, %edx
callq 0x6219
mulss 0xc(%rsp), %xmm0
divss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl $0x5a, %edx
callq 0x6219
mulss 0xc(%rsp), %xmm0
divss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm6
movq %r14, %rdi
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
movsd 0x48(%rsp), %xmm3
movsd 0x40(%rsp), %xmm4
movsd 0x38(%rsp), %xmm5
movb $0x7, %al
callq 0x3210
movl 0x12c(%rbx), %eax
cmpl %eax, %r13d
movaps 0x12fc0(%rip), %xmm2    # 0x1a190
movsd 0x13060(%rip), %xmm3    # 0x1a238
jb 0x7056
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cvttsd2si %xmm8, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x13026(%rip), %xmm8    # 0x1a228
cvttsd2si %xmm8, %rdi
andq %rcx, %rdi
orq %rax, %rdi
cmpq $0x1, %rdi
movq %rdi, %rax
adcq $0x0, %rax
movq %rax, %xmm2
punpckldq 0x12f0b(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
leaq 0x1(%rdx), %r13
subpd 0x12f0f(%rip), %xmm2    # 0x1a140
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
divsd %xmm3, %xmm10
testq %rdx, %rdx
je 0x64d9
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x48(%rbx), %rsi
movq %rdi, %xmm0
punpckldq 0x12ecc(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x12ed4(%rip), %xmm0    # 0x1a140
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
xorpd %xmm0, %xmm0
xorl %edi, %edi
movapd 0x12eba(%rip), %xmm3    # 0x1a140
movq 0x8(%rcx,%rdi,8), %r8
addq 0x8(%rax,%rdi,8), %r8
addq 0x8(%rsi,%rdi,8), %r8
movq %r8, %xmm4
punpckldq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
subpd %xmm3, %xmm4
movapd %xmm4, %xmm5
unpckhpd %xmm4, %xmm5            # xmm5 = xmm5[1],xmm4[1]
incq %rdi
addsd %xmm4, %xmm5
xorps %xmm4, %xmm4
cvtsi2sd %edi, %xmm4
subsd %xmm10, %xmm4
mulsd %xmm4, %xmm5
mulsd %xmm4, %xmm5
divsd %xmm2, %xmm5
addsd %xmm5, %xmm0
cmpq %rdi, %rdx
jne 0x7286
jmp 0x64d9