// File: /workspace/github_cpp_makefile_star2_O2/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 $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x30(%rsp)
leaq 0xb6fd6(%rip), %rsi     # 0xd897a
pushq $0x1
popq %rcx
movq %rdx, %rdi
xorl %edx, %edx
callq 0x2234c
testq %rax, %rax
je 0x21d76
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x219cc
movq %rdx, %rsi
movq 0x18(%rax), %rdx
jmp 0x219d3
leaq 0x100b2e(%rip), %rsi    # 0x122501
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x1f964
cmpq $0x0, 0x48(%rsp)
je 0x21da6
leaq 0xb6f64(%rip), %rsi     # 0xd8960
leaq 0x40(%rsp), %rdi
callq 0x2367f
testb %al, %al
je 0x21a1c
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x21a4e
movq %rdx, %rsi
movq 0x18(%r15), %rdx
jmp 0x21a55
leaq 0xb6f40(%rip), %rsi     # 0xd8963
leaq 0x40(%rsp), %rdi
callq 0x2367f
testb %al, %al
je 0x21abb
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x21b47
movq %rdx, %rsi
movq 0x18(%r15), %rdx
jmp 0x21b4e
leaq 0x100aac(%rip), %rsi    # 0x122501
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x1f964
cmpq $0x0, 0x18(%rsp)
je 0x21dd6
leaq 0x10(%rsp), %rdi
callq 0x2368c
leaq 0x38(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x1df30
leaq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq 0x30(%rsp), %rbx
movq %rcx, (%rbx)
andq $0x0, (%rdi)
callq 0x1dfb2
jmp 0x21ba3
leaq 0xb6ea8(%rip), %rsi     # 0xd896a
leaq 0x40(%rsp), %rdi
callq 0x2367f
testb %al, %al
je 0x21bc9
leaq 0x10(%rsp), %rdi
callq 0x1ddda
leaq 0xb6e8a(%rip), %rsi     # 0xd896f
pushq $0x1
popq %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x218ec
movq %rax, %r13
leaq 0x60(%rsp), %r15
leaq 0xb6e6e(%rip), %r12     # 0xd896f
pushq $0x1
popq %rbp
movq 0x10(%rsp), %rbx
testq %r13, %r13
je 0x21bf3
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x21984
movq %rbx, %rdi
movq %r15, %rsi
callq 0x236ee
movq %r15, %rdi
callq 0x1dcb8
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x21f2c
movq %rax, %r13
jmp 0x21b04
leaq 0x1009b3(%rip), %rsi    # 0x122501
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x1f964
cmpq $0x0, 0x18(%rsp)
je 0x21e08
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x20494
leaq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq 0x30(%rsp), %rbx
movq %rcx, (%rbx)
andq $0x0, (%rdi)
callq 0x20516
leaq 0x10(%rsp), %rdi
callq 0xa5530
leaq 0x40(%rsp), %rdi
callq 0xa5530
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb6da4(%rip), %rsi     # 0xd8974
leaq 0x40(%rsp), %rdi
callq 0x2367f
testb %al, %al
je 0x21e38
movq (%r15), %rdx
testq %rdx, %rdx
je 0x21c16
movq %rdx, %rsi
movq 0x10(%r15), %rdx
jmp 0x21c1d
leaq 0x8(%rbx), %rax
testq %rbx, %rbx
cmoveq %rbx, %rax
movq 0x30(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x10(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x1e040
jmp 0x21bad
leaq 0x1008e4(%rip), %rsi    # 0x122501
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x1f964
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x23742
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0xa5530
movq 0x30(%r15), %r13
leaq 0x38(%rsp), %r15
pushq $0x1
popq %rbp
testq %r13, %r13
je 0x21cfc
movq (%r13), %rdx
testq %rdx, %rdx
je 0x21c76
movq %rdx, %rsi
movq 0x10(%r13), %rdx
jmp 0x21c7d
leaq 0x100884(%rip), %rsi    # 0x122501
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
addq %rsi, %rdx
movq %r12, %rdi
callq 0x1f964
cmpq $0x0, 0x18(%rsp)
je 0x21d41
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x21984
movq 0x8(%rsp), %rdi
addq $0x48, %rdi
movq %r12, %rsi
callq 0x23860
movq %rax, %rbx
movq %rax, %rdi
callq 0x1e198
movq 0x38(%rsp), %rax
movq %rax, (%rbx)
andq $0x0, 0x38(%rsp)
movq %r15, %rdi
callq 0x1dcb8
movq %r12, %rdi
callq 0xa5530
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x21f2c
movq %rax, %r13
jmp 0x21c5b
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x237c6
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rdi, (%rax)
testq %rdi, %rdi
je 0x21d23
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x10(%rsp), %rdi
callq 0x1e4ea
leaq 0x8(%rsp), %rdi
callq 0x1ddbe
movq 0x30(%rsp), %rbx
jmp 0x21bad
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb5a71(%rip), %rsi     # 0xd77c4
movq %rax, %rdi
callq 0x3c350
leaq 0xfa30e(%rip), %rsi     # 0x11c070
leaq 0x10c67(%rip), %rdx     # 0x329d0
movq %r14, %rdi
callq 0x29ba0
jmp 0x21e38
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb59d6(%rip), %rsi     # 0xd775e
movq %rax, %rdi
callq 0x3c350
leaq 0xfa2d9(%rip), %rsi     # 0x11c070
leaq 0x10c32(%rip), %rdx     # 0x329d0
movq %r14, %rdi
callq 0x29ba0
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb59c9(%rip), %rsi     # 0xd7781
movq %rax, %rdi
callq 0x3c350
leaq 0xfa2a9(%rip), %rsi     # 0x11c070
leaq 0x10c02(%rip), %rdx     # 0x329d0
movq %r14, %rdi
callq 0x29ba0
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb59b2(%rip), %rsi     # 0xd779a
movq %rax, %rdi
callq 0x3c350
leaq 0xfa279(%rip), %rsi     # 0x11c070
leaq 0x10bd2(%rip), %rdx     # 0x329d0
movq %r14, %rdi
callq 0x29ba0
jmp 0x21e38
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb5996(%rip), %rsi     # 0xd77b0
movq %rax, %rdi
callq 0x3c350
leaq 0xfa247(%rip), %rsi     # 0x11c070
leaq 0x10ba0(%rip), %rdx     # 0x329d0
movq %r14, %rdi
callq 0x29ba0
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb5993(%rip), %rsi     # 0xd77dd
movq %rax, %rdi
callq 0x3c350
jmp 0x21dc0
jmp 0x21e8e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1e4ea
jmp 0x21f0f
jmp 0x21ed5
jmp 0x21ead
jmp 0x21ead
jmp 0x21e7d
jmp 0x21ea8
jmp 0x21eda
jmp 0x21ea8
jmp 0x21ead
jmp 0x21ead
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x21eb0
jmp 0x21ea8
jmp 0x21ea8
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x21f19
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x21f23
movq %rax, %rbx
jmp 0x21f19
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa5530
jmp 0x21f19
movq %rax, %rbx
jmp 0x21f23
jmp 0x21ed0
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x21f05
movq %rax, %rbx
jmp 0x21f05
movq %rax, %rbx
jmp 0x21f0f
movq %rax, %rbx
jmp 0x21eec
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x1dcb8
leaq 0x10(%rsp), %rdi
callq 0x1e040
jmp 0x21f19
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x1dcb8
leaq 0x10(%rsp), %rdi
callq 0xa5530
leaq 0x8(%rsp), %rdi
callq 0x1ddbe
leaq 0x40(%rsp), %rdi
callq 0xa5530
movq %rbx, %rdi
callq 0xd3bc0
nop