// File: 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
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdx, -0x1b0(%rbp)
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 0xa29e0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa3290
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa2a00
movq %rax, %rdi
callq 0xa3450
movl %eax, -0x4c(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x7aac0
movl -0x4c(%rbp), %eax
movl %eax, -0x1b4(%rbp)
movq -0x48(%rbp), %rdi
callq 0xa3480
movl %eax, %ecx
movl -0x1b4(%rbp), %eax
cmpl %ecx, %eax
jle 0x7aa73
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0xa2c60
movq -0x1c0(%rbp), %rdx
leaq 0x533c8(%rip), %rsi     # 0xcdc8e
leaq -0xd0(%rbp), %rdi
callq 0xa34a0
jmp 0x7a8d4
leaq 0x533c6(%rip), %rdx     # 0xcdca1
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xa2b40
jmp 0x7a8f0
movq -0x48(%rbp), %rdi
callq 0xa3480
movl %eax, -0x1c4(%rbp)
jmp 0x7a901
movl -0x1c4(%rbp), %eax
movl %eax, -0x124(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x124(%rbp), %rsi
callq 0xa2c60
jmp 0x7a922
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0xa2b90
jmp 0x7a93e
leaq 0x50498(%rip), %rdx     # 0xcaddd
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa2b40
jmp 0x7a957
leaq -0x70(%rbp), %rdi
callq 0x762b0
jmp 0x7a962
leaq -0x70(%rbp), %rdi
callq 0x10fc8
leaq -0x90(%rbp), %rdi
callq 0x10fc8
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0xb0(%rbp), %rdi
callq 0x10fc8
leaq -0xd0(%rbp), %rdi
callq 0x10fc8
leaq -0xf0(%rbp), %rdi
callq 0x10fc8
movb $0x0, -0x1(%rbp)
jmp 0x7ad49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7aa62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7aa56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7aa4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7aa3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7aa32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x10fc8
leaq -0x90(%rbp), %rdi
callq 0x10fc8
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0xb0(%rbp), %rdi
callq 0x10fc8
leaq -0xd0(%rbp), %rdi
callq 0x10fc8
leaq -0xf0(%rbp), %rdi
callq 0x10fc8
jmp 0x7ad57
movq -0x48(%rbp), %rdi
callq 0xa34f0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x4dd00
testb $0x1, %al
jne 0x7aa8e
jmp 0x7aaaa
movq -0x48(%rbp), %rdi
callq 0xa3500
cmpl -0x2c(%rbp), %eax
jne 0x7aaaa
movq -0x48(%rbp), %rdi
callq 0xa3480
cmpl -0x4c(%rbp), %eax
je 0x7aabe
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x7ad49
jmp 0x7aac0
leaq 0x9cf81(%rip), %rdi     # 0x117a48
leaq 0x52e3f(%rip), %rsi     # 0xcd90d
callq 0x4dd00
testb $0x1, %al
jne 0x7aadc
jmp 0x7abb1
movl $0x50, %edi
callq 0x10740
movq -0x1b0(%rbp), %rsi
movq %rax, -0x1d8(%rbp)
movb $0x1, -0x141(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq -0x140(%rbp), %rdi
callq 0xa2a50
jmp 0x7ab14
movq -0x1d0(%rbp), %rsi
movq -0x1d8(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
leaq -0x140(%rbp), %rdx
callq 0xa3520
jmp 0x7ab38
movq -0x1d8(%rbp), %rcx
movb $0x0, -0x141(%rbp)
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x140(%rbp), %rdi
callq 0xa2a90
jmp 0x7ad45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7ab90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x140(%rbp), %rdi
callq 0xa2a90
testb $0x1, -0x141(%rbp)
jne 0x7ab9b
jmp 0x7abac
movq -0x1d8(%rbp), %rdi
movl $0x50, %esi
callq 0x10770
jmp 0x7ad57
leaq 0x9ce90(%rip), %rdi     # 0x117a48
leaq 0x533f2(%rip), %rsi     # 0xcdfb1
callq 0x4dd00
testb $0x1, %al
jne 0x7abcd
jmp 0x7ac9a
movl $0x40, %edi
callq 0x10740
movq -0x1b0(%rbp), %rsi
movq %rax, -0x1e8(%rbp)
movb $0x1, -0x161(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq -0x160(%rbp), %rdi
callq 0xa2a50
jmp 0x7ac05
movq -0x1e0(%rbp), %rsi
movq -0x1e8(%rbp), %rdi
leaq -0x160(%rbp), %rdx
callq 0xa35d0
jmp 0x7ac21
movq -0x1e8(%rbp), %rcx
movb $0x0, -0x161(%rbp)
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x160(%rbp), %rdi
callq 0xa2a90
jmp 0x7ad43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7ac79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x160(%rbp), %rdi
callq 0xa2a90
testb $0x1, -0x161(%rbp)
jne 0x7ac84
jmp 0x7ac95
movq -0x1e8(%rbp), %rdi
movl $0x40, %esi
callq 0x10770
jmp 0x7ad57
leaq 0x53026(%rip), %rsi     # 0xcdcc7
leaq 0x9cda0(%rip), %rdx     # 0x117a48
leaq -0x1a8(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x39dc0
movq -0x1f0(%rbp), %rsi
leaq 0x53019(%rip), %rdx     # 0xcdce2
leaq -0x188(%rbp), %rdi
callq 0xa2b40
jmp 0x7acd7
leaq -0x188(%rbp), %rdi
callq 0x762b0
jmp 0x7ace5
leaq -0x188(%rbp), %rdi
callq 0x10fc8
leaq -0x1a8(%rbp), %rdi
callq 0x10fc8
movb $0x0, -0x1(%rbp)
jmp 0x7ad49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7ad35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x10fc8
leaq -0x1a8(%rbp), %rdi
callq 0x10fc8
jmp 0x7ad57
jmp 0x7ad45
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)