// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/unittest/googletest/googletest/src/gtest-port.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 0xcc20
movq %rax, (%rbx)
movq %r12, %rdi
callq 0xc260
leaq 0xa(%rax), %r15
movq %r15, %rdi
callq 0xc050
movq %rax, %r14
leaq 0x2cb35(%rip), %rdx     # 0x53215
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xca90
leaq 0x10(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xc710
testl %eax, %eax
sete %al
sete 0x8(%rbx)
je 0x2671d
leaq 0x38(%rsp), %rbx
movb %al, -0x8(%rbx)
movq $0x0, (%rbx)
jmp 0x26757
cmpb $0x0, (%r12)
leaq 0x2bfaf(%rip), %rsi     # 0x526d8
cmovneq %r12, %rsi
leaq 0x50(%rbx), %rdi
movl $0x1, %edx
callq 0xc710
testl %eax, %eax
sete 0x8(%rbx)
leaq 0x38(%rsp), %rbx
sete -0x8(%rbx)
movq $0x0, (%rbx)
je 0x2683b
leaq 0x8(%rsp), %rdi
callq 0x12e46
movq 0x8(%rsp), %r15
leaq 0x10(%r15), %r13
leaq 0x2caab(%rip), %rsi     # 0x5321c
movl $0x14, %edx
movq %r13, %rdi
callq 0xc700
testq %r12, %r12
je 0x26790
movq %r12, %rdi
callq 0xc260
movq %rax, %rdx
jmp 0x2679c
movl $0x6, %edx
leaq 0x2bae7(%rip), %r12     # 0x52283
movq %r13, %rdi
movq %r12, %rsi
callq 0xc700
leaq 0x2ca83(%rip), %rsi     # 0x53231
movl $0x33, %edx
movq %r13, %rdi
callq 0xc700
leaq 0x2cad4(%rip), %rdx     # 0x53296
leaq 0x2cad7(%rip), %rcx     # 0x532a0
leaq 0x2bf8a(%rip), %r8      # 0x5275a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x143f5
movq 0x10(%rsp), %r8
leaq 0x2ca7a(%rip), %rdx     # 0x53265
movq %rsp, %rdi
movl $0x1, %esi
movl $0x268, %ecx            # imm = 0x268
callq 0x10b64
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c00
movq %rsp, %rdi
callq 0x10bd0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2682d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xc600
testq %r15, %r15
je 0x2683b
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c37a
movq %r14, %rdi
callq 0xc850
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x10bd0
jmp 0x2686b
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26892
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xc600
jmp 0x26892
jmp 0x2688f
movq %rax, %r14
jmp 0x268a0
movq %rax, %r14
testq %r15, %r15
je 0x268a0
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c37a
movq %r14, %rdi
callq 0xcbb0