// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq $0x0, 0x40(%r14)
jne 0x14636
movq 0x8a13(%rip), %rdi      # 0x1cff0
leaq 0x25f8(%rip), %rsi      # 0x16bdc
movl $0x31, %edx
callq 0x4340
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2be0(%rip), %rsi      # 0x171de
leaq 0x2be4(%rip), %rdx      # 0x171e9
movq %rsp, %rdi
callq 0x6e3c
leaq 0x24(%rsp), %rsi
movl $0x42, (%rsi)
movq %rsp, %rdi
callq 0xd138
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x14636
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 0x1474c
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 0x2393(%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 0x2869(%rip), %rsi      # 0x16f0e
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x146c8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x40(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x147c7
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x6dac
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0xd30c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x4340
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1472c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x147da
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x147da
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 0x2296(%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 0x9d6(%rip), %rsi       # 0x15178
movl $0x2, %edx
movq %rax, %rdi
callq 0x4340
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14819
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x14819
leaq 0x2242(%rip), %rsi      # 0x16a10
leaq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0x4340
leaq 0x2a09(%rip), %rsi      # 0x171ea
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 0x96c(%rip), %rsi       # 0x15178
movl $0x2, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x44e0
movq 0x8793(%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 0x14875
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x14875
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x148bc
movq 0x38(%rsp), %rsi
jmp 0x148af
jmp 0x148b9
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x148aa
jmp 0x148bc
jmp 0x148b9
jmp 0x148b9
jmp 0x148b9
jmp 0x1489e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x148bc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x148bc
movq %rax, %rbx
movq 0x86fd(%rip), %rsi      # 0x1cfc0
leaq 0x48(%rsp), %rdi
callq 0x4170
leaq 0xb8(%rsp), %rdi
callq 0x4100
movq %rbx, %rdi
callq 0x4590