// File: ambersun1234[P]AVL_Tree/./googletest/googletest/src/gtest-death-test.cc
// Function: testing::internal::DefaultDeathTestFactory::Create(char const*, testing::internal::RE const*, char const*, int, testing::internal::DeathTest**)
bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,
                                     const char* file, int line,
                                     DeathTest** test) {
  UnitTestImpl* const impl = GetUnitTestImpl();
  const InternalRunDeathTestFlag* const flag =
      impl->internal_run_death_test_flag();
  const int death_test_index = impl->current_test_info()
      ->increment_death_test_count();

  if (flag != NULL) {
    if (death_test_index > flag->index()) {
      DeathTest::set_last_death_test_message(
          "Death test count (" + StreamableToString(death_test_index)
          + ") somehow exceeded expected maximum ("
          + StreamableToString(flag->index()) + ")");
      return false;
    }

    if (!(flag->file() == file && flag->line() == line &&
          flag->index() == death_test_index)) {
      *test = NULL;
      return true;
    }
  }

# if GTEST_OS_WINDOWS

  if (GTEST_FLAG(death_test_style) == "threadsafe" ||
      GTEST_FLAG(death_test_style) == "fast") {
    *test = new WindowsDeathTest(statement, regex, file, line);
  }

# elif GTEST_OS_FUCHSIA

  if (GTEST_FLAG(death_test_style) == "threadsafe" ||
      GTEST_FLAG(death_test_style) == "fast") {
    *test = new FuchsiaDeathTest(statement, regex, file, line);
  }

# else

  if (GTEST_FLAG(death_test_style) == "threadsafe") {
    *test = new ExecDeathTest(statement, regex, file, line);
  } else if (GTEST_FLAG(death_test_style) == "fast") {
    *test = new NoExecDeathTest(statement, regex);
  }

# endif  // GTEST_OS_WINDOWS

  else {  // NOLINT - this is more readable than unbalanced brackets inside #if.
    DeathTest::set_last_death_test_message(
        "Unknown death test style \"" + GTEST_FLAG(death_test_style)
        + "\" encountered");
    return false;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
callq 0x37ce0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3f020
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3a680
movq %rax, %rdi
callq 0x3f310
movl %eax, -0x4c(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x32df9
movl -0x4c(%rbp), %eax
movl %eax, -0x16c(%rbp)
movq -0x48(%rbp), %rdi
callq 0x3f340
movl %eax, %ecx
movl -0x16c(%rbp), %eax
cmpl %ecx, %eax
jle 0x32dac
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x178(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x3c090
movq -0x178(%rbp), %rdx
leaq 0x267d0(%rip), %rsi     # 0x593cf
leaq -0xd0(%rbp), %rdi
callq 0x39930
jmp 0x32c0d
leaq 0x267ce(%rip), %rdx     # 0x593e2
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x37b80
jmp 0x32c29
movq -0x48(%rbp), %rdi
callq 0x3f340
movl %eax, -0x17c(%rbp)
jmp 0x32c3a
movl -0x17c(%rbp), %eax
movl %eax, -0x124(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x124(%rbp), %rsi
callq 0x3c090
jmp 0x32c5b
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x3bfc0
jmp 0x32c77
leaq 0x236ce(%rip), %rdx     # 0x5634c
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x37b80
jmp 0x32c90
leaq -0x70(%rbp), %rdi
callq 0x2e090
jmp 0x32c9b
leaq -0x70(%rbp), %rdi
callq 0x9db8
leaq -0x90(%rbp), %rdi
callq 0x9db8
leaq -0x120(%rbp), %rdi
callq 0x9db8
leaq -0xb0(%rbp), %rdi
callq 0x9db8
leaq -0xd0(%rbp), %rdi
callq 0x9db8
leaq -0xf0(%rbp), %rdi
callq 0x9db8
movb $0x0, -0x1(%rbp)
jmp 0x32fa4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x32d9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x32d8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x32d83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x32d77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x32d6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9db8
leaq -0x90(%rbp), %rdi
callq 0x9db8
leaq -0x120(%rbp), %rdi
callq 0x9db8
leaq -0xb0(%rbp), %rdi
callq 0x9db8
leaq -0xd0(%rbp), %rdi
callq 0x9db8
leaq -0xf0(%rbp), %rdi
callq 0x9db8
jmp 0x32fb2
movq -0x48(%rbp), %rdi
callq 0x3f360
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0xfeb0
testb $0x1, %al
jne 0x32dc7
jmp 0x32de3
movq -0x48(%rbp), %rdi
callq 0x3f370
cmpl -0x2c(%rbp), %eax
jne 0x32de3
movq -0x48(%rbp), %rdi
callq 0x3f340
cmpl -0x4c(%rbp), %eax
je 0x32df7
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x32fa4
jmp 0x32df9
leaq 0x49c90(%rip), %rdi     # 0x7ca90
leaq 0x262a6(%rip), %rsi     # 0x590ad
callq 0xfeb0
testb $0x1, %al
jne 0x32e12
jmp 0x32e7b
movl $0x40, %edi
callq 0x9600
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x188(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
callq 0x3f390
jmp 0x32e40
movq -0x188(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
jmp 0x32fa0
movq -0x188(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
movl $0x40, %esi
callq 0x9630
jmp 0x32fb2
leaq 0x49c0e(%rip), %rdi     # 0x7ca90
leaq 0x2657f(%rip), %rsi     # 0x59408
callq 0xfeb0
testb $0x1, %al
jne 0x32e94
jmp 0x32ef5
movl $0x30, %edi
callq 0x9600
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x190(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x3f3f0
jmp 0x32eba
movq -0x190(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
jmp 0x32f9e
movq -0x190(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
movl $0x30, %esi
callq 0x9630
jmp 0x32fb2
leaq 0x26511(%rip), %rsi     # 0x5940d
leaq 0x49b8d(%rip), %rdx     # 0x7ca90
leaq -0x168(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x3f440
movq -0x198(%rbp), %rsi
leaq 0x26504(%rip), %rdx     # 0x59428
leaq -0x148(%rbp), %rdi
callq 0x37b80
jmp 0x32f32
leaq -0x148(%rbp), %rdi
callq 0x2e090
jmp 0x32f40
leaq -0x148(%rbp), %rdi
callq 0x9db8
leaq -0x168(%rbp), %rdi
callq 0x9db8
movb $0x0, -0x1(%rbp)
jmp 0x32fa4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x32f90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x9db8
leaq -0x168(%rbp), %rdi
callq 0x9db8
jmp 0x32fb2
jmp 0x32fa0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x9c40
nop