// File: tdv[P]boss/boss/include/plugin/loader.h
// Function: Boss::Loader::Loader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Loader(std::string const &registryFilePath,
           std::string const &srvRegModulePath,
           std::string const &clsFactoryModulePath)
      : Locator(Base<ServiceLocator>::Create())
      , SrvRegistry([&] ()
          {
            auto SrvRegModule = std::move(ModuleHolder(std::move(DllHolder(srvRegModulePath))));
            auto SrvReg = SrvRegModule.CreateObject<IServiceRegistry>(Service::Id::ServiceRegistry);
            RefObjQIPtr<ISerializable> Serializable(SrvReg);
            if (!Serializable.Get())
              throw LoaderException("Failed to get ISerializable interface from Registry object.");
            if (Serializable->Load(Base<IFileStream>::Create(registryFilePath).Get()) != Status::Ok)
              throw LoaderException("Failed to load Registry.");
            return std::move(std::make_pair(std::move(SrvRegModule), std::move(SrvReg)));
          } ())
      , ClsFactory([&] ()
          {
            auto ClassFactoryModule = std::move(ModuleHolder(std::move(DllHolder(clsFactoryModulePath))));
            auto NewClsFactory = ClassFactoryModule.CreateObject<IClassFactory>(Service::Id::ClassFactory);
            RefObjQIPtr<IClassFactoryCtrl> Ctrl(NewClsFactory);
            if (!Ctrl.Get())
              throw LoaderException("Failed to get ICalssFactoryCtrl interface from ClassFactory object.");
            if (Ctrl->SetRegistry(SrvRegistry.second.Get()) != Status::Ok)
              throw LoaderException("Failed to set Registry into ClassFactory.");
            ClassFactoryModule.SetServiceLocator(Locator.Get());
            return std::move(std::make_pair(std::move(ClassFactoryModule), std::move(NewClsFactory)));
          } ())
    {
      if (Locator->AddService(Service::Locator::Id::ClassFactoryService,
          RefObjQIPtr<IBase>(ClsFactory.second).Get()) != Status::Ok)
      {
        throw LoaderException("Failed to put ClassFactory into ServiceLocator.");
      }
      Private::SetServiceLocator(Locator.Get());
    }

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %rax, 0x40(%rsp)
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x191d0
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x192c0
jmp 0x1894c
leaq 0xb0(%rsp), %rdi
callq 0x19320
movq 0x40(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x19340
jmp 0x1899e
movq 0x38(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x196d0
jmp 0x189b2
leaq 0x90(%rsp), %rdi
callq 0x19730
movq 0x40(%rsp), %rax
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x30(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x19760
jmp 0x189f3
movq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x19ab0
jmp 0x18a04
leaq 0x70(%rsp), %rdi
callq 0x19b10
movq 0x40(%rsp), %rdi
callq 0x19b40
movq %rax, 0x28(%rsp)
jmp 0x18a1f
movq 0x40(%rsp), %rsi
addq $0x20, %rsi
leaq 0x58(%rsp), %rdi
callq 0x19b50
jmp 0x18a34
leaq 0x58(%rsp), %rdi
callq 0x19ba0
movq %rax, 0x20(%rsp)
jmp 0x18a45
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
movl $0x16d1a76d, %esi       # imm = 0x16D1A76D
callq *%rax
movl %eax, 0x1c(%rsp)
jmp 0x18a63
leaq 0x58(%rsp), %rdi
callq 0x19bb0
movl 0x1c(%rsp), %eax
cmpl $0x0, %eax
je 0x18bb1
movl $0x10, %edi
callq 0x23610
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0xae6b0(%rip), %rsi     # 0xc7146
callq 0x19bd0
jmp 0x18a9d
movq 0x10(%rsp), %rdi
leaq 0xe89f7(%rip), %rsi     # 0x1014a0
leaq 0x1160(%rip), %rdx      # 0x19c10
callq 0x24660
jmp 0x18c01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x19320
jmp 0x18bf4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x18bea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x19730
jmp 0x18bea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x18be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x19b10
jmp 0x18be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x18bd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x19bb0
jmp 0x18bd6
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x23670
jmp 0x18bd6
movq 0x40(%rsp), %rdi
callq 0x19c20
movq %rax, 0x8(%rsp)
jmp 0x18bc2
movq 0x8(%rsp), %rdi
callq 0x18330
jmp 0x18bce
addq $0xd8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x19c30
movq 0x38(%rsp), %rdi
callq 0x19c60
movq 0x48(%rsp), %rdi
callq 0x19160
movq 0xa8(%rsp), %rdi
callq 0xc40a0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)