// File: /workspace/github_c_makefile_star2_O0/asford[P]tmalign/./Kabsch.h
// Function: Kabsch(double**, double**, int, int, double*, double*, double (*) [3])
bool Kabsch(double **x, 
            double **y, 
            int n, 
            int mode,
            double *rms,
            double t[3],
            double u[3][3]
            )
{	
    int i, j, m, m1, l, k;
    double e0, rms1, d, h, g;
    double cth, sth, sqrth, p, det, sigma;  
    double xc[3], yc[3];
    double a[3][3], b[3][3], r[3][3], e[3], rr[6], ss[6];
    double sqrt3=1.73205080756888, tol=0.01;
    int ip[]={0, 1, 3, 1, 2, 4, 3, 4, 5};
    int ip2312[]={1, 2, 0, 1};
    
    int a_failed=0, b_failed=0;
	double epsilon=0.00000001;
    
    //initializtation
	*rms=0;
    rms1=0;
    e0=0;
    for(i=0; i<3; i++)
    {
        xc[i]=0.0;
        yc[i]=0.0;
        t[i]=0.0;
        for(j=0; j<3; j++)
        {
            u[i][j]=0.0;
            r[i][j]=0.0;
            a[i][j]=0.0;
            if(i==j)
            {
                u[i][j]=1.0;
                a[i][j]=1.0;
            }
        }
    }
    
    if(n<1)
    {
		return false;
    } 
    
    //compute centers for vector sets x, y
    for(i=0; i<n; i++)
    {
        xc[0] += x[i][0];
        xc[1] += x[i][1];
        xc[2] += x[i][2];
        
        yc[0] += y[i][0];
        yc[1] += y[i][1];
        yc[2] += y[i][2];
    }
    for(i=0; i<3; i++)
    {
        xc[i] = xc[i]/n;
        yc[i] = yc[i]/n;        
    }
    
    //compute e0 and matrix r
    for(m=0; m<n; m++)
    {
        for (i=0; i<3; i++)
        {
            e0 += (x[m][i]-xc[i])*(x[m][i]-xc[i])+\
                  (y[m][i]-yc[i])*(y[m][i]-yc[i]);
            d = y[m][i] - yc[i];
            for(j=0; j<3; j++)
            {
                r[i][j] += d*(x[m][j] - xc[j]);
            }
        }        
    }
    //compute determinat of matrix r
    det = r[0][0] * ( r[1][1]*r[2][2] - r[1][2]*r[2][1] )\
        - r[0][1] * ( r[1][0]*r[2][2] - r[1][2]*r[2][0] )\
        + r[0][2] * ( r[1][0]*r[2][1] - r[1][1]*r[2][0] ); 
    sigma=det;
    
    //compute tras(r)*r
    m = 0;
    for(j=0; j<3; j++)
    {
        for (i=0; i<=j; i++)
        {            
            rr[m]=r[0][i]*r[0][j]+r[1][i]*r[1][j]+r[2][i]*r[2][j];
            m++;
        }
    }
    
    double spur=(rr[0]+rr[2]+rr[5]) / 3.0;
    double cof = (((((rr[2]*rr[5] - rr[4]*rr[4]) + rr[0]*rr[5])\
          - rr[3]*rr[3]) + rr[0]*rr[2]) - rr[1]*rr[1]) / 3.0;
    det = det*det; 
    
    for (i=0; i<3; i++)
    {
        e[i]=spur;
    }
    
    if(spur>0) 
    {
        d = spur*spur;
        h = d - cof;
        g = (spur*cof - det)/2.0 - spur*h;
        
        if(h>0)
        {
            sqrth = sqrt(h);
            d = h*h*h - g*g;
            if(d<0.0) d=0.0;
            d = atan2( sqrt(d), -g ) / 3.0;			
            cth = sqrth * cos(d);
            sth = sqrth*sqrt3*sin(d);
            e[0]= (spur + cth) + cth;
            e[1]= (spur - cth) + sth;            
            e[2]= (spur - cth) - sth;
			
            if(mode!=0)
            {//compute a                
                for(l=0; l<3; l=l+2)
                {
                    d = e[l];  
                    ss[0] = (d-rr[2]) * (d-rr[5])  - rr[4]*rr[4];
                    ss[1] = (d-rr[5]) * rr[1]      + rr[3]*rr[4];
                    ss[2] = (d-rr[0]) * (d-rr[5])  - rr[3]*rr[3];
                    ss[3] = (d-rr[2]) * rr[3]      + rr[1]*rr[4];
                    ss[4] = (d-rr[0]) * rr[4]      + rr[1]*rr[3];                
                    ss[5] = (d-rr[0]) * (d-rr[2])  - rr[1]*rr[1]; 

					if(fabs(ss[0])<=epsilon) ss[0]=0.0;
					if(fabs(ss[1])<=epsilon) ss[1]=0.0;
					if(fabs(ss[2])<=epsilon) ss[2]=0.0;
					if(fabs(ss[3])<=epsilon) ss[3]=0.0;
					if(fabs(ss[4])<=epsilon) ss[4]=0.0;
					if(fabs(ss[5])<=epsilon) ss[5]=0.0;
                    
                    if( fabs(ss[0]) >= fabs(ss[2]) )
                    {
                        j=0;                    
                        if( fabs(ss[0]) < fabs(ss[5])) 
                        {
                            j = 2;
                        }
                    }
                    else if ( fabs(ss[2]) >= fabs(ss[5]) )
                    {
                        j = 1;
                    }
                    else
                    {
                        j = 2;
                    }  
                    
                    d = 0.0;
                    j = 3 * j;
                    for(i=0; i<3; i++)
                    {
                        k=ip[i+j];
                        a[i][l] = ss[k];
                        d = d + ss[k]*ss[k];						
                    } 
                   

					//if( d > 0.0 ) d = 1.0 / sqrt(d);
                    if( d > epsilon ) d = 1.0 / sqrt(d);
					else d=0.0;
                    for(i=0; i<3; i++)
                    {
                        a[i][l] = a[i][l] * d;
                    }               
                }//for l
                
                d = a[0][0]*a[0][2] + a[1][0]*a[1][2] + a[2][0]*a[2][2];
                if ((e[0] - e[1]) > (e[1] - e[2]))
                {
                    m1=2;
                    m=0;
                }
                else
                {
                    m1=0;
                    m=2;                
                }
                p=0;
                for(i=0; i<3; i++)
                {
                    a[i][m1] = a[i][m1] - d*a[i][m];
                    p = p + a[i][m1]*a[i][m1];
                }
                if( p <= tol )
                {
                    p = 1.0;
                    for(i=0; i<3; i++)
                    {
                        if (p < fabs(a[i][m])) 
                        {
                            continue;
                        }
                        p = fabs( a[i][m] );
                        j = i;                    
                    }
                    k = ip2312[j];
                    l = ip2312[j+1];
                    p = sqrt( a[k][m]*a[k][m] + a[l][m]*a[l][m] ); 
                    if( p > tol )  
                    {
                        a[j][m1] = 0.0;
                        a[k][m1] = -a[l][m]/p;
                        a[l][m1] =  a[k][m]/p;                                                       
                    }   
                    else
                    {//goto 40
                        a_failed=1;
                    }     
                }//if p<=tol
                else
                {
                    p = 1.0 / sqrt(p);
                    for(i=0; i<3; i++)
                    {
                        a[i][m1] = a[i][m1]*p;
                    }                                  
                }//else p<=tol  
                if(a_failed!=1)
                {
                    a[0][1] = a[1][2]*a[2][0] - a[1][0]*a[2][2];
                    a[1][1] = a[2][2]*a[0][0] - a[2][0]*a[0][2];
                    a[2][1] = a[0][2]*a[1][0] - a[0][0]*a[1][2];       
                }                                   
            }//if(mode!=0)       
        }//h>0
        
        //compute b anyway
        if(mode!=0 && a_failed!=1)//a is computed correctly
        {
            //compute b
            for(l=0; l<2; l++)
            {
                d=0.0;
                for(i=0; i<3; i++)
                {
                    b[i][l] = r[i][0]*a[0][l] + r[i][1]*a[1][l] + r[i][2]*a[2][l];
                    d = d + b[i][l]*b[i][l];
                }
                //if( d > 0 ) d = 1.0 / sqrt(d);
				if( d > epsilon ) d = 1.0 / sqrt(d);
				else d=0.0;
                for(i=0; i<3; i++)
                {
                    b[i][l] = b[i][l]*d;
                }                
            }            
            d =b[0][0]*b[0][1] + b[1][0]*b[1][1] + b[2][0]*b[2][1];
            p=0.0;
            
            for(i=0; i<3; i++)
            {
                b[i][1] = b[i][1] - d*b[i][0];
                p += b[i][1]*b[i][1];
            }
            
            if( p <= tol )
            {
                p = 1.0;
                for(i=0; i<3; i++)
                {
                    if(p<fabs(b[i][0]))
                    {
                        continue;
                    }
                    p = fabs( b[i][0] );
                    j=i;
                }
                k = ip2312[j];
                l = ip2312[j+1];
                p = sqrt( b[k][0]*b[k][0] + b[l][0]*b[l][0] ); 
                if( p > tol )  
                {
                    b[j][1] = 0.0;
                    b[k][1] = -b[l][0]/p;
                    b[l][1] =  b[k][0]/p;        
                }
                else
                {
                    //goto 40
                    b_failed=1;
                }                
            }//if( p <= tol )
            else
            {
                p = 1.0 / sqrt(p);
                for(i=0; i<3; i++)
                {
                    b[i][1]=b[i][1]*p;
                }
            }            
            if(b_failed!=1)
            {
                b[0][2] = b[1][0]*b[2][1] - b[1][1]*b[2][0];
                b[1][2] = b[2][0]*b[0][1] - b[2][1]*b[0][0];
                b[2][2] = b[0][0]*b[1][1] - b[0][1]*b[1][0]; 
                //compute u
                for(i=0; i<3; i++)
                {
                    for(j=0; j<3; j++)
                    {
                        u[i][j] = b[i][0]*a[j][0] + b[i][1]*a[j][1]\
                                + b[i][2]*a[j][2];
                    }
                }
            }
            
            //compute t
            for(i=0; i<3; i++)
            {
                t[i] = ((yc[i] - u[i][0]*xc[0]) - u[i][1]*xc[1])\
                        - u[i][2]*xc[2];
            }            
        }//if(mode!=0 && a_failed!=1)
    }//spur>0
    else //just compute t and errors
    {
        //compute t
        for(i=0; i<3; i++)
        {
            t[i] = ((yc[i] - u[i][0]*xc[0]) - u[i][1]*xc[1]) - u[i][2]*xc[2];
        }
    }//else spur>0 
    
    //compute rms
    for(i=0; i<3; i++)
    {
        if( e[i] < 0 ) e[i] = 0;
        e[i] = sqrt( e[i] );           
    }            
    d = e[2];
    if( sigma < 0.0 )
    {
        d = - d;
    }
    d = (d + e[1]) + e[0];
    rms1 = (e0 - d) - d; 
    if( rms1 < 0.0 ) rms1 = 0.0;  
    
    *rms=rms1;

	return true;
    
}

