// File: dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// 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
                        if ( ( c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' )
                            os << "&#x" << std::uppercase << std::hex << static_cast<int>( c );
                        else
                            os << c;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0xe480
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x51eb1
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe730
movb (%rax), %al
movb %al, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x1c, %eax
ja 0x51e2f
movq -0x38(%rbp), %rax
leaq 0x2ba30(%rip), %rcx     # 0x7d7a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
leaq 0x2caa1(%rip), %rsi     # 0x7e829
callq 0xe670
jmp 0x51e9e
movq -0x10(%rbp), %rdi
leaq 0x2ca91(%rip), %rsi     # 0x7e82e
callq 0xe670
jmp 0x51e9e
cmpq $0x2, -0x18(%rbp)
jbe 0x51df2
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
subq $0x1, %rsi
callq 0xe730
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0x51df2
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
subq $0x2, %rsi
callq 0xe730
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0x51df2
movq -0x10(%rbp), %rdi
leaq 0x2ca49(%rip), %rsi     # 0x7e834
callq 0xe670
jmp 0x51dff
movq -0x10(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0xe7c0
jmp 0x51e9e
movq -0x28(%rbp), %rax
cmpl $0x1, 0x20(%rax)
jne 0x51e20
movq -0x10(%rbp), %rdi
leaq 0x2ca20(%rip), %rsi     # 0x7e839
callq 0xe670
jmp 0x51e2d
movq -0x10(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0xe7c0
jmp 0x51e9e
movsbl -0x19(%rbp), %eax
cmpl $0x9, %eax
jl 0x51e53
movsbl -0x19(%rbp), %eax
cmpl $0xd, %eax
jle 0x51e4a
movsbl -0x19(%rbp), %eax
cmpl $0x20, %eax
jl 0x51e53
movsbl -0x19(%rbp), %eax
cmpl $0x7f, %eax
jne 0x51e8f
movq -0x10(%rbp), %rdi
leaq 0x2c9e2(%rip), %rsi     # 0x7e840
callq 0xe670
movq %rax, %rdi
leaq 0x53(%rip), %rsi        # 0x51ec0
callq 0xe1d0
movq %rax, %rdi
leaq -0x3621c(%rip), %rsi    # 0x1bc60
callq 0xe1d0
movq %rax, %rdi
movsbl -0x19(%rbp), %esi
callq 0xeb40
jmp 0x51e9c
movq -0x10(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0xe7c0
jmp 0x51e9e
jmp 0x51ea0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x51d20
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)