// File: /workspace/github_cpp_makefile_star2_O1/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 $0x168, %rsp            # imm = 0x168
movq %rsi, %r13
movq %rdi, %r12
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x911d(%rip), %rsi      # 0x16a85
leaq 0x911a(%rip), %rdx      # 0x16a89
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x6e3c
leaq 0x40(%rsp), %r14
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9080(%rip), %rsi      # 0x16a11
leaq 0x907a(%rip), %rdx      # 0x16a12
movq %r14, %rdi
callq 0x6e3c
leaq 0x60(%rsp), %rbx
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x90d5(%rip), %rsi      # 0x16a8a
leaq 0x90d2(%rip), %rdx      # 0x16a8e
movq %rbx, %rdi
callq 0x6e3c
leaq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x952f(%rip), %rsi      # 0x16f0e
leaq 0x9529(%rip), %rdx      # 0x16f0f
callq 0x6e3c
leaq 0xa0(%rsp), %rbx
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9089(%rip), %rsi      # 0x16a8f
leaq 0x9087(%rip), %rdx      # 0x16a94
movq %rbx, %rdi
callq 0x6e3c
leaq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9031(%rip), %rsi      # 0x16a61
leaq 0x902b(%rip), %rdx      # 0x16a62
callq 0x6e3c
leaq 0xe0(%rsp), %rbx
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x903e(%rip), %rsi      # 0x16a95
leaq 0x903d(%rip), %rdx      # 0x16a9b
movq %rbx, %rdi
callq 0x6e3c
leaq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8fb6(%rip), %rsi      # 0x16a37
leaq 0x8fb0(%rip), %rdx      # 0x16a38
callq 0x6e3c
leaq 0x120(%rsp), %rbx
leaq 0x130(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8ff4(%rip), %rsi      # 0x16a9c
leaq 0x8ff3(%rip), %rdx      # 0x16aa2
movq %rbx, %rdi
callq 0x6e3c
leaq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x9343(%rip), %rsi      # 0x16e15
leaq 0x933d(%rip), %rdx      # 0x16e16
callq 0x6e3c
xorl %ebx, %ebx
movq %rbx, %rax
shlq $0x6, %rax
leaq (%rsp,%rax), %r14
addq $0x20, %r14
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x4580
cmpl $-0x1, %eax
je 0xdb2f
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x4580
movq 0x8(%r14), %rdx
movq 0x20(%r14), %rcx
movq 0x28(%r14), %r8
movq %r13, %rdi
movq %rax, %rsi
callq 0x4320
jmp 0xdaef
incq %rbx
cmpq $0x5, %rbx
jne 0xdae0
leaq 0x10(%r12), %rcx
movq %rcx, (%r12)
movq (%r13), %rdx
leaq 0x10(%r13), %rax
cmpq %rax, %rdx
je 0xdb5c
movq %rdx, (%r12)
movq (%rax), %rcx
movq %rcx, 0x10(%r12)
jmp 0xdb62
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r13), %rcx
movq %rcx, 0x8(%r12)
movq %rax, (%r13)
movq $0x0, 0x8(%r13)
movb $0x0, 0x10(%r13)
movq $-0x140, %rbx           # imm = 0xFEC0
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0xdb98
movq (%rbp), %rsi
incq %rsi
callq 0x42e0
addq $-0x20, %rbp
addq $0x20, %rbx
jne 0xdb83
movq %r12, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x10(%rsp)
movl $0x120, %ebp            # imm = 0x120
xorl %eax, %eax
jmp 0xdbd1
movq %rax, 0x10(%rsp)
movl $0x100, %ebp            # imm = 0x100
movb $0x1, %al
movb $0x1, %cl
movl %ecx, 0xc(%rsp)
movl $0xe0, %r13d
testb %al, %al
jne 0xdc33
leaq 0x10(%rsp), %r12
movq (%rsp,%rbp), %rdi
leaq (%r12,%rbp), %rax
cmpq %rdi, %rax
je 0xdbfe
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x20, %rbp
cmpq $0x100, %rbp            # imm = 0x100
jne 0xdbe6
jmp 0xdc33
movq %rax, 0x10(%rsp)
movl $0xe0, %r13d
movl $0x0, 0xc(%rsp)
jmp 0xdc33
movq %rax, 0x10(%rsp)
movb $0x1, %al
movl %eax, 0xc(%rsp)
movl $0xc0, %r13d
movb $0x1, %al
movl %eax, 0x1c(%rsp)
movl $0xa0, %ebp
cmpb $0x0, 0xc(%rsp)
jne 0xdc95
leaq 0x10(%rsp), %r12
movq (%rsp,%r13), %rdi
leaq (%r12,%r13), %rax
cmpq %rdi, %rax
je 0xdc62
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x20, %r13
cmpq $0xc0, %r13
jne 0xdc4a
jmp 0xdc95
movq %rax, 0x10(%rsp)
movl $0xa0, %ebp
movl $0x0, 0x1c(%rsp)
jmp 0xdc95
movq %rax, 0x10(%rsp)
movb $0x1, %al
movl %eax, 0x1c(%rsp)
movl $0x80, %ebp
movb $0x1, %al
movl %eax, 0xc(%rsp)
movl $0x60, %r13d
cmpb $0x0, 0x1c(%rsp)
jne 0xdcfa
leaq 0x10(%rsp), %r12
movq (%rsp,%rbp), %rdi
leaq (%r12,%rbp), %rax
cmpq %rdi, %rax
je 0xdcc5
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x20, %rbp
cmpq $0x80, %rbp
jne 0xdcad
jmp 0xdcfa
movq %rax, 0x10(%rsp)
movl $0x60, %r13d
movl $0x0, 0xc(%rsp)
jmp 0xdcfa
movq %rax, 0x10(%rsp)
movb $0x1, %al
movl %eax, 0xc(%rsp)
movl $0x40, %r13d
movb $0x1, %bpl
cmpb $0x0, 0xc(%rsp)
jne 0xdd48
leaq 0x10(%rsp), %r12
movq (%rsp,%r13), %rdi
leaq (%r12,%r13), %rax
cmpq %rdi, %rax
je 0xdd21
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x20, %r13
cmpq $0x40, %r13
jne 0xdd09
jmp 0xdd48
movq %rax, 0x10(%rsp)
leaq 0x20(%rsp), %rbx
xorl %ebp, %ebp
jmp 0xdd48
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
movq %r15, %rbx
movq %r15, %r14
cmpq %r14, %r15
sete %al
orb %bpl, %al
jne 0xdd80
addq $-0x10, %r14
leaq 0x20(%rsp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0xdd70
movq (%r14), %rsi
incq %rsi
callq 0x42e0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0xdd5c
leaq 0x20(%rsp), %r14
cmpq %rbx, %r14
je 0xddb2
addq $-0x10, %rbx
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0xdda2
movq (%rbx), %rsi
incq %rsi
callq 0x42e0
leaq -0x20(%rbx), %rax
addq $-0x10, %rbx
cmpq %r14, %rbx
movq %rax, %rbx
jne 0xdd8e
movq 0x10(%rsp), %rbx
jmp 0xddce
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4a25
movq %rbx, %rdi
callq 0x4590