// Assembly:
subq $0x2c8, %rsp            # imm = 0x2C8
movq 0x2d0(%rsp), %rax
movq %rdi, 0x2b8(%rsp)
movq %rsi, 0x2b0(%rsp)
movl %edx, 0x2ac(%rsp)
movl %ecx, 0x2a8(%rsp)
movq %r8, 0x2a0(%rsp)
movq %r9, 0x298(%rsp)
movsd 0x184eeb(%rip), %xmm0   # 0x58c020
movsd %xmm0, 0x78(%rsp)
movsd 0x184ed5(%rip), %xmm0   # 0x58c018
movsd %xmm0, 0x70(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x185e9b(%rip), %rsi    # 0x58cff0
movl $0x24, %edx
callq 0x401128
movq 0x184fea(%rip), %rax    # 0x58c150
movq %rax, 0x30(%rsp)
movq 0x184fe6(%rip), %rax    # 0x58c158
movq %rax, 0x38(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movsd 0x184e81(%rip), %xmm0   # 0x58c010
movsd %xmm0, 0x20(%rsp)
movq 0x2a0(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x270(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x278(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x40733b
movslq 0x294(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x210(%rsp,%rax,8)
movslq 0x294(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x1f0(%rsp,%rax,8)
movq 0x298(%rsp), %rax
movslq 0x294(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, 0x290(%rsp)
cmpl $0x3, 0x290(%rsp)
jge 0x407323
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x290(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq 0x294(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x290(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x290(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x294(%rsp), %eax
cmpl 0x290(%rsp), %eax
jne 0x40730b
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x290(%rsp), %rcx
movsd 0x184d2e(%rip), %xmm0   # 0x58c008
movsd %xmm0, (%rax,%rcx,8)
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x290(%rsp), %rcx
movsd 0x184d02(%rip), %xmm0   # 0x58c008
movsd %xmm0, (%rax,%rcx,8)
jmp 0x40730d
movl 0x290(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x290(%rsp)
jmp 0x407220
jmp 0x407325
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x4071c7
cmpl $0x1, 0x2ac(%rsp)
jge 0x407352
movb $0x0, 0x2c7(%rsp)
jmp 0x4091ef
movl $0x0, 0x294(%rsp)
movl 0x294(%rsp), %eax
cmpl 0x2ac(%rsp), %eax
jge 0x407487
movq 0x2b8(%rsp), %rax
movslq 0x294(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
addsd 0x210(%rsp), %xmm0
movsd %xmm0, 0x210(%rsp)
movq 0x2b8(%rsp), %rax
movslq 0x294(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
addsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x218(%rsp)
movq 0x2b8(%rsp), %rax
movslq 0x294(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x10(%rax), %xmm0
addsd 0x220(%rsp), %xmm0
movsd %xmm0, 0x220(%rsp)
movq 0x2b0(%rsp), %rax
movslq 0x294(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
addsd 0x1f0(%rsp), %xmm0
movsd %xmm0, 0x1f0(%rsp)
movq 0x2b0(%rsp), %rax
movslq 0x294(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
addsd 0x1f8(%rsp), %xmm0
movsd %xmm0, 0x1f8(%rsp)
movq 0x2b0(%rsp), %rax
movslq 0x294(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x10(%rax), %xmm0
addsd 0x200(%rsp), %xmm0
movsd %xmm0, 0x200(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x40735d
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x40750d
movslq 0x294(%rsp), %rax
movsd 0x210(%rsp,%rax,8), %xmm0
cvtsi2sdl 0x2ac(%rsp), %xmm1
divsd %xmm1, %xmm0
movslq 0x294(%rsp), %rax
movsd %xmm0, 0x210(%rsp,%rax,8)
movslq 0x294(%rsp), %rax
movsd 0x1f0(%rsp,%rax,8), %xmm0
cvtsi2sdl 0x2ac(%rsp), %xmm1
divsd %xmm1, %xmm0
movslq 0x294(%rsp), %rax
movsd %xmm0, 0x1f0(%rsp,%rax,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x407492
movl $0x0, 0x28c(%rsp)
movl 0x28c(%rsp), %eax
cmpl 0x2ac(%rsp), %eax
jge 0x407729
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x407711
movq 0x2b8(%rsp), %rax
movslq 0x28c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x294(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x294(%rsp), %rax
subsd 0x210(%rsp,%rax,8), %xmm0
movq 0x2b8(%rsp), %rax
movslq 0x28c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x294(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x294(%rsp), %rax
subsd 0x210(%rsp,%rax,8), %xmm1
mulsd %xmm1, %xmm0
movq 0x2b0(%rsp), %rax
movslq 0x28c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x294(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x294(%rsp), %rax
subsd 0x1f0(%rsp,%rax,8), %xmm1
movq 0x2b0(%rsp), %rax
movslq 0x28c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x294(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movslq 0x294(%rsp), %rax
subsd 0x1f0(%rsp,%rax,8), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm1, %xmm0
addsd 0x278(%rsp), %xmm0
movsd %xmm0, 0x278(%rsp)
movq 0x2b0(%rsp), %rax
movslq 0x28c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x294(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x294(%rsp), %rax
subsd 0x1f0(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x268(%rsp)
movl $0x0, 0x290(%rsp)
cmpl $0x3, 0x290(%rsp)
jge 0x4076f9
movsd 0x268(%rsp), %xmm0
movq 0x2b8(%rsp), %rax
movslq 0x28c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x290(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x290(%rsp), %rax
subsd 0x210(%rsp,%rax,8), %xmm1
mulsd %xmm1, %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x290(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x290(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x290(%rsp)
jmp 0x407671
jmp 0x4076fb
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x407537
jmp 0x407713
movl 0x28c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28c(%rsp)
jmp 0x407518
movsd 0x100(%rsp), %xmm0
movsd 0x120(%rsp), %xmm1
mulsd 0x140(%rsp), %xmm1
movsd 0x128(%rsp), %xmm2
mulsd 0x138(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x108(%rsp), %xmm1
movsd 0x118(%rsp), %xmm2
mulsd 0x140(%rsp), %xmm2
movsd 0x128(%rsp), %xmm3
mulsd 0x130(%rsp), %xmm3
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd 0x110(%rsp), %xmm1
movsd 0x118(%rsp), %xmm2
mulsd 0x138(%rsp), %xmm2
movsd 0x120(%rsp), %xmm3
mulsd 0x130(%rsp), %xmm3
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x230(%rsp)
movsd 0x230(%rsp), %xmm0
movsd %xmm0, 0x228(%rsp)
movl $0x0, 0x28c(%rsp)
movl $0x0, 0x290(%rsp)
cmpl $0x3, 0x290(%rsp)
jge 0x4078ec
movl $0x0, 0x294(%rsp)
movl 0x294(%rsp), %eax
cmpl 0x290(%rsp), %eax
jg 0x4078d4
movslq 0x294(%rsp), %rax
movsd 0x100(%rsp,%rax,8), %xmm0
movslq 0x290(%rsp), %rax
mulsd 0x100(%rsp,%rax,8), %xmm0
movslq 0x294(%rsp), %rax
movsd 0x118(%rsp,%rax,8), %xmm1
movslq 0x290(%rsp), %rax
mulsd 0x118(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
movslq 0x294(%rsp), %rax
movsd 0x130(%rsp,%rax,8), %xmm1
movslq 0x290(%rsp), %rax
mulsd 0x130(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
movslq 0x28c(%rsp), %rax
movsd %xmm0, 0xb0(%rsp,%rax,8)
movl 0x28c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28c(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x40781a
jmp 0x4078d6
movl 0x290(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x290(%rsp)
jmp 0x407801
movsd 0xb0(%rsp), %xmm0
addsd 0xc0(%rsp), %xmm0
addsd 0xd8(%rsp), %xmm0
movsd 0x184719(%rip), %xmm1   # 0x58c028
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0xc0(%rsp), %xmm0
mulsd 0xd8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
mulsd 0xd0(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd 0xb0(%rsp), %xmm1
mulsd 0xd8(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd 0xc8(%rsp), %xmm1
mulsd 0xc8(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd 0xb0(%rsp), %xmm1
mulsd 0xc0(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd 0xb8(%rsp), %xmm1
mulsd 0xb8(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd 0x184687(%rip), %xmm1   # 0x58c028
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x230(%rsp), %xmm0
mulsd 0x230(%rsp), %xmm0
movsd %xmm0, 0x230(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x407a05
movsd 0x18(%rsp), %xmm0
movslq 0x294(%rsp), %rax
movsd %xmm0, 0xe0(%rsp,%rax,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x4079d1
movsd 0x18(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x408fde
movsd 0x18(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0x268(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x260(%rsp)
movsd 0x18(%rsp), %xmm0
mulsd 0x10(%rsp), %xmm0
subsd 0x230(%rsp), %xmm0
movsd 0x1845ce(%rip), %xmm1   # 0x58c030
divsd %xmm1, %xmm0
movsd 0x18(%rsp), %xmm1
mulsd 0x260(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x258(%rsp)
movsd 0x260(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4086e0
movsd 0x260(%rsp), %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x240(%rsp)
movsd 0x260(%rsp), %xmm0
mulsd 0x260(%rsp), %xmm0
mulsd 0x260(%rsp), %xmm0
movsd 0x258(%rsp), %xmm1
mulsd 0x258(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x268(%rsp), %xmm0
jbe 0x407b02
xorps %xmm0, %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0x268(%rsp), %xmm0
sqrtsd %xmm0, %xmm0
movsd 0x258(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
callq 0x4b0c90
movsd 0x1844ec(%rip), %xmm1   # 0x58c028
divsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0x240(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x268(%rsp), %xmm0
callq 0x401050
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x250(%rsp)
movsd 0x240(%rsp), %xmm0
mulsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x268(%rsp), %xmm0
callq 0x401100
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x248(%rsp)
movsd 0x18(%rsp), %xmm0
addsd 0x250(%rsp), %xmm0
addsd 0x250(%rsp), %xmm0
movsd %xmm0, 0xe0(%rsp)
movsd 0x18(%rsp), %xmm0
subsd 0x250(%rsp), %xmm0
addsd 0x248(%rsp), %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0x18(%rsp), %xmm0
subsd 0x250(%rsp), %xmm0
subsd 0x248(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
cmpl $0x0, 0x2a8(%rsp)
je 0x4086de
movl $0x0, 0x284(%rsp)
cmpl $0x3, 0x284(%rsp)
jge 0x408142
movslq 0x284(%rsp), %rax
movsd 0xe0(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0x268(%rsp), %xmm0
subsd 0xc0(%rsp), %xmm0
movsd 0x268(%rsp), %xmm1
subsd 0xd8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xd0(%rsp), %xmm1
mulsd 0xd0(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x268(%rsp), %xmm0
subsd 0xd8(%rsp), %xmm0
mulsd 0xb8(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
mulsd 0xd0(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x268(%rsp), %xmm0
subsd 0xb0(%rsp), %xmm0
movsd 0x268(%rsp), %xmm1
subsd 0xd8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xc8(%rsp), %xmm1
mulsd 0xc8(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x268(%rsp), %xmm0
subsd 0xc0(%rsp), %xmm0
mulsd 0xc8(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
mulsd 0xd0(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x268(%rsp), %xmm0
subsd 0xb0(%rsp), %xmm0
mulsd 0xd0(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
mulsd 0xc8(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0x268(%rsp), %xmm0
subsd 0xb0(%rsp), %xmm0
movsd 0x268(%rsp), %xmm1
subsd 0xc0(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xb8(%rsp), %xmm1
mulsd 0xb8(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0xa8(%rsp)
movsd 0x80(%rsp), %xmm1
movaps 0x184356(%rip), %xmm0   # 0x58c140
pand %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x407e06
xorps %xmm0, %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x88(%rsp), %xmm1
movaps 0x18432a(%rip), %xmm0   # 0x58c140
pand %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x407e32
xorps %xmm0, %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x90(%rsp), %xmm1
movaps 0x1842fe(%rip), %xmm0   # 0x58c140
pand %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x407e5e
xorps %xmm0, %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x98(%rsp), %xmm1
movaps 0x1842d2(%rip), %xmm0   # 0x58c140
pand %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x407e8a
xorps %xmm0, %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0xa0(%rsp), %xmm1
movaps 0x1842a6(%rip), %xmm0   # 0x58c140
pand %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x407eb6
xorps %xmm0, %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0xa8(%rsp), %xmm1
movaps 0x18427a(%rip), %xmm0   # 0x58c140
pand %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x407ee2
xorps %xmm0, %xmm0
movsd %xmm0, 0xa8(%rsp)
movsd 0x80(%rsp), %xmm0
movaps 0x18424e(%rip), %xmm1   # 0x58c140
pand %xmm1, %xmm0
movsd 0x90(%rsp), %xmm1
movaps 0x18423a(%rip), %xmm2   # 0x58c140
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x407f56
movl $0x0, 0x290(%rsp)
movsd 0x80(%rsp), %xmm1
movaps 0x184215(%rip), %xmm0   # 0x58c140
pand %xmm0, %xmm1
movsd 0xa8(%rsp), %xmm0
movaps 0x184201(%rip), %xmm2   # 0x58c140
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x407f54
movl $0x2, 0x290(%rsp)
jmp 0x407f9e
movsd 0x90(%rsp), %xmm0
movaps 0x1841da(%rip), %xmm1   # 0x58c140
pand %xmm1, %xmm0
movsd 0xa8(%rsp), %xmm1
movaps 0x1841c6(%rip), %xmm2   # 0x58c140
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x407f91
movl $0x1, 0x290(%rsp)
jmp 0x407f9c
movl $0x2, 0x290(%rsp)
jmp 0x407f9e
xorps %xmm0, %xmm0
movsd %xmm0, 0x268(%rsp)
imull $0x3, 0x290(%rsp), %eax
movl %eax, 0x290(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x408070
movl 0x294(%rsp), %eax
addl 0x290(%rsp), %eax
cltq
movl 0x40(%rsp,%rax,4), %eax
movl %eax, 0x280(%rsp)
movslq 0x280(%rsp), %rax
movsd 0x80(%rsp,%rax,8), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x268(%rsp), %xmm0
movslq 0x280(%rsp), %rax
movsd 0x80(%rsp,%rax,8), %xmm1
movslq 0x280(%rsp), %rax
mulsd 0x80(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x407fc4
movsd 0x268(%rsp), %xmm0
ucomisd 0x20(%rsp), %xmm0
jbe 0x4080a5
movsd 0x268(%rsp), %xmm0
sqrtsd %xmm0, %xmm1
movsd 0x183f72(%rip), %xmm0   # 0x58c008
divsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
jmp 0x4080b1
xorps %xmm0, %xmm0
movsd %xmm0, 0x268(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x40812a
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x268(%rsp), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x4080bc
jmp 0x40812c
movl 0x284(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x284(%rsp)
jmp 0x407c2f
movsd 0x1a0(%rsp), %xmm0
mulsd 0x1b0(%rsp), %xmm0
movsd 0x1b8(%rsp), %xmm1
mulsd 0x1c8(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd 0x1d0(%rsp), %xmm1
mulsd 0x1e0(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0xe0(%rsp), %xmm0
subsd 0xe8(%rsp), %xmm0
movsd 0xe8(%rsp), %xmm1
subsd 0xf0(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4081cb
movl $0x2, 0x288(%rsp)
movl $0x0, 0x28c(%rsp)
jmp 0x4081e1
movl $0x0, 0x288(%rsp)
movl $0x2, 0x28c(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x238(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x4082f3
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x268(%rsp), %xmm1
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
subsd %xmm1, %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x238(%rsp), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x238(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x4081f8
movsd 0x238(%rsp), %xmm1
movsd 0x70(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x4085a1
movsd 0x183cf4(%rip), %xmm0   # 0x58c008
movsd %xmm0, 0x238(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x4083d2
movsd 0x238(%rsp), %xmm1
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x183dd6(%rip), %xmm2   # 0x58c140
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x408376
jmp 0x4083bc
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x183d9f(%rip), %xmm1   # 0x58c140
pand %xmm1, %xmm0
movsd %xmm0, 0x238(%rsp)
movl 0x294(%rsp), %eax
movl %eax, 0x290(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x408328
movslq 0x290(%rsp), %rax
movl 0x30(%rsp,%rax,4), %eax
movl %eax, 0x280(%rsp)
movl 0x290(%rsp), %eax
addl $0x1, %eax
cltq
movl 0x30(%rsp,%rax,4), %eax
movl %eax, 0x284(%rsp)
movslq 0x280(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x280(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movslq 0x284(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x284(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x238(%rsp)
movsd 0x238(%rsp), %xmm0
ucomisd 0x70(%rsp), %xmm0
jbe 0x408594
movslq 0x290(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq 0x284(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x238(%rsp), %xmm0
movslq 0x280(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movslq 0x280(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x28c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd 0x238(%rsp), %xmm0
movslq 0x284(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x40859c
movl $0x1, 0x2c(%rsp)
jmp 0x40863e
movsd 0x238(%rsp), %xmm0
sqrtsd %xmm0, %xmm1
movsd 0x183a52(%rip), %xmm0   # 0x58c008
divsd %xmm1, %xmm0
movsd %xmm0, 0x238(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x40863c
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x238(%rsp), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x288(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x4085ce
jmp 0x40863e
cmpl $0x1, 0x2c(%rsp)
je 0x4086dc
movsd 0x1c8(%rsp), %xmm0
mulsd 0x1d0(%rsp), %xmm0
movsd 0x1b8(%rsp), %xmm1
mulsd 0x1e0(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x1a8(%rsp)
movsd 0x1e0(%rsp), %xmm0
mulsd 0x1a0(%rsp), %xmm0
movsd 0x1d0(%rsp), %xmm1
mulsd 0x1b0(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rsp)
movsd 0x1b0(%rsp), %xmm0
mulsd 0x1b8(%rsp), %xmm0
movsd 0x1a0(%rsp), %xmm1
mulsd 0x1c8(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x1d8(%rsp)
jmp 0x4086de
jmp 0x4086e0
cmpl $0x0, 0x2a8(%rsp)
je 0x408fd9
cmpl $0x1, 0x2c(%rsp)
je 0x408fd9
movl $0x0, 0x284(%rsp)
cmpl $0x2, 0x284(%rsp)
jge 0x40892f
xorps %xmm0, %xmm0
movsd %xmm0, 0x268(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x40885d
movslq 0x294(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movslq 0x284(%rsp), %rax
mulsd 0x1a0(%rsp,%rax,8), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movslq 0x284(%rsp), %rax
mulsd 0x1b8(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm1
movslq 0x284(%rsp), %rax
mulsd 0x1d0(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x268(%rsp), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x408729
movsd 0x268(%rsp), %xmm0
ucomisd 0x20(%rsp), %xmm0
jbe 0x408892
movsd 0x268(%rsp), %xmm0
sqrtsd %xmm0, %xmm1
movsd 0x183785(%rip), %xmm0   # 0x58c008
divsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
jmp 0x40889e
xorps %xmm0, %xmm0
movsd %xmm0, 0x268(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x408917
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x268(%rsp), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x284(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x4088a9
jmp 0x408919
movl 0x284(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x284(%rsp)
jmp 0x408704
movsd 0x150(%rsp), %xmm0
mulsd 0x158(%rsp), %xmm0
movsd 0x168(%rsp), %xmm1
mulsd 0x170(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd 0x180(%rsp), %xmm1
mulsd 0x188(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x238(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x408a5b
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd 0x268(%rsp), %xmm1
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
mulsd (%rax), %xmm1
subsd %xmm1, %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
mulsd 0x8(%rax), %xmm0
addsd 0x238(%rsp), %xmm0
movsd %xmm0, 0x238(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x40898d
movsd 0x238(%rsp), %xmm1
movsd 0x70(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x408ca9
movsd 0x18358c(%rip), %xmm0   # 0x58c008
movsd %xmm0, 0x238(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x408b28
movsd 0x238(%rsp), %xmm1
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movaps 0x183677(%rip), %xmm2   # 0x58c140
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x408ad5
jmp 0x408b12
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movaps 0x183649(%rip), %xmm1   # 0x58c140
pand %xmm1, %xmm0
movsd %xmm0, 0x238(%rsp)
movl 0x294(%rsp), %eax
movl %eax, 0x290(%rsp)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x408a90
movslq 0x290(%rsp), %rax
movl 0x30(%rsp,%rax,4), %eax
movl %eax, 0x280(%rsp)
movl 0x290(%rsp), %eax
addl $0x1, %eax
cltq
movl 0x30(%rsp,%rax,4), %eax
movl %eax, 0x284(%rsp)
movslq 0x280(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movslq 0x280(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
mulsd (%rax), %xmm0
movslq 0x284(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movslq 0x284(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
mulsd (%rax), %xmm1
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x238(%rsp)
movsd 0x238(%rsp), %xmm0
ucomisd 0x70(%rsp), %xmm0
jbe 0x408c9c
movslq 0x290(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
movslq 0x284(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x238(%rsp), %xmm0
movslq 0x280(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movslq 0x280(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
divsd 0x238(%rsp), %xmm0
movslq 0x284(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
jmp 0x408ca4
movl $0x1, 0x28(%rsp)
jmp 0x408d36
movsd 0x238(%rsp), %xmm0
sqrtsd %xmm0, %xmm1
movsd 0x18334a(%rip), %xmm0   # 0x58c008
divsd %xmm1, %xmm0
movsd %xmm0, 0x238(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x408d34
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
mulsd 0x238(%rsp), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x408cd6
jmp 0x408d36
cmpl $0x1, 0x28(%rsp)
je 0x408f08
movsd 0x168(%rsp), %xmm0
mulsd 0x188(%rsp), %xmm0
movsd 0x170(%rsp), %xmm1
mulsd 0x180(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x160(%rsp)
movsd 0x180(%rsp), %xmm0
mulsd 0x158(%rsp), %xmm0
movsd 0x188(%rsp), %xmm1
mulsd 0x150(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x178(%rsp)
movsd 0x150(%rsp), %xmm0
mulsd 0x170(%rsp), %xmm0
movsd 0x158(%rsp), %xmm1
mulsd 0x168(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x190(%rsp)
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x408f06
movl $0x0, 0x290(%rsp)
cmpl $0x3, 0x290(%rsp)
jge 0x408eee
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movslq 0x290(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
mulsd (%rax), %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movslq 0x290(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
mulsd 0x8(%rax), %xmm1
addsd %xmm1, %xmm0
movslq 0x294(%rsp), %rcx
leaq 0x150(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm1
movslq 0x290(%rsp), %rcx
leaq 0x1a0(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm1
addsd %xmm1, %xmm0
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x290(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x290(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x290(%rsp)
jmp 0x408df8
jmp 0x408ef0
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x408ddf
jmp 0x408f08
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x408fd7
movslq 0x294(%rsp), %rax
movsd 0x1f0(%rsp,%rax,8), %xmm0
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
mulsd 0x210(%rsp), %xmm1
subsd %xmm1, %xmm0
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
mulsd 0x218(%rsp), %xmm1
subsd %xmm1, %xmm0
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm1
mulsd 0x220(%rsp), %xmm1
subsd %xmm1, %xmm0
movq 0x298(%rsp), %rax
movslq 0x294(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x408f13
jmp 0x408fd9
jmp 0x4090af
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x4090ad
movslq 0x294(%rsp), %rax
movsd 0x1f0(%rsp,%rax,8), %xmm0
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
mulsd 0x210(%rsp), %xmm1
subsd %xmm1, %xmm0
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
mulsd 0x218(%rsp), %xmm1
subsd %xmm1, %xmm0
movq 0x2d0(%rsp), %rax
movslq 0x294(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm1
mulsd 0x220(%rsp), %xmm1
subsd %xmm1, %xmm0
movq 0x298(%rsp), %rax
movslq 0x294(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x408fe9
jmp 0x4090af
movl $0x0, 0x294(%rsp)
cmpl $0x3, 0x294(%rsp)
jge 0x409127
movslq 0x294(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0xe0(%rsp,%rax,8), %xmm0
jbe 0x4090ee
movslq 0x294(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xe0(%rsp,%rax,8)
movslq 0x294(%rsp), %rax
movsd 0xe0(%rsp,%rax,8), %xmm0
sqrtsd %xmm0, %xmm0
movslq 0x294(%rsp), %rax
movsd %xmm0, 0xe0(%rsp,%rax,8)
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x4090ba
movsd 0xf0(%rsp), %xmm0
movsd %xmm0, 0x268(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x228(%rsp), %xmm0
jbe 0x409170
movsd 0x268(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0x268(%rsp), %xmm0
addsd 0xe8(%rsp), %xmm0
addsd 0xe0(%rsp), %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0x278(%rsp), %xmm0
subsd 0x268(%rsp), %xmm0
subsd 0x268(%rsp), %xmm0
movsd %xmm0, 0x270(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x270(%rsp), %xmm0
jbe 0x4091d2
xorps %xmm0, %xmm0
movsd %xmm0, 0x270(%rsp)
movsd 0x270(%rsp), %xmm0
movq 0x2a0(%rsp), %rax
movsd %xmm0, (%rax)
movb $0x1, 0x2c7(%rsp)
movb 0x2c7(%rsp), %al
andb $0x1, %al
addq $0x2c8, %rsp            # imm = 0x2C8
retq