// File: /workspace/github_c_makefile_star2_O0/asford[P]tmalign/TMalign.cpp
// Function: main
int main(int argc, char *argv[])
{
	strcpy(version, "20120126");

    if (argc < 2) 
    {
        print_help(argv[0]);        
    } 
	
	
	clock_t t1, t2;
	t1 = clock();

    /*********************************************************************************/
	/*                                get argument                                   */ 
    /*********************************************************************************/
    char xname[MAXLEN], yname[MAXLEN],  Lnorm_ave[MAXLEN];
	bool A_opt, B_opt, h_opt=false;
	A_opt = B_opt = o_opt = a_opt = u_opt = d_opt = v_opt = false;

	for(int i = 0; i < argc; i++)
	{
		if ( !strcmp(argv[i],"-B") && i < argc ) { strcpy(xname,    argv[i+1]);      B_opt = true; }
		if ( !strcmp(argv[i],"-A") && i < argc ) { strcpy(yname,    argv[i+1]);      A_opt = true; }
		if ( !strcmp(argv[i],"-o") && i < argc ) { strcpy(out_reg,  argv[i+1]);      o_opt = true; }
		if ( !strcmp(argv[i],"-u") && i < argc ) { Lnorm_ass      = atof(argv[i+1]); u_opt = true; }
		if ( !strcmp(argv[i],"-a") && i < argc ) { strcpy(Lnorm_ave, argv[i+1]);     a_opt = true; }
		if ( !strcmp(argv[i],"-d") && i < argc ) { d0_scale        = atof(argv[i+1]); d_opt = true; }
		if ( !strcmp(argv[i],"-v") ) { v_opt = true; }
		if ( !strcmp(argv[i],"-h") ) { h_opt = true; }
	}


	if(!B_opt || !A_opt)
	{

		if( h_opt )
		{
			print_help(argv[0]);    			
		}
		
		if(v_opt)
		{
			cout <<endl;
			cout << " *****************************************************************************" << endl
				 << " * TM-align (Version "<< version <<"): A protein structural alignment algorithm     *" << endl
				 << " * Reference: Y Zhang and J Skolnick, Nucl Acids Res 33, 2302-9 (2005)       *" << endl
				 << " * Please email your comments and suggestions to Yang Zhang (zhng@umich.edu) *" << endl
				 << " *****************************************************************************" << endl;	
			exit(EXIT_FAILURE);
		}
	}

	if( !B_opt )
	{
		cout << "Please provide structure B" << endl;
		exit(EXIT_FAILURE);
	}		
	if( !A_opt )
	{
		cout << "Please provide structure A" << endl;
		exit(EXIT_FAILURE);
	}


	if( a_opt )
	{
		if(!strcmp(Lnorm_ave, "T"))
		{
		}
		else if(!strcmp(Lnorm_ave, "F"))
		{
			a_opt=false;
		}
		else
		{
			cout << "Wrong value for option -a!  It should be T or F" << endl;
			exit(EXIT_FAILURE);
		}
	}
	if( u_opt )
	{
		if(Lnorm_ass<=0)
		{
			cout << "Wrong value for option -u!  It should be >0" << endl;
			exit(EXIT_FAILURE);
		}
	}
	if( d_opt )
	{
		if(d0_scale<=0)
		{
			cout << "Wrong value for option -d!  It should be >0" << endl;
			exit(EXIT_FAILURE);
		}
	}














    /*********************************************************************************/
	/*                                load data                                      */ 
    /*********************************************************************************/
    load_PDB_allocate_memory(xname, yname);



    

    /*********************************************************************************/
	/*                                parameter set                                  */ 
    /*********************************************************************************/
	parameter_set4search(xlen, ylen);          //please set parameters in the function
    int simplify_step     = 40;               //for similified search engine
    int score_sum_method  = 8;                //for scoring method, whether only sum over pairs with dis<score_d8
        
	int i;
    int *invmap0          = new int[ylen+1]; 
    int *invmap           = new int[ylen+1]; 
    double TM, TMmax=-1;
	for(i=0; i<ylen; i++)
	{
		invmap0[i]=-1;
	}	


	double ddcc=0.4;
	if(Lnorm <= 40) ddcc=0.1;   //Lnorm was setted in parameter_set4search
      

    /*********************************************************************************/
	/*         get initial alignment with gapless threading                          */ 
    /*********************************************************************************/
    get_initial(xa, ya, xlen, ylen, invmap0);
    //find the max TMscore for this initial alignment with the simplified search_engin
    TM=detailed_search(xa, ya, xlen, ylen, invmap0, t, u, simplify_step, score_sum_method);
	if(TM>TMmax)
    {
        TMmax=TM;
    }           
    //run dynamic programing iteratively to find the best alignment
    TM=DP_iter(xa, ya, xlen, ylen, t, u, invmap, 0, 2, 30);
    if(TM>TMmax)
    {        
        TMmax=TM;
        for(int i=0; i<ylen; i++)
        {
            invmap0[i]=invmap[i];
        }
    }
	
    
	


    /*********************************************************************************/
	/*         get initial alignment based on secondary structure                    */ 
    /*********************************************************************************/	
	get_initial_ss(xa, ya, xlen, ylen, invmap);
    TM=detailed_search(xa, ya, xlen, ylen, invmap, t, u, simplify_step, score_sum_method);
    if(TM>TMmax)
    {
        TMmax=TM;
        for(int i=0; i<ylen; i++)
        {
            invmap0[i]=invmap[i];
        }
    } 
    if(TM > TMmax*0.2)
    {
        TM=DP_iter(xa, ya, xlen, ylen, t, u, invmap, 0, 2, 30);
        if(TM>TMmax)
        {
            TMmax=TM;
            for(int i=0; i<ylen; i++)
            {
                invmap0[i]=invmap[i];
            }
        }   
    }
	//output_align(invmap0, ylen);


	
    /*********************************************************************************/
	/*         get initial alignment based on local superposition                    */ 
    /*********************************************************************************/	
	//=initial5 in original TM-align
    if(get_initial_local(xa, ya, xlen, ylen, invmap))
	{		
		TM=detailed_search(xa, ya, xlen, ylen, invmap, t, u, simplify_step, score_sum_method);
		if(TM>TMmax)
		{
			TMmax=TM;
			for(int i=0; i<ylen; i++)
			{
				invmap0[i]=invmap[i];
			}
		} 
		if(TM > TMmax*ddcc)
		{
			TM=DP_iter(xa, ya, xlen, ylen, t, u, invmap, 0, 2, 2);
			if(TM>TMmax)
			{
				TMmax=TM;
				for(int i=0; i<ylen; i++)
				{
					invmap0[i]=invmap[i];
				}
			}   
		}
		//output_align(invmap0, ylen);
	}    
	else
	{
		cout << endl << endl << "Warning: initial alignment from local superposition fail!" << endl << endl <<endl;		
	}
	
	



    /*********************************************************************************/
	/*    get initial alignment based on previous alignment+secondary structure      */ 
    /*********************************************************************************/	
	//=initial3 in original TM-align
    get_initial_ssplus(xa, ya, xlen, ylen, invmap0, invmap);
    TM=detailed_search(xa, ya, xlen, ylen, invmap, t, u, simplify_step, score_sum_method);
    if(TM>TMmax)
    {
        TMmax=TM;
        for(i=0; i<ylen; i++)
        {
            invmap0[i]=invmap[i];
        }
    } 
    if(TM > TMmax*ddcc)
    {
        TM=DP_iter(xa, ya, xlen, ylen, t, u, invmap, 0, 2, 30);
        if(TM>TMmax)
        {
            TMmax=TM;
            for(i=0; i<ylen; i++)
            {
                invmap0[i]=invmap[i];
            }
        }   
    }
	//output_align(invmap0, ylen);   
      
	


	

    /*********************************************************************************/
	/*        get initial alignment based on fragment gapless threading              */ 
    /*********************************************************************************/	    
	//=initial4 in original TM-align
	get_initial_fgt(xa, ya, xlen, ylen, xresno, yresno, invmap);
    TM=detailed_search(xa, ya, xlen, ylen, invmap, t, u, simplify_step, score_sum_method);	
    if(TM>TMmax)
    {
        TMmax=TM;
        for(i=0; i<ylen; i++)
        {
            invmap0[i]=invmap[i];
        }
    } 
    if(TM > TMmax*ddcc)
    {
        TM=DP_iter(xa, ya, xlen, ylen, t, u, invmap, 1, 2, 2);
        if(TM>TMmax)
        {         
            TMmax=TM;
            for(i=0; i<ylen; i++)
            {
                invmap0[i]=invmap[i];
            }
        }   
    } 
	//output_align(invmap0, ylen); 






	
    //*********************************************************************************//
    //     The alignment will not be changed any more in the following                 //
    //*********************************************************************************//
	//check if the initial alignment is generated approately	
	bool flag=false;
	for(i=0; i<ylen; i++)
	{
		if(invmap0[i]>=0)
		{
			flag=true;
			break;			
		}			
	}		
	if(!flag) 
	{
		cout << "There is no alignment between the two proteins!" << endl;
		cout << "Program stop with no result!" << endl;
		return 1;
	}
	//cout << "final alignment" << endl;
	//output_align(invmap0, ylen);










    //*********************************************************************************//
    //       Detailed TMscore search engine  --> prepare for final TMscore             //
    //*********************************************************************************//       
    //run detailed TMscore search engine for the best alignment, and 
	//extract the best rotation matrix (t, u) for the best alginment
    simplify_step=1;
    score_sum_method=8;
    TM=detailed_search(xa, ya, xlen, ylen, invmap0, t, u, simplify_step, score_sum_method);

	//select pairs with dis<d8 for final TMscore computation and output alignment
	int n_ali8, k=0;
	int n_ali=0;
	int *m1, *m2;
	double d;
	m1=new int[xlen]; //alignd index in x
	m2=new int[ylen]; //alignd index in y
	do_rotation(xa, xt, xlen, t, u);
	k=0;
    for(int j=0; j<ylen; j++)
    {
        i=invmap0[j];
        if(i>=0)//aligned
        {
			n_ali++;        
            d=sqrt(dist(&xt[i][0], &ya[j][0]));
			if(d <= score_d8)
			{
				m1[k]=i;
				m2[k]=j;

				xtm[k][0]=xa[i][0];
                xtm[k][1]=xa[i][1];
                xtm[k][2]=xa[i][2];
                    
                ytm[k][0]=ya[j][0];
                ytm[k][1]=ya[j][1];
                ytm[k][2]=ya[j][2];								
				
				k++;
			}
		}
	}
	n_ali8=k;







    //*********************************************************************************//
    //                               Final TMscore                                     //
    //                     Please set parameters for output                            //
    //*********************************************************************************//
    double rmsd, TM1, TM2;
	double d0_out=5.0;  
    simplify_step=1;
    score_sum_method=0;

	double t0[3], u0[3][3];
	double d0_0, TM_0;
	double Lnorm_0=ylen;
	
	
	//normalized by length of structure A
	parameter_set4final(Lnorm_0);
	d0A=d0;
	d0_0=d0A;
	TM1=TMscore8_search(xtm, ytm, n_ali8, t0, u0, simplify_step, score_sum_method, &rmsd);
	TM_0=TM1;

	//normalized by length of structure B
	parameter_set4final(xlen+0.0);
	d0B=d0;
	TM2=TMscore8_search(xtm, ytm, n_ali8, t, u, simplify_step, score_sum_method, &rmsd);




	if(a_opt)
	{
		//normalized by average length of structures A, B
		Lnorm_0=(xlen+ylen)*0.5;
		parameter_set4final(Lnorm_0);
		d0a=d0;
		d0_0=d0a;
		TM3=TMscore8_search(xtm, ytm, n_ali8, t, u, simplify_step, score_sum_method, &rmsd);
		TM_0=TM3;
	}
	if(u_opt)
	{	
		//normalized by user assigned length		
		parameter_set4final(Lnorm_ass);		
		d0u=d0;		
		d0_0=d0u;
		Lnorm_0=Lnorm_ass;
		TM4=TMscore8_search(xtm, ytm, n_ali8, t, u, simplify_step, score_sum_method, &rmsd);	
		TM_0=TM4;
	}
	if(d_opt)
	{	
		//scaled by user assigned d0
		parameter_set4scale(ylen, d0_scale);
		d0_out=d0_scale;
		d0_0=d0_scale;
		//Lnorm_0=ylen;
		Lnorm_d0=Lnorm_0;
		TM5=TMscore8_search(xtm, ytm, n_ali8, t, u, simplify_step, score_sum_method, &rmsd);	
		TM_0=TM5;
	}

   
        
	output_results(xname, yname, xlen, ylen, t0, u0, TM1, TM2, rmsd, d0_out, m1, m2, n_ali8, n_ali, TM_0, Lnorm_0, d0_0);
                    
 









    //*********************************************************************************//
    //                            Done! Free memory                                    //
    //*********************************************************************************//           
    free_memory();
    delete [] invmap0;
    delete [] invmap;
	delete [] m1;
	delete [] m2;


    t2 = clock();    
    float diff = ((float)t2 - (float)t1)/CLOCKS_PER_SEC;
    printf("\nTotal running time is %5.2f seconds\n", diff);        

 	return 0;	
}

