// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/src/gtest-death-test.cc
// Function: testing::internal::DefaultDeathTestFactory::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>, char const*, int, testing::internal::DeathTest**)
bool DefaultDeathTestFactory::Create(const char* statement,
                                     Matcher<const std::string&> matcher,
                                     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 != nullptr) {
    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 = nullptr;
      return true;
    }
  }

#ifdef GTEST_OS_WINDOWS

  if (GTEST_FLAG_GET(death_test_style) == "threadsafe" ||
      GTEST_FLAG_GET(death_test_style) == "fast") {
    *test = new WindowsDeathTest(statement, std::move(matcher), file, line);
  }

#elif defined(GTEST_OS_FUCHSIA)

  if (GTEST_FLAG_GET(death_test_style) == "threadsafe" ||
      GTEST_FLAG_GET(death_test_style) == "fast") {
    *test = new FuchsiaDeathTest(statement, std::move(matcher), file, line);
  }

#else

  if (GTEST_FLAG_GET(death_test_style) == "threadsafe") {
    *test = new ExecDeathTest(statement, std::move(matcher), file, line);
  } else if (GTEST_FLAG_GET(death_test_style) == "fast") {
    *test = new NoExecDeathTest(statement, std::move(matcher));
  }

#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_GET(death_test_style) +
                                           "\" encountered");
    return false;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
callq 0x4c032
movq 0x238(%rax), %r13
movq 0x170(%rax), %rcx
movl 0xf8(%rcx), %eax
leal 0x1(%rax), %r14d
movl %r14d, 0xf8(%rcx)
movl %r14d, 0x4(%rsp)
testq %r13, %r13
je 0x38315
cmpl 0x24(%r13), %eax
jge 0x3837f
movq %r13, %rdi
movq %r12, %rsi
callq 0x24f71
testb %al, %al
je 0x38461
cmpl %ebp, 0x20(%r13)
jne 0x38461
cmpl %r14d, 0x24(%r13)
jne 0x38461
leaq 0x4c53c(%rip), %rdi     # 0x84858
leaq 0x22c2a(%rip), %rsi     # 0x5af4d
callq 0x24f71
testb %al, %al
je 0x38467
pushq $0x50
popq %rdi
callq 0xd570
movq 0x8(%r15), %rcx
leaq 0x70(%rsp), %rdx
movq %rcx, 0x8(%rdx)
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rdx)
andq $0x0, 0x8(%r15)
movq %rax, %r15
leaq 0x4b3dc(%rip), %rax     # 0x83738
movq %rax, (%rdx)
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rcx
movl %ebp, %r8d
callq 0x4c2ec
movq %r15, (%rbx)
leaq 0x70(%rsp), %rdi
jmp 0x384c2
leaq 0xe8(%rsp), %rbx
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x4c0e2
leaq 0x22f33(%rip), %rsi     # 0x5b2ce
leaq 0xa8(%rsp), %rdi
movq %rbx, %rdx
callq 0x4c2c8
leaq 0x22f2f(%rip), %rdx     # 0x5b2e1
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x4c05c
movl 0x24(%r13), %eax
leaq 0x34(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x88(%rsp), %rdi
callq 0x4c0e2
leaq 0x38(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x4c07b
leaq 0x20741(%rip), %rdx     # 0x58b41
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4c05c
leaq 0x10(%rsp), %rdi
callq 0x35b7c
leaq 0x10(%rsp), %rdi
callq 0xdbe8
leaq 0x38(%rsp), %rdi
callq 0xdbe8
leaq 0x88(%rsp), %rdi
callq 0xdbe8
leaq 0xc8(%rsp), %rdi
callq 0xdbe8
leaq 0xa8(%rsp), %rdi
callq 0xdbe8
leaq 0xe8(%rsp), %rdi
jmp 0x38513
andq $0x0, (%rbx)
jmp 0x384c7
leaq 0x4c3ea(%rip), %rdi     # 0x84858
leaq 0x2196b(%rip), %rsi     # 0x59de0
callq 0x24f71
testb %al, %al
je 0x384cb
pushq $0x40
popq %rdi
callq 0xd570
movq 0x8(%r15), %rcx
leaq 0x58(%rsp), %rdx
movq %rcx, 0x8(%rdx)
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rdx)
andq $0x0, 0x8(%r15)
movq %rax, %r15
leaq 0x4b28e(%rip), %rax     # 0x83738
movq %rax, (%rdx)
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x4c366
movq %r15, (%rbx)
leaq 0x58(%rsp), %rdi
callq 0x4c042
movb $0x1, %al
jmp 0x3851a
leaq 0x22e35(%rip), %rsi     # 0x5b307
leaq 0x4c37f(%rip), %rdx     # 0x84858
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x1d2d9
leaq 0x22e35(%rip), %rdx     # 0x5b322
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x4c05c
leaq 0x10(%rsp), %rdi
callq 0x35b7c
leaq 0x10(%rsp), %rdi
callq 0xdbe8
leaq 0x38(%rsp), %rdi
callq 0xdbe8
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdbe8
jmp 0x3853e
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x385cd
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4c042
pushq $0x40
jmp 0x38568
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x4c042
pushq $0x50
popq %rsi
movq %r15, %rdi
callq 0xd5a0
jmp 0x385d2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdbe8
jmp 0x38585
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xdbe8
jmp 0x38594
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xdbe8
jmp 0x385a6
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xdbe8
jmp 0x385b8
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xdbe8
leaq 0xe8(%rsp), %rdi
callq 0xdbe8
movq %rbx, %rdi
callq 0xdaa0
movq %rax, %rbx
jmp 0x385c5