// File: halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::internal::UnitTestImpl::GetTestSuite(char const*, char const*, void (*)(), void (*)())
TestSuite* UnitTestImpl::GetTestSuite(
    const char* test_suite_name, const char* type_param,
    internal::SetUpTestSuiteFunc set_up_tc,
    internal::TearDownTestSuiteFunc tear_down_tc) {
  // Can we find a TestSuite with the given name?
  const auto test_suite =
      std::find_if(test_suites_.rbegin(), test_suites_.rend(),
                   TestSuiteNameIs(test_suite_name));

  if (test_suite != test_suites_.rend()) return *test_suite;

  // No.  Let's create one.
  auto* const new_test_suite =
      new TestSuite(test_suite_name, type_param, set_up_tc, tear_down_tc);

  const UnitTestFilter death_test_suite_filter(kDeathTestSuiteFilter);
  // Is this a death test suite?
  if (death_test_suite_filter.MatchesName(test_suite_name)) {
    // Yes.  Inserts the test suite after the last death test suite
    // defined so far.  This only works when the test suites haven't
    // been shuffled.  Otherwise we may end up running a death test
    // after a non-death test.
    ++last_death_test_suite_;
    test_suites_.insert(test_suites_.begin() + last_death_test_suite_,
                        new_test_suite);
  } else {
    // No.  Appends to the end of the list.
    test_suites_.push_back(new_test_suite);
  }

  test_suite_indices_.push_back(static_cast<int>(test_suite_indices_.size()));
  return new_test_suite;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x198(%rbp)
addq $0xb8, %rsi
movq %rsi, -0x190(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xaace0
movq -0x190(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xaad30
movq -0x18(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x10e10
movq -0x188(%rbp), %rsi
movq -0x180(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x1d070
jmp 0x9b83b
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xaad80
jmp 0x9b84d
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xaabf0
jmp 0x9b864
leaq -0x68(%rbp), %rdi
callq 0xaadb0
leaq -0x88(%rbp), %rdi
callq 0x10fc8
leaq -0x89(%rbp), %rdi
callq 0x10810
movq -0x198(%rbp), %rsi
addq $0xb8, %rsi
leaq -0xa8(%rbp), %rdi
callq 0xaad30
leaq -0x38(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xaadd0
testb $0x1, %al
jne 0x9b8b5
jmp 0x9b92a
leaq -0x38(%rbp), %rdi
callq 0xaae00
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x9bc16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x9b919
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x9b90d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xaadb0
leaq -0x88(%rbp), %rdi
callq 0x10fc8
leaq -0x89(%rbp), %rdi
callq 0x10810
jmp 0x9bc23
movl $0x108, %edi            # imm = 0x108
callq 0x10740
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1a0(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x8a690
jmp 0x9b958
movq -0x1a0(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x121(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x10e10
movq -0x1a8(%rbp), %rdx
leaq 0x30ef9(%rip), %rsi     # 0xcc880
leaq -0x120(%rbp), %rdi
callq 0x1d070
jmp 0x9b995
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x827f0
jmp 0x9b9aa
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0x121(%rbp), %rdi
callq 0x10810
movq -0x18(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x149(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x10e10
movq -0x1b8(%rbp), %rsi
movq -0x1b0(%rbp), %rdx
leaq -0x148(%rbp), %rdi
callq 0x1d070
jmp 0x9b9fc
leaq -0x100(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x82ab0
movb %al, -0x1b9(%rbp)
jmp 0x9ba17
leaq -0x148(%rbp), %rdi
callq 0x10fc8
leaq -0x149(%rbp), %rdi
callq 0x10810
movb -0x1b9(%rbp), %al
testb $0x1, %al
jne 0x9ba3e
jmp 0x9bb9c
movq -0x198(%rbp), %rdi
movl 0x164(%rdi), %eax
incl %eax
movl %eax, 0x164(%rdi)
addq $0xb8, %rdi
movq %rdi, -0x1d0(%rbp)
callq 0xab030
movq %rax, %rcx
movq -0x198(%rbp), %rax
movq %rcx, -0x168(%rbp)
movslq 0x164(%rax), %rsi
leaq -0x168(%rbp), %rdi
callq 0xab060
movq %rax, -0x160(%rbp)
leaq -0x158(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0xab0a0
movq -0x1d0(%rbp), %rdi
movq -0x158(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xaae30
movq %rax, -0x1c8(%rbp)
jmp 0x9bac7
movq -0x1c8(%rbp), %rax
movq %rax, -0x170(%rbp)
jmp 0x9bbba
movq -0x1a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
movl $0x108, %esi            # imm = 0x108
callq 0x10770
jmp 0x9bc23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x9bb34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0x121(%rbp), %rdi
callq 0x10810
jmp 0x9bc23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x9bb77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x10fc8
leaq -0x149(%rbp), %rdi
callq 0x10810
jmp 0x9bc08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x9bc08
movq -0x198(%rbp), %rdi
addq $0xb8, %rdi
leaq -0xb0(%rbp), %rsi
callq 0xab0e0
jmp 0x9bbb8
jmp 0x9bbba
movq -0x198(%rbp), %rdi
addq $0xd0, %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x5dab0
movq -0x1d8(%rbp), %rdi
movl %eax, -0x174(%rbp)
leaq -0x174(%rbp), %rsi
callq 0xa8bb0
jmp 0x9bbef
movq -0xb0(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x82b30
jmp 0x9bc16
leaq -0x100(%rbp), %rdi
callq 0x82b30
jmp 0x9bc23
movq -0x8(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x10e00
nop