// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0x38b90
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0xe2e0
addq $0xa, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe050
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
leaq 0x5ddf9(%rip), %rdx     # 0x8b798
movb $0x0, %al
callq 0xed20
movq -0x80(%rbp), %rdi
addq $0x10, %rdi
movq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0xe920
movl %eax, %ecx
movq -0x80(%rbp), %rax
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x8(%rax)
testb $0x1, 0x8(%rax)
je 0x2da2e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2d9f0
leaq 0x5d211(%rip), %rax     # 0x8abf8
movq %rax, -0x88(%rbp)
jmp 0x2d9fb
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rax
movq %rax, -0x28(%rbp)
addq $0x50, %rdi
movq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0xe920
movl %eax, %ecx
movq -0x80(%rbp), %rax
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x8(%rax)
movq -0x80(%rbp), %rsi
addq $0x8, %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x38(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x31470
movq -0x98(%rbp), %rdi
callq 0x31090
movb %al, -0x89(%rbp)
jmp 0x2da5e
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x2da6a
jmp 0x2da80
jmp 0x2db99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2dbc8
leaq -0x50(%rbp), %rdi
callq 0x16d70
jmp 0x2da8b
leaq 0x5dd0d(%rip), %rsi     # 0x8b79f
leaq -0x50(%rbp), %rdi
callq 0x37990
movq %rax, -0xa0(%rbp)
jmp 0x2daa4
movq -0xa0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x31ec0
movq %rax, -0xa8(%rbp)
jmp 0x2dabd
movq -0xa8(%rbp), %rdi
leaq 0x5dce9(%rip), %rsi     # 0x8b7b4
callq 0x38bb0
movq %rax, -0xb0(%rbp)
jmp 0x2dad9
leaq 0x5dd39(%rip), %rdx     # 0x8b819
leaq 0x5dd3c(%rip), %rcx     # 0x8b823
leaq 0x5d18c(%rip), %r8      # 0x8ac7a
leaq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x18e00
jmp 0x2dafd
leaq -0x78(%rbp), %rdi
callq 0xe2b0
movq %rax, %r8
leaq 0x5dcd8(%rip), %rdx     # 0x8b7e8
leaq -0x58(%rbp), %rdi
movl $0x1, %esi
movl $0x268, %ecx            # imm = 0x268
callq 0x13fa0
jmp 0x2db25
movq -0xb0(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x14060
jmp 0x2db37
leaq -0x58(%rbp), %rdi
callq 0x14020
leaq -0x78(%rbp), %rdi
callq 0xf058
leaq -0x50(%rbp), %rdi
callq 0x31070
jmp 0x2db99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2db8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2db85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x14020
leaq -0x78(%rbp), %rdi
callq 0xf058
leaq -0x50(%rbp), %rdi
callq 0x31070
jmp 0x2dbc8
leaq -0x38(%rbp), %rdi
callq 0x30d20
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, %rax
je 0x2dbbf
movq -0xb8(%rbp), %rdi
callq 0xeaa0
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x30d20
movq -0x40(%rbp), %rdi
callq 0xee80
nopw (%rax,%rax)