// Assembly:
pushq %rbx
subq $0x76c0, %rsp           # imm = 0x76C0
movl $0x0, 0x76bc(%rsp)
movl %edi, 0x76b8(%rsp)
movq %rsi, 0x76b0(%rsp)
leaq 0x1fb857(%rip), %rdi    # 0x60a550
leaq 0x17e12b(%rip), %rsi    # 0x58ce2b
callq 0x401088
cmpl $0x2, 0x76b8(%rsp)
jge 0x40ed1f
movq 0x76b0(%rsp), %rax
movq (%rax), %rdi
callq 0x40e500
callq 0x5492e0
movq %rax, 0x76a8(%rsp)
movb $0x0, 0x16d(%rsp)
movb $0x0, 0x1fe0b1(%rip)    # 0x60cdec
movb $0x0, 0x1fe0a9(%rip)    # 0x60cdeb
movb $0x0, 0x1fe0a1(%rip)    # 0x60cdea
movb $0x0, 0x1fe099(%rip)    # 0x60cde9
movb $0x0, 0x1fe091(%rip)    # 0x60cde8
movb $0x0, 0x16e(%rsp)
movb $0x0, 0x16f(%rsp)
movl $0x0, 0x168(%rsp)
movl 0x168(%rsp), %eax
cmpl 0x76b8(%rsp), %eax
jge 0x40f044
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17e093(%rip), %rsi    # 0x58ce34
callq 0x401058
cmpl $0x0, %eax
jne 0x40ede9
movl 0x168(%rsp), %eax
cmpl 0x76b8(%rsp), %eax
jge 0x40ede9
leaq 0x4f90(%rsp), %rdi
movq 0x76b0(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x401088
movb $0x1, 0x16e(%rsp)
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17e033(%rip), %rsi    # 0x58ce37
callq 0x401058
cmpl $0x0, %eax
jne 0x40ee4c
movl 0x168(%rsp), %eax
cmpl 0x76b8(%rsp), %eax
jge 0x40ee4c
leaq 0x2880(%rsp), %rdi
movq 0x76b0(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x401088
movb $0x1, 0x16f(%rsp)
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17dfd3(%rip), %rsi    # 0x58ce3a
callq 0x401058
cmpl $0x0, %eax
jne 0x40eead
movl 0x168(%rsp), %eax
cmpl 0x76b8(%rsp), %eax
jge 0x40eead
movq 0x76b0(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1fb7ff(%rip), %rdi    # 0x60a6a0
callq 0x401088
movb $0x1, 0x1fdf3b(%rip)    # 0x60cde8
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17df75(%rip), %rsi    # 0x58ce3d
callq 0x401058
cmpl $0x0, %eax
jne 0x40ef0f
movl 0x168(%rsp), %eax
cmpl 0x76b8(%rsp), %eax
jge 0x40ef0f
movq 0x76b0(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4d5e40
movsd %xmm0, 0x1fdea8(%rip)   # 0x60cdb0
movb $0x1, 0x1fdedb(%rip)    # 0x60cdea
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17df16(%rip), %rsi    # 0x58ce40
callq 0x401058
cmpl $0x0, %eax
jne 0x40ef71
movl 0x168(%rsp), %eax
cmpl 0x76b8(%rsp), %eax
jge 0x40ef71
leaq 0x170(%rsp), %rdi
movq 0x76b0(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x401088
movb $0x1, 0x1fde78(%rip)    # 0x60cde9
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17deb7(%rip), %rsi    # 0x58ce43
callq 0x401058
cmpl $0x0, %eax
jne 0x40efd3
movl 0x168(%rsp), %eax
cmpl 0x76b8(%rsp), %eax
jge 0x40efd3
movq 0x76b0(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4d5e40
movsd %xmm0, 0x1fddf4(%rip)   # 0x60cdc0
movb $0x1, 0x1fde18(%rip)    # 0x60cdeb
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17de58(%rip), %rsi    # 0x58ce46
callq 0x401058
cmpl $0x0, %eax
jne 0x40efff
movb $0x1, 0x1fdded(%rip)    # 0x60cdec
movq 0x76b0(%rsp), %rax
movslq 0x168(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17de2f(%rip), %rsi    # 0x58ce49
callq 0x401058
cmpl $0x0, %eax
jne 0x40f02c
movb $0x1, 0x16d(%rsp)
jmp 0x40f02e
movl 0x168(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x168(%rsp)
jmp 0x40ed72
testb $0x1, 0x16e(%rsp)
je 0x40f05c
testb $0x1, 0x16f(%rsp)
jne 0x40f15a
testb $0x1, 0x16d(%rsp)
je 0x40f076
movq 0x76b0(%rsp), %rax
movq (%rax), %rdi
callq 0x40e500
testb $0x1, 0x1fdd6f(%rip)    # 0x60cdec
je 0x40f158
movq $0x60dd20, %rdi         # imm = 0x60DD20
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17d338(%rip), %rsi    # 0x58c3dc
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
leaq 0x17d369(%rip), %rsi    # 0x58c42b
callq 0x479e70
movq %rax, %rdi
leaq 0x1fb47f(%rip), %rsi    # 0x60a550
callq 0x479e70
movq %rax, %rdi
leaq 0x17d361(%rip), %rsi    # 0x58c441
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
leaq 0x17d375(%rip), %rsi    # 0x58c473
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
leaq 0x17d3a6(%rip), %rsi    # 0x58c4c2
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
leaq 0x17d2a2(%rip), %rsi    # 0x58c3dc
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movl $0x1, %edi
callq 0x4d69b0
jmp 0x40f15a
testb $0x1, 0x16e(%rsp)
jne 0x40f190
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17dcda(%rip), %rsi    # 0x58ce4c
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movl $0x1, %edi
callq 0x4d69b0
testb $0x1, 0x16f(%rsp)
jne 0x40f1c6
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17dcbf(%rip), %rsi    # 0x58ce67
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movl $0x1, %edi
callq 0x4d69b0
testb $0x1, 0x1fdc1c(%rip)    # 0x60cde9
je 0x40f23c
leaq 0x170(%rsp), %rdi
leaq 0x19f629(%rip), %rsi    # 0x5ae807
callq 0x401058
cmpl $0x0, %eax
jne 0x40f1ea
jmp 0x40f23a
leaq 0x170(%rsp), %rdi
leaq 0x17dcb7(%rip), %rsi    # 0x58ceb0
callq 0x401058
cmpl $0x0, %eax
jne 0x40f20c
movb $0x0, 0x1fdbdf(%rip)    # 0x60cde9
jmp 0x40f238
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17dc68(%rip), %rsi    # 0x58ce82
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movl $0x1, %edi
callq 0x4d69b0
jmp 0x40f23a
jmp 0x40f23c
testb $0x1, 0x1fdba7(%rip)    # 0x60cdea
je 0x40f280
xorps %xmm0, %xmm0
ucomisd 0x1fdb60(%rip), %xmm0   # 0x60cdb0
jb 0x40f27e
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17dc52(%rip), %rsi    # 0x58ceb2
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movl $0x1, %edi
callq 0x4d69b0
jmp 0x40f280
testb $0x1, 0x1fdb64(%rip)    # 0x60cdeb
je 0x40f2c4
xorps %xmm0, %xmm0
ucomisd 0x1fdb2c(%rip), %xmm0   # 0x60cdc0
jb 0x40f2c2
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17dc3a(%rip), %rsi    # 0x58cede
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movl $0x1, %edi
callq 0x4d69b0
jmp 0x40f2c4
leaq 0x4f90(%rsp), %rdi
leaq 0x2880(%rsp), %rsi
callq 0x409200
movl 0x1fb2d1(%rip), %edi    # 0x60a5b0
movl 0x1fb2cf(%rip), %esi    # 0x60a5b4
callq 0x40e9b0
movl $0x28, 0x164(%rsp)
movl $0x8, 0x160(%rsp)
movl 0x1fb2ae(%rip), %eax    # 0x60a5b4
addl $0x1, %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x411b60
movq %rax, 0x150(%rsp)
movl 0x1fb27a(%rip), %eax    # 0x60a5b4
addl $0x1, %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x411b60
movq %rax, 0x148(%rsp)
movsd 0x17ccd0(%rip), %xmm0   # 0x58c040
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x1fb223(%rip), %eax    # 0x60a5b4
jge 0x40f3bd
movq 0x150(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x40f384
movsd 0x17cd5b(%rip), %xmm0   # 0x58c120
movsd %xmm0, 0x130(%rsp)
movsd 0x17cd42(%rip), %xmm0   # 0x58c118
ucomisd 0x1fb192(%rip), %xmm0   # 0x60a570
jb 0x40f3f1
movsd 0x17ccc0(%rip), %xmm0   # 0x58c0a8
movsd %xmm0, 0x130(%rsp)
movq 0x1fb1c8(%rip), %rdi    # 0x60a5c0
movq 0x1fb1c9(%rip), %rsi    # 0x60a5c8
movl 0x1fb1ab(%rip), %edx    # 0x60a5b0
movl 0x1fb1a9(%rip), %ecx    # 0x60a5b4
movq 0x150(%rsp), %r8
callq 0x40aad0
movq 0x1fb1a1(%rip), %rdi    # 0x60a5c0
movq 0x1fb1a2(%rip), %rsi    # 0x60a5c8
movl 0x1fb184(%rip), %edx    # 0x60a5b0
movl 0x1fb182(%rip), %ecx    # 0x60a5b4
movq 0x150(%rsp), %r8
movl 0x164(%rsp), %r10d
movl 0x160(%rsp), %eax
leaq 0x1fb1e0(%rip), %r9     # 0x60a630
leaq 0x1fb1f9(%rip), %r11    # 0x60a650
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x40a030
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40f498
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movq 0x1fb121(%rip), %rdi    # 0x60a5c0
movq 0x1fb122(%rip), %rsi    # 0x60a5c8
movl 0x1fb104(%rip), %edx    # 0x60a5b0
movl 0x1fb102(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %rax
leaq 0x1fb16f(%rip), %r8     # 0x60a630
leaq 0x1fb188(%rip), %r9     # 0x60a650
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x2, 0x10(%rsp)
movl $0x1e, 0x18(%rsp)
callq 0x40caf0
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40f570
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x12c(%rsp)
movl 0x12c(%rsp), %eax
cmpl 0x1fb081(%rip), %eax    # 0x60a5b4
jge 0x40f56e
movq 0x148(%rsp), %rax
movslq 0x12c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x12c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x12c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x12c(%rsp)
jmp 0x40f526
jmp 0x40f570
movq 0x1fb049(%rip), %rdi    # 0x60a5c0
movq 0x1fb04a(%rip), %rsi    # 0x60a5c8
movl 0x1fb02c(%rip), %edx    # 0x60a5b0
movl 0x1fb02a(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %r8
callq 0x40b4c0
movq 0x1fb022(%rip), %rdi    # 0x60a5c0
movq 0x1fb023(%rip), %rsi    # 0x60a5c8
movl 0x1fb005(%rip), %edx    # 0x60a5b0
movl 0x1fb003(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %r8
movl 0x164(%rsp), %r10d
movl 0x160(%rsp), %eax
leaq 0x1fb061(%rip), %r9     # 0x60a630
leaq 0x1fb07a(%rip), %r11    # 0x60a650
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x40a030
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40f66c
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x128(%rsp)
movl 0x128(%rsp), %eax
cmpl 0x1faf85(%rip), %eax    # 0x60a5b4
jge 0x40f66a
movq 0x148(%rsp), %rax
movslq 0x128(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x128(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x128(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x128(%rsp)
jmp 0x40f622
jmp 0x40f66c
movsd 0x140(%rsp), %xmm0
movsd 0x17caab(%rip), %xmm1   # 0x58c128
mulsd 0x138(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x40f76a
movq 0x1faf29(%rip), %rdi    # 0x60a5c0
movq 0x1faf2a(%rip), %rsi    # 0x60a5c8
movl 0x1faf0c(%rip), %edx    # 0x60a5b0
movl 0x1faf0a(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %rax
leaq 0x1faf77(%rip), %r8     # 0x60a630
leaq 0x1faf90(%rip), %r9     # 0x60a650
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x2, 0x10(%rsp)
movl $0x1e, 0x18(%rsp)
callq 0x40caf0
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40f768
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x124(%rsp)
movl 0x124(%rsp), %eax
cmpl 0x1fae89(%rip), %eax    # 0x60a5b4
jge 0x40f766
movq 0x148(%rsp), %rax
movslq 0x124(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x124(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x124(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x124(%rsp)
jmp 0x40f71e
jmp 0x40f768
jmp 0x40f76a
movq 0x1fae4f(%rip), %rdi    # 0x60a5c0
movq 0x1fae50(%rip), %rsi    # 0x60a5c8
movl 0x1fae32(%rip), %edx    # 0x60a5b0
movl 0x1fae30(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %r8
callq 0x40b540
testb $0x1, %al
jne 0x40f79a
jmp 0x40f970
movq 0x1fae1f(%rip), %rdi    # 0x60a5c0
movq 0x1fae20(%rip), %rsi    # 0x60a5c8
movl 0x1fae02(%rip), %edx    # 0x60a5b0
movl 0x1fae00(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %r8
movl 0x164(%rsp), %r10d
movl 0x160(%rsp), %eax
leaq 0x1fae5e(%rip), %r9     # 0x60a630
leaq 0x1fae77(%rip), %r11    # 0x60a650
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x40a030
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40f86f
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x120(%rsp)
movl 0x120(%rsp), %eax
cmpl 0x1fad82(%rip), %eax    # 0x60a5b4
jge 0x40f86d
movq 0x148(%rsp), %rax
movslq 0x120(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x120(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0x40f825
jmp 0x40f86f
movsd 0x140(%rsp), %xmm0
movsd 0x138(%rsp), %xmm1
mulsd 0x130(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x40f96e
movq 0x1fad25(%rip), %rdi    # 0x60a5c0
movq 0x1fad26(%rip), %rsi    # 0x60a5c8
movl 0x1fad08(%rip), %edx    # 0x60a5b0
movl 0x1fad06(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %rax
leaq 0x1fad73(%rip), %r8     # 0x60a630
leaq 0x1fad8c(%rip), %r9     # 0x60a650
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x2, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
callq 0x40caf0
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40f96c
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
cmpl 0x1fac85(%rip), %eax    # 0x60a5b4
jge 0x40f96a
movq 0x148(%rsp), %rax
movslq 0x11c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x11c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x11c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
jmp 0x40f922
jmp 0x40f96c
jmp 0x40f96e
jmp 0x40f9ce
movq $0x60dd20, %rdi         # imm = 0x60DD20
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
leaq 0x17d56e(%rip), %rsi    # 0x58cf0a
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq 0x1fabeb(%rip), %rdi    # 0x60a5c0
movq 0x1fabec(%rip), %rsi    # 0x60a5c8
movl 0x1fabce(%rip), %edx    # 0x60a5b0
movl 0x1fabcc(%rip), %ecx    # 0x60a5b4
movq 0x150(%rsp), %r8
movq 0x148(%rsp), %r9
callq 0x40c070
movq 0x1fabbc(%rip), %rdi    # 0x60a5c0
movq 0x1fabbd(%rip), %rsi    # 0x60a5c8
movl 0x1fab9f(%rip), %edx    # 0x60a5b0
movl 0x1fab9d(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %r8
movl 0x164(%rsp), %r10d
movl 0x160(%rsp), %eax
leaq 0x1fabfb(%rip), %r9     # 0x60a630
leaq 0x1fac14(%rip), %r11    # 0x60a650
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x40a030
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40fad2
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x1fab1f(%rip), %eax    # 0x60a5b4
jge 0x40fad0
movq 0x148(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x40fa88
jmp 0x40fad2
movsd 0x140(%rsp), %xmm0
movsd 0x138(%rsp), %xmm1
mulsd 0x130(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x40fbd1
movq 0x1faac2(%rip), %rdi    # 0x60a5c0
movq 0x1faac3(%rip), %rsi    # 0x60a5c8
movl 0x1faaa5(%rip), %edx    # 0x60a5b0
movl 0x1faaa3(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %rax
leaq 0x1fab10(%rip), %r8     # 0x60a630
leaq 0x1fab29(%rip), %r9     # 0x60a650
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x2, 0x10(%rsp)
movl $0x1e, 0x18(%rsp)
callq 0x40caf0
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40fbcf
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x1faa22(%rip), %eax    # 0x60a5b4
jge 0x40fbcd
movq 0x148(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x40fb85
jmp 0x40fbcf
jmp 0x40fbd1
movq 0x1fa9e8(%rip), %rdi    # 0x60a5c0
movq 0x1fa9e9(%rip), %rsi    # 0x60a5c8
movl 0x1fa9cb(%rip), %edx    # 0x60a5b0
movl 0x1fa9c9(%rip), %ecx    # 0x60a5b4
movq 0x1fa9de(%rip), %r8     # 0x60a5d0
movq 0x1fa9df(%rip), %r9     # 0x60a5d8
movq 0x148(%rsp), %rax
movq %rax, (%rsp)
callq 0x40c340
movq 0x1fa9af(%rip), %rdi    # 0x60a5c0
movq 0x1fa9b0(%rip), %rsi    # 0x60a5c8
movl 0x1fa992(%rip), %edx    # 0x60a5b0
movl 0x1fa990(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %r8
movl 0x164(%rsp), %r10d
movl 0x160(%rsp), %eax
leaq 0x1fa9ee(%rip), %r9     # 0x60a630
leaq 0x1faa07(%rip), %r11    # 0x60a650
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x40a030
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40fcdf
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x1fa912(%rip), %eax    # 0x60a5b4
jge 0x40fcdd
movq 0x148(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x40fc95
jmp 0x40fcdf
movsd 0x140(%rsp), %xmm0
movsd 0x138(%rsp), %xmm1
mulsd 0x130(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x40fddb
movq 0x1fa8b5(%rip), %rdi    # 0x60a5c0
movq 0x1fa8b6(%rip), %rsi    # 0x60a5c8
movl 0x1fa898(%rip), %edx    # 0x60a5b0
movl 0x1fa896(%rip), %ecx    # 0x60a5b4
movq 0x148(%rsp), %rax
leaq 0x1fa903(%rip), %r8     # 0x60a630
leaq 0x1fa91c(%rip), %r9     # 0x60a650
movq %rax, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x2, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
callq 0x40caf0
movsd %xmm0, 0x140(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x138(%rsp), %xmm0
jbe 0x40fdd9
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x1fa818(%rip), %eax    # 0x60a5b4
jge 0x40fdd7
movq 0x148(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x150(%rsp), %rax
movslq 0x15c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x40fd8f
jmp 0x40fdd9
jmp 0x40fddb
movb $0x0, 0x11b(%rsp)
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x1fa7b9(%rip), %eax    # 0x60a5b4
jge 0x40fe32
movq 0x150(%rsp), %rax
movslq 0x15c(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x40fe1d
movb $0x1, 0x11b(%rsp)
jmp 0x40fe32
jmp 0x40fe1f
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x40fdee
testb $0x1, 0x11b(%rsp)
jne 0x40fe90
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17d0fa(%rip), %rsi    # 0x58cf44
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movq $0x60dd20, %rdi         # imm = 0x60DD20
leaq 0x17d108(%rip), %rsi    # 0x58cf74
callq 0x479e70
movq %rax, %rdi
movq $0x479750, %rsi         # imm = 0x479750
callq 0x478960
movl $0x1, 0x76bc(%rsp)
jmp 0x41067f
movl $0x1, 0x164(%rsp)
movl $0x8, 0x160(%rsp)
movq 0x1fa713(%rip), %rdi    # 0x60a5c0
movq 0x1fa714(%rip), %rsi    # 0x60a5c8
movl 0x1fa6f6(%rip), %edx    # 0x60a5b0
movl 0x1fa6f4(%rip), %ecx    # 0x60a5b4
movq 0x150(%rsp), %r8
movl 0x164(%rsp), %r10d
movl 0x160(%rsp), %eax
leaq 0x1fa752(%rip), %r9     # 0x60a630
leaq 0x1fa76b(%rip), %r11    # 0x60a650
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x40a030
movsd %xmm0, 0x140(%rsp)
movl $0x0, 0x110(%rsp)
movl $0x0, 0x10c(%rsp)
movslq 0x1fa693(%rip), %rax    # 0x60a5b0
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x411b60
movq %rax, 0x100(%rsp)
movslq 0x1fa667(%rip), %rax    # 0x60a5b4
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x411b60
movq %rax, 0xf8(%rsp)
movq 0x1fa643(%rip), %rdi    # 0x60a5c0
movq 0x1fa66c(%rip), %rsi    # 0x60a5f0
movl 0x1fa626(%rip), %edx    # 0x60a5b0
leaq 0x1fa69f(%rip), %rcx    # 0x60a630
leaq 0x1fa6b8(%rip), %r8     # 0x60a650
callq 0x4061b0
movl $0x0, 0x110(%rsp)
movl $0x0, 0xec(%rsp)
movl 0xec(%rsp), %eax
cmpl 0x1fa5f4(%rip), %eax    # 0x60a5b4
jge 0x4101cd
movq 0x150(%rsp), %rax
movslq 0xec(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x15c(%rsp)
cmpl $0x0, 0x15c(%rsp)
jl 0x4101b5
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
movq 0x1fa5ea(%rip), %rax    # 0x60a5f0
movslq 0x15c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x1fa5af(%rip), %rax    # 0x60a5c8
movslq 0xec(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x406000
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0xf0(%rsp)
movsd 0xf0(%rsp), %xmm1
movsd 0x1fa530(%rip), %xmm0   # 0x60a578
ucomisd %xmm1, %xmm0
jb 0x4101b3
movl 0x15c(%rsp), %edx
movq 0x100(%rsp), %rax
movslq 0x110(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0xec(%rsp), %edx
movq 0xf8(%rsp), %rax
movslq 0x110(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x1fa533(%rip), %rax    # 0x60a5c0
movslq 0x15c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq 0x1fa53c(%rip), %rax    # 0x60a5e0
movslq 0x110(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, (%rax)
movq 0x1fa505(%rip), %rax    # 0x60a5c0
movslq 0x15c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
movq 0x1fa50d(%rip), %rax    # 0x60a5e0
movslq 0x110(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x8(%rax)
movq 0x1fa4d5(%rip), %rax    # 0x60a5c0
movslq 0x15c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x10(%rax), %xmm0
movq 0x1fa4dd(%rip), %rax    # 0x60a5e0
movslq 0x110(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x10(%rax)
movq 0x1fa4ad(%rip), %rax    # 0x60a5c8
movslq 0xec(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq 0x1fa4b6(%rip), %rax    # 0x60a5e8
movslq 0x110(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, (%rax)
movq 0x1fa47f(%rip), %rax    # 0x60a5c8
movslq 0xec(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
movq 0x1fa487(%rip), %rax    # 0x60a5e8
movslq 0x110(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x8(%rax)
movq 0x1fa44f(%rip), %rax    # 0x60a5c8
movslq 0xec(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x10(%rax), %xmm0
movq 0x1fa457(%rip), %rax    # 0x60a5e8
movslq 0x110(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x10(%rax)
movl 0x110(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x110(%rsp)
jmp 0x4101b5
jmp 0x4101b7
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xec(%rsp)
jmp 0x40ffb3
movl 0x110(%rsp), %eax
movl %eax, 0x114(%rsp)
movsd 0x17bf4d(%rip), %xmm0   # 0x58c130
movsd %xmm0, 0xc8(%rsp)
movl $0x1, 0x164(%rsp)
movl $0x0, 0x160(%rsp)
cvtsi2sdl 0x1fa3aa(%rip), %xmm0 # 0x60a5b4
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
callq 0x40eb40
movsd 0x1fa35d(%rip), %xmm0   # 0x60a580
movsd %xmm0, 0x1fcb9d(%rip)   # 0x60cdc8
movsd 0x1fcb95(%rip), %xmm0   # 0x60cdc8
movsd %xmm0, 0x58(%rsp)
movq 0x1fa3a0(%rip), %rdi    # 0x60a5e0
movq 0x1fa3a1(%rip), %rsi    # 0x60a5e8
movl 0x114(%rsp), %edx
leaq 0xb0(%rsp), %rcx
leaq 0x60(%rsp), %r8
movl 0x164(%rsp), %r9d
movl 0x160(%rsp), %r10d
leaq 0xe0(%rsp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4097f0
movsd %xmm0, 0xd8(%rsp)
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
cvtsi2sdl 0x1fa30f(%rip), %xmm0 # 0x60a5b0
xorps %xmm1, %xmm1
addsd %xmm1, %xmm0
callq 0x40eb40
movsd 0x1fa2cb(%rip), %xmm0   # 0x60a580
movsd %xmm0, 0x1fcb13(%rip)   # 0x60cdd0
movq 0x1fa31c(%rip), %rdi    # 0x60a5e0
movq 0x1fa31d(%rip), %rsi    # 0x60a5e8
movl 0x114(%rsp), %edx
movl 0x164(%rsp), %r9d
movl 0x160(%rsp), %r10d
leaq 0x1fa347(%rip), %rcx    # 0x60a630
leaq 0x1fa360(%rip), %r8     # 0x60a650
leaq 0xe0(%rsp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4097f0
movsd %xmm0, 0xd0(%rsp)
testb $0x1, 0x1fcad3(%rip)    # 0x60cde9
je 0x4103c6
movl 0x1fa28e(%rip), %eax    # 0x60a5b0
addl 0x1fa28c(%rip), %eax    # 0x60a5b4
cvtsi2sd %eax, %xmm0
movsd 0x17bd04(%rip), %xmm1   # 0x58c038
mulsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
callq 0x40eb40
movsd 0x1fa22f(%rip), %xmm0   # 0x60a580
movsd %xmm0, 0x1fca87(%rip)   # 0x60cde0
movsd 0x1fca7f(%rip), %xmm0   # 0x60cde0
movsd %xmm0, 0x58(%rsp)
movq 0x1fa272(%rip), %rdi    # 0x60a5e0
movq 0x1fa273(%rip), %rsi    # 0x60a5e8
movl 0x114(%rsp), %edx
movl 0x164(%rsp), %r9d
movl 0x160(%rsp), %r10d
leaq 0x1fa29d(%rip), %rcx    # 0x60a630
leaq 0x1fa2b6(%rip), %r8     # 0x60a650
leaq 0xe0(%rsp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4097f0
movsd %xmm0, 0x1fca38(%rip)   # 0x60cdf0
movsd 0x1fca30(%rip), %xmm0   # 0x60cdf0
movsd %xmm0, 0x50(%rsp)
testb $0x1, 0x1fca1d(%rip)    # 0x60cdea
je 0x41046b
movsd 0x1fc9d5(%rip), %xmm0   # 0x60cdb0
callq 0x40eb40
movsd 0x1fa198(%rip), %xmm0   # 0x60a580
movsd %xmm0, 0x1fc9e8(%rip)   # 0x60cdd8
movsd 0x1fc9e0(%rip), %xmm0   # 0x60cdd8
movsd %xmm0, 0x58(%rsp)
movsd 0x1fc9aa(%rip), %xmm0   # 0x60cdb0
movsd %xmm0, 0x48(%rsp)
movq 0x1fa1cd(%rip), %rdi    # 0x60a5e0
movq 0x1fa1ce(%rip), %rsi    # 0x60a5e8
movl 0x114(%rsp), %edx
movl 0x164(%rsp), %r9d
movl 0x160(%rsp), %r10d
leaq 0x1fa1f8(%rip), %rcx    # 0x60a630
leaq 0x1fa211(%rip), %r8     # 0x60a650
leaq 0xe0(%rsp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4097f0
movsd %xmm0, 0x1fc99b(%rip)   # 0x60cdf8
movsd 0x1fc993(%rip), %xmm0   # 0x60cdf8
movsd %xmm0, 0x50(%rsp)
testb $0x1, 0x1fc979(%rip)    # 0x60cdeb
je 0x410517
movl 0x1fa136(%rip), %edi    # 0x60a5b4
movsd 0x1fc93a(%rip), %xmm0   # 0x60cdc0
callq 0x40ec50
movsd 0x1fc92d(%rip), %xmm0   # 0x60cdc0
movsd %xmm0, 0xc8(%rsp)
movsd 0x1fc91c(%rip), %xmm0   # 0x60cdc0
movsd %xmm0, 0x58(%rsp)
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x1fc900(%rip)   # 0x60cdb8
movq 0x1fa121(%rip), %rdi    # 0x60a5e0
movq 0x1fa122(%rip), %rsi    # 0x60a5e8
movl 0x114(%rsp), %edx
movl 0x164(%rsp), %r9d
movl 0x160(%rsp), %r10d
leaq 0x1fa14c(%rip), %rcx    # 0x60a630
leaq 0x1fa165(%rip), %r8     # 0x60a650
leaq 0xe0(%rsp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4097f0
movsd %xmm0, 0x1fc8f7(%rip)   # 0x60ce00
movsd 0x1fc8ef(%rip), %xmm0   # 0x60ce00
movsd %xmm0, 0x50(%rsp)
leaq 0x4f90(%rsp), %rdi
leaq 0x2880(%rsp), %rsi
movl 0x1fa083(%rip), %edx    # 0x60a5b0
movl 0x1fa081(%rip), %ecx    # 0x60a5b4
leaq 0xb0(%rsp), %r8
leaq 0x60(%rsp), %r9
movsd 0xd8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movsd 0xe0(%rsp), %xmm2
movsd 0xc8(%rsp), %xmm3
movq 0x100(%rsp), %rbx
movq 0xf8(%rsp), %r11
movl 0x114(%rsp), %r10d
movl 0x10c(%rsp), %eax
movsd 0x50(%rsp), %xmm4
movsd 0x48(%rsp), %xmm5
movsd 0x58(%rsp), %xmm6
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x40dba0
callq 0x409480
movq 0x150(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x4105ce
movq 0x38(%rsp), %rdi
callq 0x410cc0
movq 0x148(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x4105eb
movq 0x30(%rsp), %rdi
callq 0x410cc0
movq 0x100(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x410608
movq 0x28(%rsp), %rdi
callq 0x410cc0
movq 0xf8(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x410625
movq 0x20(%rsp), %rdi
callq 0x410cc0
callq 0x5492e0
movq %rax, 0x76a0(%rsp)
cvtsi2ssq 0x76a0(%rsp), %xmm0
cvtsi2ssq 0x76a8(%rsp), %xmm1
subss %xmm1, %xmm0
movss 0x17bb1e(%rip), %xmm1   # 0x58c170
divss %xmm1, %xmm0
movss %xmm0, 0x44(%rsp)
movss 0x44(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c924(%rip), %rdi    # 0x58cf91
movb $0x1, %al
callq 0x4e1d40
movl $0x0, 0x76bc(%rsp)
movl 0x76bc(%rsp), %eax
addq $0x76c0, %rsp           # imm = 0x76C0
popq %rbx
retq
nop