// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4400
movq 0x40(%r14), %rax
testq %rax, %rax
jne 0x10876
movq 0x97bf(%rip), %rdi      # 0x19ff0
leaq 0x23a4(%rip), %rsi      # 0x12bdc
callq 0x4290
leaq 0x2968(%rip), %rsi      # 0x131ac
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x5caa
leaq 0x34(%rsp), %rsi
movl $0x42, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0xb17a
leaq 0x10(%rsp), %rdi
callq 0x4150
movq 0x40(%r14), %rax
shll $0x2, %ebp
testb $0x4, 0x20(%rax)
movslq %ebp, %rsi
leaq 0x20(%rsp), %rax
jne 0x1092e
movq %rax, -0x10(%rax)
leaq 0x10(%rsp), %rdi
pushq $0x20
popq %rdx
callq 0x4300
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4250
leaq 0x215f(%rip), %rsi      # 0x12a11
movq %rax, %rdi
callq 0x4290
movq 0x40(%r14), %rsi
movq %rax, %rdi
callq 0x4250
leaq 0x2641(%rip), %rsi      # 0x12f0e
movq %rax, %rdi
callq 0x4290
leaq 0x10(%rsp), %rdi
callq 0x4150
movq 0x40(%r14), %rax
movq 0x48(%rax), %rsi
testq %rsi, %rsi
je 0x10984
leaq 0x38(%rsp), %rdi
callq 0x4420
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xb2c7
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4250
leaq 0x10(%rsp), %rdi
callq 0x4150
leaq 0x38(%rsp), %rdi
callq 0x4150
jmp 0x10995
movq %rax, -0x10(%rax)
leaq 0x10(%rsp), %rdi
pushq $0x20
popq %rdx
callq 0x4300
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4250
leaq 0x20bc(%rip), %rsi      # 0x12a11
movq %rax, %rdi
callq 0x4290
movq 0x40(%r14), %rsi
movq %rax, %rdi
callq 0x4250
leaq 0x808(%rip), %rsi       # 0x11178
movq %rax, %rdi
callq 0x4290
leaq 0x10(%rsp), %rdi
callq 0x4150
jmp 0x109c1
leaq 0x2085(%rip), %rsi      # 0x12a10
leaq 0x58(%rsp), %rdi
callq 0x4290
leaq 0x281c(%rip), %rsi      # 0x131b8
leaq 0x58(%rsp), %rdi
callq 0x4290
movq 0x40(%r14), %rsi
movq %rax, %rdi
callq 0x4250
leaq 0x7bf(%rip), %rsi       # 0x11178
movq %rax, %rdi
callq 0x4290
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
leaq 0x58(%rsp), %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4150
jmp 0x109f9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x10a14
jmp 0x10a1b
jmp 0x10a0c
jmp 0x10a1b
jmp 0x10a1b
jmp 0x10a1b
jmp 0x10a0c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4150
jmp 0x10a1e
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560