// File: /workspace/github_c_makefile_star2_O0/YunyiQian[P]multitel3/./rayinformation.c
// Function: rayinformation
int rayinformation(
	char *name,		//name of input model, "none" means using default model(prem)
	double sdepth,		//depth of the source in km
	double ddepth,		//depth of the discontinuity in km
	double rdepth,		//depth of the receiver in km
	int indicator[4],	//indicators of ray type
	double Vd[6],		//information of discontinuity structure
	double Vr[2],		//information of receiver side structure, Vr[0] is Vs, Vr[1] is Vp
	char *outfile,		//name of output file
	double dh            //ifferential of hh when generating ray information
	){


	int P1 = indicator[0];	//indicator of first part of ray is P wave(1) or S wave(0)
	int P2 = indicator[1];	//indicator of second part of ray, same as above
	int Turn1 = indicator[2];	//indicator of first part of ray is going to turn(1) or not(0)
	int Turn2 = indicator[3];	//indicator of second part of ray, same as above

	int i,j;
        int kk;
	int ks,ke;	//number of source layer and discontinuity layer in model 1
	int ls,le;	//number of discontinuity layer and receiver layer in model 2
	int error1;
	int error2;
	int num;
	double hh;	//takeoff angle of phase
	double hstart,hend;	//start and end of hh
//	double dh = 0.005;	//differential of hh when generating ray information
	double parameter;	//ray parameter in spherical model
	double xc,ti;		//great circle distance and traveltime
	double Q;		//t star in attenuation

	double V1[2],V2[2];	//V1[0/1] is Vs/Vp of incident side and V2[0/1] is Vs/Vp of another side
	double Rho1,Rho2;	//Rho1 is rho of incident side and Rho2 is another side
	double dhh,dgcarc;	//differential of takeoff angle and great circle distance when calculating geometrical spreading factor
	double R_recv,R_disc;	//Riduals of receiver and discontinuity
	double factor;
	double ii,rr,ll;	//incident, refleced angle at discontinuity and incident angle at receiver
	double temp;
	int temp1;
        int temp2;
        int temp3;
        int temp4;
	int type;
	int sum;


	double HH[MAX],PA[MAX];		//takeoff angle and ray parameter
	double DEG[MAX],XC[MAX],XC1[MAX],XC2[MAX];	//great circle distance at discontinuity and at receiver
	double QQ[MAX],TI[MAX];		//t star in attenuation and traveltime
	double DIFFU[MAX];		//geometrical spreading factor
	double REF_CO[MAX];		//reflection coefficient factor
	MODEL *m1,*m2;
	FILE *fp;

	if ( Turn1 == 0 && sdepth > ddepth ){
		hstart = PI/2. + dh;
		hend   = PI - dh;
	}else{
//		hstart = dh;
//		hend   = PI/2. - dh;
		hstart = 0;
                hend   = PI/2. - dh;
	}
	
	for (i=0,sum=0;i<4;i++){
		sum += indicator[i];
	}

	m1 = (MODEL *)malloc(sizeof(MODEL));
	model_input(name,m1);
	model_init(m1,sdepth,&ks,ddepth,&ke,P1);

	m2 = (MODEL *)malloc(sizeof(MODEL));
	model_input(name,m2);
	model_init(m2,ddepth,&ls,rdepth,&le,P2);

	fp = fopen(outfile,"w");
	if (fp == NULL){
		fprintf(stderr,"Error in opening outfile\n");
		exit(-1);
	}

	R_recv = Rearth - rdepth;
	R_disc = Rearth - ddepth;

	for (hh = hstart,num = 0;hh < hend;hh += dh){
		parameter = m1->p[ks]*sin(hh);
		if (sum != 1){
			error1 = raytrace2(m1,parameter,ks,ke,Turn1,&xc,&Q,&ti);
		}else{
			error1 = raytrace3(m1,parameter,ks,ke,Turn1,&xc,&Q,&ti);
		}

		if (error1 == -1){
			continue;
		}

		HH[num] = hh;
		PA[num] = parameter;
		XC1[num]=xc;
		XC[num] = xc;
		DEG[num] = XC[num];
		TI[num] = ti;
		QQ[num] = Q;

		if (sum != 1){
			error2 = raytrace2(m2,parameter,ls,le,Turn2,&xc,&Q,&ti);
		}else{
			error2 = raytrace3(m2,parameter,ls,le,Turn2,&xc,&Q,&ti);
		}

		if (error2 == -1){
			continue;
		}
		XC2[num] =xc;
		XC[num] += xc;
		TI[num] += ti;
		QQ[num] += Q;

		if ( XC[num] < gcarc_min || XC[num] > gcarc_max || XC[num] != XC[num] ){
//                if ( XC[num] < gcarc_min || XC[num] > gcarc_max){
			continue;
		}

		num++;
	}

//	for (i=1;i<num-1;i++){
//		printf("dist1=%f\tdist2=%f\n",XC1[i],XC2[i]);
//		}	

	for (i=1;i<num-1;i++){
		/* determine which side the ray is approach to discontinuity */
		if (Turn1 == 0 && sdepth < ddepth){
			V1[0] = Vd[0];		//V1[0] is Vs of incident side
			V1[1] = Vd[1];		//V1[1] is Vp of incident side
			Rho1  = Vd[2];		//rho of incident side
			
			V2[0] = Vd[3];		//V2[0] is Vs of another side
			V2[1] = Vd[4];		//V2[1] is Vp of another side
			Rho2  = Vd[5];		//rho of another side
		}else{
			V1[0] = Vd[3];		//the same as describe above
			V1[1] = Vd[4];
			Rho1  = Vd[5];

			V2[0] = Vd[0];
			V2[1] = Vd[1];
			Rho2  = Vd[2];
		}

                dgcarc = (XC[i+1] - XC[i-1])/2    ;
                dhh  = (HH[i+1]-HH[i])        ;



		ii = asin( PA[i]*V1[P1]/R_disc );
		rr = asin( PA[i]*V1[P2]/R_disc );
		ll = asin( PA[i]*Vr[P2]/R_recv );

                temp = rad2deg*dhh*sin(HH[i])/( sin(deg2rad*XC[i])*cos(ll)*dgcarc );
		DIFFU[i] = sqrt( fabs(temp) )/R_recv;
// printf("gcarc=%f\ttheta=%f\ti0=%f\tsin(theta)=%f\tcos(i0)=%f\tsin(gcarc)=%f\tsin(theta)/sin(gcarc)/cos(i0)=%f\tdtheta=%f\tdgcarc=%f\tdtheta/dgcarc=%f\tG=%f\n",XC[i],HH[i]*180/PI,ll*180/PI,sin(HH[i]),cos(ll),sin(deg2rad*XC[i]),sin(HH[i])/(sin(deg2rad*XC[i])*cos(ll)),dhh*180/PI,dgcarc,dhh*180/PI/dgcarc,DIFFU[i]*1e5);
		/* determine type of reflection, no Sv to Sv reflection */
		if ( P1 == 1 && P2 == 1 ){
			type = 1;
		}else if ( P1 == 1 && P2 == 0 ){
			type = 2;
		}else if ( P1 == 0 && P2 == 1 ){
			type = 3;
		}else if ( P1 == 0 && P2 == 0 ){
			type = 5;
		}

		REF_CO[i] = Reflection_Coefficient(V1[1],V1[0],V2[1],V2[0],Rho1,Rho2,ii,type);
//		if ( REF_CO[i] != REF_CO[i] ) printf ("%lf\t%d\t%d\t%d\t%d\n",V1[0],V2[0],P2,Turn1,Turn2);
	}


                                               
	
//	DIFFU[1]=(17*DIFFU[i-4]+14*DIFFU[i-3]+11*DIFFU[i-2]+8*DIFFU[i-1]+5*DIFFU[i]+2*DIFFU[i+1]-DIFFU[i+2]-4*DIFFU[i+3]-7*DIFFU[i+4])/45;
//	DIFFU[2]=(56*DIFFU[i-4]+47*DIFFU[i-3]+38*DIFFU[i-2]+29*DIFFU[i-1]+20*DIFFU[i]+11*DIFFU[i+1]+2*DIFFU[i+2]-7*DIFFU[i+3]-16*DIFFU[i+4])/180;
//	DIFFU[3]=(22*DIFFU[i-4]+19*DIFFU[i-3]+16*DIFFU[i-2]+13*DIFFU[i-1]+10*DIFFU[i]+7*DIFFU[i+1]+4*DIFFU[i+2]+DIFFU[i+3]-2*DIFFU[i+4])/90;
//	DIFFU[4]=(32*DIFFU[i-4]+29*DIFFU[i-3]+26*DIFFU[i-2]+23*DIFFU[i-1]+20*DIFFU[i]+17*DIFFU[i+1]+14*DIFFU[i+2]+11*DIFFU[i+3]+8*DIFFU[i+4])/180;
	for (i=25;i<num-16;i++){
        	DIFFU[i]=(DIFFU[i-4]+DIFFU[i-3]+DIFFU[i-2]+DIFFU[i-1]+DIFFU[i]+DIFFU[i+1]+DIFFU[i+2]+DIFFU[i+3]+DIFFU[i+4])/9;
        }//9 for all

        for (j=1;j<30;j++){
        	for (i=1;i<num-1;i++){
			if(XC[i]>=26 && XC[i]<=40)
                        	DIFFU[i]=(DIFFU[i-4]+DIFFU[i-3]+DIFFU[i-2]+DIFFU[i-1]+DIFFU[i]+DIFFU[i+1]+DIFFU[i+2]+DIFFU[i+3]+DIFFU[i+4])/9;
        	}
        }
        for (j=1;j<30;j++){
                for (i=1;i<num-1;i++){
                        if(XC[i]>=35 && XC[i]<=50)
                                DIFFU[i]=(DIFFU[i-4]+DIFFU[i-3]+DIFFU[i-2]+DIFFU[i-1]+DIFFU[i]+DIFFU[i+1]+DIFFU[i+2]+DIFFU[i+3]+DIFFU[i+4])/9;
                }
        }

        for (j=1;j<30;j++){
                for (i=1;i<num-1;i++){
                        if(XC[i]>=85 && XC[i]<=95)
                                DIFFU[i]=(DIFFU[i-4]+DIFFU[i-3]+DIFFU[i-2]+DIFFU[i-1]+DIFFU[i]+DIFFU[i+1]+DIFFU[i+2]+DIFFU[i+3]+DIFFU[i+4])/9;
                }
        }
        for (j=1;j<30;j++){
                for (i=1;i<num-1;i++){
                        if(XC[i]>=80 && XC[i]<=90)
                                DIFFU[i]=(DIFFU[i-4]+DIFFU[i-3]+DIFFU[i-2]+DIFFU[i-1]+DIFFU[i]+DIFFU[i+1]+DIFFU[i+2]+DIFFU[i+3]+DIFFU[i+4])/9;
                }
        }

//	DIFFU[num-5]=(8*DIFFU[i-4]+11*DIFFU[i-3]+14*DIFFU[i-2]+17*DIFFU[i-1]+20*DIFFU[i]+23*DIFFU[i+1]+26*DIFFU[i+2]+29*DIFFU[i+3]+32*DIFFU[i+4])/180;
//        DIFFU[num-4]=(-2*DIFFU[i-4]+DIFFU[i-3]+4*DIFFU[i-2]+7*DIFFU[i-1]+10*DIFFU[i]+13*DIFFU[i+1]+16*DIFFU[i+2]+19*DIFFU[i+3]+22*DIFFU[i+4])/90;
//        DIFFU[num-3]=(-16*DIFFU[i-4]-7*DIFFU[i-3]+2*DIFFU[i-2]+11*DIFFU[i-1]+20*DIFFU[i]+29*DIFFU[i+1]+38*DIFFU[i+2]+47*DIFFU[i+3]+56*DIFFU[i+4])/180;
//        DIFFU[num-2]=(-7*DIFFU[i-4]-4*DIFFU[i-3]-DIFFU[i-2]+2*DIFFU[i-1]+5*DIFFU[i]+8*DIFFU[i+1]+11*DIFFU[i+2]+14*DIFFU[i+3]+17*DIFFU[i+4])/45;

	fprintf(fp,"%d\n",num-2);
	for (i=1;i<num-1;i++){
		fprintf(fp,"%f\t%f\t%e\t%f\t%f\t%f\t%f\n",XC[i],PA[i],DIFFU[i]*1.e5,TI[i],QQ[i],REF_CO[i],HH[i]*rad2deg);
//		fprintf(fp,"%f\t%f\t%f\n",HH[i],TI[i],XC[i]);
	}
	fclose(fp);
	fp = NULL;
	free (m1);
	free (m2);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a1390, %rsp         # imm = 0x7A1390
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movsd %xmm3, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x54(%rbp)
jne 0x3a98
movsd -0x10(%rbp), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0x3a98
movsd 0x15fc(%rip), %xmm0     # 0x5070
addsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x15ef(%rip), %xmm0     # 0x5078
subsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
jmp 0x3ab8
xorps %xmm0, %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x15c5(%rip), %xmm0     # 0x5070
subsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x150(%rbp)
cmpl $0x4, -0x5c(%rbp)
jge 0x3af1
movq -0x28(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x150(%rbp), %eax
movl %eax, -0x150(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x3ac9
movl $0x13890, %edi          # imm = 0x13890
callq 0x10c0
movq %rax, -0x7a1358(%rbp)
movq -0x8(%rbp), %rdi
movq -0x7a1358(%rbp), %rsi
callq 0x1240
movq -0x7a1358(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movl -0x4c(%rbp), %ecx
leaq -0x68(%rbp), %rsi
leaq -0x6c(%rbp), %rdx
callq 0x1460
movl $0x13890, %edi          # imm = 0x13890
callq 0x10c0
movq %rax, -0x7a1360(%rbp)
movq -0x8(%rbp), %rdi
movq -0x7a1360(%rbp), %rsi
callq 0x1240
movq -0x7a1360(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movl -0x50(%rbp), %ecx
leaq -0x70(%rbp), %rsi
leaq -0x74(%rbp), %rdx
callq 0x1460
movq -0x40(%rbp), %rdi
leaq 0x16c9(%rip), %rsi      # 0x5249
callq 0x10d0
movq %rax, -0x7a1368(%rbp)
cmpq $0x0, -0x7a1368(%rbp)
jne 0x3bb8
movq 0x345b(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x16a4(%rip), %rsi      # 0x524b
movb $0x0, %al
callq 0x10b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1120
movsd 0x1458(%rip), %xmm0     # 0x5018
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x108(%rbp)
movsd 0x1443(%rip), %xmm0     # 0x5018
subsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x110(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movl $0x0, -0x80(%rbp)
movsd -0x88(%rbp), %xmm1
movsd -0x98(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3edc
movq -0x7a1358(%rbp), %rax
movslq -0x68(%rbp), %rcx
movsd 0xfa08(%rax,%rcx,8), %xmm0
movsd %xmm0, -0x7a1370(%rbp)
movsd -0x88(%rbp), %xmm0
callq 0x10e0
movaps %xmm0, %xmm1
movsd -0x7a1370(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
cmpl $0x1, -0x150(%rbp)
je 0x3c97
movq -0x7a1358(%rbp), %rdi
movsd -0xa0(%rbp), %xmm0
movl -0x68(%rbp), %esi
movl -0x6c(%rbp), %edx
movl -0x54(%rbp), %ecx
leaq -0xa8(%rbp), %r8
leaq -0xb8(%rbp), %r9
leaq -0xb0(%rbp), %rax
movq %rax, (%rsp)
callq 0x25b0
movl %eax, -0x78(%rbp)
jmp 0x3cd0
movq -0x7a1358(%rbp), %rdi
movsd -0xa0(%rbp), %xmm0
movl -0x68(%rbp), %esi
movl -0x6c(%rbp), %edx
movl -0x54(%rbp), %ecx
leaq -0xa8(%rbp), %r8
leaq -0xb8(%rbp), %r9
leaq -0xb0(%rbp), %rax
movq %rax, (%rsp)
callq 0x2be0
movl %eax, -0x78(%rbp)
cmpl $-0x1, -0x78(%rbp)
jne 0x3cdb
jmp 0x3ec2
movsd -0x88(%rbp), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0xc3650(%rbp,%rax,8)
movsd -0xa0(%rbp), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0x186b50(%rbp,%rax,8)
movsd -0xa8(%rbp), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0x3d0a50(%rbp,%rax,8)
movsd -0xa8(%rbp), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0x30d550(%rbp,%rax,8)
movslq -0x80(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0x24a050(%rbp,%rax,8)
movsd -0xb0(%rbp), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0x61a950(%rbp,%rax,8)
movsd -0xb8(%rbp), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0x557450(%rbp,%rax,8)
cmpl $0x1, -0x150(%rbp)
je 0x3db7
movq -0x7a1360(%rbp), %rdi
movsd -0xa0(%rbp), %xmm0
movl -0x70(%rbp), %esi
movl -0x74(%rbp), %edx
movl -0x58(%rbp), %ecx
leaq -0xa8(%rbp), %r8
leaq -0xb8(%rbp), %r9
leaq -0xb0(%rbp), %rax
movq %rax, (%rsp)
callq 0x25b0
movl %eax, -0x7c(%rbp)
jmp 0x3df0
movq -0x7a1360(%rbp), %rdi
movsd -0xa0(%rbp), %xmm0
movl -0x70(%rbp), %esi
movl -0x74(%rbp), %edx
movl -0x58(%rbp), %ecx
leaq -0xa8(%rbp), %r8
leaq -0xb8(%rbp), %r9
leaq -0xb0(%rbp), %rax
movq %rax, (%rsp)
callq 0x2be0
movl %eax, -0x7c(%rbp)
cmpl $-0x1, -0x7c(%rbp)
jne 0x3dfb
jmp 0x3ec2
movsd -0xa8(%rbp), %xmm0
movslq -0x80(%rbp), %rax
movsd %xmm0, -0x493f50(%rbp,%rax,8)
movsd -0xa8(%rbp), %xmm0
movslq -0x80(%rbp), %rax
addsd -0x30d550(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x30d550(%rbp,%rax,8)
movsd -0xb0(%rbp), %xmm0
movslq -0x80(%rbp), %rax
addsd -0x61a950(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x61a950(%rbp,%rax,8)
movsd -0xb8(%rbp), %xmm0
movslq -0x80(%rbp), %rax
addsd -0x557450(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x557450(%rbp,%rax,8)
movslq -0x80(%rbp), %rax
xorps %xmm0, %xmm0
ucomisd -0x30d550(%rbp,%rax,8), %xmm0
ja 0x3eb7
movslq -0x80(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movsd 0x1247(%rip), %xmm1     # 0x50d8
ucomisd %xmm1, %xmm0
ja 0x3eb7
movslq -0x80(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movslq -0x80(%rbp), %rax
ucomisd -0x30d550(%rbp,%rax,8), %xmm0
jne 0x3eb7
jp 0x3eb7
jmp 0x3eb9
jmp 0x3ec2
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
movsd -0x48(%rbp), %xmm0
addsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x3bf9
movl $0x1, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4249
cmpl $0x0, -0x54(%rbp)
jne 0x3f71
movsd -0x10(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3f71
movq -0x30(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xd0(%rbp)
movq -0x30(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0xc8(%rbp)
movq -0x30(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0xe0(%rbp)
movq -0x30(%rbp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0xd8(%rbp)
movq -0x30(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0xf0(%rbp)
jmp 0x3fd6
movq -0x30(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0xd0(%rbp)
movq -0x30(%rbp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0xc8(%rbp)
movq -0x30(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xe0(%rbp)
movq -0x30(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0xd8(%rbp)
movq -0x30(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0xf0(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
cltq
movsd -0x30d550(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x1, %eax
cltq
subsd -0x30d550(%rbp,%rax,8), %xmm0
movsd 0x1068(%rip), %xmm1     # 0x5068
divsd %xmm1, %xmm0
movsd %xmm0, -0x100(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
cltq
movsd -0xc3650(%rbp,%rax,8), %xmm0
movslq -0x5c(%rbp), %rax
subsd -0xc3650(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xf8(%rbp)
movslq -0x5c(%rbp), %rax
movsd -0x186b50(%rbp,%rax,8), %xmm0
movslq -0x4c(%rbp), %rax
mulsd -0xd0(%rbp,%rax,8), %xmm0
divsd -0x110(%rbp), %xmm0
callq 0x1100
movsd %xmm0, -0x120(%rbp)
movslq -0x5c(%rbp), %rax
movsd -0x186b50(%rbp,%rax,8), %xmm0
movslq -0x50(%rbp), %rax
mulsd -0xd0(%rbp,%rax,8), %xmm0
divsd -0x110(%rbp), %xmm0
callq 0x1100
movsd %xmm0, -0x128(%rbp)
movslq -0x5c(%rbp), %rax
movsd -0x186b50(%rbp,%rax,8), %xmm0
movq -0x38(%rbp), %rax
movslq -0x50(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
divsd -0x108(%rbp), %xmm0
callq 0x1100
movsd %xmm0, -0x130(%rbp)
movsd 0xfb9(%rip), %xmm0      # 0x5080
mulsd -0xf8(%rbp), %xmm0
movsd %xmm0, -0x7a1388(%rbp)
movslq -0x5c(%rbp), %rax
movsd -0xc3650(%rbp,%rax,8), %xmm0
callq 0x10e0
movaps %xmm0, %xmm1
movsd -0x7a1388(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x7a1378(%rbp)
movslq -0x5c(%rbp), %rax
movsd 0xfc4(%rip), %xmm0      # 0x50d0
mulsd -0x30d550(%rbp,%rax,8), %xmm0
callq 0x10e0
movsd %xmm0, -0x7a1380(%rbp)
movsd -0x130(%rbp), %xmm0
callq 0x1090
movsd -0x7a1380(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x7a1378(%rbp), %xmm0
mulsd %xmm2, %xmm1
mulsd -0x100(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x138(%rbp)
movsd -0x138(%rbp), %xmm0
movaps 0xf87(%rip), %xmm1      # 0x50f0
pand %xmm1, %xmm0
callq 0x1130
divsd -0x108(%rbp), %xmm0
movslq -0x5c(%rbp), %rax
movsd %xmm0, -0x6dde50(%rbp,%rax,8)
cmpl $0x1, -0x4c(%rbp)
jne 0x419f
cmpl $0x1, -0x50(%rbp)
jne 0x419f
movl $0x1, -0x14c(%rbp)
jmp 0x41eb
cmpl $0x1, -0x4c(%rbp)
jne 0x41b7
cmpl $0x0, -0x50(%rbp)
jne 0x41b7
movl $0x2, -0x14c(%rbp)
jmp 0x41e9
cmpl $0x0, -0x4c(%rbp)
jne 0x41cf
cmpl $0x1, -0x50(%rbp)
jne 0x41cf
movl $0x3, -0x14c(%rbp)
jmp 0x41e7
cmpl $0x0, -0x4c(%rbp)
jne 0x41e5
cmpl $0x0, -0x50(%rbp)
jne 0x41e5
movl $0x5, -0x14c(%rbp)
jmp 0x41e7
jmp 0x41e9
jmp 0x41eb
movsd -0xc8(%rbp), %xmm0
movsd -0xd0(%rbp), %xmm1
movsd -0xd8(%rbp), %xmm2
movsd -0xe0(%rbp), %xmm3
movsd -0xe8(%rbp), %xmm4
movsd -0xf0(%rbp), %xmm5
movsd -0x120(%rbp), %xmm6
movl -0x14c(%rbp), %edi
callq 0x32e0
movslq -0x5c(%rbp), %rax
movsd %xmm0, -0x7a1350(%rbp,%rax,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x3ee3
movl $0x19, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x10, %ecx
cmpl %ecx, %eax
jge 0x431d
movl -0x5c(%rbp), %eax
subl $0x4, %eax
cltq
movsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movslq -0x5c(%rbp), %rax
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x4, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movsd 0xd9a(%rip), %xmm1      # 0x5098
divsd %xmm1, %xmm0
movslq -0x5c(%rbp), %rax
movsd %xmm0, -0x6dde50(%rbp,%rax,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4250
movl $0x1, -0x60(%rbp)
cmpl $0x1e, -0x60(%rbp)
jge 0x444e
movl $0x1, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x443e
movslq -0x5c(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movsd 0xd65(%rip), %xmm1      # 0x50c0
ucomisd %xmm1, %xmm0
jb 0x442e
movslq -0x5c(%rbp), %rax
movsd 0xd57(%rip), %xmm0      # 0x50c8
ucomisd -0x30d550(%rbp,%rax,8), %xmm0
jb 0x442e
movl -0x5c(%rbp), %eax
subl $0x4, %eax
cltq
movsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movslq -0x5c(%rbp), %rax
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x4, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movsd 0xc7b(%rip), %xmm1      # 0x5098
divsd %xmm1, %xmm0
movslq -0x5c(%rbp), %rax
movsd %xmm0, -0x6dde50(%rbp,%rax,8)
jmp 0x4430
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4335
jmp 0x4440
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4324
movl $0x1, -0x60(%rbp)
cmpl $0x1e, -0x60(%rbp)
jge 0x457f
movl $0x1, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x456f
movslq -0x5c(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movsd 0xc24(%rip), %xmm1      # 0x50b0
ucomisd %xmm1, %xmm0
jb 0x455f
movslq -0x5c(%rbp), %rax
movsd 0xc16(%rip), %xmm0      # 0x50b8
ucomisd -0x30d550(%rbp,%rax,8), %xmm0
jb 0x455f
movl -0x5c(%rbp), %eax
subl $0x4, %eax
cltq
movsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movslq -0x5c(%rbp), %rax
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x4, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movsd 0xb4a(%rip), %xmm1      # 0x5098
divsd %xmm1, %xmm0
movslq -0x5c(%rbp), %rax
movsd %xmm0, -0x6dde50(%rbp,%rax,8)
jmp 0x4561
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4466
jmp 0x4571
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4455
movl $0x1, -0x60(%rbp)
cmpl $0x1e, -0x60(%rbp)
jge 0x46b0
movl $0x1, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x46a0
movslq -0x5c(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movsd 0xae3(%rip), %xmm1      # 0x50a0
ucomisd %xmm1, %xmm0
jb 0x4690
movslq -0x5c(%rbp), %rax
movsd 0xad5(%rip), %xmm0      # 0x50a8
ucomisd -0x30d550(%rbp,%rax,8), %xmm0
jb 0x4690
movl -0x5c(%rbp), %eax
subl $0x4, %eax
cltq
movsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movslq -0x5c(%rbp), %rax
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x4, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movsd 0xa19(%rip), %xmm1      # 0x5098
divsd %xmm1, %xmm0
movslq -0x5c(%rbp), %rax
movsd %xmm0, -0x6dde50(%rbp,%rax,8)
jmp 0x4692
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4597
jmp 0x46a2
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4586
movl $0x1, -0x60(%rbp)
cmpl $0x1e, -0x60(%rbp)
jge 0x47e1
movl $0x1, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x47d1
movslq -0x5c(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movsd 0x99a(%rip), %xmm1      # 0x5088
ucomisd %xmm1, %xmm0
jb 0x47c1
movslq -0x5c(%rbp), %rax
movsd 0x98c(%rip), %xmm0      # 0x5090
ucomisd -0x30d550(%rbp,%rax,8), %xmm0
jb 0x47c1
movl -0x5c(%rbp), %eax
subl $0x4, %eax
cltq
movsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
subl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movslq -0x5c(%rbp), %rax
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x2, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x3, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movl -0x5c(%rbp), %eax
addl $0x4, %eax
cltq
addsd -0x6dde50(%rbp,%rax,8), %xmm0
movsd 0x8e8(%rip), %xmm1      # 0x5098
divsd %xmm1, %xmm0
movslq -0x5c(%rbp), %rax
movsd %xmm0, -0x6dde50(%rbp,%rax,8)
jmp 0x47c3
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x46c8
jmp 0x47d3
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x46b7
movq -0x7a1368(%rbp), %rdi
movl -0x80(%rbp), %edx
subl $0x2, %edx
leaq 0xa70(%rip), %rsi       # 0x5265
movb $0x0, %al
callq 0x10b0
movl $0x1, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x48a2
movq -0x7a1368(%rbp), %rdi
movslq -0x5c(%rbp), %rax
movsd -0x30d550(%rbp,%rax,8), %xmm0
movslq -0x5c(%rbp), %rax
movsd -0x186b50(%rbp,%rax,8), %xmm1
movslq -0x5c(%rbp), %rax
movsd 0x7ff(%rip), %xmm2      # 0x5040
mulsd -0x6dde50(%rbp,%rax,8), %xmm2
movslq -0x5c(%rbp), %rax
movsd -0x61a950(%rbp,%rax,8), %xmm3
movslq -0x5c(%rbp), %rax
movsd -0x557450(%rbp,%rax,8), %xmm4
movslq -0x5c(%rbp), %rax
movsd -0x7a1350(%rbp,%rax,8), %xmm5
movslq -0x5c(%rbp), %rax
movsd 0x803(%rip), %xmm6      # 0x5080
mulsd -0xc3650(%rbp,%rax,8), %xmm6
leaq 0x9dc(%rip), %rsi       # 0x5269
movb $0x7, %al
callq 0x10b0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4803
movq -0x7a1368(%rbp), %rdi
callq 0x1070
movq $0x0, -0x7a1368(%rbp)
movq -0x7a1358(%rbp), %rdi
callq 0x1030
movq -0x7a1360(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x7a1390, %rsp         # imm = 0x7A1390
popq %rbp
retq
nopl (%rax)