// File: /workspace/github_cpp_makefile_star2_O3/cegme[P]vose/test.cc
// Function: test::test1()
bool test::test1() {
  std::cerr << "\nAdd several marbles, return correct weight and size.\n";
  
  Vose vose;

  std::cerr << "\tAdd m('red',5): ";
  double red_score = vose.add("red", 5);
  std::cerr << red_score << "\n";
  assert(red_score == 1);

  std::cerr << "\tAdd m('blue',10): ";
  std::cerr << vose.add("blue", 10) << "\n";

  std::cerr << "\tAdd m('yellow',20): ";
  double yellow_score = vose.add("yellow", 20);
  std::cerr << yellow_score << "\n";
  assert(yellow_score == 20.0/(5+10+20));

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq 0x846f(%rip), %rbx      # 0xfff0
leaq 0x3758(%rip), %rsi      # 0xb2e0
movl $0x36, %edx
movq %rbx, %rdi
callq 0x2200
leaq -0x108(%rbp), %rdi
movl $0x90, %edx
xorl %esi, %esi
callq 0x2100
leaq 0x3768(%rip), %rsi      # 0xb317
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2200
leaq -0x68(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x375e(%rip), %rsi      # 0xb329
leaq 0x375a(%rip), %rdx      # 0xb32c
leaq -0x78(%rbp), %rdi
callq 0xa378
leaq -0x108(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x5, %edx
callq 0x6874
movsd %xmm0, -0x18(%rbp)
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x7c03
callq 0x21c0
movq 0x83e6(%rip), %rdi      # 0xfff0
movsd -0x18(%rbp), %xmm0
callq 0x2260
leaq 0x3951(%rip), %rsi      # 0xb56c
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movsd -0x18(%rbp), %xmm0
ucomisd 0x340b(%rip), %xmm0     # 0xb040
jne 0x7dce
jp 0x7dce
movq 0x83a8(%rip), %rdi      # 0xfff0
leaq 0x3708(%rip), %rsi      # 0xb357
movl $0x13, %edx
callq 0x2200
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x3898(%rip), %rsi      # 0xb500
leaq 0x3895(%rip), %rdx      # 0xb504
leaq -0x58(%rbp), %rdi
callq 0xa378
leaq -0x108(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0xa, %edx
callq 0x6874
movq 0x835c(%rip), %rdi      # 0xfff0
callq 0x2260
leaq 0x38cc(%rip), %rsi      # 0xb56c
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x7cbb
callq 0x21c0
movq 0x832e(%rip), %rdi      # 0xfff0
leaq 0x36a2(%rip), %rsi      # 0xb36b
movl $0x15, %edx
callq 0x2200
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x369f(%rip), %rsi      # 0xb381
leaq 0x369e(%rip), %rdx      # 0xb387
leaq -0x38(%rbp), %rdi
callq 0xa378
leaq -0x108(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x14, %edx
callq 0x6874
movsd %xmm0, -0x18(%rbp)
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x7d1a
callq 0x21c0
movq 0x82cf(%rip), %rdi      # 0xfff0
movsd -0x18(%rbp), %xmm0
callq 0x2260
leaq 0x383a(%rip), %rsi      # 0xb56c
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movsd -0x18(%rbp), %xmm0
ucomisd 0x3564(%rip), %xmm0     # 0xb2b0
jne 0x7ded
jp 0x7ded
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x7d69
callq 0x21c0
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x7d7a
callq 0x21c0
leaq -0xc8(%rbp), %rbx
movq %rbx, %rdi
callq 0x46c4
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x7da3
leaq -0xe8(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xf8(%rbp), %rax
testq %rax, %rax
je 0x7dc0
leaq -0x108(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3558(%rip), %rdi      # 0xb32d
leaq 0x3560(%rip), %rsi      # 0xb33c
leaq 0x3561(%rip), %rcx      # 0xb344
movl $0x16, %edx
callq 0x2110
leaq 0x3594(%rip), %rdi      # 0xb388
leaq 0x3541(%rip), %rsi      # 0xb33c
leaq 0x3542(%rip), %rcx      # 0xb344
movl $0x1e, %edx
callq 0x2110
jmp 0x7e0e
movq %rax, %rdi
callq 0x4411
movq %rax, %rbx
movq -0x38(%rbp), %rdi
jmp 0x7e39
jmp 0x7e45
jmp 0x7e45
movq %rax, %rbx
movq -0x78(%rbp), %rdi
jmp 0x7e39
jmp 0x7e45
jmp 0x7e45
jmp 0x7e45
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x7e48
callq 0x21c0
jmp 0x7e48
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x405e
movq %rbx, %rdi
callq 0x22b0