// File: ashlall[P]StreamStats/Test/QDigest_test_Double.cpp
// Function: test_qdigetDouble()
void test_qdigetDouble()
{
	int n = 50;
	int k = 5000; //make an arbitrarily large k for testing 	
				//Compress factor: usually the choice of k ranges from 0.3*stream_length to 0.5stream_length  in order to get the best query results

					
	double quantA,quantB,quantC,quantD,quantE,quantF,quantG,quantH;
	bool condA,condB,condC,condD,condE,condF,condG,condH;
    double upper,lower;
    
    double random_fix1 = rand()% RAND_MAX + 0.12345; //used to test corner case where n = 1
    double random_fix2 = rand()% RAND_MAX + 0.12345;
    double random_fix3 = rand()% RAND_MAX + 0.12345;

	QDigestDouble a(k);
	QDigestDouble b(k);
	QDigestDouble c(k);
	QDigestDouble d(k);
    QDigestDouble e(k);
	QDigestDouble f(k);
	QDigestDouble g(k);
	QDigestDouble h(k);
		
	for (double i = 0; i <= n; i = i + 0.1) //inserting in increasing order
    {	
  		a.insert(i); 
    }
	bool condA1;
	long LA = a.get_stream_size(); //test the function get_stream_size()
	condA1= (LA == n/0.1);
	assert(condA1 == true);
	   
	   
	for (double j = n; j >= 0; j = j - 0.1) //inserting in decreasing order
    {	
  		b.insert(j); 
    }
    bool condB1;
	long LB = b.get_stream_size(); //test the function get_stream_size()
	condB1= (LB == n/0.1);
	assert(condB1 == true); 	
  	
  	
  	for (int m = 1; m <= 3; m++) //create 3 "random" sequences that holds their randomness every time runs the code
  	{
  		 if (m == 1)
  		 {
  		 	//cout << "sequence 1: " << endl;
  			 for (int i = 0; i <= n; i++)
   			 {
   			 	srand(i);
  				double rand_num=rand()%n + 0.5;
  				//cout << rand_num << " ";
  				c.insert(rand_num); //inserting float number from 0 to n
  			 }
  			 //cout << ""<<endl;
  			 bool condC1;
			 long LC = c.get_stream_size(); //test the function get_stream_size()
			 condC1= (LC == n+1);
			 assert(condC1 == true); 			 
  		}
  		
  		else if(m == 2)
  		{
  			 //cout << "sequence 2: " << endl;
  			  for (int i = 0; i <= n; i++)
   			 {
   			    srand(i^2);
  				double rand_num=rand()%n + 0.5;
  				//cout << rand_num << " ";
  				d.insert(rand_num); //inserting float number from 0 to n
  			 }  
  			 //cout << ""<<endl;
  			 bool condD1;
			 long LD = d.get_stream_size(); //test the function get_stream_size()
			 condD1= (LD == n+1);
			 assert(condD1 == true);  
  		}	
  		
  		else 
  		{	
  			//cout << "sequence 3: " << endl;
  			  for (int i = 0; i <= n; i++)
   			 {
   			 	srand(n-i);
  				double rand_num=rand()%n + 0.5;
  				//cout << rand_num << " ";
  				e.insert(rand_num); //inserting float number from 0 to n
  			 }  
  			 //cout <<""<<endl;
  			 bool condE1;
			 long LE = e.get_stream_size(); //test the function get_stream_size()
			 condE1= (LE == n+1);
			 assert(condE1 == true);
  		}
  	}
  	
  
  	f.insert(random_fix1); //test corner case where n = 1
  	g.insert(random_fix2); 
  	h.insert(random_fix3); 
  
  	  bool condF1,condG1,condH1;
	  long LF = f.get_stream_size(); //test the function get_stream_size()
	  long LG = g.get_stream_size();
 	  long LH = h.get_stream_size();
      condF1 = (LF == 1);
      condG1 = (LG == 1);
	  condH1 = (LH == 1);
	  assert(condF1 == true);
	  assert(condG1 == true);
	  assert(condH1 == true);
	//random floating number from MIN ~ MAX are needed !!!!!
	

    for (float i=1;i<=100;i++)
    {
  	  double interval=i/100; //getting each probabilty interval
  	  
  	  quantA=a.getQuantile(interval); //getting quantile for each probability interval
  	  quantB=b.getQuantile(interval);//getting quantile for each probability interval
  	  quantC=c.getQuantile(interval);//getting quantile for each probability interval
  	  quantD=d.getQuantile(interval);
  	  quantE=e.getQuantile(interval);
  	  quantF=f.getQuantile(interval);
  	  quantG=g.getQuantile(interval);
  	  quantH=h.getQuantile(interval);
  	  
  	  lower=(interval-0.06)*n;
  	  upper=(interval+0.06)*n;
  	  
  	  condA= ((lower<=quantA) && (upper>=quantA));
  	  //checking if quantile is within error range
  	  
  	  condB= ((lower<=quantB) && (upper >=quantB));
  	  //checking if quantile is within error range
  	  
  	  condC= ((lower<=quantC) && (upper>=quantC));
  	  condD= ((lower<=quantD) && (upper>=quantD));
  	  condE= ((lower<=quantE) && (upper>=quantE));
  	  //checking if quantile is within error range
  	  

  	  condF= ((quantF <= 1.0001*random_fix1) && (quantF >= 0.9999*random_fix1));
  	  condG= ((quantG <= 1.0001*random_fix2) && (quantG >= 0.9999*random_fix2));
  	  condH= ((quantH <= 1.0001*random_fix3) && (quantH >= 0.9999*random_fix3));
  	  
  	  
  	  //checking if the condition holds in the corner case where stream size = 1
  	  
  	  assert(condA==true);
  	  assert(condB==true);
  	  assert(condC==true);
  	  assert(condD==true);
  	  assert(condE==true);
  	  assert(condF==true);
  	  assert(condG==true);
  	  assert(condH==true);
  } 

	/*  
		QDigestDouble a(500);
		for(double i=1; i<=1000; i = i + 0.5)
		{
			a.insert(i);
		}

		cout << "median:" << a.getQuantile(0.5) << endl;
		cout << "0.1: "<<a.getQuantile(0.1) << endl;
		cout << "0.3: "<<a.getQuantile(0.3) << endl;
		cout << "0.4: "<<a.getQuantile(0.4) << endl;
		cout << "0.8: "<<a.getQuantile(0.8) << endl;
		cout << "hi" <<endl; 
   */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5e0, %rsp            # imm = 0x5E0
movl $0x32, -0x4(%rbp)
movl $0x1388, -0x8(%rbp)     # imm = 0x1388
callq 0x2050
movslq %eax, %rdx
movq %rdx, %rcx
shlq $0x1e, %rcx
addq %rcx, %rdx
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x3d, %rdx
addl %ecx, %edx
movl %edx, %ecx
shll $0x1f, %ecx
addl %edx, %ecx
addl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0x95f3(%rip), %xmm1     # 0xd010
movsd %xmm1, -0x550(%rbp)
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x2050
movsd -0x550(%rbp), %xmm1
movslq %eax, %rdx
movq %rdx, %rcx
shlq $0x1e, %rcx
addq %rcx, %rdx
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x3d, %rdx
addl %ecx, %edx
movl %edx, %ecx
shll $0x1f, %ecx
addl %edx, %ecx
addl %ecx, %eax
cvtsi2sd %eax, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
callq 0x2050
movsd -0x550(%rbp), %xmm1
movslq %eax, %rdx
movq %rdx, %rcx
shlq $0x1e, %rcx
addq %rcx, %rdx
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x3d, %rdx
addl %ecx, %edx
movl %edx, %ecx
shll $0x1f, %ecx
addl %edx, %ecx
addl %ecx, %eax
cvtsi2sd %eax, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0xf8(%rbp), %rdi
callq 0x55d0
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0x178(%rbp), %rdi
callq 0x55d0
jmp 0x3acc
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0x208(%rbp), %rdi
callq 0x55d0
jmp 0x3adf
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0x288(%rbp), %rdi
callq 0x55d0
jmp 0x3af2
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0x308(%rbp), %rdi
callq 0x55d0
jmp 0x3b05
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0x388(%rbp), %rdi
callq 0x55d0
jmp 0x3b18
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0x408(%rbp), %rdi
callq 0x55d0
jmp 0x3b2b
cvtsi2sdl -0x8(%rbp), %xmm0
leaq -0x488(%rbp), %rdi
callq 0x55d0
jmp 0x3b3e
xorps %xmm0, %xmm0
movsd %xmm0, -0x490(%rbp)
movsd -0x490(%rbp), %xmm1
cvtsi2sdl -0x4(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x3c56
movsd -0x490(%rbp), %xmm0
leaq -0xf8(%rbp), %rdi
callq 0x5630
jmp 0x3b76
jmp 0x3b78
movsd 0x9498(%rip), %xmm0     # 0xd018
addsd -0x490(%rbp), %xmm0
movsd %xmm0, -0x490(%rbp)
jmp 0x3b49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x481c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x4810
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x4804
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x47f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x47ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x47e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x47d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
leaq -0x488(%rbp), %rdi
callq 0x5720
jmp 0x47d4
leaq -0xf8(%rbp), %rdi
callq 0x56c0
movq %rax, -0x558(%rbp)
jmp 0x3c6b
movq -0x558(%rbp), %rax
movq %rax, -0x4a0(%rbp)
cvtsi2sdq -0x4a0(%rbp), %xmm0
cvtsi2sdl -0x4(%rbp), %xmm1
movsd 0x9389(%rip), %xmm2     # 0xd018
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
sete %al
setnp %cl
andb %cl, %al
andb $0x1, %al
movb %al, -0x491(%rbp)
movb -0x491(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x3cb9
jmp 0x3cd8
leaq 0x9429(%rip), %rdi      # 0xd0e9
leaq 0x9431(%rip), %rsi      # 0xd0f8
movl $0x2a, %edx
leaq 0x943d(%rip), %rcx      # 0xd110
callq 0x20d0
cvtsi2sdl -0x4(%rbp), %xmm0
movsd %xmm0, -0x4a8(%rbp)
movsd -0x4a8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x3d2c
movsd -0x4a8(%rbp), %xmm0
leaq -0x178(%rbp), %rdi
callq 0x5630
jmp 0x3d0c
jmp 0x3d0e
movsd -0x4a8(%rbp), %xmm0
movsd 0x92fa(%rip), %xmm1     # 0xd018
subsd %xmm1, %xmm0
movsd %xmm0, -0x4a8(%rbp)
jmp 0x3ce5
leaq -0x178(%rbp), %rdi
callq 0x56c0
movq %rax, -0x560(%rbp)
jmp 0x3d41
movq -0x560(%rbp), %rax
movq %rax, -0x4b8(%rbp)
cvtsi2sdq -0x4b8(%rbp), %xmm0
cvtsi2sdl -0x4(%rbp), %xmm1
movsd 0x92b3(%rip), %xmm2     # 0xd018
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
sete %al
setnp %cl
andb %cl, %al
andb $0x1, %al
movb %al, -0x4a9(%rbp)
movb -0x4a9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x3d8f
jmp 0x3dae
leaq 0x9393(%rip), %rdi      # 0xd129
leaq 0x935b(%rip), %rsi      # 0xd0f8
movl $0x34, %edx
leaq 0x9367(%rip), %rcx      # 0xd110
callq 0x20d0
movl $0x1, -0x4bc(%rbp)
cmpl $0x3, -0x4bc(%rbp)
jg 0x40a5
cmpl $0x1, -0x4bc(%rbp)
jne 0x3eb5
movl $0x0, -0x4c0(%rbp)
movl -0x4c0(%rbp), %eax
cmpl -0x4(%rbp), %eax
jg 0x3e3e
movl -0x4c0(%rbp), %edi
callq 0x2140
callq 0x2050
movl -0x4(%rbp), %ecx
cltd
idivl %ecx
cvtsi2sd %edx, %xmm0
movsd 0x922f(%rip), %xmm1     # 0xd038
addsd %xmm1, %xmm0
movsd %xmm0, -0x4c8(%rbp)
movsd -0x4c8(%rbp), %xmm0
leaq -0x208(%rbp), %rdi
callq 0x5630
jmp 0x3e2b
jmp 0x3e2d
movl -0x4c0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c0(%rbp)
jmp 0x3ddc
leaq -0x208(%rbp), %rdi
callq 0x56c0
movq %rax, -0x568(%rbp)
jmp 0x3e53
movq -0x568(%rbp), %rax
movq %rax, -0x4d8(%rbp)
movq -0x4d8(%rbp), %rax
movl -0x4(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movb %al, -0x4c9(%rbp)
movb -0x4c9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x3e91
jmp 0x3eb0
leaq 0x92a0(%rip), %rdi      # 0xd138
leaq 0x9259(%rip), %rsi      # 0xd0f8
movl $0x47, %edx
leaq 0x9265(%rip), %rcx      # 0xd110
callq 0x20d0
jmp 0x408f
cmpl $0x2, -0x4bc(%rbp)
jne 0x3fa8
movl $0x0, -0x4dc(%rbp)
movl -0x4dc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jg 0x3f31
movl -0x4dc(%rbp), %edi
xorl $0x2, %edi
callq 0x2140
callq 0x2050
movl -0x4(%rbp), %ecx
cltd
idivl %ecx
cvtsi2sd %edx, %xmm0
movsd 0x913c(%rip), %xmm1     # 0xd038
addsd %xmm1, %xmm0
movsd %xmm0, -0x4e8(%rbp)
movsd -0x4e8(%rbp), %xmm0
leaq -0x288(%rbp), %rdi
callq 0x5630
jmp 0x3f1e
jmp 0x3f20
movl -0x4dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4dc(%rbp)
jmp 0x3ecc
leaq -0x288(%rbp), %rdi
callq 0x56c0
movq %rax, -0x570(%rbp)
jmp 0x3f46
movq -0x570(%rbp), %rax
movq %rax, -0x4f8(%rbp)
movq -0x4f8(%rbp), %rax
movl -0x4(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movb %al, -0x4e9(%rbp)
movb -0x4e9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x3f84
jmp 0x3fa3
leaq 0x91bc(%rip), %rdi      # 0xd147
leaq 0x9166(%rip), %rsi      # 0xd0f8
movl $0x58, %edx
leaq 0x9172(%rip), %rcx      # 0xd110
callq 0x20d0
jmp 0x408d
movl $0x0, -0x4fc(%rbp)
movl -0x4fc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jg 0x4019
movl -0x4(%rbp), %edi
movl -0x4fc(%rbp), %eax
subl %eax, %edi
callq 0x2140
callq 0x2050
movl -0x4(%rbp), %ecx
cltd
idivl %ecx
cvtsi2sd %edx, %xmm0
movsd 0x9054(%rip), %xmm1     # 0xd038
addsd %xmm1, %xmm0
movsd %xmm0, -0x508(%rbp)
movsd -0x508(%rbp), %xmm0
leaq -0x308(%rbp), %rdi
callq 0x5630
jmp 0x4006
jmp 0x4008
movl -0x4fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4fc(%rbp)
jmp 0x3fb2
leaq -0x308(%rbp), %rdi
callq 0x56c0
movq %rax, -0x578(%rbp)
jmp 0x402e
movq -0x578(%rbp), %rax
movq %rax, -0x518(%rbp)
movq -0x518(%rbp), %rax
movl -0x4(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movb %al, -0x509(%rbp)
movb -0x509(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x406c
jmp 0x408b
leaq 0x90e3(%rip), %rdi      # 0xd156
leaq 0x907e(%rip), %rsi      # 0xd0f8
movl $0x69, %edx
leaq 0x908a(%rip), %rcx      # 0xd110
callq 0x20d0
jmp 0x408d
jmp 0x408f
jmp 0x4091
movl -0x4bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4bc(%rbp)
jmp 0x3db8
movsd -0x68(%rbp), %xmm0
leaq -0x388(%rbp), %rdi
callq 0x5630
jmp 0x40b8
movsd -0x70(%rbp), %xmm0
leaq -0x408(%rbp), %rdi
callq 0x5630
jmp 0x40cb
movsd -0x78(%rbp), %xmm0
leaq -0x488(%rbp), %rdi
callq 0x5630
jmp 0x40de
leaq -0x388(%rbp), %rdi
callq 0x56c0
movq %rax, -0x580(%rbp)
jmp 0x40f3
movq -0x580(%rbp), %rax
movq %rax, -0x528(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x56c0
movq %rax, -0x588(%rbp)
jmp 0x4116
movq -0x588(%rbp), %rax
movq %rax, -0x530(%rbp)
leaq -0x488(%rbp), %rdi
callq 0x56c0
movq %rax, -0x590(%rbp)
jmp 0x4139
movq -0x590(%rbp), %rax
movq %rax, -0x538(%rbp)
cmpq $0x1, -0x528(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x519(%rbp)
cmpq $0x1, -0x530(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x51a(%rbp)
cmpq $0x1, -0x538(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x51b(%rbp)
movb -0x519(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x4192
jmp 0x41b1
leaq 0x8fcc(%rip), %rdi      # 0xd165
leaq 0x8f58(%rip), %rsi      # 0xd0f8
movl $0x79, %edx
leaq 0x8f64(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x51a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x41c3
jmp 0x41e2
leaq 0x8faa(%rip), %rdi      # 0xd174
leaq 0x8f27(%rip), %rsi      # 0xd0f8
movl $0x7a, %edx
leaq 0x8f33(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x51b(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x41f4
jmp 0x4213
leaq 0x8f88(%rip), %rdi      # 0xd183
leaq 0x8ef6(%rip), %rsi      # 0xd0f8
movl $0x7b, %edx
leaq 0x8f02(%rip), %rcx      # 0xd110
callq 0x20d0
movss 0x8e95(%rip), %xmm0     # 0xd0b0
movss %xmm0, -0x53c(%rbp)
movss 0x8e89(%rip), %xmm0     # 0xd0b4
ucomiss -0x53c(%rbp), %xmm0
jb 0x476b
movss -0x53c(%rbp), %xmm0
movss 0x8e6c(%rip), %xmm1     # 0xd0b4
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x548(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0xf8(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x598(%rbp)
jmp 0x4276
movsd -0x598(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0x178(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x5a0(%rbp)
jmp 0x42a1
movsd -0x5a0(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0x208(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x5a8(%rbp)
jmp 0x42cc
movsd -0x5a8(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0x288(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x5b0(%rbp)
jmp 0x42f7
movsd -0x5b0(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0x308(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x5b8(%rbp)
jmp 0x4322
movsd -0x5b8(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0x388(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x5c0(%rbp)
jmp 0x434d
movsd -0x5c0(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0x408(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x5c8(%rbp)
jmp 0x4378
movsd -0x5c8(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x548(%rbp), %xmm0
leaq -0x488(%rbp), %rdi
callq 0x56e0
movsd %xmm0, -0x5d0(%rbp)
jmp 0x43a3
movsd -0x5d0(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x548(%rbp), %xmm0
movsd 0x8c60(%rip), %xmm1     # 0xd020
subsd %xmm1, %xmm0
cvtsi2sdl -0x4(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd 0x8c46(%rip), %xmm0     # 0xd020
addsd -0x548(%rbp), %xmm0
cvtsi2sdl -0x4(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x10(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d1(%rbp)
jb 0x441b
movsd -0x58(%rbp), %xmm0
ucomisd -0x10(%rbp), %xmm0
setae %al
movb %al, -0x5d1(%rbp)
movb -0x5d1(%rbp), %al
andb $0x1, %al
movb %al, -0x49(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d2(%rbp)
jb 0x4451
movsd -0x58(%rbp), %xmm0
ucomisd -0x18(%rbp), %xmm0
setae %al
movb %al, -0x5d2(%rbp)
movb -0x5d2(%rbp), %al
andb $0x1, %al
movb %al, -0x4a(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d3(%rbp)
jb 0x4487
movsd -0x58(%rbp), %xmm0
ucomisd -0x20(%rbp), %xmm0
setae %al
movb %al, -0x5d3(%rbp)
movb -0x5d3(%rbp), %al
andb $0x1, %al
movb %al, -0x4b(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d4(%rbp)
jb 0x44bd
movsd -0x58(%rbp), %xmm0
ucomisd -0x28(%rbp), %xmm0
setae %al
movb %al, -0x5d4(%rbp)
movb -0x5d4(%rbp), %al
andb $0x1, %al
movb %al, -0x4c(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d5(%rbp)
jb 0x44f3
movsd -0x58(%rbp), %xmm0
ucomisd -0x30(%rbp), %xmm0
setae %al
movb %al, -0x5d5(%rbp)
movb -0x5d5(%rbp), %al
andb $0x1, %al
movb %al, -0x4d(%rbp)
movsd -0x38(%rbp), %xmm1
movsd 0x8b1d(%rip), %xmm0     # 0xd028
mulsd -0x68(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d6(%rbp)
jb 0x453d
movsd -0x38(%rbp), %xmm0
movsd 0x8b05(%rip), %xmm1     # 0xd030
mulsd -0x68(%rbp), %xmm1
ucomisd %xmm1, %xmm0
setae %al
movb %al, -0x5d6(%rbp)
movb -0x5d6(%rbp), %al
andb $0x1, %al
movb %al, -0x4e(%rbp)
movsd -0x40(%rbp), %xmm1
movsd 0x8ad3(%rip), %xmm0     # 0xd028
mulsd -0x70(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d7(%rbp)
jb 0x4587
movsd -0x40(%rbp), %xmm0
movsd 0x8abb(%rip), %xmm1     # 0xd030
mulsd -0x70(%rbp), %xmm1
ucomisd %xmm1, %xmm0
setae %al
movb %al, -0x5d7(%rbp)
movb -0x5d7(%rbp), %al
andb $0x1, %al
movb %al, -0x4f(%rbp)
movsd -0x48(%rbp), %xmm1
movsd 0x8a89(%rip), %xmm0     # 0xd028
mulsd -0x78(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x5d8(%rbp)
jb 0x45d1
movsd -0x48(%rbp), %xmm0
movsd 0x8a71(%rip), %xmm1     # 0xd030
mulsd -0x78(%rbp), %xmm1
ucomisd %xmm1, %xmm0
setae %al
movb %al, -0x5d8(%rbp)
movb -0x5d8(%rbp), %al
andb $0x1, %al
movb %al, -0x50(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x45eb
jmp 0x460a
leaq 0x8ba0(%rip), %rdi      # 0xd192
leaq 0x8aff(%rip), %rsi      # 0xd0f8
movl $0xa2, %edx
leaq 0x8b0b(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x4a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x4619
jmp 0x4638
leaq 0x8b7e(%rip), %rdi      # 0xd19e
leaq 0x8ad1(%rip), %rsi      # 0xd0f8
movl $0xa3, %edx
leaq 0x8add(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x4b(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x4647
jmp 0x4666
leaq 0x8b5c(%rip), %rdi      # 0xd1aa
leaq 0x8aa3(%rip), %rsi      # 0xd0f8
movl $0xa4, %edx
leaq 0x8aaf(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x4c(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x4675
jmp 0x4694
leaq 0x8b3a(%rip), %rdi      # 0xd1b6
leaq 0x8a75(%rip), %rsi      # 0xd0f8
movl $0xa5, %edx
leaq 0x8a81(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x4d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x46a3
jmp 0x46c2
leaq 0x8b18(%rip), %rdi      # 0xd1c2
leaq 0x8a47(%rip), %rsi      # 0xd0f8
movl $0xa6, %edx
leaq 0x8a53(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x4e(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x46d1
jmp 0x46f0
leaq 0x8af6(%rip), %rdi      # 0xd1ce
leaq 0x8a19(%rip), %rsi      # 0xd0f8
movl $0xa7, %edx
leaq 0x8a25(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x4f(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x46ff
jmp 0x471e
leaq 0x8ad4(%rip), %rdi      # 0xd1da
leaq 0x89eb(%rip), %rsi      # 0xd0f8
movl $0xa8, %edx
leaq 0x89f7(%rip), %rcx      # 0xd110
callq 0x20d0
movb -0x50(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x472d
jmp 0x474c
leaq 0x8ab2(%rip), %rdi      # 0xd1e6
leaq 0x89bd(%rip), %rsi      # 0xd0f8
movl $0xa9, %edx
leaq 0x89c9(%rip), %rcx      # 0xd110
callq 0x20d0
jmp 0x474e
movss 0x895a(%rip), %xmm0     # 0xd0b0
addss -0x53c(%rbp), %xmm0
movss %xmm0, -0x53c(%rbp)
jmp 0x4223
leaq -0x488(%rbp), %rdi
callq 0x5720
leaq -0x408(%rbp), %rdi
callq 0x5720
leaq -0x388(%rbp), %rdi
callq 0x5720
leaq -0x308(%rbp), %rdi
callq 0x5720
leaq -0x288(%rbp), %rdi
callq 0x5720
leaq -0x208(%rbp), %rdi
callq 0x5720
leaq -0x178(%rbp), %rdi
callq 0x5720
leaq -0xf8(%rbp), %rdi
callq 0x5720
addq $0x5e0, %rsp            # imm = 0x5E0
popq %rbp
retq
leaq -0x408(%rbp), %rdi
callq 0x5720
leaq -0x388(%rbp), %rdi
callq 0x5720
leaq -0x308(%rbp), %rdi
callq 0x5720
leaq -0x288(%rbp), %rdi
callq 0x5720
leaq -0x208(%rbp), %rdi
callq 0x5720
leaq -0x178(%rbp), %rdi
callq 0x5720
leaq -0xf8(%rbp), %rdi
callq 0x5720
movq -0x180(%rbp), %rdi
callq 0x2220
nopw %cs:(%rax,%rax)