// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/Test/QDigest_test_Double.cpp
// Function: test_reverse()
void test_reverse()
{
	QDigestDouble larry(3000);
	int stream_size =88888;
	double item;
	
	default_random_engine generator;
    normal_distribution<double> distribution(3000,50);
    
    for (int i=0; i<stream_size; i++) 
    {
    	item = distribution(generator);
    	//item = i;
  	    larry.insert(item);
  	}
  	
  	double median;
  	median = larry.getQuantile(0.5);
  	cout << median << endl;
  	
  	double median_index;
  	median_index = larry.reverseQuantile(3000, stream_size);
  	cout << median_index << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
leaq -0xa8(%rbp), %rbx
leaq -0x78(%rbp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
movabsq $0x40a7700000000000, %rdx # imm = 0x40A7700000000000
movq %rdx, 0x28(%rax)
movq %rcx, 0x10(%rax)
xorl %esi, %esi
movq %rsi, 0x8(%rax)
movq %rsi, 0x30(%rax)
movq $0x3b9aca00, 0x18(%rax) # imm = 0x3B9ACA00
movq $-0x3b9aca00, 0x20(%rax) # imm = 0xC4653600
leaq 0x4a93(%rip), %rdi      # 0x8d80
movq %rdi, -0x38(%rax)
movabsq $0x41cdcd6500000000, %rdi # imm = 0x41CDCD6500000000
movq %rdi, 0x38(%rax)
movabsq $0x40c3880000000000, %rdi # imm = 0x40C3880000000000
movq %rdi, 0x40(%rax)
leaq -0x30(%rbp), %r14
movq %rcx, (%r14)
leaq -0xd0(%rbp), %r15
movq %rdx, (%r15)
movabsq $0x4049000000000000, %rax # imm = 0x4049000000000000
movq %rax, 0x8(%r15)
movq %rsi, 0x10(%r15)
movb $0x0, 0x18(%r15)
movl $0x15b38, %r13d         # imm = 0x15B38
leaq -0xb0(%rbp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x59fa
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm2
movapd %xmm2, %xmm3
xorpd 0x1cca(%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 %r12, %rdi
callq 0x256e
decl %r13d
jne 0x4342
leaq -0xb0(%rbp), %rdi
movsd 0x1ca3(%rip), %xmm0     # 0x6068
callq 0x277e
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd -0x40(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm0
subsd %xmm1, %xmm0
movq 0x4bdc(%rip), %rdi      # 0x8fd0
callq 0x21f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movl $0x15b38, %r15d         # imm = 0x15B38
xorl %r12d, %r12d
leaq -0xb0(%rbp), %r14
leal (%r15,%r12), %r13d
shrl %r13d
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
divsd 0x1c4e(%rip), %xmm0     # 0x6098
movq -0xb0(%rbp), %rax
movq %r14, %rdi
callq *0x8(%rax)
movsd 0x1c41(%rip), %xmm1     # 0x60a0
ucomisd %xmm0, %xmm1
ja 0x446a
movl %r13d, %r15d
jmp 0x4470
incl %r13d
movl %r13d, %r12d
cmpl %r15d, %r12d
jl 0x4433
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movq 0x4b4c(%rip), %rdi      # 0x8fd0
callq 0x21f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
leaq 0x4876(%rip), %rax      # 0x8d30
movq %rax, -0xb0(%rbp)
movq %rbx, %rdi
callq 0x46ce
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x44e1
jmp 0x44e1
jmp 0x44e1
movq %rax, %r14
leaq 0x4845(%rip), %rax      # 0x8d30
movq %rax, -0xb0(%rbp)
movq %rbx, %rdi
callq 0x46ce
movq %r14, %rdi
callq 0x2260