// File: /workspace/github_cpp_makefile_star2_O3/tdv[P]boss/boss/include/common/xml_property_bag.h
// Function: Boss::XmlPropertyBag::Load(Boss::IIStream*)
virtual RetCode BOSS_CALL Load(IIStream *stream)
    {
      if (!stream)
        return Status::InvalidArgument;
      try
      {
        std::lock_guard<std::recursive_mutex> Lock(Mtx);
        RefObjPtr<IBuffer> Buffer;
        if (stream->Read(Buffer.GetPPtr()) != Status::Ok)
          return Status::Fail;
        void const *Data = 0;
        UInt DataSize = 0;
        if (Buffer->GetSize(&DataSize) != Status::Ok || !DataSize ||
            Buffer->GetData(&Data) != Status::Ok)
        {
          return Status::Fail;
        }
        std::vector<char> Xml(reinterpret_cast<char const *>(Data),
                              reinterpret_cast<char const *>(Data) + DataSize);
        Xml.push_back(0);
        std::string NewRootName;
        PropPool NewProps;
        rapidxml::xml_document<> Doc;
        Doc.parse<rapidxml::parse_full>(&Xml[0]);
        auto const *RootNode = Doc.first_node();
        if (!RootNode)
          return Status::Fail;
        NewRootName.assign(RootNode->name(), RootNode->name_size());
        if (NewRootName.empty())
          return Status::Fail;
        for (auto const *i = RootNode->first_node() ; i ; i = i->next_sibling())
        {
          std::string Name(i->name(), i->name_size());
          if (Name.empty())
            return Status::Fail;
          NewProps[Name] = DeserializeItem(i);
        }
        std::swap(NewProps, Props);
        std::swap(NewRootName, RootName);
        return Status::Ok;
      }
      catch (...)
      {
        return Status::Fail;
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10138, %rsp          # imm = 0x10138
testq %rsi, %rsi
je 0x1f7e0
movq %rsi, %r15
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x19620
testl %eax, %eax
jne 0x1fa8e
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
movl $0x2, %ebp
testl %eax, %eax
je 0x1f7f9
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f7d6
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x19680
jmp 0x1f7e5
movl $0x5, %ebp
movl %ebp, %eax
addq $0x10138, %rsp          # imm = 0x10138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x18(%rsp)
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movl $0x2, %ebp
testl %eax, %eax
jne 0x1f7c6
cmpl $0x0, 0x4(%rsp)
je 0x1f7c6
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x18(%rsp), %rsi
callq *0x28(%rax)
testl %eax, %eax
jne 0x1f7c6
movq 0x18(%rsp), %rsi
movl 0x4(%rsp), %edx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
callq 0x21a40
movb $0x0, 0xb0(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x1f878
movb $0x0, (%rsi)
incq 0x28(%rsp)
jmp 0x1f88a
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x22a16
leaq 0x68(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
leaq 0xa8(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
leaq 0x110(%rsp), %rcx
movq %rax, -0x40(%rcx)
movaps %xmm0, -0x60(%rcx)
movl $0x0, -0x38(%rcx)
movq %rax, -0x30(%rcx)
movq %rax, -0x20(%rcx)
leaq 0x10128(%rsp), %rax
leaq 0x128(%rsp), %rcx
movups %xmm0, (%rax)
movq %rcx, -0x18(%rcx)
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movq 0x20(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x22004
movq 0xe0(%rsp), %r15
movl $0x2, %ebp
testq %r15, %r15
je 0x1fa4b
movq (%r15), %r8
testq %r8, %r8
je 0x1f939
movq %r8, %rcx
movq 0x10(%r15), %r8
jmp 0x1f940
leaq 0x100bc1(%rip), %rcx    # 0x120501
leaq 0x58(%rsp), %rdi
movq 0x8(%rdi), %rdx
xorl %esi, %esi
callq 0xa7910
cmpq $0x0, 0x60(%rsp)
je 0x1fa4b
movq 0x30(%r15), %r12
testq %r12, %r12
je 0x1fa14
leaq 0x38(%rsp), %r13
movq (%r12), %rdx
testq %rdx, %rdx
je 0x1f981
movq %rdx, %rsi
movq 0x10(%r12), %rdx
jmp 0x1f988
leaq 0x100b79(%rip), %rsi    # 0x120501
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
addq %rsi, %rdx
movq %r13, %rdi
callq 0x1ff5e
cmpq $0x0, 0x40(%rsp)
je 0x1fa37
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x22218
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x24288
movq %rax, %r15
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1f9d7
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, (%r15)
movq 0x10(%rsp), %rax
movq %rax, (%r15)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1f9fa
callq 0x29fe0
cmpq $0x0, 0x20(%r12)
je 0x1fa95
movq 0x58(%r12), %r12
testq %r12, %r12
jne 0x1f96e
leaq 0x48(%r14), %rsi
leaq 0x78(%rsp), %rdi
callq 0x243c0
subq $-0x80, %r14
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0xa85e0
xorl %ebp, %ebp
jmp 0x1fa4b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1fa4b
callq 0x29fe0
leaq 0x110(%rsp), %rdi
callq 0x2448a
leaq 0x78(%rsp), %rdi
callq 0x20160
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1fa76
callq 0x29fe0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1f7c6
callq 0x29fe0
jmp 0x1f7c6
movl %eax, %edi
callq 0x1b2b1
leaq 0xb7d37(%rip), %rdi     # 0xd77d3
leaq 0xb7a35(%rip), %rsi     # 0xd74d8
leaq 0xb7d38(%rip), %rcx     # 0xd77e2
movl $0x3ee, %edx            # imm = 0x3EE
callq 0x19150
movq %rax, %r14
jmp 0x1fb1d
jmp 0x1fac6
jmp 0x1fb34
jmp 0x1fac6
jmp 0x1fb3c
movq %rax, %r14
jmp 0x1fade
movq %rax, %r14
jmp 0x1faf2
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1fade
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1faf2
callq 0x29fe0
leaq 0x110(%rsp), %rdi
callq 0x2448a
leaq 0x78(%rsp), %rdi
callq 0x20160
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1fb1d
callq 0x29fe0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1fb3f
callq 0x29fe0
jmp 0x1fb3f
jmp 0x1fb34
jmp 0x1fb34
jmp 0x1fb3c
movq %rax, %rdi
callq 0x1e4f5
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1fb4f
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x19680
jmp 0x1fb5e
jmp 0x1fb34
movq %rax, %r14
movq %r14, %rdi
callq 0x2a440
callq 0x2a4b0
movl $0x2, %ebp
jmp 0x1f7e5
nop