// File: /workspace/github_cpp_makefile_star2_O3/tap3edit[P]tap3xml/global.cpp
// Function: remove_xml_rules(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string remove_xml_rules(string str)
{
    int pos, i;


    string repl_items[][2]={
         { "&lt;",      "<" }
        ,{ "&gt;",      ">" }
        ,{ "&amp;",     "&" }
        ,{ "&apos;",    "'" }
        ,{ "&quot;",    "\"" }
    };

    for (i=0;i<5;i++)
    {
        while ((pos=str.find(repl_items[i][0])) != (int)string::npos)
        {
            str.replace(str.find(repl_items[i][0]),repl_items[i][0].size(),repl_items[i][1]);
        }
    }

    return str;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, %r12
movq %rdi, %r15
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9662(%rip), %rsi      # 0x16a85
leaq 0x965f(%rip), %rdx      # 0x16a89
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x6c96
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x95c7(%rip), %rsi      # 0x16a11
leaq 0x95c1(%rip), %rdx      # 0x16a12
callq 0x6c96
leaq 0x40(%rsp), %r14
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x961f(%rip), %rsi      # 0x16a8a
leaq 0x961c(%rip), %rdx      # 0x16a8e
movq %r14, %rdi
callq 0x6c96
leaq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9a7f(%rip), %rsi      # 0x16f0e
leaq 0x9a79(%rip), %rdx      # 0x16f0f
callq 0x6c96
leaq 0x80(%rsp), %r14
leaq 0x90(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x95d9(%rip), %rsi      # 0x16a8f
leaq 0x95d7(%rip), %rdx      # 0x16a94
movq %r14, %rdi
callq 0x6c96
leaq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9581(%rip), %rsi      # 0x16a61
leaq 0x957b(%rip), %rdx      # 0x16a62
callq 0x6c96
leaq 0xc0(%rsp), %r14
leaq 0xd0(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x958e(%rip), %rsi      # 0x16a95
leaq 0x958d(%rip), %rdx      # 0x16a9b
movq %r14, %rdi
callq 0x6c96
leaq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9506(%rip), %rsi      # 0x16a37
leaq 0x9500(%rip), %rdx      # 0x16a38
callq 0x6c96
leaq 0x100(%rsp), %r14
leaq 0x110(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x9544(%rip), %rsi      # 0x16a9c
leaq 0x9543(%rip), %rdx      # 0x16aa2
movq %r14, %rdi
callq 0x6c96
leaq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x9893(%rip), %rsi      # 0x16e15
leaq 0x988d(%rip), %rdx      # 0x16e16
callq 0x6c96
xorl %ebx, %ebx
movq %rbx, %rax
shlq $0x6, %rax
leaq (%rsp,%rax), %r14
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r12, %rdi
xorl %edx, %edx
callq 0x4580
cmpl $-0x1, %eax
je 0xd5db
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r12, %rdi
xorl %edx, %edx
callq 0x4580
movq 0x8(%r14), %rdx
movq 0x20(%r14), %rcx
movq 0x28(%r14), %r8
movq %r12, %rdi
movq %rax, %rsi
callq 0x4320
jmp 0xd59b
incq %rbx
cmpq $0x5, %rbx
jne 0xd590
leaq 0x10(%r15), %rcx
movq %rcx, (%r15)
movq (%r12), %rdx
leaq 0x10(%r12), %rax
cmpq %rax, %rdx
je 0xd605
movq %rdx, (%r15)
movq (%rax), %rcx
movq %rcx, 0x10(%r15)
jmp 0xd60b
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%r15)
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq $-0x140, %rbx           # imm = 0xFEC0
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0xd643
movq (%r13), %rsi
incq %rsi
callq 0x42e0
addq $-0x20, %r13
addq $0x20, %rbx
jne 0xd62e
movq %r15, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x100(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd6d5
movq 0x110(%rsp), %rsi
jmp 0xd6c8
jmp 0xd6d2
movq %rax, %r15
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0xd6d5
movq 0xd0(%rsp), %rsi
jmp 0xd6c8
jmp 0xd6d2
movq %rax, %r15
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0xd6d5
movq 0x90(%rsp), %rsi
jmp 0xd6c8
jmp 0xd6d2
movq %rax, %r15
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0xd6d5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0xd6d5
movq %rax, %r15
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0xd6ed
movq (%r14), %rsi
incq %rsi
callq 0x42e0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0xd6d9
jmp 0xd72d
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xd72d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0xd72d
movq %rax, %r15
leaq 0x140(%rsp), %rdi
movq %rsp, %rsi
callq 0x487a
movq %r15, %rdi
callq 0x4590