// File: /workspace/github_cpp_makefile_star2_O1/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 0x18166
movq 0xe3e78(%rip), %rbx     # 0xfc510
testq %rbx, %rbx
je 0x187ad
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 0x187ee
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x186ef
movq (%rdi), %rax
leaq 0x10(%rsp), %rdx
movl $0xd14d2e99, %esi       # imm = 0xD14D2E99
callq *0x20(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1882f
leaq 0x18(%rsp), %rdx
movq $0x0, (%rdx)
movq (%rdi), %rax
movl %ebp, %esi
callq *0x28(%rax)
testl %eax, %eax
jne 0x1886d
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1873c
movq (%rdi), %rax
leaq 0x8(%rsp), %rdx
movl $0x805b9772, %esi       # imm = 0x805B9772
callq *0x20(%rax)
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0x188ab
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq %r15, (%r14)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x18766
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x18776
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x18786
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x18796
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 0x1b950
movq %rax, %r15
leaq 0xa6d52(%rip), %rsi     # 0xbf513
movq %rax, %rdi
callq 0x2ef10
leaq 0xdd8f0(%rip), %rax     # 0xf60c0
movq %rax, (%r15)
leaq 0xdd8be(%rip), %rsi     # 0xf6098
leaq 0xcdaf(%rip), %rdx      # 0x25590
movq %r15, %rdi
callq 0x1c9a0
jmp 0x188e7
movl $0x10, %edi
callq 0x1b950
movq %rax, %r15
leaq 0xa6d3a(%rip), %rsi     # 0xbf53c
movq %rax, %rdi
callq 0x2ef10
leaq 0xdd8af(%rip), %rax     # 0xf60c0
movq %rax, (%r15)
leaq 0xdd87d(%rip), %rsi     # 0xf6098
leaq 0xcd6e(%rip), %rdx      # 0x25590
movq %r15, %rdi
callq 0x1c9a0
jmp 0x188e7
movl $0x10, %edi
callq 0x1b950
movq %rax, %r15
leaq 0xa6cee(%rip), %rsi     # 0xbf531
movq %rax, %rdi
callq 0x2ef10
leaq 0xdd86e(%rip), %rax     # 0xf60c0
movq %rax, (%r15)
leaq 0xdd83c(%rip), %rsi     # 0xf6098
leaq 0xcd2d(%rip), %rdx      # 0x25590
movq %r15, %rdi
callq 0x1c9a0
jmp 0x188e7
movl $0x10, %edi
callq 0x1b950
movq %rax, %r15
leaq 0xa690d(%rip), %rsi     # 0xbf18e
movq %rax, %rdi
callq 0x2ef10
leaq 0xdd830(%rip), %rax     # 0xf60c0
movq %rax, (%r15)
leaq 0xdd7fe(%rip), %rsi     # 0xf6098
leaq 0xccef(%rip), %rdx      # 0x25590
movq %r15, %rdi
callq 0x1c9a0
jmp 0x188e7
movl $0x10, %edi
callq 0x1b950
movq %rax, %r15
leaq 0xa68a9(%rip), %rsi     # 0xbf168
movq %rax, %rdi
callq 0x2ef10
leaq 0xdd7f2(%rip), %rax     # 0xf60c0
movq %rax, (%r15)
leaq 0xdd7c0(%rip), %rsi     # 0xf6098
leaq 0xccb1(%rip), %rdx      # 0x25590
movq %r15, %rdi
callq 0x1c9a0
movq %rax, %r14
movq %r15, %rdi
callq 0x1b9b0
jmp 0x18955
movq %rax, %r14
movq %r15, %rdi
callq 0x1b9b0
jmp 0x18975
movq %rax, %r14
jmp 0x18985
movq %rax, %r14
movq %r15, %rdi
callq 0x1b9b0
jmp 0x18985
movq %rax, %r14
movq %r15, %rdi
callq 0x1b9b0
jmp 0x189a7
movq %rax, %r14
jmp 0x189b7
movq %rax, %r14
movq %r15, %rdi
callq 0x1b9b0
jmp 0x189b7
jmp 0x189cf
jmp 0x189cf
jmp 0x189cf
jmp 0x189cf
jmp 0x18972
jmp 0x189a4
jmp 0x189cf
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x18965
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x18975
jmp 0x189cf
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x18985
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x18995
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x10(%rsp)
jmp 0x189a7
jmp 0x189cf
jmp 0x189cf
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x189b7
movq (%rdi), %rax
callq *0x18(%rax)
testq %rbx, %rbx
je 0x189c5
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %r14, %rdi
callq 0xbc2b0
jmp 0x189cf
movq %rax, %rdi
callq 0x18aa9
nop