// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
xorps %xmm0, %xmm0
leaq -0x110(%rbp), %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
andq $0x0, 0x20(%rbx)
movsd 0xc7e(%rip), %xmm0      # 0x2008
movq %rbx, %rdi
callq 0x1228
movsd 0x10(%rbx), %xmm0
ucomisd 0xc69(%rip), %xmm0      # 0x2008
jne 0x1560
jp 0x1560
leaq -0xe0(%rbp), %rbx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rbx)
andq $0x0, 0x20(%rbx)
movapd %xmm0, (%rbx)
movsd 0xc44(%rip), %xmm0      # 0x2010
pushq $0x63
popq %r14
subl $0x1, %r14d
jb 0x13f7
movq %rbx, %rdi
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x1228
movsd -0x20(%rbp), %xmm0
addsd 0xc1b(%rip), %xmm0      # 0x2010
jmp 0x13d0
movsd -0xd0(%rbp), %xmm0
ucomisd 0xc09(%rip), %xmm0      # 0x2010
jne 0x1579
jp 0x1579
xorpd %xmm0, %xmm0
leaq -0xb0(%rbp), %rbx
andq $0x0, 0x20(%rbx)
movapd %xmm0, 0x10(%rbx)
movapd %xmm0, (%rbx)
movl $0xf4240, %eax          # imm = 0xF4240
movl $0xf4240, %r14d         # imm = 0xF4240
subl $0x1, %r14d
jb 0x144e
cvtsi2sd %eax, %xmm0
movq %rbx, %rdi
callq 0x1228
movl %r14d, %eax
jmp 0x1437
movsd -0xa0(%rbp), %xmm0
ucomisd 0xbb2(%rip), %xmm0      # 0x2010
jne 0x1592
jp 0x1592
xorpd %xmm0, %xmm0
leaq -0x80(%rbp), %rbx
movapd %xmm0, 0x10(%rbx)
movapd %xmm0, (%rbx)
andq $0x0, 0x20(%rbx)
pushq $0x3
popq %r14
cmpl $0x493e3, %r14d         # imm = 0x493E3
je 0x14a0
cvtsi2sd %r14d, %xmm0
movq %rbx, %rdi
callq 0x1228
addl $0x3, %r14d
jmp 0x1484
movsd -0x70(%rbp), %xmm0
ucomisd 0xb5b(%rip), %xmm0      # 0x2008
jne 0x15ab
jp 0x15ab
xorpd %xmm0, %xmm0
leaq -0x50(%rbp), %rbx
andq $0x0, 0x20(%rbx)
movapd %xmm0, 0x10(%rbx)
movapd %xmm0, (%rbx)
movl $0x2710, %r14d          # imm = 0x2710
movl $0x3e8, %r15d           # imm = 0x3E8
subl $0x1, %r14d
jb 0x14fe
callq 0x1030
cltd
idivl %r15d
addl $0xfa, %edx
cvtsi2sd %edx, %xmm0
movq %rbx, %rdi
callq 0x1228
jmp 0x14db
leaq -0x50(%rbp), %rbx
movsd 0xb0e(%rip), %xmm0      # 0x2018
movq %rbx, %rdi
callq 0x1228
movl $0x3e8, %r14d           # imm = 0x3E8
movl $0x3e8, %r15d           # imm = 0x3E8
subl $0x1, %r15d
jb 0x1541
callq 0x1030
cltd
idivl %r14d
addl $0x226, %edx            # imm = 0x226
cvtsi2sd %edx, %xmm0
movq %rbx, %rdi
callq 0x1228
jmp 0x151e
movsd -0x40(%rbp), %xmm0
ucomisd 0xaca(%rip), %xmm0      # 0x2018
jne 0x15c4
jp 0x15c4
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb01(%rip), %rdi       # 0x2068
leaq 0xb05(%rip), %rsi       # 0x2073
leaq 0xb12(%rip), %rcx       # 0x2087
pushq $0xe
jmp 0x15db
leaq 0xb17(%rip), %rdi       # 0x2097
leaq 0xaec(%rip), %rsi       # 0x2073
leaq 0xaf9(%rip), %rcx       # 0x2087
pushq $0x13
jmp 0x15db
leaq 0xb09(%rip), %rdi       # 0x20a2
leaq 0xad3(%rip), %rsi       # 0x2073
leaq 0xae0(%rip), %rcx       # 0x2087
pushq $0x18
jmp 0x15db
leaq 0xafb(%rip), %rdi       # 0x20ad
leaq 0xaba(%rip), %rsi       # 0x2073
leaq 0xac7(%rip), %rcx       # 0x2087
pushq $0x1d
jmp 0x15db
leaq 0xaed(%rip), %rdi       # 0x20b8
leaq 0xaa1(%rip), %rsi       # 0x2073
leaq 0xaae(%rip), %rcx       # 0x2087
pushq $0x25
popq %rdx
callq 0x1040