// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/Test/BasicStats_test.cpp
// Function: test_MAX()
void test_MAX()
{
 BasicStats a; // tests when there is one item in the stream
  a.insert(3);
  assert(a.MAX()==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.MAX()==99);

  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.MAX()==1000000);

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

// 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 0x9f9(%rip), %xmm0      # 0x2008
movq %rbx, %rdi
callq 0x1228
movsd 0x18(%rbx), %xmm0
ucomisd 0x9e4(%rip), %xmm0      # 0x2008
jne 0x17e5
jp 0x17e5
leaq -0xe0(%rbp), %rbx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rbx)
andq $0x0, 0x20(%rbx)
movapd %xmm0, (%rbx)
movsd 0x9bf(%rip), %xmm0      # 0x2010
pushq $0x63
popq %r14
subl $0x1, %r14d
jb 0x167c
movq %rbx, %rdi
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x1228
movsd -0x20(%rbp), %xmm0
addsd 0x996(%rip), %xmm0      # 0x2010
jmp 0x1655
movsd -0xc8(%rbp), %xmm0
ucomisd 0x994(%rip), %xmm0      # 0x2020
jne 0x17fe
jp 0x17fe
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 0x16d3
cvtsi2sd %eax, %xmm0
movq %rbx, %rdi
callq 0x1228
movl %r14d, %eax
jmp 0x16bc
movsd -0x98(%rbp), %xmm0
ucomisd 0x945(%rip), %xmm0      # 0x2028
jne 0x1817
jp 0x1817
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 0x1725
cvtsi2sd %r14d, %xmm0
movq %rbx, %rdi
callq 0x1228
addl $0x3, %r14d
jmp 0x1709
movsd -0x68(%rbp), %xmm0
ucomisd 0x8fe(%rip), %xmm0      # 0x2030
jne 0x1830
jp 0x1830
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 0x1783
callq 0x1030
cltd
idivl %r15d
addl $0xfa, %edx
cvtsi2sd %edx, %xmm0
movq %rbx, %rdi
callq 0x1228
jmp 0x1760
leaq -0x50(%rbp), %rbx
movsd 0x8a9(%rip), %xmm0      # 0x2038
movq %rbx, %rdi
callq 0x1228
movl $0x3e8, %r14d           # imm = 0x3E8
movl $0x3e8, %r15d           # imm = 0x3E8
subl $0x1, %r15d
jb 0x17c6
callq 0x1030
cltd
idivl %r14d
addl $0x226, %edx            # imm = 0x226
cvtsi2sd %edx, %xmm0
movq %rbx, %rdi
callq 0x1228
jmp 0x17a3
movsd -0x38(%rbp), %xmm0
ucomisd 0x865(%rip), %xmm0      # 0x2038
jne 0x1849
jp 0x1849
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8d9(%rip), %rdi       # 0x20c5
leaq 0x880(%rip), %rsi       # 0x2073
leaq 0x8d6(%rip), %rcx       # 0x20d0
pushq $0x2d
jmp 0x1860
leaq 0x8db(%rip), %rdi       # 0x20e0
leaq 0x867(%rip), %rsi       # 0x2073
leaq 0x8bd(%rip), %rcx       # 0x20d0
pushq $0x32
jmp 0x1860
leaq 0x8ce(%rip), %rdi       # 0x20ec
leaq 0x84e(%rip), %rsi       # 0x2073
leaq 0x8a4(%rip), %rcx       # 0x20d0
pushq $0x37
jmp 0x1860
leaq 0x8c6(%rip), %rdi       # 0x20fd
leaq 0x835(%rip), %rsi       # 0x2073
leaq 0x88b(%rip), %rcx       # 0x20d0
pushq $0x3c
jmp 0x1860
leaq 0x8bd(%rip), %rdi       # 0x210d
leaq 0x81c(%rip), %rsi       # 0x2073
leaq 0x872(%rip), %rcx       # 0x20d0
pushq $0x44
popq %rdx
callq 0x1040