// File: /workspace/github_cpp_makefile_star2_O1/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 0x21bae
movq %rsi, %r15
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x1b620
testl %eax, %eax
jne 0x21e5c
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
movl $0x2, %ebp
testl %eax, %eax
je 0x21bc7
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x21ba4
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x1b680
jmp 0x21bb3
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 0x21b94
cmpl $0x0, 0x4(%rsp)
je 0x21b94
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x18(%rsp), %rsi
callq *0x28(%rax)
testl %eax, %eax
jne 0x21b94
movq 0x18(%rsp), %rsi
movl 0x4(%rsp), %edx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
callq 0x23eea
movb $0x0, 0xb0(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x21c46
movb $0x0, (%rsi)
incq 0x28(%rsp)
jmp 0x21c58
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x24f60
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 0x244b0
movq 0xe0(%rsp), %r15
movl $0x2, %ebp
testq %r15, %r15
je 0x21e19
movq (%r15), %r8
testq %r8, %r8
je 0x21d07
movq %r8, %rcx
movq 0x10(%r15), %r8
jmp 0x21d0e
leaq 0x1037f3(%rip), %rcx    # 0x125501
leaq 0x58(%rsp), %rdi
movq 0x8(%rdi), %rdx
xorl %esi, %esi
callq 0xaa190
cmpq $0x0, 0x60(%rsp)
je 0x21e19
movq 0x30(%r15), %r12
testq %r12, %r12
je 0x21de2
leaq 0x38(%rsp), %r13
movq (%r12), %rdx
testq %rdx, %rdx
je 0x21d4f
movq %rdx, %rsi
movq 0x10(%r12), %rdx
jmp 0x21d56
leaq 0x1037ab(%rip), %rsi    # 0x125501
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
addq %rsi, %rdx
movq %r13, %rdi
callq 0x22342
cmpq $0x0, 0x40(%rsp)
je 0x21e05
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2470c
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x268ac
movq %rax, %r15
movq (%rax), %rdi
testq %rdi, %rdi
je 0x21da5
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 0x21dc8
callq 0x2c860
cmpq $0x0, 0x20(%r12)
je 0x21e63
movq 0x58(%r12), %r12
testq %r12, %r12
jne 0x21d3c
leaq 0x48(%r14), %rsi
leaq 0x78(%rsp), %rdi
callq 0x269ee
subq $-0x80, %r14
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0xaae60
xorl %ebp, %ebp
jmp 0x21e19
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x21e19
callq 0x2c860
leaq 0x110(%rsp), %rdi
callq 0x26ab8
leaq 0x78(%rsp), %rdi
callq 0x2253e
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x21e44
callq 0x2c860
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x21b94
callq 0x2c860
jmp 0x21b94
movl %eax, %edi
callq 0x1d32d
leaq 0xb8969(%rip), %rdi     # 0xda7d3
leaq 0xb8667(%rip), %rsi     # 0xda4d8
leaq 0xb896a(%rip), %rcx     # 0xda7e2
movl $0x3ee, %edx            # imm = 0x3EE
callq 0x1b150
movq %rax, %r14
jmp 0x21efa
jmp 0x21e9a
jmp 0x21f11
jmp 0x21e9a
jmp 0x21f19
movq %rax, %r14
jmp 0x21ebb
movq %rax, %r14
jmp 0x21ecf
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21eb2
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x10(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x21ecf
callq 0x2c860
leaq 0x110(%rsp), %rdi
callq 0x26ab8
leaq 0x78(%rsp), %rdi
callq 0x2253e
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x21efa
callq 0x2c860
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x21f1c
callq 0x2c860
jmp 0x21f1c
jmp 0x21f11
jmp 0x21f11
jmp 0x21f19
movq %rax, %rdi
callq 0x2087b
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x21f2c
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x1b680
jmp 0x21f3b
jmp 0x21f11
movq %rax, %r14
movq %r14, %rdi
callq 0x2ccc0
callq 0x2cd30
movl $0x2, %ebp
jmp 0x21bb3