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


    static string repl_items[][2]={
         { "\r\n",              "\n" }
        ,{ "<",                 "%%$tap3edit$%%lt;" }
        ,{ ">",                 "%%$tap3edit$%%gt;" }
        ,{ "'",                 "%%$tap3edit$%%apos;" }
        ,{ "\"",                "%%$tap3edit$%%quot;" }
        ,{ "&",                 "%%$tap3edit$%%amp;" }
        ,{ "%%$tap3edit$%%",    "&" }
    };

    for (i=0;i<7;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
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rsi, -0xb8(%rbp)
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpb $0x0, 0x1c75e(%rip)     # 0x31bf0
jne 0x15944
leaq 0x1c751(%rip), %rdi     # 0x31bf0
callq 0x4710
cmpl $0x0, %eax
je 0x15944
movb $0x1, -0x9c(%rbp)
leaq 0x1c575(%rip), %rax     # 0x31a30
movq %rax, -0xc8(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x3e(%rbp)
movq %rax, -0x28(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x46e0
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rdx
leaq 0x105f9(%rip), %rsi     # 0x25aec
callq 0x7670
jmp 0x154fa
leaq 0x1c54f(%rip), %rax     # 0x31a50
movq %rax, -0xd8(%rbp)
movq %rax, -0x28(%rbp)
leaq -0x3d(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x46e0
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rdx
leaq 0x105bc(%rip), %rsi     # 0x25aed
callq 0x7670
jmp 0x15538
movb $0x0, -0x3e(%rbp)
leaq 0x1c52d(%rip), %rax     # 0x31a70
movq %rax, -0xe8(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x4b(%rbp)
movq %rax, -0x48(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x46e0
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rdx
leaq 0x10574(%rip), %rsi     # 0x25aef
callq 0x7670
jmp 0x15582
leaq 0x1c507(%rip), %rax     # 0x31a90
movq %rax, -0xf8(%rbp)
movq %rax, -0x48(%rbp)
leaq -0x4a(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x46e0
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rdx
leaq 0x10538(%rip), %rsi     # 0x25af1
callq 0x7670
jmp 0x155c0
movb $0x0, -0x4b(%rbp)
leaq 0x1c4e5(%rip), %rax     # 0x31ab0
movq %rax, -0x108(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x5b(%rbp)
movq %rax, -0x58(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x46e0
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0x109e9(%rip), %rsi     # 0x25fec
callq 0x7670
jmp 0x1560a
leaq 0x1c4bf(%rip), %rax     # 0x31ad0
movq %rax, -0x118(%rbp)
movq %rax, -0x58(%rbp)
leaq -0x5a(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x46e0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rdx
leaq 0x104c2(%rip), %rsi     # 0x25b03
callq 0x7670
jmp 0x15648
movb $0x0, -0x5b(%rbp)
leaq 0x1c49d(%rip), %rax     # 0x31af0
movq %rax, -0x128(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x6b(%rbp)
movq %rax, -0x68(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x46e0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0x1048a(%rip), %rsi     # 0x25b15
callq 0x7670
jmp 0x15692
leaq 0x1c477(%rip), %rax     # 0x31b10
movq %rax, -0x138(%rbp)
movq %rax, -0x68(%rbp)
leaq -0x6a(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x46e0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rdx
leaq 0x1044e(%rip), %rsi     # 0x25b17
callq 0x7670
jmp 0x156d0
movb $0x0, -0x6b(%rbp)
leaq 0x1c455(%rip), %rax     # 0x31b30
movq %rax, -0x148(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x7b(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x46e0
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rdx
leaq 0x107e0(%rip), %rsi     # 0x25ef3
callq 0x7670
jmp 0x1571a
leaq 0x1c42f(%rip), %rax     # 0x31b50
movq %rax, -0x158(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x7a(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x46e0
movq -0x158(%rbp), %rdi
movq -0x150(%rbp), %rdx
leaq 0x103da(%rip), %rsi     # 0x25b2b
callq 0x7670
jmp 0x15758
movb $0x0, -0x7b(%rbp)
leaq 0x1c40d(%rip), %rax     # 0x31b70
movq %rax, -0x168(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x8b(%rbp)
movq %rax, -0x88(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x46e0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rdx
leaq 0x1039b(%rip), %rsi     # 0x25b3f
callq 0x7670
jmp 0x157ab
leaq 0x1c3de(%rip), %rax     # 0x31b90
movq %rax, -0x178(%rbp)
movq %rax, -0x88(%rbp)
leaq -0x8a(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x46e0
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rdx
leaq 0x10359(%rip), %rsi     # 0x25b41
callq 0x7670
jmp 0x157ef
movb $0x0, -0x8b(%rbp)
leaq 0x1c3b3(%rip), %rax     # 0x31bb0
movq %rax, -0x188(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x9b(%rbp)
movq %rax, -0x98(%rbp)
leaq -0x99(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x46e0
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rdx
leaq 0x10316(%rip), %rsi     # 0x25b54
callq 0x7670
jmp 0x15845
leaq 0x1c384(%rip), %rax     # 0x31bd0
movq %rax, -0x198(%rbp)
movq %rax, -0x98(%rbp)
leaq -0x9a(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x46e0
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rdx
leaq 0x102bd(%rip), %rsi     # 0x25b3f
callq 0x7670
jmp 0x15889
movb $0x0, -0x9b(%rbp)
movb $0x0, -0x9c(%rbp)
leaq -0x9a(%rbp), %rdi
callq 0x43d0
leaq -0x99(%rbp), %rdi
callq 0x43d0
leaq -0x8a(%rbp), %rdi
callq 0x43d0
leaq -0x89(%rbp), %rdi
callq 0x43d0
leaq -0x7a(%rbp), %rdi
callq 0x43d0
leaq -0x79(%rbp), %rdi
callq 0x43d0
leaq -0x6a(%rbp), %rdi
callq 0x43d0
leaq -0x69(%rbp), %rdi
callq 0x43d0
leaq -0x5a(%rbp), %rdi
callq 0x43d0
leaq -0x59(%rbp), %rdi
callq 0x43d0
leaq -0x4a(%rbp), %rdi
callq 0x43d0
leaq -0x49(%rbp), %rdi
callq 0x43d0
leaq -0x3d(%rbp), %rdi
callq 0x43d0
leaq -0x29(%rbp), %rdi
callq 0x43d0
leaq -0x10f08(%rip), %rdi    # 0x4a20
xorl %eax, %eax
movl %eax, %esi
leaq 0x1bac5(%rip), %rdx     # 0x313f8
callq 0x42d0
leaq 0x1c2b1(%rip), %rdi     # 0x31bf0
callq 0x4210
movl $0x0, -0x18(%rbp)
cmpl $0x7, -0x18(%rbp)
jge 0x15e7d
jmp 0x15957
movq -0xb8(%rbp), %rdi
movslq -0x18(%rbp), %rax
leaq 0x1c0c7(%rip), %rsi     # 0x31a30
shlq $0x6, %rax
addq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x47c0
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x15e6d
movq -0xb8(%rbp), %rdi
movslq -0x18(%rbp), %rax
leaq 0x1c099(%rip), %rsi     # 0x31a30
shlq $0x6, %rax
addq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x47c0
movq %rax, -0x1a0(%rbp)
movslq -0x18(%rbp), %rax
leaq 0x1c077(%rip), %rdi     # 0x31a30
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4250
movq -0xb8(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
movq %rax, %rdx
movslq -0x18(%rbp), %rax
leaq 0x1c04f(%rip), %rcx     # 0x31a30
shlq $0x6, %rax
addq %rax, %rcx
addq $0x20, %rcx
callq 0x4130
jmp 0x15957
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15daf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15da6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15d41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15d38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15ccd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15cc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15c59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15c50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15be5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15bdc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15b68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15b5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15ae8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x9a(%rbp), %rdi
callq 0x43d0
leaq -0x99(%rbp), %rdi
callq 0x43d0
testb $0x1, -0x9b(%rbp)
jne 0x15aff
jmp 0x15b5a
movq -0x98(%rbp), %rax
leaq 0x1bf23(%rip), %rcx     # 0x31a30
addq $0x180, %rcx            # imm = 0x180
cmpq %rax, %rcx
movq %rax, -0x1a8(%rbp)
je 0x15b58
movq -0x1a8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x41e0
movq -0x1b0(%rbp), %rax
leaq 0x1beeb(%rip), %rcx     # 0x31a30
addq $0x180, %rcx            # imm = 0x180
cmpq %rcx, %rax
movq %rax, -0x1a8(%rbp)
jne 0x15b20
jmp 0x15b5a
jmp 0x15b5c
leaq -0x8a(%rbp), %rdi
callq 0x43d0
leaq -0x89(%rbp), %rdi
callq 0x43d0
testb $0x1, -0x8b(%rbp)
jne 0x15b7f
jmp 0x15bda
movq -0x88(%rbp), %rax
leaq 0x1bea3(%rip), %rcx     # 0x31a30
addq $0x140, %rcx            # imm = 0x140
cmpq %rax, %rcx
movq %rax, -0x1b8(%rbp)
je 0x15bd8
movq -0x1b8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x41e0
movq -0x1c0(%rbp), %rax
leaq 0x1be6b(%rip), %rcx     # 0x31a30
addq $0x140, %rcx            # imm = 0x140
cmpq %rcx, %rax
movq %rax, -0x1b8(%rbp)
jne 0x15ba0
jmp 0x15bda
jmp 0x15bdc
leaq -0x7a(%rbp), %rdi
callq 0x43d0
leaq -0x79(%rbp), %rdi
callq 0x43d0
testb $0x1, -0x7b(%rbp)
jne 0x15bf6
jmp 0x15c4e
movq -0x78(%rbp), %rax
leaq 0x1be2f(%rip), %rcx     # 0x31a30
addq $0x100, %rcx            # imm = 0x100
cmpq %rax, %rcx
movq %rax, -0x1c8(%rbp)
je 0x15c4c
movq -0x1c8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x41e0
movq -0x1d0(%rbp), %rax
leaq 0x1bdf7(%rip), %rcx     # 0x31a30
addq $0x100, %rcx            # imm = 0x100
cmpq %rcx, %rax
movq %rax, -0x1c8(%rbp)
jne 0x15c14
jmp 0x15c4e
jmp 0x15c50
leaq -0x6a(%rbp), %rdi
callq 0x43d0
leaq -0x69(%rbp), %rdi
callq 0x43d0
testb $0x1, -0x6b(%rbp)
jne 0x15c6a
jmp 0x15cc2
movq -0x68(%rbp), %rax
leaq 0x1bdbb(%rip), %rcx     # 0x31a30
addq $0xc0, %rcx
cmpq %rax, %rcx
movq %rax, -0x1d8(%rbp)
je 0x15cc0
movq -0x1d8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x41e0
movq -0x1e0(%rbp), %rax
leaq 0x1bd83(%rip), %rcx     # 0x31a30
addq $0xc0, %rcx
cmpq %rcx, %rax
movq %rax, -0x1d8(%rbp)
jne 0x15c88
jmp 0x15cc2
jmp 0x15cc4
leaq -0x5a(%rbp), %rdi
callq 0x43d0
leaq -0x59(%rbp), %rdi
callq 0x43d0
testb $0x1, -0x5b(%rbp)
jne 0x15cde
jmp 0x15d36
movq -0x58(%rbp), %rax
leaq 0x1bd47(%rip), %rcx     # 0x31a30
addq $0x80, %rcx
cmpq %rax, %rcx
movq %rax, -0x1e8(%rbp)
je 0x15d34
movq -0x1e8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x41e0
movq -0x1f0(%rbp), %rax
leaq 0x1bd0f(%rip), %rcx     # 0x31a30
addq $0x80, %rcx
cmpq %rcx, %rax
movq %rax, -0x1e8(%rbp)
jne 0x15cfc
jmp 0x15d36
jmp 0x15d38
leaq -0x4a(%rbp), %rdi
callq 0x43d0
leaq -0x49(%rbp), %rdi
callq 0x43d0
testb $0x1, -0x4b(%rbp)
jne 0x15d52
jmp 0x15da4
movq -0x48(%rbp), %rax
leaq 0x1bcd3(%rip), %rcx     # 0x31a30
addq $0x40, %rcx
cmpq %rax, %rcx
movq %rax, -0x1f8(%rbp)
je 0x15da2
movq -0x1f8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x200(%rbp)
callq 0x41e0
movq -0x200(%rbp), %rax
leaq 0x1bc9e(%rip), %rcx     # 0x31a30
addq $0x40, %rcx
cmpq %rcx, %rax
movq %rax, -0x1f8(%rbp)
jne 0x15d6d
jmp 0x15da4
jmp 0x15da6
leaq -0x3d(%rbp), %rdi
callq 0x43d0
leaq -0x29(%rbp), %rdi
callq 0x43d0
testb $0x1, -0x3e(%rbp)
jne 0x15dc0
jmp 0x15e0a
movq -0x28(%rbp), %rax
leaq 0x1bc65(%rip), %rcx     # 0x31a30
cmpq %rax, %rcx
movq %rax, -0x208(%rbp)
je 0x15e08
movq -0x208(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x210(%rbp)
callq 0x41e0
movq -0x210(%rbp), %rax
leaq 0x1bc34(%rip), %rcx     # 0x31a30
cmpq %rcx, %rax
movq %rax, -0x208(%rbp)
jne 0x15dd7
jmp 0x15e0a
testb $0x1, -0x9c(%rbp)
jne 0x15e15
jmp 0x15e5f
movq -0x20(%rbp), %rax
leaq 0x1bc10(%rip), %rcx     # 0x31a30
cmpq %rax, %rcx
movq %rax, -0x218(%rbp)
je 0x15e5d
movq -0x218(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x220(%rbp)
callq 0x41e0
movq -0x220(%rbp), %rax
leaq 0x1bbdf(%rip), %rcx     # 0x31a30
cmpq %rcx, %rax
movq %rax, -0x218(%rbp)
jne 0x15e2c
jmp 0x15e5f
leaq 0x1bd8a(%rip), %rdi     # 0x31bf0
callq 0x4200
jmp 0x15ea0
jmp 0x15e6f
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1594b
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdi
callq 0x41d0
movq -0xa8(%rbp), %rax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x46d0
nopl (%rax)