// File: /workspace/github_cpp_makefile_star2_O3/tdv[P]boss/boss/include/plugin/factory_tools.h
// Function: Boss::RefObjPtr<MyNs::ISum> Boss::CreateObject<MyNs::ISum>(unsigned int)
inline RefObjPtr<T> CreateObject(ClassId clsId)
  {
    auto Locator = Private::GetServiceLocator();
    if (!Locator.Get())
      throw FactoryToolsException("Failed to get ServiceLocator.");
    RefObjPtr<IBase> FactoryInst;
    if (Locator->GetService(Service::Locator::Id::ClassFactoryService, FactoryInst.GetPPtr()) != Status::Ok)
      throw FactoryToolsException("ClassFactory not found.");
    RefObjQIPtr<IClassFactory> Factory(FactoryInst);
    if (!Factory.Get())
      throw FactoryToolsException("Interface IClassFactory not found.");
    RefObjPtr<IBase> Inst;
    if (Factory->CreateObject(clsId, Inst.GetPPtr()) != Status::Ok)
      throw FactoryToolsException("Failed to create object.");
    RefObjQIPtr<T> Ret(Inst);
    if (!Ret.Get())
      throw FactoryToolsException("Interface not found.");
    return std::move(Ret);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %r14
callq 0x17146
movq 0xe3ea5(%rip), %rbx     # 0xfb510
testq %rbx, %rbx
je 0x1780a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x16d1a76d, %esi       # imm = 0x16D1A76D
callq *0x28(%rax)
testl %eax, %eax
jne 0x17846
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17788
movq (%rdi), %rax
leaq 0x10(%rsp), %rdx
movl $0xd14d2e99, %esi       # imm = 0xD14D2E99
callq *0x20(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17788
leaq 0x18(%rsp), %rdx
movq $0x0, (%rdx)
movq (%rdi), %rax
movl %ebp, %esi
callq *0x28(%rax)
testl %eax, %eax
jne 0x17884
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x177c9
movq (%rdi), %rax
leaq 0x8(%rsp), %rdx
movl $0x805b9772, %esi       # imm = 0x805B9772
callq *0x20(%rax)
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0x177c9
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq %r15, (%r14)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17741
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x17751
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17761
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17771
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a710
movq %rax, %r15
leaq 0xa6d95(%rip), %rsi     # 0xbe531
movq %rax, %rdi
callq 0x2dcd0
leaq 0xdd925(%rip), %rax     # 0xf50d0
movq %rax, (%r15)
leaq 0xdd8f3(%rip), %rsi     # 0xf50a8
leaq 0xcb94(%rip), %rdx      # 0x24350
movq %r15, %rdi
callq 0x1b760
jmp 0x178c0
movl $0x10, %edi
callq 0x1a710
movq %rax, %r15
leaq 0xa698b(%rip), %rsi     # 0xbe168
movq %rax, %rdi
callq 0x2dcd0
leaq 0xdd8e4(%rip), %rax     # 0xf50d0
movq %rax, (%r15)
leaq 0xdd8b2(%rip), %rsi     # 0xf50a8
leaq 0xcb53(%rip), %rdx      # 0x24350
movq %r15, %rdi
callq 0x1b760
jmp 0x178c0
movl $0x10, %edi
callq 0x1a710
movq %rax, %rbx
leaq 0xa6cf5(%rip), %rsi     # 0xbe513
movq %rax, %rdi
callq 0x2dcd0
leaq 0xdd8a3(%rip), %rax     # 0xf50d0
movq %rax, (%rbx)
leaq 0xdd871(%rip), %rsi     # 0xf50a8
leaq 0xcb12(%rip), %rdx      # 0x24350
movq %rbx, %rdi
callq 0x1b760
movl $0x10, %edi
callq 0x1a710
movq %rax, %r15
leaq 0xa6ce2(%rip), %rsi     # 0xbe53c
movq %rax, %rdi
callq 0x2dcd0
leaq 0xdd867(%rip), %rax     # 0xf50d0
movq %rax, (%r15)
leaq 0xdd835(%rip), %rsi     # 0xf50a8
leaq 0xcad6(%rip), %rdx      # 0x24350
movq %r15, %rdi
callq 0x1b760
jmp 0x178c0
movl $0x10, %edi
callq 0x1a710
movq %rax, %r15
leaq 0xa68f6(%rip), %rsi     # 0xbe18e
movq %rax, %rdi
callq 0x2dcd0
leaq 0xdd829(%rip), %rax     # 0xf50d0
movq %rax, (%r15)
leaq 0xdd7f7(%rip), %rsi     # 0xf50a8
leaq 0xca98(%rip), %rdx      # 0x24350
movq %r15, %rdi
callq 0x1b760
movq %rax, %r14
movq %r15, %rdi
callq 0x1a770
jmp 0x17946
movq %rax, %r14
movq %r15, %rdi
callq 0x1a770
jmp 0x17966
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a770
jmp 0x1797f
jmp 0x1798f
jmp 0x1798f
jmp 0x1798f
jmp 0x1798f
jmp 0x1798f
movq %rax, %r14
movq %r15, %rdi
callq 0x1a770
jmp 0x17936
jmp 0x17929
movq %rax, %r14
jmp 0x17956
movq %rax, %r14
movq %r15, %rdi
callq 0x1a770
jmp 0x17956
jmp 0x1792e
movq %rax, %r14
jmp 0x17946
movq %rax, %r14
jmp 0x17966
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17946
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x17956
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17966
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17976
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %r14, %rdi
callq 0xbb070
jmp 0x1798f
jmp 0x1798f
jmp 0x1798f
jmp 0x1798f
movq %rax, %rdi
callq 0x17a69
nop