// File: 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:
subq $0xd8, %rsp
movl $0x0, 0xd4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x17750
jmp 0x17231
leaq 0xc8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x17840
jmp 0x17248
leaq 0xc0(%rsp), %rdi
callq 0x178a0
leaq 0xc8(%rsp), %rdi
callq 0x178c0
movq %rax, 0x80(%rsp)
jmp 0x1726c
leaq 0xa8(%rsp), %rdi
callq 0x178d0
jmp 0x1727b
leaq 0xa8(%rsp), %rdi
callq 0x179c0
movq %rax, 0x78(%rsp)
jmp 0x1728f
movq 0x78(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, 0x70(%rsp)
je 0x172af
movq 0x78(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
movl %eax, 0x6c(%rsp)
jmp 0x172cb
leaq 0xa8(%rsp), %rdi
callq 0x179d0
movl 0x6c(%rsp), %eax
cmpl $0x0, %eax
je 0x173ab
leaq 0xe3ff4(%rip), %rdi     # 0xfb2e0
leaq 0xa6ded(%rip), %rsi     # 0xbe0e0
callq 0x84b20
movq %rax, 0x60(%rsp)
jmp 0x172ff
movq 0x60(%rsp), %rdi
leaq 0x6d0f5(%rip), %rsi     # 0x84400
callq 0x83610
jmp 0x17312
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0xa4(%rsp)
jmp 0x1759b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x175d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x178a0
jmp 0x175d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x175cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x179d0
jmp 0x175cc
xorl %eax, %eax
movl %eax, %esi
leaq 0x98(%rsp), %rdi
callq 0x179f0
jmp 0x173be
leaq 0xc8(%rsp), %rdi
callq 0x178c0
movq %rax, 0x58(%rsp)
jmp 0x173d2
leaq 0x98(%rsp), %rdi
callq 0x17a30
movq %rax, 0x50(%rsp)
jmp 0x173e6
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movl %eax, 0x4c(%rsp)
jmp 0x173ff
movl 0x4c(%rsp), %eax
cmpl $0x0, %eax
je 0x17469
leaq 0xe3ed1(%rip), %rdi     # 0xfb2e0
leaq 0xa6ce0(%rip), %rsi     # 0xbe0f6
callq 0x84b20
movq %rax, 0x40(%rsp)
jmp 0x17422
movq 0x40(%rsp), %rdi
leaq 0x6cfd2(%rip), %rsi     # 0x84400
callq 0x83610
jmp 0x17435
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0xa4(%rsp)
jmp 0x1758e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x175bf
leaq 0x98(%rsp), %rdi
callq 0x17a40
movq %rax, 0x38(%rsp)
jmp 0x1747d
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
jmp 0x1748d
xorl %eax, %eax
movl %eax, %esi
leaq 0x90(%rsp), %rdi
callq 0x17a50
jmp 0x174a0
leaq 0xc8(%rsp), %rdi
callq 0x178c0
movq %rax, 0x30(%rsp)
jmp 0x174b4
leaq 0x90(%rsp), %rdi
callq 0x17a90
movq %rax, 0x28(%rsp)
jmp 0x174c8
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movl %eax, 0x24(%rsp)
jmp 0x174e1
movl 0x24(%rsp), %eax
cmpl $0x0, %eax
je 0x17552
leaq 0xe3def(%rip), %rdi     # 0xfb2e0
leaq 0xa6c14(%rip), %rsi     # 0xbe10c
callq 0x84b20
movq %rax, 0x18(%rsp)
jmp 0x17504
movq 0x18(%rsp), %rdi
leaq 0x6cef0(%rip), %rsi     # 0x84400
callq 0x83610
jmp 0x17517
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0xa4(%rsp)
jmp 0x17581
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x17ab0
jmp 0x175bf
leaq 0x90(%rsp), %rdi
callq 0x17aa0
movq %rax, 0x10(%rsp)
jmp 0x17566
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
jmp 0x17576
movl $0x0, 0xa4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x17ab0
leaq 0x98(%rsp), %rdi
callq 0x17ad0
leaq 0xc8(%rsp), %rdi
callq 0x17af0
movl 0xa4(%rsp), %eax
testl %eax, %eax
je 0x175ba
jmp 0x175b5
jmp 0x17681
jmp 0x17657
leaq 0x98(%rsp), %rdi
callq 0x17ad0
leaq 0xc8(%rsp), %rdi
callq 0x17af0
movl 0xb4(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x17690
movq 0xb8(%rsp), %rdi
callq 0x1ab50
movq %rax, 0x88(%rsp)
leaq 0xe3cd7(%rip), %rdi     # 0xfb2e0
leaq 0xa6b19(%rip), %rsi     # 0xbe129
callq 0x84b20
movq %rax, 0x8(%rsp)
jmp 0x1761c
movq 0x88(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x84b20
movq %rax, (%rsp)
jmp 0x17640
movq (%rsp), %rdi
leaq 0x6cdb5(%rip), %rsi     # 0x84400
callq 0x83610
jmp 0x17652
callq 0x1abc0
movl $0x0, 0xd4(%rsp)
jmp 0x17681
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
callq 0x1abc0
jmp 0x1767f
jmp 0x17690
movl 0xd4(%rsp), %eax
addq $0xd8, %rsp
retq
movq 0xb8(%rsp), %rdi
callq 0xbb4d0
movq %rax, %rdi
callq 0x17b10
nopw %cs:(%rax,%rax)
nop