// File: /workspace/github_cpp_makefile_star2_O3/tdv[P]boss/boss/examples/simple_enum/main.cpp
// Function: SetMyBets(Boss::RefObjPtr<Boss::IEnum>, unsigned int)
void SetMyBets(Boss::RefObjPtr<Boss::IEnum> collection, unsigned percent)
{
  Boss::EnumHelper<MyNs::IFaces::IAuction> Collection(collection);
  for (auto i = Collection.First() ; i.Get() ; i = Collection.Next())
  {
    Boss::RefObjQIPtr<MyNs::IFaces::IFixPrice> FixPrice(i);
    if (!FixPrice.Get())
      throw std::runtime_error("Failed to get price object.");
    double Price = 0;
    if (FixPrice->GetPrice(&Price) != Boss::Status::Ok)
      throw std::runtime_error("Failed to get price for \"BestOffer\".");
    if (i->MyBet(Price + (Price * percent) / 100) != Boss::Status::Ok)
      throw std::runtime_error("Failed to set my bet for \"Auction\".");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebp
movq (%rdi), %rdi
movq %rdi, 0x18(%rsp)
testq %rdi, %rdi
je 0x17d2e
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x18ae2
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x17d4d
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x1a4c4
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x18b64
movq 0x8(%rsp), %rbx
testq %rbx, %rbx
je 0x17e3a
movl %ebp, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r12
movq $0x0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x29ab589c, %esi       # imm = 0x29AB589C
movq %r14, %rdx
callq *0x20(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17e57
movq $0x0, 0x20(%rsp)
movq (%rdi), %rax
movq %r15, %rsi
callq *0x28(%rax)
testl %eax, %eax
jne 0x17ea7
movsd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
mulsd 0x28(%rsp), %xmm0
divsd 0xa622d(%rip), %xmm0    # 0xbe020
addsd %xmm1, %xmm0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
testl %eax, %eax
jne 0x17e89
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17e18
movq (%rdi), %rax
callq *0x18(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x18b64
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x8(%rsp), %rbx
testq %rbx, %rbx
jne 0x17d99
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17e4a
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1abd0
movq %rax, %r15
leaq 0xa626b(%rip), %rsi     # 0xbe0d6
movq %rax, %rdi
callq 0x2e110
leaq 0xdda36(%rip), %rsi     # 0xf58b0
leaq 0xc90f(%rip), %rdx      # 0x24790
movq %r15, %rdi
callq 0x1bc20
movl $0x10, %edi
callq 0x1abd0
movq %rax, %r15
leaq 0xa62d2(%rip), %rsi     # 0xbe16f
movq %rax, %rdi
callq 0x2e110
jmp 0x17ec3
movl $0x10, %edi
callq 0x1abd0
movq %rax, %r15
leaq 0xa6237(%rip), %rsi     # 0xbe0f2
movq %rax, %rdi
callq 0x2e110
leaq 0xdd9e6(%rip), %rsi     # 0xf58b0
leaq 0xc8bf(%rip), %rdx      # 0x24790
movq %r15, %rdi
callq 0x1bc20
jmp 0x17f6c
jmp 0x17f6c
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x17f60
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x17f60
jmp 0x17f6c
movq %rax, %r14
jmp 0x17f50
jmp 0x17f05
jmp 0x17f05
jmp 0x17f34
movq %rax, %r14
movq %r15, %rdi
callq 0x1ac30
jmp 0x17f37
jmp 0x17f6c
jmp 0x17f18
jmp 0x17f34
movq %rax, %r14
jmp 0x17f47
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17f47
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x17f47
jmp 0x17f6c
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17f47
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17f60
movq (%rdi), %rax
callq *0x18(%rax)
movq %r14, %rdi
callq 0xbb300
jmp 0x17f6c
jmp 0x17f6c
movq %rax, %rdi
callq 0x18c71