// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movq %rdi, 0x28(%rsp)
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x9d20
cmpq $0x0, 0x8(%r15)
movq (%rbx), %rbx
je 0x10a13
leaq 0x10(%rbx), %r12
xorl %r13d, %r13d
movq (%r15), %rax
movb (%rax,%r13), %al
movzbl %al, %r14d
cmpl $0x26, %r14d
jle 0x108c9
cmpl $0x27, %r14d
je 0x108e3
movl $0x4, %edx
cmpl $0x3e, %r14d
je 0x1090d
cmpl $0x3c, %r14d
jne 0x10945
leaq 0x182c9(%rip), %rsi     # 0x28b90
jmp 0x1092b
cmpl $0x22, %r14d
je 0x10916
cmpl $0x26, %r14d
jne 0x10945
movl $0x5, %edx
leaq 0x182b9(%rip), %rsi     # 0x28b9a
jmp 0x1092b
movl $0x6, %edx
leaq 0x182b1(%rip), %rsi     # 0x28ba0
testb %bpl, %bpl
jne 0x1092b
movb $0x27, 0x8(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6510
jmp 0x10933
leaq 0x18281(%rip), %rsi     # 0x28b95
jmp 0x1092b
movl $0x6, %edx
leaq 0x18285(%rip), %rsi     # 0x28ba7
testb %bpl, %bpl
je 0x109f7
movq %r12, %rdi
callq 0x6510
incq %r13
cmpq 0x8(%r15), %r13
jb 0x10894
jmp 0x10a13
cmpb $0x1f, %al
jg 0x1095a
cmpl $0xd, %r14d
ja 0x10933
movl $0x2600, %ecx           # imm = 0x2600
btl %r14d, %ecx
jae 0x10933
testb %bpl, %bpl
je 0x109dc
cmpl $0xd, %r14d
ja 0x109dc
movl $0x2600, %ecx           # imm = 0x2600
btl %r14d, %ecx
jae 0x109dc
movl $0x3, %edx
movq %r12, %rdi
leaq 0x1822f(%rip), %rsi     # 0x28bae
callq 0x6510
leaq 0x8(%rsp), %rdi
movl %r14d, %esi
callq 0xc388
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x6510
movl $0x1, %edx
movq %r12, %rdi
leaq 0x181ec(%rip), %rsi     # 0x28b9e
callq 0x6510
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x10933
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6430
jmp 0x10933
movb %al, 0x8(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6510
jmp 0x10933
movb $0x22, 0x8(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6510
jmp 0x10933
movq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9f89
testq %rbx, %rbx
je 0x10a31
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10a6c
jmp 0x10a6c
jmp 0x10a6c
jmp 0x10a6c
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x10a6f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6430
jmp 0x10a6f
movq %rax, %r14
testq %rbx, %rbx
je 0x10a7d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r14, %rdi
callq 0x68e0
nop