// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq %rsi, %rdi
callq 0x6960
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x61b0
leaq 0xa(%rax), %r12
movq %r12, %rdi
callq 0x6040
movq %rax, %r14
leaq 0xb34f(%rip), %rdx      # 0x1f36c
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x6860
leaq 0x10(%rbx), %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x6530
testl %eax, %eax
sete %al
sete 0x8(%rbx)
je 0x14055
leaq 0x20(%rsp), %rbx
movb %al, -0x8(%rbx)
andq $0x0, (%rbx)
jmp 0x1408b
cmpb $0x0, (%r15)
leaq 0xa891(%rip), %rsi      # 0x1e8f1
cmovneq %r15, %rsi
leaq 0x50(%rbx), %rdi
pushq $0x1
popq %rdx
callq 0x6530
testl %eax, %eax
sete 0x8(%rbx)
leaq 0x20(%rsp), %rbx
andq $0x0, (%rbx)
testl %eax, %eax
sete -0x8(%rbx)
je 0x14131
movq %rsp, %rdi
callq 0x8f22
movq (%rsp), %rdi
addq $0x10, %rdi
leaq 0xb2d1(%rip), %rsi      # 0x1f373
callq 0x6410
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1589c
leaq 0xb2cd(%rip), %rsi      # 0x1f388
movq %rax, %rdi
callq 0x184c4
movq %rax, %r15
leaq 0xb2ef(%rip), %rdx      # 0x1f3bc
leaq 0xb2f2(%rip), %rcx      # 0x1f3c6
leaq 0xa86b(%rip), %r8       # 0x1e946
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x93f5
movq 0x28(%rsp), %r8
leaq 0xa16b(%rip), %rdx      # 0x1e261
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0x20d2, %ecx           # imm = 0x20D2
callq 0x78f2
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x7970
leaq 0x8(%rsp), %rdi
callq 0x7952
leaq 0x28(%rsp), %rdi
callq 0x6a28
movq %rsp, %rdi
callq 0x731c
movq %rbx, %rdi
callq 0x7362
movq %r14, %rdi
callq 0x6660
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x7952
jmp 0x1415f
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x6a28
jmp 0x14175
jmp 0x14172
movq %rax, %r14
jmp 0x1417d
movq %rax, %r14
movq %rsp, %rdi
callq 0x731c
movq %rbx, %rdi
callq 0x7362
movq %r14, %rdi
callq 0x6900
nop