// File: /workspace/github_cpp_makefile_star2_O2/WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.cc
// Function: testing::internal::XmlUnitTestResultPrinter::EscapeXml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
std::string XmlUnitTestResultPrinter::EscapeXml(
    const std::string& str, bool is_attribute) {
  Message m;

  for (size_t i = 0; i < str.size(); ++i) {
    const char ch = str[i];
    switch (ch) {
      case '<':
        m << "&lt;";
        break;
      case '>':
        m << "&gt;";
        break;
      case '&':
        m << "&amp;";
        break;
      case '\'':
        if (is_attribute)
          m << "&apos;";
        else
          m << '\'';
        break;
      case '"':
        if (is_attribute)
          m << "&quot;";
        else
          m << '"';
        break;
      default:
        if (IsValidXmlCharacter(ch)) {
          if (is_attribute && IsNormalizableWhitespace(ch))
            m << "&#x" << String::FormatByte(static_cast<unsigned char>(ch))
              << ";";
          else
            m << ch;
        }
        break;
    }
  }

  return m.GetString();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x8f22
xorl %r12d, %r12d
leaq 0x10aa4(%rip), %rbx     # 0x1eb60
leaq 0x18(%rsp), %r13
cmpq 0x8(%r14), %r12
jae 0xe221
movq (%r14), %rax
movzbl (%rax,%r12), %r15d
cmpl $0x22, %r15d
je 0xe1d7
cmpl $0x26, %r15d
je 0xe106
cmpl $0x27, %r15d
je 0xe130
cmpl $0x3e, %r15d
je 0xe11b
cmpl $0x3c, %r15d
jne 0xe14e
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq %rbx, %rsi
jmp 0xe1ec
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x10a54(%rip), %rsi     # 0x1eb6a
jmp 0xe1ec
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x10a3a(%rip), %rsi     # 0x1eb65
jmp 0xe1ec
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
testb %bpl, %bpl
je 0xe20d
leaq 0x10a27(%rip), %rsi     # 0x1eb70
jmp 0xe1ec
cmpb $0x1f, %r15b
jg 0xe16d
cmpl $0xd, %r15d
ja 0xe1f1
movl $0x2600, %eax           # imm = 0x2600
btl %r15d, %eax
jae 0xe1f1
testb %bpl, %bpl
je 0xe1f9
cmpl $0xd, %r15d
ja 0xe1f9
movl $0x2600, %eax           # imm = 0x2600
btl %r15d, %eax
jae 0xe1f9
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x109e7(%rip), %rsi     # 0x1eb7e
callq 0x6410
movq %r13, %rdi
movl %r15d, %esi
callq 0xae10
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq %r13, %rsi
callq 0x63c0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x109a6(%rip), %rsi     # 0x1eb6e
callq 0x6410
movq %r13, %rdi
callq 0x6a28
jmp 0xe1f1
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
testb %bpl, %bpl
je 0xe217
leaq 0x1098b(%rip), %rsi     # 0x1eb77
callq 0x6410
incq %r12
jmp 0xe0c1
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movsbl %r15b, %esi
callq 0x6550
jmp 0xe1f1
pushq $0x27
popq %rsi
callq 0x6550
jmp 0xe1f1
pushq $0x22
popq %rsi
callq 0x6550
jmp 0xe1f1
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x90f7
leaq 0x8(%rsp), %rdi
callq 0x731c
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe266
jmp 0xe266
jmp 0xe266
jmp 0xe266
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6a28
jmp 0xe269
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x731c
movq %rbx, %rdi
callq 0x6900
nop