// File: /workspace/github_cpp_makefile_star2_O1/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, 0x30(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x9de4
cmpq $0x0, 0x8(%r14)
je 0x10d67
movq 0x8(%rsp), %r15
addq $0x10, %r15
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
movq (%r14), %rax
movb (%rax,%rbx), %al
movzbl %al, %r13d
cmpl $0x26, %r13d
jle 0x10c25
cmpl $0x27, %r13d
je 0x10c3f
movl $0x4, %edx
cmpl $0x3e, %r13d
je 0x10c67
cmpl $0x3c, %r13d
jne 0x10c9f
leaq 0x17f6d(%rip), %rsi     # 0x28b90
jmp 0x10c85
cmpl $0x22, %r13d
je 0x10c70
cmpl $0x26, %r13d
jne 0x10c9f
movl $0x5, %edx
leaq 0x17f5d(%rip), %rsi     # 0x28b9a
jmp 0x10c85
movl $0x6, %edx
leaq 0x17f55(%rip), %rsi     # 0x28ba0
testb %bpl, %bpl
jne 0x10c85
movb $0x27, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x6510
jmp 0x10c8d
leaq 0x17f27(%rip), %rsi     # 0x28b95
jmp 0x10c85
movl $0x6, %edx
leaq 0x17f2b(%rip), %rsi     # 0x28ba7
testb %bpl, %bpl
je 0x10d4d
movq %r15, %rdi
callq 0x6510
incq %rbx
cmpq 0x8(%r14), %rbx
jb 0x10bf1
jmp 0x10d67
cmpb $0x1f, %al
jg 0x10cb4
cmpl $0xd, %r13d
ja 0x10c8d
movl $0x2600, %ecx           # imm = 0x2600
btl %r13d, %ecx
jae 0x10c8d
testb %bpl, %bpl
je 0x10d34
cmpl $0xd, %r13d
ja 0x10d34
movl $0x2600, %ecx           # imm = 0x2600
btl %r13d, %ecx
jae 0x10d34
movl $0x3, %edx
movq %r15, %rdi
leaq 0x17ed5(%rip), %rsi     # 0x28bae
callq 0x6510
movq %r12, %rdi
movl %r13d, %esi
callq 0xc4bc
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x6510
movl $0x1, %edx
movq %r15, %rdi
leaq 0x17e94(%rip), %rsi     # 0x28b9e
callq 0x6510
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x10c8d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6430
jmp 0x10c8d
movb %al, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x6510
jmp 0x10c8d
movb $0x22, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x6510
jmp 0x10c8d
movq 0x8(%rsp), %r14
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa059
testq %r14, %r14
je 0x10d93
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10dce
jmp 0x10dce
jmp 0x10dce
jmp 0x10dce
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x10dd1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6430
jmp 0x10dd1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x10dea
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x68e0