// File: /workspace/github_c_makefile_star2_O1/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 0x2d7ad(%rip), %rdx     # 0x541e5
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 0x8(%rbx)
jne 0x26a85
cmpb $0x0, (%r12)
leaq 0x2cc3b(%rip), %rsi     # 0x536a8
cmovneq %r12, %rsi
leaq 0x50(%rbx), %rdi
movl $0x1, %edx
callq 0xc710
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 0x26b8c
movq %rsp, %rdi
callq 0x12eee
movq (%rsp), %r15
leaq 0x10(%r15), %r13
leaq 0x2d736(%rip), %rsi     # 0x541ec
movl $0x14, %edx
movq %r13, %rdi
callq 0xc700
testq %r12, %r12
je 0x26ad5
movq %r12, %rdi
callq 0xc260
movq %rax, %rdx
jmp 0x26ae1
movl $0x6, %edx
leaq 0x2c772(%rip), %r12     # 0x53253
movq %r13, %rdi
movq %r12, %rsi
callq 0xc700
leaq 0x2d70e(%rip), %rsi     # 0x54201
movl $0x33, %edx
movq %r13, %rdi
callq 0xc700
leaq 0x2d75f(%rip), %rdx     # 0x54266
leaq 0x2d762(%rip), %rcx     # 0x54270
leaq 0x2cc15(%rip), %r8      # 0x5372a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x144bf
movq 0x10(%rsp), %r8
leaq 0x2d705(%rip), %rdx     # 0x54235
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x268, %ecx            # imm = 0x268
callq 0x10bb8
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c56
leaq 0x8(%rsp), %rdi
callq 0x10c24
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26b76
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xc600
testq %r15, %r15
je 0x26b8c
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c81c
movq %r14, %rdi
callq 0xc850
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x10c24
jmp 0x26bbe
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26be5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xc600
jmp 0x26be5
jmp 0x26be2
movq %rax, %r14
jmp 0x26bfb
movq %rax, %r14
testq %r15, %r15
je 0x26bfb
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c81c
movq %r14, %rdi
callq 0xcbb0
nop