// File: /workspace/github_cpp_makefile_star2_O3/WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.cc
// Function: testing::internal::CodePointToUtf8[abi:cxx11](unsigned int)
std::string CodePointToUtf8(UInt32 code_point) {
  if (code_point > kMaxCodePoint4) {
    return "(Invalid Unicode 0x" + String::FormatHexInt(code_point) + ")";
  }

  char str[5];  // Big enough for the largest valid code point.
  if (code_point <= kMaxCodePoint1) {
    str[1] = '\0';
    str[0] = static_cast<char>(code_point);                          // 0xxxxxxx
  } else if (code_point <= kMaxCodePoint2) {
    str[2] = '\0';
    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx
    str[0] = static_cast<char>(0xC0 | code_point);                   // 110xxxxx
  } else if (code_point <= kMaxCodePoint3) {
    str[3] = '\0';
    str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx
    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx
    str[0] = static_cast<char>(0xE0 | code_point);                   // 1110xxxx
  } else {  // code_point <= kMaxCodePoint4
    str[4] = '\0';
    str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx
    str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx
    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx
    str[0] = static_cast<char>(0xF0 | code_point);                   // 11110xxx
  }
  return str;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
cmpl $0x200000, %esi         # imm = 0x200000
jb 0xbbee
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xbd96
leaq 0x1c8fd(%rip), %rcx     # 0x284b2
movl $0x13, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x64f0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbc2c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xbc33
cmpl $0x7f, %esi
ja 0xbc02
movb $0x0, 0x9(%rsp)
movb %sil, 0x8(%rsp)
jmp 0xbd01
cmpl $0x7ff, %esi            # imm = 0x7FF
ja 0xbcce
movb $0x0, 0xa(%rsp)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x9(%rsp)
orb $-0x40, %al
jmp 0xbcfd
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1cccc(%rip), %rsi     # 0x28922
callq 0x69a0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0xbc7d
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0xbc83
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xbcb1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6430
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbd28
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6430
jmp 0xbd28
movl %esi, %ecx
shrl $0x6, %ecx
movl %esi, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movl %esi, %eax
shrl $0xc, %eax
andb $0x3f, %cl
orb $-0x80, %cl
cmpl $0xffff, %esi           # imm = 0xFFFF
ja 0xbd33
movb $0x0, 0xb(%rsp)
movb %dl, 0xa(%rsp)
movb %cl, 0x9(%rsp)
orb $-0x20, %al
movb %al, 0x8(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x61c0
leaq (%rsp,%rax), %rdx
addq $0x8, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24240
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movb $0x0, 0xc(%rsp)
movb %dl, 0xb(%rsp)
movb %cl, 0xa(%rsp)
shrl $0x12, %esi
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x9(%rsp)
orb $-0x10, %sil
jmp 0xbbf8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xbd73
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6430
jmp 0xbd73
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbd8e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6430
movq %rbx, %rdi
callq 0x68e0