// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/unittest/googletest/googletest/src/gtest.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 0x12e46
cmpq $0x0, 0x8(%r15)
movq (%rbx), %rbx
je 0x1adcf
leaq 0x10(%rbx), %r12
xorl %r13d, %r13d
movq (%r15), %rax
movb (%rax,%r13), %al
movzbl %al, %r14d
cmpl $0x26, %r14d
jle 0x1ac85
cmpl $0x27, %r14d
je 0x1ac9f
movl $0x4, %edx
cmpl $0x3e, %r14d
je 0x1acc9
cmpl $0x3c, %r14d
jne 0x1ad01
leaq 0x37cea(%rip), %rsi     # 0x5296d
jmp 0x1ace7
cmpl $0x22, %r14d
je 0x1acd2
cmpl $0x26, %r14d
jne 0x1ad01
movl $0x5, %edx
leaq 0x37cda(%rip), %rsi     # 0x52977
jmp 0x1ace7
movl $0x6, %edx
leaq 0x37cd2(%rip), %rsi     # 0x5297d
testb %bpl, %bpl
jne 0x1ace7
movb $0x27, 0x8(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xc700
jmp 0x1acef
leaq 0x37ca2(%rip), %rsi     # 0x52972
jmp 0x1ace7
movl $0x6, %edx
leaq 0x37ca6(%rip), %rsi     # 0x52984
testb %bpl, %bpl
je 0x1adb3
movq %r12, %rdi
callq 0xc700
incq %r13
cmpq 0x8(%r15), %r13
jb 0x1ac50
jmp 0x1adcf
cmpb $0x1f, %al
jg 0x1ad16
cmpl $0xd, %r14d
ja 0x1acef
movl $0x2600, %ecx           # imm = 0x2600
btl %r14d, %ecx
jae 0x1acef
testb %bpl, %bpl
je 0x1ad98
cmpl $0xd, %r14d
ja 0x1ad98
movl $0x2600, %ecx           # imm = 0x2600
btl %r14d, %ecx
jae 0x1ad98
movl $0x3, %edx
movq %r12, %rdi
leaq 0x37c50(%rip), %rsi     # 0x5298b
callq 0xc700
leaq 0x8(%rsp), %rdi
movl %r14d, %esi
callq 0x16444
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0xc700
movl $0x1, %edx
movq %r12, %rdi
leaq 0x37c0d(%rip), %rsi     # 0x5297b
callq 0xc700
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1acef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc600
jmp 0x1acef
movb %al, 0x8(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xc700
jmp 0x1acef
movb $0x22, 0x8(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xc700
jmp 0x1acef
movq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x130af
testq %rbx, %rbx
je 0x1aded
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 0x1ae28
jmp 0x1ae28
jmp 0x1ae28
jmp 0x1ae28
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1ae2b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc600
jmp 0x1ae2b
movq %rax, %r14
testq %rbx, %rbx
je 0x1ae39
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r14, %rdi
callq 0xcbb0
nop