// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq %rsi, %rdi
callq 0xdc60
movq %rax, (%rbx)
movq %r15, %rdi
callq 0xd250
leaq 0xa(%rax), %r12
movq %r12, %rdi
callq 0xd050
movq %rax, %r14
leaq 0x271de(%rip), %rdx     # 0x451e5
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0xdaf0
leaq 0x10(%rbx), %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0xd730
testl %eax, %eax
sete %al
sete 0x8(%rbx)
je 0x1e03f
leaq 0x20(%rsp), %rbx
movb %al, -0x8(%rbx)
andq $0x0, (%rbx)
jmp 0x1e075
cmpb $0x0, (%r15)
leaq 0x2665e(%rip), %rsi     # 0x446a8
cmovneq %r15, %rsi
leaq 0x50(%rbx), %rdi
pushq $0x1
popq %rdx
callq 0xd730
testl %eax, %eax
sete 0x8(%rbx)
leaq 0x20(%rsp), %rbx
andq $0x0, (%rbx)
testl %eax, %eax
sete -0x8(%rbx)
je 0x1e11b
movq %rsp, %rdi
callq 0x11c8e
movq (%rsp), %rdi
addq $0x10, %rdi
leaq 0x27160(%rip), %rsi     # 0x451ec
callq 0xd5e0
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1fab0
leaq 0x2715c(%rip), %rsi     # 0x45201
movq %rax, %rdi
callq 0x221f8
movq %rax, %r15
leaq 0x271af(%rip), %rdx     # 0x45266
leaq 0x271b2(%rip), %rcx     # 0x45270
leaq 0x26665(%rip), %r8      # 0x4472a
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x12d68
movq 0x28(%rsp), %r8
leaq 0x27155(%rip), %rdx     # 0x45235
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0x268, %ecx            # imm = 0x268
callq 0x104f8
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x10576
leaq 0x8(%rsp), %rdi
callq 0x10558
leaq 0x28(%rsp), %rdi
callq 0xdd68
movq %rsp, %rdi
callq 0x1f8e0
movq %rbx, %rdi
callq 0x2295e
movq %r14, %rdi
callq 0xd880
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x10558
jmp 0x1e149
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0xdd68
jmp 0x1e15f
jmp 0x1e15c
movq %rax, %r14
jmp 0x1e167
movq %rax, %r14
movq %rsp, %rdi
callq 0x1f8e0
movq %rbx, %rdi
callq 0x2295e
movq %r14, %rdi
callq 0xdbf0
nop