// File: halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::TestInfo::Run()
void TestInfo::Run() {
  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
  if (!should_run_) {
    if (is_disabled_ && matches_filter_) repeater->OnTestDisabled(*this);
    return;
  }

  // Tells UnitTest where to store test result.
  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
  impl->set_current_test_info(this);

  // Notifies the unit test event listeners that a test is about to start.
  repeater->OnTestStart(*this);
  result_.set_start_timestamp(internal::GetTimeInMillis());
  internal::Timer timer;
  impl->os_stack_trace_getter()->UponLeavingGTest();

  // Creates the test object.
  Test* const test = internal::HandleExceptionsInMethodIfSupported(
      factory_, &internal::TestFactoryBase::CreateTest,
      "the test fixture's constructor");

  // Runs the test if the constructor didn't generate a fatal failure or invoke
  // GTEST_SKIP().
  // Note that the object will not be null
  if (!Test::HasFatalFailure() && !Test::IsSkipped()) {
    // This doesn't throw as all user code that can throw are wrapped into
    // exception handling code.
    test->Run();
  }

  if (test != nullptr) {
    // Deletes the test object.
    impl->os_stack_trace_getter()->UponLeavingGTest();
    internal::HandleExceptionsInMethodIfSupported(
        test, &Test::DeleteSelf_, "the test fixture's destructor");
  }

  result_.set_elapsed_time(timer.Elapsed());

  // Notifies the unit test event listener that a test has just finished.
  repeater->OnTestEnd(*this);

  // Tells UnitTest to stop associating assertion results to this
  // test.
  impl->set_current_test_info(nullptr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0x80640
movq %rax, %rdi
callq 0x8a520
movq %rax, %rdi
callq 0x83a90
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x10(%rbp)
testb $0x1, 0x80(%rax)
jne 0x8a3da
movq -0x50(%rbp), %rax
testb $0x1, 0x81(%rax)
je 0x8a3d5
movq -0x50(%rbp), %rax
testb $0x1, 0x82(%rax)
je 0x8a3d5
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
jmp 0x8a511
callq 0xa29e0
movq -0x50(%rbp), %rsi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa8250
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq -0x50(%rbp), %rax
addq $0x90, %rax
movq %rax, -0x58(%rbp)
callq 0x84120
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xa8270
leaq -0x20(%rbp), %rdi
callq 0xa8290
movq -0x18(%rbp), %rdi
callq 0x840c0
movq %rax, %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movq -0x50(%rbp), %rax
movq 0x88(%rax), %rdi
movq $0x0, -0x30(%rbp)
movq $0x11, -0x38(%rbp)
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq 0x44622(%rip), %rcx     # 0xcea8a
callq 0xa82c0
movq %rax, -0x28(%rbp)
callq 0x899c0
testb $0x1, %al
jne 0x8a48c
callq 0x899e0
testb $0x1, %al
jne 0x8a48c
movq -0x28(%rbp), %rdi
callq 0x898c0
cmpq $0x0, -0x28(%rbp)
je 0x8a4d3
movq -0x18(%rbp), %rdi
callq 0x840c0
movq %rax, %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movq -0x28(%rbp), %rdi
leaq 0x1e09d(%rip), %rax     # 0xa8550
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq 0x445db(%rip), %rcx     # 0xceaa9
callq 0xa7c70
movq -0x50(%rbp), %rax
addq $0x90, %rax
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xa85a0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0xa8580
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa8250
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)