// File: /workspace/github_cpp_makefile_star2_O2/tdv[P]boss/boss/include/common/xml_property_bag.h
// Function: Boss::XmlPropertyBag::SerializeItem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Boss::IBase*, rapidxml::xml_document<char>*, rapidxml::xml_node<char>*) const
void SerializeItem(std::string const &name, IBase *prop,
                       rapidxml::xml_document<> *doc,
                       rapidxml::xml_node<> *node) const
    {
      {
        RefObjQIPtr<IEntityId> Id(prop);
        if (Id.Get())
        {
          UInt EntityId = 0;
          if (Id->GetId(&EntityId) != Status::Ok)
            throw std::runtime_error("Failed to get EntityId.");
          auto *StrVal = doc->allocate_string(ToString(EntityId).c_str());
          auto *StrName = doc->allocate_string(name.c_str());
          auto *NewNode = doc->allocate_node(rapidxml::node_element, StrName, StrVal);
          node->append_node(NewNode);
          auto *TypeAttr = doc->allocate_attribute(Tags::TypeTag, Tags::EntityIdTag);
          NewNode->append_attribute(TypeAttr);
          return;
        }
      }
      {
        RefObjQIPtr<IString> String(prop);
        if (String.Get())
        {
          auto *StrVal = doc->allocate_string(GetString(String.Get()).c_str());
          auto *StrName = doc->allocate_string(name.c_str());
          auto *NewNode = doc->allocate_node(rapidxml::node_element, StrName, StrVal);
          node->append_node(NewNode);
          auto *TypeAttr = doc->allocate_attribute(Tags::TypeTag, Tags::StringTag);
          NewNode->append_attribute(TypeAttr);
          return;
        }
      }
      {
        RefObjQIPtr<IEnum> Enum(prop);
        if (Enum.Get())
        {
          auto *StrName = doc->allocate_string(name.c_str());
          auto *NewNode = doc->allocate_node(rapidxml::node_element, StrName);
          node->append_node(NewNode);
          auto *TypeAttr = doc->allocate_attribute(Tags::TypeTag, Tags::EnumTag);
          NewNode->append_attribute(TypeAttr);
          if (Enum->Reset() != Status::Ok)
            throw std::runtime_error("Failed to reset enum position.");
          for (RefObjPtr<IBase> i ; Enum->Next(i.GetPPtr()) == Status::Ok ; i.Release())
            SerializeItem(Tags::ItemTag, i.Get(), doc, NewNode);
          return;
        }
      }
      {
        RefObjQIPtr<IPropertyBag> PropBag(prop);
        if (PropBag.Get())
        {
          auto *StrName = doc->allocate_string(name.c_str());
          auto *NewNode = doc->allocate_node(rapidxml::node_element, StrName);
          node->append_node(NewNode);
          auto *TypeAttr = doc->allocate_attribute(Tags::TypeTag, Tags::PropertyBagTag);
          NewNode->append_attribute(TypeAttr);
          RefObjPtr<IEnum> Enum;
          if (PropBag->EnumProperties(Enum.GetPPtr()) != Status::Ok)
            throw std::runtime_error("Failed to get PropertyBag.");
          if (Enum->Reset() != Status::Ok)
            throw std::runtime_error("Failed to reset enum position.");
          for (RefObjPtr<IBase> i ; Enum->Next(i.GetPPtr()) == Status::Ok ; i.Release())
          {
            RefObjQIPtr<INamedValue> Prop(i);
            if (!Prop.Get())
              throw std::runtime_error("Failed to get PropertyItem.");
            RefObjPtr<IString> Name;
            if (Prop->GetName(Name.GetPPtr()) != Status::Ok)
              throw std::runtime_error("Failed to get property name.");
            RefObjPtr<IBase> Value;
            if (Prop->GetValue(Value.GetPPtr()) != Status::Ok)
              throw std::runtime_error("Failed to get property value.");
            SerializeItem(GetString(Name.Get()), Value.Get(), doc, NewNode);
          }
          return;
        }
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbp
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x2421c
movq (%r13), %rdi
testq %rdi, %rdi
je 0x23ba6
leaq 0x10(%rsp), %rsi
andl $0x0, (%rsi)
movq (%rdi), %rax
callq *0x28(%rax)
testl %eax, %eax
jne 0x23fef
movl 0x10(%rsp), %esi
leaq 0x40(%rsp), %rdi
callq 0x242aa
addq $0x60, %rbx
movq 0x40(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2423a
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0xa5530
movq (%r12), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2423a
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x228ec
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x222ea
leaq 0xb4e02(%rip), %rsi     # 0xd897a
leaq 0xb4de1(%rip), %rdx     # 0xd8960
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x22db4
movq %r14, %rdi
movq %rax, %rsi
callq 0x22e2a
leaq 0x8(%rsp), %rdi
callq 0x1dca8
jmp 0x23f44
leaq 0x8(%rsp), %rdi
callq 0x1dca8
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x24302
movq (%r13), %rdx
testq %rdx, %rdx
je 0x23c62
leaq 0x40(%rsp), %rdi
movq %rbp, %rsi
callq 0x24320
addq $0x60, %rbx
movq 0x40(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2423a
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0xa5530
movq (%r12), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2423a
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x228ec
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x222ea
leaq 0xb4d46(%rip), %rsi     # 0xd897a
leaq 0xb4d28(%rip), %rdx     # 0xd8963
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x22db4
movq %r14, %rdi
movq %rax, %rsi
callq 0x22e2a
leaq 0x8(%rsp), %rdi
callq 0x1db28
jmp 0x23f44
leaq 0x8(%rsp), %rdi
callq 0x1db28
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x244c8
cmpq $0x0, (%r13)
movq %rbx, 0x38(%rsp)
je 0x23d85
leaq 0x60(%rbx), %r14
movq (%r12), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2423a
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x228ec
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0x222ea
leaq 0xb4cb1(%rip), %rsi     # 0xd897a
leaq 0xb4c9a(%rip), %rdx     # 0xd896a
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x22db4
movq %r12, %rdi
movq %rax, %rsi
callq 0x22e2a
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testl %eax, %eax
jne 0x24021
movq %rbp, %rbx
leaq 0x10(%rsp), %r15
leaq 0xb4c65(%rip), %r13     # 0xd896f
leaq 0x40(%rsp), %rbp
leaq 0x18(%rsp), %r14
andq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x28(%rax)
testl %eax, %eax
jne 0x23d6c
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xa7de0
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %rbp, %rsi
movq 0x38(%rsp), %rcx
movq %r12, %r8
callq 0x23ac0
movq %rbp, %rdi
callq 0xa5530
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x23d14
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x23d14
leaq 0x10(%rsp), %rdi
callq 0x1dcb8
leaq 0x8(%rsp), %rdi
callq 0x1d5ae
jmp 0x23f44
leaq 0x8(%rsp), %rdi
callq 0x1d5ae
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x244e6
cmpq $0x0, (%r13)
je 0x23f3a
leaq 0x60(%rbx), %r14
movq (%r12), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2423a
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x228ec
movq %rax, %rbx
movq %r15, %rdi
movq %rax, %rsi
callq 0x222ea
leaq 0xb4b93(%rip), %rsi     # 0xd897a
leaq 0xb4b86(%rip), %rdx     # 0xd8974
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x22db4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x22e2a
leaq 0x10(%rsp), %rsi
andq $0x0, (%rsi)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
testl %eax, %eax
jne 0x24051
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq %rbp, 0x60(%rsp)
testl %eax, %eax
jne 0x2406d
leaq 0x18(%rsp), %r15
leaq 0x30(%rsp), %rbp
leaq 0x28(%rsp), %r12
leaq 0x40(%rsp), %r13
andq $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x28(%rax)
testl %eax, %eax
jne 0x23f26
movq %rbp, %rdi
movq %r15, %rsi
callq 0x24504
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x23f88
andq $0x0, 0x20(%rsp)
movq (%rdi), %rax
leaq 0x20(%rsp), %rsi
callq *0x28(%rax)
testl %eax, %eax
jne 0x23fbd
andq $0x0, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x30(%rax)
testl %eax, %eax
jne 0x23f53
movq %rbx, %r14
movq 0x20(%rsp), %rdx
movq %r13, %rdi
movq 0x60(%rsp), %rbx
movq %rbx, %rsi
callq 0x24320
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq 0x38(%rsp), %rcx
movq %r14, %rbx
movq %r14, %r8
callq 0x23ac0
movq %r13, %rdi
callq 0xa5530
movq %r12, %rdi
callq 0x1dcb8
leaq 0x20(%rsp), %rdi
callq 0x1dabe
movq %rbp, %rdi
callq 0x2451e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x23e4e
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x23e4e
leaq 0x18(%rsp), %rdi
callq 0x1dcb8
leaq 0x10(%rsp), %rdi
callq 0x1d73c
leaq 0x8(%rsp), %rdi
callq 0x2452e
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb3982(%rip), %rsi     # 0xd78e7
movq %rax, %rdi
callq 0x3c350
leaq 0xf80fc(%rip), %rsi     # 0x11c070
leaq 0xea55(%rip), %rdx      # 0x329d0
movq %r14, %rdi
callq 0x29ba0
jmp 0x24051
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb3914(%rip), %rsi     # 0xd78ae
movq %rax, %rdi
callq 0x3c350
leaq 0xf80c7(%rip), %rsi     # 0x11c070
leaq 0xea20(%rip), %rdx      # 0x329d0
movq %r14, %rdi
callq 0x29ba0
jmp 0x24051
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb38fb(%rip), %rsi     # 0xd78ca
movq %rax, %rdi
callq 0x3c350
leaq 0xf8092(%rip), %rsi     # 0x11c070
leaq 0xe9eb(%rip), %rdx      # 0x329d0
movq %r14, %rdi
callq 0x29ba0
jmp 0x24051
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb385b(%rip), %rsi     # 0xd785c
movq %rax, %rdi
callq 0x3c350
leaq 0xf8060(%rip), %rsi     # 0x11c070
leaq 0xe9b9(%rip), %rdx      # 0x329d0
movq %r14, %rdi
callq 0x29ba0
jmp 0x24051
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb3841(%rip), %rsi     # 0xd7874
movq %rax, %rdi
callq 0x3c350
leaq 0xf802e(%rip), %rsi     # 0x11c070
leaq 0xe987(%rip), %rdx      # 0x329d0
movq %r14, %rdi
callq 0x29ba0
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb3830(%rip), %rsi     # 0xd7893
movq %rax, %rdi
callq 0x3c350
jmp 0x24087
pushq $0x10
popq %rdi
callq 0x28b50
movq %rax, %r14
leaq 0xb37f5(%rip), %rsi     # 0xd7874
movq %rax, %rdi
callq 0x3c350
leaq 0xf7fe2(%rip), %rsi     # 0x11c070
leaq 0xe93b(%rip), %rdx      # 0x329d0
movq %r14, %rdi
callq 0x29ba0
jmp 0x2409f
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x241b4
jmp 0x240c3
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x241e8
jmp 0x240c3
movq %rax, %rbx
jmp 0x241be
jmp 0x240ea
movq %rax, %rbx
jmp 0x241b4
jmp 0x240ea
jmp 0x24104
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xa5530
jmp 0x24107
jmp 0x24104
movq %rax, %rbx
jmp 0x241e8
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x2419b
jmp 0x24104
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1db28
jmp 0x241f2
jmp 0x2415d
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x24180
movq %rax, %rbx
jmp 0x2418a
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x2418a
jmp 0x24164
movq %rax, %rbx
movq %r14, %rdi
callq 0x28bb0
jmp 0x24176
jmp 0x24198
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xa5530
jmp 0x2419b
jmp 0x24198
jmp 0x24198
jmp 0x241a7
movq %rax, %rbx
jmp 0x24180
jmp 0x24164
movq %rax, %rbx
jmp 0x24176
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xa5530
leaq 0x28(%rsp), %rdi
callq 0x1dcb8
leaq 0x20(%rsp), %rdi
callq 0x1dabe
leaq 0x30(%rsp), %rdi
callq 0x2451e
jmp 0x241aa
jmp 0x24198
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1dca8
jmp 0x241f2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1dcb8
leaq 0x10(%rsp), %rdi
callq 0x1d73c
leaq 0x8(%rsp), %rdi
callq 0x2452e
jmp 0x241f2
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xa5530
jmp 0x241de
jmp 0x241db
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1dcb8
leaq 0x8(%rsp), %rdi
callq 0x1d5ae
movq %rbx, %rdi
callq 0xd3bc0