// File: /workspace/github_cpp_makefile_star2_O1/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 0x800b(%rip), %rbx      # 0xfff0
leaq 0x32f4(%rip), %rsi      # 0xb2e0
movl $0x36, %edx
movq %rbx, %rdi
callq 0x2200
leaq -0x108(%rbp), %rdi
movl $0x90, %edx
xorl %esi, %esi
callq 0x2100
leaq 0x3304(%rip), %rsi      # 0xb317
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2200
leaq -0x68(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x32fa(%rip), %rsi      # 0xb329
leaq 0x32f6(%rip), %rdx      # 0xb32c
leaq -0x78(%rbp), %rdi
callq 0xa7de
leaq -0x108(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x5, %edx
callq 0x6cc4
movsd %xmm0, -0x18(%rbp)
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x8067
callq 0x21c0
movq 0x7f82(%rip), %rdi      # 0xfff0
movsd -0x18(%rbp), %xmm0
callq 0x2260
leaq 0x34ed(%rip), %rsi      # 0xb56c
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movsd -0x18(%rbp), %xmm0
ucomisd 0x2fa7(%rip), %xmm0     # 0xb040
jne 0x8232
jp 0x8232
movq 0x7f44(%rip), %rdi      # 0xfff0
leaq 0x32a4(%rip), %rsi      # 0xb357
movl $0x13, %edx
callq 0x2200
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x3434(%rip), %rsi      # 0xb500
leaq 0x3431(%rip), %rdx      # 0xb504
leaq -0x58(%rbp), %rdi
callq 0xa7de
leaq -0x108(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0xa, %edx
callq 0x6cc4
movq 0x7ef8(%rip), %rdi      # 0xfff0
callq 0x2260
leaq 0x3468(%rip), %rsi      # 0xb56c
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x811f
callq 0x21c0
movq 0x7eca(%rip), %rdi      # 0xfff0
leaq 0x323e(%rip), %rsi      # 0xb36b
movl $0x15, %edx
callq 0x2200
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x323b(%rip), %rsi      # 0xb381
leaq 0x323a(%rip), %rdx      # 0xb387
leaq -0x38(%rbp), %rdi
callq 0xa7de
leaq -0x108(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x14, %edx
callq 0x6cc4
movsd %xmm0, -0x18(%rbp)
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x817e
callq 0x21c0
movq 0x7e6b(%rip), %rdi      # 0xfff0
movsd -0x18(%rbp), %xmm0
callq 0x2260
leaq 0x33d6(%rip), %rsi      # 0xb56c
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movsd -0x18(%rbp), %xmm0
ucomisd 0x3100(%rip), %xmm0     # 0xb2b0
jne 0x8251
jp 0x8251
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x81cd
callq 0x21c0
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x81de
callq 0x21c0
leaq -0xc8(%rbp), %rbx
movq %rbx, %rdi
callq 0x49e2
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x8207
leaq -0xe8(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xf8(%rbp), %rax
testq %rax, %rax
je 0x8224
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 0x30f4(%rip), %rdi      # 0xb32d
leaq 0x30fc(%rip), %rsi      # 0xb33c
leaq 0x30fd(%rip), %rcx      # 0xb344
movl $0x16, %edx
callq 0x2110
leaq 0x3130(%rip), %rdi      # 0xb388
leaq 0x30dd(%rip), %rsi      # 0xb33c
leaq 0x30de(%rip), %rcx      # 0xb344
movl $0x1e, %edx
callq 0x2110
jmp 0x8272
movq %rax, %rdi
callq 0x4733
movq %rax, %rbx
movq -0x38(%rbp), %rdi
jmp 0x829d
jmp 0x82a9
jmp 0x82a9
movq %rax, %rbx
movq -0x78(%rbp), %rdi
jmp 0x829d
jmp 0x82a9
jmp 0x82a9
jmp 0x82a9
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x82ac
callq 0x21c0
jmp 0x82ac
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x4468
movq %rbx, %rdi
callq 0x22b0