// File: /workspace/github_cpp_makefile_star2_O3/tap3edit[P]tap3xml/XmlItem.cpp
// Function: XmlItem::encode[abi:cxx11](int)
string XmlItem::encode(int depth)
{
    ostringstream item;
    
    extern string apply_xml_rules(string str);

    if (_tree==NULL) {
        cerr << "treenode structure was not set with tree() method";
        err_trace(__FILE__, __LINE__);
    }


    /* 1. Preparing XML Item */

    if ( !_tree->pc )
    {
        item << string(depth*4, ' ') << "<" << _tree->tagname << ">";
        /* _001_ { */
        if (_tree->value == NULL)
            item << "";
        else
            item << apply_xml_rules(*_tree->value) ;
        /* _001_ } */
        item << "</" << _tree->tagname << ">\n";
    }
    else
    {
        item << string(depth*4, ' ') << "<" << _tree->tagname << ">\n";
    }


    /* 2. Return value */

    return  item.str();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4420
movq 0x40(%r14), %rax
testq %rax, %rax
jne 0x13ec4
movq 0x9189(%rip), %rdi      # 0x1cff0
leaq 0x2d6e(%rip), %rsi      # 0x16bdc
movl $0x31, %edx
callq 0x4340
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3324(%rip), %rsi      # 0x171ac
leaq 0x3328(%rip), %rdx      # 0x171b7
movq %rsp, %rdi
callq 0x6c96
leaq 0x24(%rsp), %rsi
movl $0x42, (%rsi)
movq %rsp, %rdi
callq 0xcde4
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x13ec0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x40(%r14), %rax
shll $0x2, %ebp
testb $0x4, 0x20(%rax)
movslq %ebp, %rsi
leaq 0x10(%rsp), %r12
jne 0x13fd6
movq %r12, -0x10(%r12)
movq %rsp, %rdi
movl $0x20, %edx
callq 0x4350
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x4340
movq %rax, %r15
leaq 0x2b09(%rip), %rsi      # 0x16a11
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq 0x40(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4340
leaq 0x2fdf(%rip), %rsi      # 0x16f0e
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13f52
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x40(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x14051
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x6c00
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0xcfb0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x4340
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13fb6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x14064
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x14064
movq %r12, -0x10(%r12)
movq %rsp, %rdi
movl $0x20, %edx
callq 0x4350
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x4340
movq %rax, %r15
leaq 0x2a0c(%rip), %rsi      # 0x16a11
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq 0x40(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4340
leaq 0x114c(%rip), %rsi      # 0x15178
movl $0x2, %edx
movq %rax, %rdi
callq 0x4340
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x140a3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x140a3
leaq 0x29b8(%rip), %rsi      # 0x16a10
leaq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0x4340
leaq 0x314d(%rip), %rsi      # 0x171b8
leaq 0x48(%rsp), %rdi
movl $0x2, %edx
callq 0x4340
movq 0x40(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
callq 0x4340
leaq 0x10e2(%rip), %rsi      # 0x15178
movl $0x2, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x44e0
movq 0x8f09(%rip), %rsi      # 0x1cfc0
leaq 0x48(%rsp), %rdi
callq 0x4170
leaq 0xb8(%rsp), %rdi
callq 0x4100
movq %rbx, %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x140ff
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x140ff
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x14146
movq 0x38(%rsp), %rsi
jmp 0x14139
jmp 0x14143
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x14134
jmp 0x14146
jmp 0x14143
jmp 0x14143
jmp 0x14143
jmp 0x14128
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14146
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x14146
movq %rax, %rbx
movq 0x8e73(%rip), %rsi      # 0x1cfc0
leaq 0x48(%rsp), %rdi
callq 0x4170
leaq 0xb8(%rsp), %rdi
callq 0x4100
movq %rbx, %rdi
callq 0x4590