// File: /workspace/github_cpp_makefile_star2_O1/tdv[P]boss/boss/include/common/xml_property_bag.h
// Function: Boss::XmlPropertyBag::Save(Boss::IOStream*)
virtual RetCode BOSS_CALL Save(IOStream *stream)
    {
      if (!stream)
        return Status::InvalidArgument;
      try
      {
        std::lock_guard<std::recursive_mutex> Lock(Mtx);
        rapidxml::xml_document<> Doc;
        auto *RootNode = Doc.allocate_node(rapidxml::node_element, RootName.c_str());
        Doc.append_node(RootNode);
        for (auto &prop : Props)
          SerializeItem(prop.first, prop.second.Get(), &Doc, RootNode);
        std::stringstream Io;
        rapidxml::print(std::ostream_iterator<char>(Io), Doc, 0);
        std::string Xml(Io.str());
        return stream->Write(Xml.c_str(), Xml.length());
      }
      catch (...)
      {
        return Status::Fail;
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10248, %rsp          # imm = 0x10248
testq %rsi, %rsi
je 0x220fb
movq %rsi, %r15
movq %rdi, %r12
addq $0x20, %rdi
movq %rdi, (%rsp)
callq 0x1b620
testl %eax, %eax
jne 0x22114
xorl %eax, %eax
leaq 0x220(%rsp), %r14
movq %rax, -0x40(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%r14)
movl $0x0, -0x38(%r14)
movq %rax, -0x30(%r14)
movq %rax, -0x20(%r14)
leaq 0x10238(%rsp), %rax
leaq 0x238(%rsp), %rcx
movups %xmm0, (%rax)
movq %rcx, -0x18(%rcx)
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movq 0x80(%r12), %rbp
movl $0x60, %esi
movq %r14, %rdi
callq 0x25d52
movq %rax, %r13
xorl %eax, %eax
movq %rax, 0x20(%r13)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movl $0x1, 0x28(%r13)
movq %rax, 0x30(%r13)
movq %rax, 0x40(%r13)
testq %rbp, %rbp
je 0x22021
movq $-0x1, %rax
cmpb $0x0, 0x1(%rbp,%rax)
leaq 0x1(%rax), %rax
jne 0x2200e
movq %rbp, (%r13)
movq %rax, 0x10(%r13)
leaq 0x1c0(%rsp), %rdi
movq %r13, %rsi
callq 0x251e6
leaq 0x58(%r12), %rbx
leaq 0x1c0(%rsp), %rbp
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2205e
leaq 0x8(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r12, %rdi
movq %rbp, %rcx
movq %r13, %r8
callq 0x26b12
jmp 0x2203e
leaq 0x38(%rsp), %rdi
callq 0xa27b0
leaq 0x48(%rsp), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
leaq 0x28(%rsp), %rdi
leaq 0x1c0(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x27730
leaq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x9f250
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq (%r15), %rax
movq %r15, %rdi
callq *0x28(%rax)
movl %eax, %ebp
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x220ca
callq 0x2c860
leaq 0x1012df(%rip), %rsi    # 0x1233b0
leaq 0x38(%rsp), %rdi
callq 0xa3250
leaq 0xb8(%rsp), %rdi
callq 0x7b2a0
movq %r14, %rdi
callq 0x26ab8
movq (%rsp), %rdi
callq 0x1b680
jmp 0x22100
movl $0x5, %ebp
movl %ebp, %eax
addq $0x10248, %rsp          # imm = 0x10248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x1d32d
movq %rax, %rdi
callq 0x2087b
movq %rax, %r15
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22140
callq 0x2c860
jmp 0x22140
jmp 0x2213d
movq %rax, %r15
leaq 0x101269(%rip), %rsi    # 0x1233b0
leaq 0x38(%rsp), %rdi
callq 0xa3250
leaq 0xb8(%rsp), %rdi
callq 0x7b2a0
jmp 0x2216c
jmp 0x22169
movq %rax, %r15
jmp 0x2217d
jmp 0x22169
movq %rax, %r15
movq %r14, %rdi
callq 0x26ab8
movq (%rsp), %rdi
callq 0x1b680
movq %r15, %rdi
callq 0x2ccc0
callq 0x2cd30
movl $0x2, %ebp
jmp 0x22100
jmp 0x2211b