// File: halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)
void InsertSyntheticTestCase(const std::string& name, CodeLocation location,
                             bool has_test_p) {
  const auto& ignored = *GetIgnoredParameterizedTestSuites();
  if (ignored.find(name) != ignored.end()) return;

  const char kMissingInstantiation[] =  //
      " is defined via TEST_P, but never instantiated. None of the test "
      "cases "
      "will run. Either no INSTANTIATE_TEST_SUITE_P is provided or the only "
      "ones provided expand to nothing."
      "\n\n"
      "Ideally, TEST_P definitions should only ever be included as part of "
      "binaries that intend to use them. (As opposed to, for example, being "
      "placed in a library that may be linked in to get other utilities.)";

  const char kMissingTestCase[] =  //
      " is instantiated via INSTANTIATE_TEST_SUITE_P, but no tests are "
      "defined via TEST_P . No test cases will run."
      "\n\n"
      "Ideally, INSTANTIATE_TEST_SUITE_P should only ever be invoked from "
      "code that always depend on code that provides TEST_P. Failing to do "
      "so is often an indication of dead code, e.g. the last TEST_P was "
      "removed but the rest got left behind.";

  std::string message =
      "Parameterized test suite " + name +
      (has_test_p ? kMissingInstantiation : kMissingTestCase) +
      "\n\n"
      "To suppress this error for this test suite, insert the following line "
      "(in a non-header) in the namespace it is defined in:"
      "\n\n"
      "GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(" +
      name + ");";

  std::string full_name = "UninstantiatedParameterizedTestSuite<" + name + ">";
  RegisterTest(  //
      "GoogleTestVerification", full_name.c_str(),
      nullptr,  // No type parameter.
      nullptr,  // No value parameter.
      location.file.c_str(), location.line, [message, location] {
        return new FailureTest(location, message,
                               kErrorOnUninstantiatedParameterizedTest);
      });
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movq %rsi, -0x450(%rbp)
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
callq 0x80c80
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xa4f00
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xa4f30
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa4ed0
testb $0x1, %al
jne 0x80dbb
jmp 0x80dc0
jmp 0x80fce
leaq -0x1b0(%rbp), %rdi
leaq 0x4f4c2(%rip), %rsi     # 0xd0290
movl $0x17a, %edx            # imm = 0x17A
callq 0x105e0
leaq -0x310(%rbp), %rdi
leaq 0x4f62a(%rip), %rsi     # 0xd0410
movl $0x15c, %edx            # imm = 0x15C
callq 0x105e0
movq -0x8(%rbp), %rdx
leaq -0x3b0(%rbp), %rdi
leaq 0x4d3e9(%rip), %rsi     # 0xce1eb
callq 0x39dc0
testb $0x1, -0x11(%rbp)
je 0x80e1d
leaq -0x1b0(%rbp), %rax
movq %rax, -0x458(%rbp)
jmp 0x80e2b
leaq -0x310(%rbp), %rax
movq %rax, -0x458(%rbp)
movq -0x458(%rbp), %rdx
leaq -0x390(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0xa2b40
jmp 0x80e47
leaq 0x4d598(%rip), %rdx     # 0xce3e6
leaq -0x370(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0xa2b40
jmp 0x80e63
movq -0x8(%rbp), %rdx
leaq -0x350(%rbp), %rdi
leaq -0x370(%rbp), %rsi
callq 0x3c8a0
jmp 0x80e7c
leaq 0x4d382(%rip), %rdx     # 0xce205
leaq -0x330(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0xa2b40
jmp 0x80e98
leaq -0x350(%rbp), %rdi
callq 0x10fc8
leaq -0x370(%rbp), %rdi
callq 0x10fc8
leaq -0x390(%rbp), %rdi
callq 0x10fc8
leaq -0x3b0(%rbp), %rdi
callq 0x10fc8
movq -0x8(%rbp), %rdx
leaq 0x4d335(%rip), %rsi     # 0xce208
leaq -0x400(%rbp), %rdi
callq 0x39dc0
jmp 0x80ee1
leaq 0x4e085(%rip), %rdx     # 0xcef6d
leaq -0x3e0(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0xa2b40
jmp 0x80efd
leaq -0x400(%rbp), %rdi
callq 0x10fc8
leaq -0x3e0(%rbp), %rdi
callq 0x102c0
movq -0x450(%rbp), %rdi
movq %rax, -0x478(%rbp)
callq 0x102c0
movq %rax, %rcx
movq -0x450(%rbp), %rax
movq %rcx, -0x470(%rbp)
movl 0x20(%rax), %eax
movl %eax, -0x464(%rbp)
leaq -0x448(%rbp), %rdi
movq %rdi, -0x460(%rbp)
leaq -0x330(%rbp), %rsi
callq 0x102f0
jmp 0x80f5e
movq -0x450(%rbp), %rsi
leaq -0x428(%rbp), %rdi
callq 0xa4f60
jmp 0x80f73
movl -0x464(%rbp), %r9d
movq -0x470(%rbp), %r8
movq -0x478(%rbp), %rsi
movq %rsp, %rax
leaq -0x448(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x4d292(%rip), %rdi     # 0xce22e
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x81110
jmp 0x80faa
leaq -0x448(%rbp), %rdi
callq 0x81370
leaq -0x3e0(%rbp), %rdi
callq 0x10fc8
leaq -0x330(%rbp), %rdi
callq 0x10fc8
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
jmp 0x81049
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
jmp 0x8103d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
jmp 0x81031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x10fc8
leaq -0x370(%rbp), %rdi
callq 0x10fc8
leaq -0x390(%rbp), %rdi
callq 0x10fc8
leaq -0x3b0(%rbp), %rdi
callq 0x10fc8
jmp 0x810f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
jmp 0x810ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x10fc8
jmp 0x810ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
jmp 0x810e0
movq -0x460(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
callq 0x10fc8
jmp 0x810e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3b8(%rbp)
movl %eax, -0x3bc(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x81370
leaq -0x3e0(%rbp), %rdi
callq 0x10fc8
leaq -0x330(%rbp), %rdi
callq 0x10fc8
movq -0x3b8(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)