// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rdi
callq 0x17354
movq %rsp, %rdi
movq (%rdi), %r12
leaq 0x8(%r12), %rbx
testq %r12, %r12
cmoveq %r12, %rbx
callq 0x173e4
movq (%rsp), %rax
leaq 0x8(%rax), %rsi
testq %rax, %rax
cmoveq %rax, %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movl %eax, %ebp
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x170e7
movq (%rdi), %rax
callq *0x20(%rax)
testl %ebp, %ebp
je 0x1713e
leaq 0xe11ee(%rip), %r14     # 0xf82e0
leaq 0xa4f0b(%rip), %rsi     # 0xbc004
movl $0x15, %edx
movq %r14, %rdi
callq 0x81be0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x62d30
movsbl %al, %esi
leaq 0xe11bc(%rip), %rdi     # 0xf82e0
callq 0x816e0
movq %rax, %rdi
callq 0x80cb0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
jmp 0x17248
movq %rsp, %rsi
movq $0x0, (%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
testl %eax, %eax
je 0x171a8
leaq 0xe1184(%rip), %r14     # 0xf82e0
leaq 0xa4eb7(%rip), %rsi     # 0xbc01a
movl $0x15, %edx
movq %r14, %rdi
callq 0x81be0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x62d30
movsbl %al, %esi
leaq 0xe1152(%rip), %rdi     # 0xf82e0
callq 0x816e0
movq %rax, %rdi
callq 0x80cb0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
jmp 0x17239
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
testl %eax, %eax
sete %r15b
je 0x1721c
leaq 0xe110a(%rip), %r14     # 0xf82e0
leaq 0xa4e53(%rip), %rsi     # 0xbc030
movl $0x1c, %edx
movq %r14, %rdi
callq 0x81be0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x62d30
movsbl %al, %esi
leaq 0xe10d8(%rip), %rdi     # 0xf82e0
callq 0x816e0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x80cb0
jmp 0x17229
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
xorl %ebp, %ebp
callq *0x28(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17239
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x17248
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
testb %r15b, %r15b
je 0x17258
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17287
jmp 0x17287
movq %rdx, %r15
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x172c0
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x172c0
jmp 0x17287
jmp 0x17287
movq %rax, %rdi
callq 0x17497
movq %rdx, %r15
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x172a4
movq (%rdi), %rax
callq *0x20(%rax)
movq $0x0, (%rsp)
jmp 0x172d9
jmp 0x17287
jmp 0x172d3
movq %rdx, %r15
movq %rax, %r14
jmp 0x172e7
movq %rdx, %r15
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x172d9
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x172d9
jmp 0x17287
movq %rdx, %r15
movq %rax, %r14
testq %r12, %r12
je 0x172e7
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpl $0x1, %r15d
jne 0x17347
movq %r14, %rdi
callq 0x18140
movq %rax, %rbx
leaq 0xe0fe1(%rip), %rdi     # 0xf82e0
leaq 0xa4d47(%rip), %rsi     # 0xbc04d
movl $0x7, %edx
callq 0x81be0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0xe0fc0(%rip), %rdi     # 0xf82e0
movq %rax, %rsi
callq 0x82110
movq %rax, %rdi
callq 0x819f0
callq 0x181b0
jmp 0x17256
jmp 0x17287
movq %rax, %r14
callq 0x181b0
movq %r14, %rdi
callq 0xb8ac0
jmp 0x17287