// File: /workspace/github_cpp_makefile_star2_O2/madpilot[P]mDNSResolver/test/catch.h
// Function: Catch::XmlEncode::encodeTo(std::ostream&) const
void encodeTo( std::ostream& os ) const {

            // Apostrophe escaping not necessary if we always use " to write attributes
            // (see: http://www.w3.org/TR/xml/#syntax)

            for( std::size_t i = 0; i < m_str.size(); ++ i ) {
                char c = m_str[i];
                switch( c ) {
                    case '<':   os << "&lt;"; break;
                    case '&':   os << "&amp;"; break;

                    case '>':
                        // See: http://www.w3.org/TR/xml/#syntax
                        if( i > 2 && m_str[i-1] == ']' && m_str[i-2] == ']' )
                            os << "&gt;";
                        else
                            os << c;
                        break;

                    case '\"':
                        if( m_forWhat == ForAttributes )
                            os << "&quot;";
                        else
                            os << c;
                        break;

                    default:
                        // Escape control chars - based on contribution by @espenalb in PR #465 and
                        // by @mrpi PR #588
                        if ( ( c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' )
                            os << "&#x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>( c ) << ';';
                        else
                            os << c;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
leaq 0x19c3f(%rip), %r12     # 0x3d8cf
cmpq 0x8(%r14), %r13
jae 0x23db2
movq (%r14), %rcx
movzbl (%rcx,%r13), %eax
cmpl $0x22, %eax
je 0x23cf8
cmpl $0x26, %eax
je 0x23cbe
cmpl $0x3e, %eax
je 0x23cca
cmpl $0x3c, %eax
jne 0x23d17
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x23d0d
movq %rbx, %rdi
leaq 0x19c0c(%rip), %rsi     # 0x3d8d4
jmp 0x23d0d
cmpq $0x3, %r13
jb 0x23d90
cmpb $0x5d, -0x1(%rcx,%r13)
jne 0x23d90
cmpb $0x5d, -0x2(%rcx,%r13)
jne 0x23d90
movq %rbx, %rdi
leaq 0x19be4(%rip), %rsi     # 0x3d8da
jmp 0x23d0d
cmpl $0x1, 0x20(%r14)
jne 0x23d97
movq %rbx, %rdi
leaq 0x19bd2(%rip), %rsi     # 0x3d8df
callq 0xa3c0
jmp 0x23da2
movsbl %al, %r15d
cmpb $0x9, %r15b
jl 0x23d33
leal -0xe(%rax), %ecx
cmpb $0x12, %cl
setae %cl
cmpb $0x7f, %al
setne %al
testb %cl, %al
jne 0x23daa
movq %rbx, %rdi
leaq 0x19ba9(%rip), %rsi     # 0x3d8e6
callq 0xa3c0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
orl $0x4000, 0x18(%rax,%rdx) # imm = 0x4000
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
pushq $0x30
popq %rsi
callq 0xa5d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0xa690
movq %rax, %rdi
pushq $0x3b
jmp 0x23d9c
movq %rbx, %rdi
pushq $0x3e
jmp 0x23d9c
movq %rbx, %rdi
pushq $0x22
popq %rsi
callq 0xa450
incq %r13
jmp 0x23c90
movq %rbx, %rdi
movl %r15d, %esi
jmp 0x23d9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop