// File: /workspace/github_cpp_makefile_star2_O3/ashlall[P]StreamStats/Test/BasicStats_test.cpp
// Function: test_MIN()
void test_MIN()
{
  BasicStats a; // tests when there is one item in the stream
  a.insert(3);
  assert(a.MIN()==3);

  BasicStats b; // tests with 100 items in the stream in ascending order
  for (int i=1;i<100;i++)
    b.insert(i);
  assert(b.MIN()==1);

  BasicStats c; // tests with one million items in the stream in descending order 
  for (int i=1000000;i>=1;i--)
    c.insert(i);
  assert(c.MIN()==1);

  BasicStats d; // tests the stream in ascending order
  for (int i=1;i<=100000;i++)
    d.insert(i*3);
  assert(d.MIN()==3);
  
  BasicStats e;
  for(int i=1;i<=10000;i++)
     e.insert(rand()%1000+250); //tests in a randomly generated stream with 100 as minimum
  e.insert(100);
  for(int i=1;i<=1000;i++)
     e.insert(rand()%1000+550);
  assert(e.MIN()==100);
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorpd %xmm2, %xmm2
movsd 0xc4b(%rip), %xmm0      # 0x2008
movl $0x63, %eax
movapd %xmm0, %xmm1
movapd %xmm1, %xmm3
cmpq $0x63, %rax
je 0x13d8
movapd %xmm1, %xmm3
minsd %xmm2, %xmm3
addsd %xmm0, %xmm1
movapd %xmm3, %xmm2
decq %rax
jne 0x13c6
ucomisd 0xc1b(%rip), %xmm3      # 0x2008
jne 0x152d
jp 0x152d
xorpd %xmm0, %xmm0
movl $0xf4240, %eax          # imm = 0xF4240
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
cmpq $0xf4240, %rax          # imm = 0xF4240
je 0x1415
minsd %xmm0, %xmm1
movapd %xmm1, %xmm0
decq %rax
jne 0x1402
ucomisd 0xbe2(%rip), %xmm1      # 0x2008
jne 0x154c
jp 0x154c
xorpd %xmm0, %xmm0
movq $-0x493e0, %rax         # imm = 0xFFFB6C20
leal 0x493e3(%rax), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
cmpq $-0x493e0, %rax         # imm = 0xFFFB6C20
je 0x1456
minsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x3, %rax
jne 0x143d
ucomisd 0xba8(%rip), %xmm1      # 0x2010
jne 0x156b
jp 0x156b
xorpd %xmm1, %xmm1
movl $0x2710, %ebx           # imm = 0x2710
movsd %xmm1, -0x10(%rbp)
callq 0x1030
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
negl %ecx
addl %ecx, %eax
addl $0xfa, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
cmpq $0x2710, %rbx           # imm = 0x2710
je 0x14c1
minsd -0x10(%rbp), %xmm0
movapd %xmm0, %xmm1
decq %rbx
jne 0x147d
movsd 0xb46(%rip), %xmm1      # 0x2018
minsd %xmm0, %xmm1
movl $0x3e8, %ebx            # imm = 0x3E8
movsd %xmm1, -0x10(%rbp)
callq 0x1030
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
negl %ecx
addl %ecx, %eax
addl $0x226, %eax            # imm = 0x226
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
minsd -0x10(%rbp), %xmm1
decl %ebx
jne 0x14db
ucomisd 0xaf6(%rip), %xmm1      # 0x2018
jne 0x158a
jp 0x158a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xbb0(%rip), %rdi       # 0x20e4
leaq 0xb85(%rip), %rsi       # 0x20c0
leaq 0xb92(%rip), %rcx       # 0x20d4
movl $0x13, %edx
callq 0x1040
leaq 0xb9c(%rip), %rdi       # 0x20ef
leaq 0xb66(%rip), %rsi       # 0x20c0
leaq 0xb73(%rip), %rcx       # 0x20d4
movl $0x18, %edx
callq 0x1040
leaq 0xb88(%rip), %rdi       # 0x20fa
leaq 0xb47(%rip), %rsi       # 0x20c0
leaq 0xb54(%rip), %rcx       # 0x20d4
movl $0x1d, %edx
callq 0x1040
leaq 0xb74(%rip), %rdi       # 0x2105
leaq 0xb28(%rip), %rsi       # 0x20c0
leaq 0xb35(%rip), %rcx       # 0x20d4
movl $0x25, %edx
callq 0x1040