// File: /workspace/github_cpp_makefile_star2_O1/WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.cc
// Function: testing::internal::RE::Init(char const*)
void RE::Init(const char* regex) {
  pattern_ = posix::StrDup(regex);

  // Reserves enough bytes to hold the regular expression used for a
  // full match.
  const size_t full_regex_len = strlen(regex) + 10;
  char* const full_pattern = new char[full_regex_len];

  snprintf(full_pattern, full_regex_len, "^(%s)$", regex);
  is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0;
  // We want to call regcomp(&partial_regex_, ...) even if the
  // previous expression returns false.  Otherwise partial_regex_ may
  // not be properly initialized can may cause trouble when it's
  // freed.
  //
  // Some implementation of POSIX regex (e.g. on at least some
  // versions of Cygwin) doesn't accept the empty string as a valid
  // regex.  We change it to an equivalent form "()" to be safe.
  if (is_valid_) {
    const char* const partial_regex = (*regex == '\0') ? "()" : regex;
    is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0;
  }
  EXPECT_TRUE(is_valid_)
      << "Regular expression \"" << regex
      << "\" is not a valid POSIX Extended regular expression.";

  delete[] full_pattern;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6940
movq %rax, (%rbx)
movq %r12, %rdi
callq 0x61c0
leaq 0xa(%rax), %r15
movq %r15, %rdi
callq 0x6040
movq %rax, %r14
leaq 0xd302(%rip), %rdx      # 0x2939c
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x6810
leaq 0x10(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x6520
testl %eax, %eax
sete 0x8(%rbx)
jne 0x1c0e7
cmpb $0x0, (%r12)
leaq 0xc852(%rip), %rsi      # 0x28921
cmovneq %r12, %rsi
leaq 0x50(%rbx), %rdi
movl $0x1, %edx
callq 0x6520
testl %eax, %eax
sete 0x8(%rbx)
movb 0x8(%rbx), %al
leaq 0x38(%rsp), %rbx
movb %al, -0x8(%rbx)
movq $0x0, (%rbx)
testb %al, %al
jne 0x1c1ee
movq %rsp, %rdi
callq 0x9de4
movq (%rsp), %r15
leaq 0x10(%r15), %r13
leaq 0xd28b(%rip), %rsi      # 0x293a3
movl $0x14, %edx
movq %r13, %rdi
callq 0x6510
testq %r12, %r12
je 0x1c137
movq %r12, %rdi
callq 0x61c0
movq %rax, %rdx
jmp 0x1c143
movl $0x6, %edx
leaq 0xc383(%rip), %r12      # 0x284c6
movq %r13, %rdi
movq %r12, %rsi
callq 0x6510
leaq 0xd263(%rip), %rsi      # 0x293b8
movl $0x33, %edx
movq %r13, %rdi
callq 0x6510
leaq 0xd283(%rip), %rdx      # 0x293ec
leaq 0xd286(%rip), %rcx      # 0x293f6
leaq 0xc7ff(%rip), %r8       # 0x28976
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xa443
movq 0x10(%rsp), %r8
leaq 0xc0ff(%rip), %rdx      # 0x28291
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x20d2, %ecx           # imm = 0x20D2
callq 0x7caa
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x7d48
leaq 0x8(%rsp), %rdi
callq 0x7d16
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c1d8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6430
testq %r15, %r15
je 0x1c1ee
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7608
movq %r14, %rdi
callq 0x6640
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x7d16
jmp 0x1c220
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c247
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6430
jmp 0x1c247
jmp 0x1c244
movq %rax, %r14
jmp 0x1c25d
movq %rax, %r14
testq %r15, %r15
je 0x1c25d
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7608
movq %r14, %rdi
callq 0x68e0
nop