// File: /workspace/github_cpp_makefile_star2_O3/tdv[P]boss/boss/examples/objects_as_params/main.cpp
// Function: main
int main()
{
  try
  {
    Boss::RefObjPtr<MyNs::IFaces::ISimpleObject> Obj = Boss::Base<MyNs::Impl::SimpleObject>::Create();
    if (Obj->SetObject(Boss::Base<MyNs::Impl::InputObject>::Create().Get()) != Boss::Status::Ok)
    {
      std::cerr << "failed to set object." << std::endl;
      return -1;
    }
    Boss::RefObjPtr<MyNs::IFaces::IInputObject> In;
    if (Obj->GetObject(In.GetPPtr()) != Boss::Status::Ok)
    {
      std::cerr << "failed to get object." << std::endl;
      return -1;
    }
    In->Method();
    Boss::RefObjPtr<MyNs::IFaces::IOutputObject> Out;
    if (Obj->CreateNewObject(Out.GetPPtr()) != Boss::Status::Ok)
    {
      std::cerr << "failed to create new object." << std::endl;
      return -1;
    }
    Out->Method();
  }
  catch (std::exception const &e)
  {
    std::cerr << "Error: " << e.what() << std::endl;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rsp), %rdi
callq 0x17340
leaq 0x8(%rsp), %rdi
movq (%rdi), %r12
leaq 0x8(%r12), %rbx
testq %r12, %r12
movq %rbx, %r14
cmoveq %r12, %r14
callq 0x173d0
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rsi
testq %rax, %rax
cmoveq %rax, %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
movl %eax, %ebp
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x170d2
movq (%rdi), %rax
callq *0x20(%rax)
testl %ebp, %ebp
je 0x17129
leaq 0xe1203(%rip), %r15     # 0xf82e0
leaq 0xa4f20(%rip), %rsi     # 0xbc004
movl $0x15, %edx
movq %r15, %rdi
callq 0x81b50
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x62ca0
movsbl %al, %esi
leaq 0xe11d1(%rip), %rdi     # 0xf82e0
callq 0x81650
movq %rax, %rdi
callq 0x80c20
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
jmp 0x17237
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
testl %eax, %eax
je 0x17195
leaq 0xe1197(%rip), %r15     # 0xf82e0
leaq 0xa4eca(%rip), %rsi     # 0xbc01a
movl $0x15, %edx
movq %r15, %rdi
callq 0x81b50
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x62ca0
movsbl %al, %esi
leaq 0xe1165(%rip), %rdi     # 0xf82e0
callq 0x81650
movq %rax, %rdi
callq 0x80c20
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
jmp 0x17227
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
leaq 0x10(%rsp), %rsi
movq $0x0, (%rsi)
movq (%r14), %rax
movq %r14, %rdi
callq *0x38(%rax)
testl %eax, %eax
sete %r13b
je 0x1720a
leaq 0xe111c(%rip), %r15     # 0xf82e0
leaq 0xa4e65(%rip), %rsi     # 0xbc030
movl $0x1c, %edx
movq %r15, %rdi
callq 0x81b50
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x62ca0
movsbl %al, %esi
leaq 0xe10ea(%rip), %rdi     # 0xf82e0
callq 0x81650
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x80c20
jmp 0x17217
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
xorl %ebp, %ebp
callq *0x28(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17227
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17237
movq (%rdi), %rax
callq *0x18(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
testb %r13b, %r13b
je 0x17247
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17278
jmp 0x17278
movq %rdx, %r15
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x172aa
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x172aa
jmp 0x17278
jmp 0x17278
movq %rax, %rdi
callq 0x17483
movq %rdx, %r15
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x172c4
movq (%rdi), %rax
callq *0x20(%rax)
jmp 0x172c4
jmp 0x17278
jmp 0x172be
movq %rdx, %r15
movq %rax, %r14
jmp 0x172d2
movq %rdx, %r15
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x172c4
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x172c4
jmp 0x17278
movq %rdx, %r15
movq %rax, %r14
testq %r12, %r12
je 0x172d2
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpl $0x1, %r15d
jne 0x17332
movq %r14, %rdi
callq 0x180b0
movq %rax, %rbx
leaq 0xe0ff6(%rip), %rdi     # 0xf82e0
leaq 0xa4d5c(%rip), %rsi     # 0xbc04d
movl $0x7, %edx
callq 0x81b50
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0xe0fd5(%rip), %rdi     # 0xf82e0
movq %rax, %rsi
callq 0x82080
movq %rax, %rdi
callq 0x81960
callq 0x18120
jmp 0x17245
jmp 0x17278
movq %rax, %r14
callq 0x18120
movq %r14, %rdi
callq 0xb8a30
jmp 0x17278
nop