// File: /workspace/github_cpp_makefile_star2_O1/tdv[P]boss/boss/include/common/xml_property_bag.h
// Function: Boss::XmlPropertyBag::DeserializeItem(rapidxml::xml_node<char> const*) const
IBasePtr DeserializeItem(rapidxml::xml_node<> const *node) const
    {
      auto const *TypeAttr = node->first_attribute(Tags::TypeTag);
      if (!TypeAttr)
        throw std::runtime_error("Failed to get item type attribute.");
      std::string Type(TypeAttr->value(), TypeAttr->value_size());
      if (Type.empty())
        throw std::runtime_error("Failed to get item type.");
      if (Type == Tags::EntityIdTag)
      {
        std::string Id(node->value(), node->value_size());
        if (Id.empty())
          throw std::runtime_error("Empty EntityId value.");
        return Base<EntityId>::Create(FromString<UInt>(Id));
      }
      if (Type == Tags::StringTag)
      {
        std::string Str(node->value(), node->value_size());
        if (Str.empty())
          throw std::runtime_error("Empty string value.");
        return Base<String>::Create(Str);
      }
      if (Type == Tags::EnumTag)
      {
        auto NewEnum = Base<Enum>::Create();
        for (auto const *i = node->first_node(Tags::ItemTag) ; i ; i = i->next_sibling(Tags::ItemTag))
          NewEnum->AddItem(DeserializeItem(i));
        return NewEnum;
      }
      if (Type == Tags::PropertyBagTag)
      {
        auto NewPropBag = Base<XmlPropertyBag>::Create(std::string(node->name(), node->name_size()));
        for (auto const *i = node->first_node() ; i ; i = i->next_sibling())
        {
          std::string Name(i->name(), i->name_size());
          if (Name.empty())
            throw std::runtime_error("Failed to get node name.");
          NewPropBag->Props[Name] = DeserializeItem(i);
        }
        return IBasePtr(RefObjQIPtr<IBase>(NewPropBag).Get());
      }
      throw std::runtime_error("Unknown type.");
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
leaq 0xb719d(%rip), %rsi     # 0xdb8ca
movq %rdx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x2524e
testq %rax, %rax
je 0x24ba3
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x24757
movq %rdx, %rsi
movq 0x18(%rax), %rdx
jmp 0x2475e
leaq 0x100da3(%rip), %rsi    # 0x125501
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x22342
cmpq $0x0, 0x48(%rsp)
je 0x24bd5
leaq 0xb7128(%rip), %rsi     # 0xdb8b0
leaq 0x40(%rsp), %rdi
callq 0xab750
testl %eax, %eax
je 0x247f5
leaq 0xb7116(%rip), %rsi     # 0xdb8b3
leaq 0x40(%rsp), %rdi
callq 0xab750
testl %eax, %eax
je 0x24807
leaq 0xb7108(%rip), %rsi     # 0xdb8ba
leaq 0x40(%rsp), %rdi
callq 0xab750
testl %eax, %eax
je 0x248ca
leaq 0xb70f9(%rip), %rsi     # 0xdb8c4
leaq 0x40(%rsp), %rdi
callq 0xab750
testl %eax, %eax
jne 0x24c3b
movq (%r15), %rdx
testq %rdx, %rdx
je 0x24972
movq %rdx, %rsi
movq 0x10(%r15), %rdx
jmp 0x24979
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x24820
movq %rdx, %rsi
movq 0x18(%r15), %rdx
jmp 0x24827
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x24acb
movq %rdx, %rsi
movq 0x18(%r15), %rdx
jmp 0x24ad2
leaq 0x100cda(%rip), %rsi    # 0x125501
leaq 0x30(%rsp), %rbx
movq %rbx, -0x10(%rbx)
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x22342
cmpq $0x0, 0x28(%rsp)
je 0x24c07
leaq 0x70(%rsp), %rdi
callq 0xa27b0
leaq 0x80(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x98d30
leaq 0x70(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x7f220
movl 0x1c(%rsp), %ebp
leaq 0xfeb2c(%rip), %rsi     # 0x1233b0
leaq 0x70(%rsp), %rdi
callq 0xa3250
leaq 0xf0(%rsp), %rdi
callq 0x7b2a0
leaq 0x6c(%rsp), %rsi
movl %ebp, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x20766
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq %rcx, (%r13)
movq 0x20(%rsp), %rdi
jmp 0x24b1f
movq %r13, %rbx
leaq 0x70(%rsp), %rdi
callq 0x205f6
leaq 0xb6fe1(%rip), %rsi     # 0xdb8bf
movq %r15, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x245e0
movq %rax, %r15
testq %rax, %rax
je 0x24952
leaq 0x10(%rsp), %r12
leaq 0xb6fbe(%rip), %r13     # 0xdb8bf
movq 0x70(%rsp), %rbp
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2470c
movq %rbp, %rdi
movq %r12, %rsi
callq 0x26772
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2492f
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x10(%rsp)
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x24e38
movq %rax, %r15
testq %rax, %rax
jne 0x24901
movq 0x70(%rsp), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq %rbx, %r13
movq %rcx, (%rbx)
leaq 0x50(%rsp), %r12
jmp 0x24b29
leaq 0x100b88(%rip), %rsi    # 0x125501
leaq 0x80(%rsp), %rbx
movq %rbx, -0x10(%rbx)
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x22342
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x267da
movq %r13, 0x60(%rsp)
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x249b5
callq 0x2c860
movq 0x30(%r15), %r15
testq %r15, %r15
je 0x24a68
leaq 0x70(%rsp), %r12
leaq 0x8(%rsp), %r13
movq (%r15), %rdx
testq %rdx, %rdx
je 0x249dd
movq %rdx, %rsi
movq 0x10(%r15), %rdx
jmp 0x249e4
leaq 0x100b1d(%rip), %rsi    # 0x125501
movq %rbx, 0x70(%rsp)
addq %rsi, %rdx
movq %r12, %rdi
callq 0x22342
cmpq $0x0, 0x78(%rsp)
je 0x24b4d
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2470c
movq 0x20(%rsp), %rdi
addq $0x48, %rdi
movq %r12, %rsi
callq 0x268ac
movq %rax, %rbp
movq (%rax), %rdi
testq %rdi, %rdi
je 0x24a30
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, (%rbp)
movq 0x8(%rsp), %rax
movq %rax, (%rbp)
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x24a50
callq 0x2c860
cmpq $0x0, 0x20(%r15)
je 0x24b84
movq 0x58(%r15), %r15
testq %r15, %r15
jne 0x249cc
movq $0x0, 0x70(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x24a8b
movq (%rdi), %rax
leaq 0x70(%rsp), %rdx
movl $0x2cc77d66, %esi       # imm = 0x2CC77D66
callq *0x28(%rax)
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %r13
movq %rdi, (%r13)
testq %rdi, %rdi
leaq 0x50(%rsp), %r12
je 0x24aa9
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x24ab9
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x24b29
movq (%rdi), %rax
callq *0x20(%rax)
jmp 0x24b29
leaq 0x100a2f(%rip), %rsi    # 0x125501
leaq 0x80(%rsp), %rbx
movq %rbx, -0x10(%rbx)
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x22342
cmpq $0x0, 0x78(%rsp)
je 0x24c59
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x22f2e
movq 0x20(%rsp), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq %rcx, (%r13)
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x24b29
callq 0x2c860
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x24b38
callq 0x2c860
movq %r13, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2cb60
movq %rax, %r14
leaq 0xb5c4b(%rip), %rsi     # 0xda7ac
movq %rax, %rdi
callq 0x40360
leaq 0xfa500(%rip), %rsi     # 0x11f070
leaq 0x11e69(%rip), %rdx     # 0x369e0
movq %r14, %rdi
callq 0x2dbb0
jmp 0x24c8b
leaq 0xb5c48(%rip), %rdi     # 0xda7d3
leaq 0xb5946(%rip), %rsi     # 0xda4d8
leaq 0xb5c49(%rip), %rcx     # 0xda7e2
movl $0x3ee, %edx            # imm = 0x3EE
callq 0x1b150
movl $0x10, %edi
callq 0x2cb60
movq %rax, %r14
leaq 0xb5b8f(%rip), %rsi     # 0xda746
movq %rax, %rdi
callq 0x40360
leaq 0xfa4aa(%rip), %rsi     # 0x11f070
leaq 0x11e13(%rip), %rdx     # 0x369e0
movq %r14, %rdi
callq 0x2dbb0
movl $0x10, %edi
callq 0x2cb60
movq %rax, %r14
leaq 0xb5b80(%rip), %rsi     # 0xda769
movq %rax, %rdi
callq 0x40360
leaq 0xfa478(%rip), %rsi     # 0x11f070
leaq 0x11de1(%rip), %rdx     # 0x369e0
movq %r14, %rdi
callq 0x2dbb0
movl $0x10, %edi
callq 0x2cb60
movq %rax, %r14
leaq 0xb5b67(%rip), %rsi     # 0xda782
movq %rax, %rdi
callq 0x40360
leaq 0xfa446(%rip), %rsi     # 0x11f070
leaq 0x11daf(%rip), %rdx     # 0x369e0
movq %r14, %rdi
callq 0x2dbb0
jmp 0x24c8b
movl $0x10, %edi
callq 0x2cb60
movq %rax, %r14
leaq 0xb5b76(%rip), %rsi     # 0xda7c5
movq %rax, %rdi
callq 0x40360
jmp 0x24bf1
movl $0x10, %edi
callq 0x2cb60
movq %rax, %r14
leaq 0xb5b2b(%rip), %rsi     # 0xda798
movq %rax, %rdi
callq 0x40360
leaq 0xfa3f4(%rip), %rsi     # 0x11f070
leaq 0x11d5d(%rip), %rdx     # 0x369e0
movq %r14, %rdi
callq 0x2dbb0
jmp 0x24cf1
movq %rax, %r15
movq %r14, %rdi
callq 0x2cbc0
jmp 0x24cf4
jmp 0x24d24
jmp 0x24d83
jmp 0x24d44
jmp 0x24e2f
jmp 0x24e2f
movq %rax, %r15
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x24cc6
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x70(%rsp)
jmp 0x24df8
jmp 0x24e2f
jmp 0x24dc3
jmp 0x24d4c
movq %rax, %r15
movq %r14, %rdi
callq 0x2cbc0
jmp 0x24d4f
jmp 0x24cf1
jmp 0x24d44
movq %rax, %r15
movq 0x70(%rsp), %rdi
jmp 0x24d54
jmp 0x24d44
jmp 0x24cff
movq %rax, %r15
leaq 0xfe6a7(%rip), %rsi     # 0x1233b0
leaq 0x70(%rsp), %rdi
callq 0xa3250
leaq 0xf0(%rsp), %rdi
callq 0x7b2a0
jmp 0x24d4f
jmp 0x24d44
movq %rax, %r15
movq %r14, %rdi
callq 0x2cbc0
jmp 0x24e11
movq %rax, %r15
movq %r14, %rdi
callq 0x2cbc0
jmp 0x24e25
movq %rax, %r15
jmp 0x24e11
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x24e11
callq 0x2c860
jmp 0x24e11
movq %rax, %r15
jmp 0x24e25
jmp 0x24e2f
jmp 0x24dc8
movq %rax, %r15
movq %r14, %rdi
callq 0x2cbc0
jmp 0x24de9
movq %rax, %r15
jmp 0x24da4
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x24d9b
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x10(%rsp)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x24db4
movq (%rdi), %rax
callq *0x20(%rax)
movq $0x0, 0x70(%rsp)
jmp 0x24e11
jmp 0x24e2f
jmp 0x24e2f
movq %rax, %r15
jmp 0x24df8
movq %rax, %r15
jmp 0x24de9
movq %rax, %r15
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x24de0
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x24df8
callq 0x2c860
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x24e08
movq (%rdi), %rax
callq *0x20(%rax)
movq $0x0, 0x20(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x24e25
callq 0x2c860
movq %r15, %rdi
callq 0xd7070
jmp 0x24e2f
movq %rax, %rdi
callq 0x2087b
nop