// File: /workspace/github_cpp_makefile_star2_O1/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 0xc55(%rip), %xmm0      # 0x2008
movl $0x63, %eax
movapd %xmm0, %xmm1
movapd %xmm1, %xmm3
cmpq $0x63, %rax
je 0x13ce
movapd %xmm1, %xmm3
minsd %xmm2, %xmm3
addsd %xmm0, %xmm1
movapd %xmm3, %xmm2
decq %rax
jne 0x13bc
ucomisd 0xc25(%rip), %xmm3      # 0x2008
jne 0x1523
jp 0x1523
xorpd %xmm0, %xmm0
movl $0xf4240, %eax          # imm = 0xF4240
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
cmpq $0xf4240, %rax          # imm = 0xF4240
je 0x140b
minsd %xmm0, %xmm1
movapd %xmm1, %xmm0
decq %rax
jne 0x13f8
ucomisd 0xbec(%rip), %xmm1      # 0x2008
jne 0x1542
jp 0x1542
xorpd %xmm0, %xmm0
movq $-0x493e0, %rax         # imm = 0xFFFB6C20
leal 0x493e3(%rax), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
cmpq $-0x493e0, %rax         # imm = 0xFFFB6C20
je 0x144c
minsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x3, %rax
jne 0x1433
ucomisd 0xbb2(%rip), %xmm1      # 0x2010
jne 0x1561
jp 0x1561
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 0x14b7
minsd -0x10(%rbp), %xmm0
movapd %xmm0, %xmm1
decq %rbx
jne 0x1473
movsd 0xb50(%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 0x14d1
ucomisd 0xb00(%rip), %xmm1      # 0x2018
jne 0x1580
jp 0x1580
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xbba(%rip), %rdi       # 0x20e4
leaq 0xb8f(%rip), %rsi       # 0x20c0
leaq 0xb9c(%rip), %rcx       # 0x20d4
movl $0x13, %edx
callq 0x1040
leaq 0xba6(%rip), %rdi       # 0x20ef
leaq 0xb70(%rip), %rsi       # 0x20c0
leaq 0xb7d(%rip), %rcx       # 0x20d4
movl $0x18, %edx
callq 0x1040
leaq 0xb92(%rip), %rdi       # 0x20fa
leaq 0xb51(%rip), %rsi       # 0x20c0
leaq 0xb5e(%rip), %rcx       # 0x20d4
movl $0x1d, %edx
callq 0x1040
leaq 0xb7e(%rip), %rdi       # 0x2105
leaq 0xb32(%rip), %rsi       # 0x20c0
leaq 0xb3f(%rip), %rcx       # 0x20d4
movl $0x25, %edx
callq 0x1040