// File: /workspace/github_cpp_makefile_star2_O2/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 0x1f3fd
movq %rsi, %r15
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x1e168
leaq 0x10(%rsp), %rsi
andq $0x0, (%rsi)
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
testl %eax, %eax
je 0x1f414
pushq $0x2
popq %rbp
leaq 0x10(%rsp), %rdi
callq 0x21296
movq %rbx, %rdi
callq 0x19680
jmp 0x1f400
pushq $0x5
popq %rbp
movl %ebp, %eax
addq $0x10138, %rsp          # imm = 0x10138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $0x0, 0x18(%rsp)
leaq 0x4(%rsp), %rsi
andl $0x0, (%rsi)
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
pushq $0x2
popq %rbp
testl %eax, %eax
jne 0x1f3e9
cmpl $0x0, 0x4(%rsp)
je 0x1f3e9
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
leaq 0x18(%rsp), %rsi
callq *0x28(%rax)
testl %eax, %eax
jne 0x1f3e9
movq 0x18(%rsp), %rsi
movl 0x4(%rsp), %edx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
callq 0x211a4
leaq 0xb0(%rsp), %rsi
movb $0x0, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x21fca
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xa8(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
leaq 0x110(%rsp), %rcx
andq $0x0, -0x40(%rcx)
movaps %xmm0, -0x60(%rcx)
andl $0x0, -0x38(%rcx)
movups %xmm0, -0x20(%rax)
andq $0x0, -0x30(%rcx)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
andq $0x0, -0x20(%rcx)
movups %xmm0, -0x8(%rax)
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 0x2181e
movq 0xe0(%rsp), %r15
pushq $0x2
popq %rbp
testq %r15, %r15
je 0x1f623
movq (%r15), %rdx
testq %rdx, %rdx
je 0x1f52e
movq %rdx, %rsi
movq 0x10(%r15), %rdx
jmp 0x1f535
leaq 0x102fcc(%rip), %rsi    # 0x122501
leaq 0x58(%rsp), %rdi
callq 0xa64a0
cmpq $0x0, 0x60(%rsp)
je 0x1f623
movq 0x30(%r15), %r15
leaq 0x38(%rsp), %r12
testq %r15, %r15
je 0x1f5f6
movq (%r15), %rdx
testq %rdx, %rdx
je 0x1f56e
movq %rdx, %rsi
movq 0x10(%r15), %rdx
jmp 0x1f575
leaq 0x102f8c(%rip), %rsi    # 0x122501
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
addq %rsi, %rdx
movq %r12, %rdi
callq 0x1f964
cmpq $0x0, 0x40(%rsp)
je 0x1f619
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21984
leaq 0x78(%rsp), %rdi
movq %r12, %rsi
callq 0x23860
movq %rax, %r13
movq %rax, %rdi
callq 0x1e198
movq 0x8(%rsp), %rax
movq %rax, (%r13)
andq $0x0, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x1dcb8
movq %r12, %rdi
callq 0xa5530
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
pushq $0x1
popq %rcx
callq 0x21f2c
movq %rax, %r15
jmp 0x1f554
leaq 0x48(%r14), %rsi
leaq 0x78(%rsp), %rdi
callq 0x23996
subq $-0x80, %r14
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0xa6e50
xorl %ebp, %ebp
jmp 0x1f623
leaq 0x38(%rsp), %rdi
callq 0xa5530
leaq 0x110(%rsp), %rdi
callq 0x23a5c
leaq 0x78(%rsp), %rdi
callq 0x1fa52
leaq 0x58(%rsp), %rdi
callq 0xa5530
leaq 0x20(%rsp), %rdi
callq 0x2122e
jmp 0x1f3e9
jmp 0x1f663
jmp 0x1f663
movq %rax, %r14
jmp 0x1f6a2
jmp 0x1f6ae
movq %rax, %r14
jmp 0x1f677
movq %rax, %r14
jmp 0x1f681
jmp 0x1f6ae
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1dcb8
leaq 0x38(%rsp), %rdi
callq 0xa5530
leaq 0x110(%rsp), %rdi
callq 0x23a5c
leaq 0x78(%rsp), %rdi
callq 0x1fa52
leaq 0x58(%rsp), %rdi
callq 0xa5530
leaq 0x20(%rsp), %rdi
callq 0x2122e
jmp 0x1f6b1
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x21296
movq %rbx, %rdi
callq 0x19680
jmp 0x1f6c8
movq %rax, %r14
movq %r14, %rdi
callq 0x28cb0
callq 0x28d20
pushq $0x2
jmp 0x1f3ff