// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp            # imm = 0x518
callq 0x2060
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
cvtsi2sd %ecx, %xmm0
addsd 0x2d7e(%rip), %xmm0     # 0x6048
movapd %xmm0, -0x70(%rbp)
callq 0x2060
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
addsd 0x2d45(%rip), %xmm0     # 0x6048
movapd %xmm0, -0x60(%rbp)
callq 0x2060
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
cvtsi2sd %ecx, %xmm1
leaq -0x210(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movl $0x1, %eax
movq %rax, -0x28(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rbx)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rbx)
movupd %xmm0, -0x8(%rbx)
movabsq $0x40b3880000000000, %rsi # imm = 0x40B3880000000000
movq %rsi, 0x28(%rbx)
movq %rax, 0x10(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
movl $0x3b9aca00, %edi       # imm = 0x3B9ACA00
movq %rdi, 0x18(%rbx)
movq $-0x3b9aca00, %r8       # imm = 0xC4653600
movq %r8, 0x20(%rbx)
leaq 0x59ee(%rip), %r9       # 0x8d80
movq %r9, -0x38(%rbx)
movabsq $0x41cdcd6500000000, %r10 # imm = 0x41CDCD6500000000
movq %r10, 0x38(%rbx)
movabsq $0x40c3880000000000, %r11 # imm = 0x40C3880000000000
movq %r11, 0x40(%rbx)
leaq -0x190(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movq %rax, -0x28(%rbx)
movupd %xmm0, -0x20(%rbx)
movl %edx, -0x10(%rbx)
movupd %xmm0, -0x8(%rbx)
movq %rsi, 0x28(%rbx)
movq %rax, 0x10(%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
movq %rdi, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, -0x38(%rbx)
movq %r10, 0x38(%rbx)
movq %r11, 0x40(%rbx)
leaq -0x110(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movq %rax, -0x28(%rbx)
movupd %xmm0, -0x20(%rbx)
movl %edx, -0x10(%rbx)
movupd %xmm0, -0x8(%rbx)
movq %rsi, 0x28(%rbx)
movq %rax, 0x10(%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
movq %rdi, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, -0x38(%rbx)
movq %r10, 0x38(%rbx)
movq %r11, 0x40(%rbx)
leaq -0x388(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movq %rax, -0x28(%rbx)
movupd %xmm0, -0x20(%rbx)
movl %edx, -0x10(%rbx)
movupd %xmm0, -0x8(%rbx)
movq %rsi, 0x28(%rbx)
movq %rax, 0x10(%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
movq %rdi, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, -0x38(%rbx)
movq %r10, 0x38(%rbx)
movq %r11, 0x40(%rbx)
leaq -0x308(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movq %rax, -0x28(%rbx)
movupd %xmm0, -0x20(%rbx)
movl %edx, -0x10(%rbx)
movupd %xmm0, -0x8(%rbx)
movq %rsi, 0x28(%rbx)
movq %rax, 0x10(%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
movq %rdi, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, -0x38(%rbx)
movq %r10, 0x38(%rbx)
movq %r11, 0x40(%rbx)
leaq -0x508(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movq %rax, -0x28(%rbx)
movupd %xmm0, -0x20(%rbx)
movl %edx, -0x10(%rbx)
movupd %xmm0, -0x8(%rbx)
movq %rsi, 0x28(%rbx)
movq %rax, 0x10(%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
movq %rdi, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, -0x38(%rbx)
movq %r10, 0x38(%rbx)
movq %r11, 0x40(%rbx)
leaq -0x488(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movq %rax, -0x28(%rbx)
movupd %xmm0, -0x20(%rbx)
movl %edx, -0x10(%rbx)
movupd %xmm0, -0x8(%rbx)
movq %rsi, 0x28(%rbx)
movq %rax, 0x10(%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
movq %rdi, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, -0x38(%rbx)
movq %r10, 0x38(%rbx)
movq %r11, 0x40(%rbx)
leaq -0x408(%rbp), %rbx
movq %rbx, -0x30(%rbx)
movq %rax, -0x28(%rbx)
movupd %xmm0, -0x20(%rbx)
movl %edx, -0x10(%rbx)
addsd 0x2af7(%rip), %xmm1     # 0x6048
movapd %xmm1, -0x50(%rbp)
movupd %xmm0, -0x8(%rbx)
movq %rsi, 0x28(%rbx)
leaq -0x240(%rbp), %r15
movq %rax, 0x10(%rbx)
leaq -0x1c0(%rbp), %r12
movq %rcx, 0x8(%rbx)
movq %rcx, 0x30(%rbx)
leaq -0x140(%rbp), %r13
movq %rdi, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, -0x38(%rbx)
movq %r10, 0x38(%rbx)
movq %r11, 0x40(%rbx)
xorpd %xmm5, %xmm5
leaq -0x248(%rbp), %rbx
movsd -0x1d8(%rbp), %xmm0
movsd -0x1d0(%rbp), %xmm1
movapd %xmm1, %xmm2
xorpd 0x2a75(%rip), %xmm2     # 0x6030
movapd %xmm5, %xmm3
cmpltsd %xmm2, %xmm3
movapd %xmm5, -0x40(%rbp)
andnpd %xmm5, %xmm3
movapd %xmm1, %xmm2
cmpltsd %xmm3, %xmm2
movapd %xmm2, %xmm4
andnpd %xmm3, %xmm4
andpd %xmm0, %xmm2
orpd %xmm4, %xmm2
addsd %xmm1, %xmm2
addsd %xmm1, %xmm1
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rbx, %rdi
callq 0x256e
movapd -0x40(%rbp), %xmm5
addsd 0x2a38(%rip), %xmm5     # 0x6050
movsd 0x2a38(%rip), %xmm4     # 0x6058
ucomisd %xmm5, %xmm4
jae 0x359f
cmpq $0x1f4, -0x1e0(%rbp) # imm = 0x1F4
jne 0x411c
leaq -0x1c8(%rbp), %rbx
movapd %xmm4, -0x40(%rbp)
movsd -0x158(%rbp), %xmm0
movsd -0x150(%rbp), %xmm1
movapd %xmm1, %xmm2
xorpd 0x29cd(%rip), %xmm2     # 0x6030
movapd %xmm4, %xmm3
cmpltsd %xmm2, %xmm3
andnpd %xmm4, %xmm3
movapd %xmm1, %xmm2
cmpltsd %xmm3, %xmm2
movapd %xmm2, %xmm4
andnpd %xmm3, %xmm4
andpd %xmm0, %xmm2
orpd %xmm4, %xmm2
addsd %xmm1, %xmm2
addsd %xmm1, %xmm1
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rbx, %rdi
callq 0x256e
movapd -0x40(%rbp), %xmm0
addsd 0x29a5(%rip), %xmm0     # 0x6060
ucomisd 0x29cd(%rip), %xmm0     # 0x6090
movapd %xmm0, %xmm4
jae 0x3642
cmpq $0x1f4, -0x160(%rbp) # imm = 0x1F4
jne 0x413b
movl $0x1, %r13d
leaq -0x148(%rbp), %rbx
leaq -0x3c0(%rbp), %r14
leaq -0x340(%rbp), %r15
cmpl $0x1, %r13d
je 0x37d1
cmpl $0x2, %r13d
jne 0x3892
xorl %r12d, %r12d
movl %r12d, %edi
xorl $0x2, %edi
callq 0x2170
callq 0x2060
cltq
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x24, %rcx
addl %edx, %ecx
imull $0x32, %ecx, %ecx
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd 0x291e(%rip), %xmm0     # 0x6068
movsd -0x350(%rbp), %xmm1
movsd -0x348(%rbp), %xmm2
movapd %xmm2, %xmm3
xorpd 0x28ca(%rip), %xmm3     # 0x6030
movapd %xmm0, %xmm4
cmpltsd %xmm3, %xmm4
andnpd %xmm0, %xmm4
movapd %xmm2, %xmm0
cmpltsd %xmm4, %xmm0
movapd %xmm0, %xmm3
andnpd %xmm4, %xmm3
andpd %xmm1, %xmm0
orpd %xmm3, %xmm0
addsd %xmm2, %xmm0
addsd %xmm2, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %r14, %rdi
callq 0x256e
incl %r12d
cmpl $0x33, %r12d
jne 0x3710
cmpq $0x33, -0x358(%rbp)
je 0x394e
jmp 0x40de
xorl %r12d, %r12d
movl %r12d, %edi
callq 0x2170
callq 0x2060
cltq
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x24, %rcx
addl %edx, %ecx
imull $0x32, %ecx, %ecx
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd 0x285d(%rip), %xmm0     # 0x6068
movsd -0xd8(%rbp), %xmm1
movsd -0xd0(%rbp), %xmm2
movapd %xmm2, %xmm3
xorpd 0x2809(%rip), %xmm3     # 0x6030
movapd %xmm0, %xmm4
cmpltsd %xmm3, %xmm4
andnpd %xmm0, %xmm4
movapd %xmm2, %xmm0
cmpltsd %xmm4, %xmm0
movapd %xmm0, %xmm3
andnpd %xmm4, %xmm3
andpd %xmm1, %xmm0
orpd %xmm3, %xmm0
addsd %xmm2, %xmm0
addsd %xmm2, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rbx, %rdi
callq 0x256e
incl %r12d
cmpl $0x33, %r12d
jne 0x37d4
cmpq $0x33, -0xe0(%rbp)
je 0x394e
jmp 0x40fd
movl $0x32, %r12d
movl %r12d, %edi
callq 0x2170
callq 0x2060
cltq
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x24, %rcx
addl %edx, %ecx
imull $0x32, %ecx, %ecx
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd 0x2799(%rip), %xmm0     # 0x6068
movsd -0x2d0(%rbp), %xmm1
movsd -0x2c8(%rbp), %xmm2
movapd %xmm2, %xmm3
xorpd 0x2745(%rip), %xmm3     # 0x6030
movapd %xmm0, %xmm4
cmpltsd %xmm3, %xmm4
andnpd %xmm0, %xmm4
movapd %xmm2, %xmm0
cmpltsd %xmm4, %xmm0
movapd %xmm0, %xmm3
andnpd %xmm4, %xmm3
andpd %xmm1, %xmm0
orpd %xmm3, %xmm0
addsd %xmm2, %xmm0
addsd %xmm2, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %r15, %rdi
callq 0x256e
addl $-0x1, %r12d
jb 0x3898
cmpq $0x33, -0x2d8(%rbp)
jne 0x40bf
incl %r13d
cmpl $0x4, %r13d
jne 0x36f9
leaq -0x540(%rbp), %rdi
movsd 0x70(%rdi), %xmm0
movsd 0x78(%rdi), %xmm1
movapd 0x26bc(%rip), %xmm2     # 0x6030
xorpd %xmm1, %xmm2
movapd -0x70(%rbp), %xmm4
movapd %xmm4, %xmm3
cmpltsd %xmm2, %xmm3
andnpd %xmm4, %xmm3
movapd %xmm1, %xmm2
cmpltsd %xmm3, %xmm2
movapd %xmm2, %xmm4
andnpd %xmm3, %xmm4
andpd %xmm0, %xmm2
orpd %xmm4, %xmm2
addsd %xmm1, %xmm2
addsd %xmm1, %xmm1
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x256e
leaq -0x4c0(%rbp), %rdi
movsd 0x70(%rdi), %xmm0
movsd 0x78(%rdi), %xmm1
movapd 0x2652(%rip), %xmm2     # 0x6030
xorpd %xmm1, %xmm2
movapd -0x60(%rbp), %xmm4
movapd %xmm4, %xmm3
cmpltsd %xmm2, %xmm3
andnpd %xmm4, %xmm3
movapd %xmm1, %xmm2
cmpltsd %xmm3, %xmm2
movapd %xmm2, %xmm4
andnpd %xmm3, %xmm4
andpd %xmm0, %xmm2
orpd %xmm4, %xmm2
addsd %xmm1, %xmm2
addsd %xmm1, %xmm1
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x256e
leaq -0x440(%rbp), %rdi
movsd 0x70(%rdi), %xmm0
movsd 0x78(%rdi), %xmm1
movapd 0x25e8(%rip), %xmm2     # 0x6030
xorpd %xmm1, %xmm2
movapd -0x50(%rbp), %xmm4
movapd %xmm4, %xmm3
cmpltsd %xmm2, %xmm3
andnpd %xmm4, %xmm3
movapd %xmm1, %xmm2
cmpltsd %xmm3, %xmm2
movapd %xmm2, %xmm4
andnpd %xmm3, %xmm4
andpd %xmm0, %xmm2
orpd %xmm4, %xmm2
addsd %xmm1, %xmm2
addsd %xmm1, %xmm1
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x256e
cmpq $0x1, -0x4d8(%rbp)
jne 0x415a
cmpq $0x1, -0x458(%rbp)
jne 0x4179
cmpq $0x1, -0x3d8(%rbp)
jne 0x4198
movsd 0x25a5(%rip), %xmm2     # 0x6070
movapd -0x70(%rbp), %xmm1
movapd %xmm1, %xmm0
mulsd %xmm2, %xmm0
movapd %xmm0, -0x280(%rbp)
movsd 0x2590(%rip), %xmm0     # 0x6078
mulsd %xmm0, %xmm1
movapd %xmm1, -0x70(%rbp)
movapd -0x60(%rbp), %xmm1
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
movapd %xmm3, -0x270(%rbp)
mulsd %xmm0, %xmm1
movapd %xmm1, -0x60(%rbp)
movapd -0x50(%rbp), %xmm1
mulsd %xmm1, %xmm2
movapd %xmm2, -0x260(%rbp)
mulsd %xmm0, %xmm1
movapd %xmm1, -0x50(%rbp)
movl $0x1, %r14d
leaq -0x340(%rbp), %r15
leaq -0x540(%rbp), %r12
leaq -0x4c0(%rbp), %r13
leaq -0x440(%rbp), %rbx
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
divss 0x256d(%rip), %xmm0     # 0x60c8
cvtss2sd %xmm0, %xmm0
leaq -0x248(%rbp), %rdi
movaps %xmm0, -0x40(%rbp)
callq 0x277e
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd -0x1d8(%rbp), %xmm0
movsd %xmm0, -0xc8(%rbp)
movsd -0x1d0(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
leaq -0x1c8(%rbp), %rdi
movapd -0x40(%rbp), %xmm0
callq 0x277e
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd -0x158(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
movsd -0x150(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
leaq -0x148(%rbp), %rdi
movapd -0x40(%rbp), %xmm0
callq 0x277e
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd -0xd8(%rbp), %xmm0
movapd %xmm0, -0x2c0(%rbp)
movsd -0xd0(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
leaq -0x3c0(%rbp), %rdi
movapd -0x40(%rbp), %xmm0
callq 0x277e
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd -0x350(%rbp), %xmm0
movapd %xmm0, -0x2b0(%rbp)
movsd -0x348(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movq %r15, %rdi
movapd -0x40(%rbp), %xmm0
callq 0x277e
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd -0x2d0(%rbp), %xmm0
movapd %xmm0, -0x2a0(%rbp)
movsd -0x2c8(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movq %r12, %rdi
movapd -0x40(%rbp), %xmm0
callq 0x277e
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd -0x4d0(%rbp), %xmm0
movapd %xmm0, -0x290(%rbp)
movsd -0x4c8(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movq %r13, %rdi
movaps -0x40(%rbp), %xmm0
callq 0x277e
movsd %xmm0, -0x88(%rbp)
movsd -0x450(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x448(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movq %rbx, %rdi
movaps -0x40(%rbp), %xmm0
callq 0x277e
movsd -0xc8(%rbp), %xmm4
addsd %xmm4, %xmm4
movsd -0xc0(%rbp), %xmm1
mulsd %xmm1, %xmm4
subsd %xmm1, %xmm4
movapd -0x40(%rbp), %xmm3
movapd %xmm3, %xmm1
addsd 0x234f(%rip), %xmm1     # 0x6080
movsd 0x231f(%rip), %xmm2     # 0x6058
mulsd %xmm2, %xmm1
addsd 0x2343(%rip), %xmm3     # 0x6088
ucomisd %xmm1, %xmm4
jb 0x40a0
mulsd %xmm2, %xmm3
ucomisd %xmm4, %xmm3
jb 0x40a0
movsd -0xb8(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd -0xb0(%rbp), %xmm4
mulsd %xmm4, %xmm2
subsd %xmm4, %xmm2
ucomisd %xmm1, %xmm2
jb 0x4081
ucomisd %xmm2, %xmm3
jb 0x4081
movapd -0x2c0(%rbp), %xmm4
addsd %xmm4, %xmm4
movsd -0xa8(%rbp), %xmm2
mulsd %xmm2, %xmm4
subsd %xmm2, %xmm4
movapd %xmm1, %xmm2
cmplepd %xmm4, %xmm2
cmplepd %xmm3, %xmm4
andpd %xmm2, %xmm4
movd %xmm4, %eax
testb $0x1, %al
je 0x4062
movapd -0x2b0(%rbp), %xmm4
addsd %xmm4, %xmm4
movsd -0xa0(%rbp), %xmm2
mulsd %xmm2, %xmm4
subsd %xmm2, %xmm4
movapd %xmm1, %xmm2
cmplepd %xmm4, %xmm2
cmplepd %xmm3, %xmm4
andpd %xmm2, %xmm4
movd %xmm4, %eax
testb $0x1, %al
je 0x4043
movapd -0x2a0(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd -0x98(%rbp), %xmm4
mulsd %xmm4, %xmm2
subsd %xmm4, %xmm2
cmplepd %xmm2, %xmm1
cmplepd %xmm3, %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %eax
testb $0x1, %al
je 0x4024
movapd -0x290(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd -0x90(%rbp), %xmm1
mulsd %xmm1, %xmm2
subsd %xmm1, %xmm2
movapd -0x70(%rbp), %xmm1
cmplepd %xmm2, %xmm1
cmplepd -0x280(%rbp), %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %eax
testb $0x1, %al
je 0x4005
cvttsd2si -0x88(%rbp), %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd -0x78(%rbp), %xmm1
addsd %xmm1, %xmm1
movsd -0x80(%rbp), %xmm2
mulsd %xmm2, %xmm1
subsd %xmm2, %xmm1
movapd -0x60(%rbp), %xmm2
cmplepd %xmm1, %xmm2
cmplepd -0x270(%rbp), %xmm1
andpd %xmm2, %xmm1
movd %xmm1, %eax
testb $0x1, %al
je 0x3fe6
cvttsd2si %xmm0, %rax
cvtsi2sd %rax, %xmm0
divsd -0x3d0(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd -0x3c8(%rbp), %xmm1
mulsd %xmm1, %xmm0
subsd %xmm1, %xmm0
movapd -0x50(%rbp), %xmm1
cmplepd %xmm0, %xmm1
cmplepd -0x260(%rbp), %xmm0
andpd %xmm1, %xmm0
movd %xmm0, %eax
testb $0x1, %al
je 0x3fc7
incl %r14d
cmpl $0x65, %r14d
jne 0x3b4b
leaq 0x4e13(%rip), %rbx      # 0x8d30
movq %rbx, -0x440(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x46ce
movq %rbx, -0x4c0(%rbp)
leaq -0x4b8(%rbp), %rdi
callq 0x46ce
movq %rbx, -0x540(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x46ce
movq %rbx, -0x340(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x46ce
movq %rbx, -0x3c0(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x46ce
movq %rbx, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x46ce
movq %rbx, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x46ce
movq %rbx, -0x248(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x46ce
addq $0x518, %rsp            # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x222c(%rip), %rdi      # 0x61fa
leaq 0x2137(%rip), %rsi      # 0x610c
leaq 0x2148(%rip), %rcx      # 0x6124
movl $0xa9, %edx
callq 0x20f0
leaq 0x2201(%rip), %rdi      # 0x61ee
leaq 0x2118(%rip), %rsi      # 0x610c
leaq 0x2129(%rip), %rcx      # 0x6124
movl $0xa8, %edx
callq 0x20f0
leaq 0x21d6(%rip), %rdi      # 0x61e2
leaq 0x20f9(%rip), %rsi      # 0x610c
leaq 0x210a(%rip), %rcx      # 0x6124
movl $0xa7, %edx
callq 0x20f0
leaq 0x21ab(%rip), %rdi      # 0x61d6
leaq 0x20da(%rip), %rsi      # 0x610c
leaq 0x20eb(%rip), %rcx      # 0x6124
movl $0xa6, %edx
callq 0x20f0
leaq 0x2180(%rip), %rdi      # 0x61ca
leaq 0x20bb(%rip), %rsi      # 0x610c
leaq 0x20cc(%rip), %rcx      # 0x6124
movl $0xa5, %edx
callq 0x20f0
leaq 0x2155(%rip), %rdi      # 0x61be
leaq 0x209c(%rip), %rsi      # 0x610c
leaq 0x20ad(%rip), %rcx      # 0x6124
movl $0xa4, %edx
callq 0x20f0
leaq 0x212a(%rip), %rdi      # 0x61b2
leaq 0x207d(%rip), %rsi      # 0x610c
leaq 0x208e(%rip), %rcx      # 0x6124
movl $0xa3, %edx
callq 0x20f0
leaq 0x20ff(%rip), %rdi      # 0x61a6
leaq 0x205e(%rip), %rsi      # 0x610c
leaq 0x206f(%rip), %rcx      # 0x6124
movl $0xa2, %edx
callq 0x20f0
leaq 0x20a4(%rip), %rdi      # 0x616a
leaq 0x203f(%rip), %rsi      # 0x610c
leaq 0x2050(%rip), %rcx      # 0x6124
movl $0x69, %edx
callq 0x20f0
leaq 0x2076(%rip), %rdi      # 0x615b
leaq 0x2020(%rip), %rsi      # 0x610c
leaq 0x2031(%rip), %rcx      # 0x6124
movl $0x58, %edx
callq 0x20f0
leaq 0x2048(%rip), %rdi      # 0x614c
leaq 0x2001(%rip), %rsi      # 0x610c
leaq 0x2012(%rip), %rcx      # 0x6124
movl $0x47, %edx
callq 0x20f0
leaq 0x1fda(%rip), %rdi      # 0x60fd
leaq 0x1fe2(%rip), %rsi      # 0x610c
leaq 0x1ff3(%rip), %rcx      # 0x6124
movl $0x2a, %edx
callq 0x20f0
leaq 0x1ffb(%rip), %rdi      # 0x613d
leaq 0x1fc3(%rip), %rsi      # 0x610c
leaq 0x1fd4(%rip), %rcx      # 0x6124
movl $0x34, %edx
callq 0x20f0
leaq 0x2018(%rip), %rdi      # 0x6179
leaq 0x1fa4(%rip), %rsi      # 0x610c
leaq 0x1fb5(%rip), %rcx      # 0x6124
movl $0x79, %edx
callq 0x20f0
leaq 0x2008(%rip), %rdi      # 0x6188
leaq 0x1f85(%rip), %rsi      # 0x610c
leaq 0x1f96(%rip), %rcx      # 0x6124
movl $0x7a, %edx
callq 0x20f0
leaq 0x1ff8(%rip), %rdi      # 0x6197
leaq 0x1f66(%rip), %rsi      # 0x610c
leaq 0x1f77(%rip), %rcx      # 0x6124
movl $0x7b, %edx
callq 0x20f0
jmp 0x41c6
jmp 0x41bb
movq %rax, %rbx
jmp 0x41de
jmp 0x41c6
jmp 0x41c6
jmp 0x41c6
movq %rax, %rbx
leaq -0x240(%rbp), %r15
leaq -0x1c0(%rbp), %r12
leaq -0x140(%rbp), %r13
leaq 0x4b4b(%rip), %r14      # 0x8d30
movq %r14, -0x440(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x46ce
movq %r14, -0x4c0(%rbp)
leaq -0x4b8(%rbp), %rdi
callq 0x46ce
movq %r14, -0x540(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x46ce
movq %r14, -0x340(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x46ce
movq %r14, -0x3c0(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x46ce
movq %r14, -0x148(%rbp)
movq %r13, %rdi
callq 0x46ce
movq %r14, -0x1c8(%rbp)
movq %r12, %rdi
callq 0x46ce
movq %r14, -0x248(%rbp)
movq %r15, %rdi
callq 0x46ce
movq %rbx, %rdi
callq 0x2260