// File: halfflat[P]tinyopt/test/googletest/googletest/src/gtest-death-test.cc
// Function: testing::internal::DeathTestImpl::Passed(bool)
bool DeathTestImpl::Passed(bool status_ok) {
  if (!spawned()) return false;

  const std::string error_message = GetErrorLogs();

  bool success = false;
  Message buffer;

  buffer << "Death test: " << statement() << "\n";
  switch (outcome()) {
    case LIVED:
      buffer << "    Result: failed to die.\n"
             << " Error msg:\n"
             << FormatDeathTestOutput(error_message);
      break;
    case THREW:
      buffer << "    Result: threw an exception.\n"
             << " Error msg:\n"
             << FormatDeathTestOutput(error_message);
      break;
    case RETURNED:
      buffer << "    Result: illegal return in test statement.\n"
             << " Error msg:\n"
             << FormatDeathTestOutput(error_message);
      break;
    case DIED:
      if (status_ok) {
        if (matcher_.Matches(error_message)) {
          success = true;
        } else {
          std::ostringstream stream;
          matcher_.DescribeTo(&stream);
          buffer << "    Result: died but not with expected error.\n"
                 << "  Expected: " << stream.str() << "\n"
                 << "Actual msg:\n"
                 << FormatDeathTestOutput(error_message);
        }
      } else {
        buffer << "    Result: died but not with expected exit code:\n"
               << "            " << ExitSummary(status()) << "\n"
               << "Actual msg:\n"
               << FormatDeathTestOutput(error_message);
      }
      break;
    case IN_PROGRESS:
    default:
      GTEST_LOG_(FATAL)
          << "DeathTest::Passed somehow called before conclusion of test";
  }

  DeathTest::set_last_death_test_message(buffer.GetString());
  return success;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0xa2d60
testb $0x1, %al
jne 0x76e44
movb $0x0, -0x1(%rbp)
jmp 0x77478
movq -0x2e8(%rbp), %rsi
movq (%rsi), %rax
movq 0x30(%rax), %rax
leaq -0x38(%rbp), %rdi
callq *%rax
movb $0x0, -0x39(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x84210
jmp 0x76e67
leaq 0x56c1a(%rip), %rsi     # 0xcda88
leaq -0x48(%rbp), %rdi
callq 0xa2d80
movq %rax, -0x2f0(%rbp)
jmp 0x76e80
movq -0x2e8(%rbp), %rdi
callq 0xa2e30
movq %rax, -0x2f8(%rbp)
jmp 0x76e95
movq -0x2f0(%rbp), %rdi
movq -0x2f8(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rsi
callq 0xa2dc0
movq %rax, -0x300(%rbp)
jmp 0x76eb9
movq -0x300(%rbp), %rdi
leaq 0x5452f(%rip), %rsi     # 0xcb3f6
callq 0xa2e50
jmp 0x76ece
movq -0x2e8(%rbp), %rdi
callq 0xa2e90
movl %eax, -0x304(%rbp)
jmp 0x76ee2
movl -0x304(%rbp), %eax
movl %eax, %ecx
movq %rcx, -0x310(%rbp)
subl $0x4, %eax
ja 0x77395
movq -0x310(%rbp), %rax
leaq 0x55278(%rip), %rcx     # 0xcc180
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x7746d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x77464
leaq 0x56b5b(%rip), %rsi     # 0xcda95
leaq -0x48(%rbp), %rdi
callq 0xa2eb0
movq %rax, -0x318(%rbp)
jmp 0x76f4c
movq -0x318(%rbp), %rdi
leaq 0x56b57(%rip), %rsi     # 0xcdab1
callq 0xa2d80
movq %rax, -0x320(%rbp)
jmp 0x76f68
leaq -0x80(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x77490
jmp 0x76f77
movq -0x320(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xa2ef0
jmp 0x76f89
leaq -0x80(%rbp), %rdi
callq 0x10fc8
jmp 0x773ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x10fc8
jmp 0x77464
leaq 0x56b06(%rip), %rsi     # 0xcdabe
leaq -0x48(%rbp), %rdi
callq 0xa2f30
movq %rax, -0x328(%rbp)
jmp 0x76fca
movq -0x328(%rbp), %rdi
leaq 0x56ad9(%rip), %rsi     # 0xcdab1
callq 0xa2d80
movq %rax, -0x330(%rbp)
jmp 0x76fe6
leaq -0xa0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x77490
jmp 0x76ff8
movq -0x330(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xa2ef0
jmp 0x7700d
leaq -0xa0(%rbp), %rdi
callq 0x10fc8
jmp 0x773ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x10fc8
jmp 0x77464
leaq 0x56a9d(%rip), %rsi     # 0xcdadf
leaq -0x48(%rbp), %rdi
callq 0xa2f70
movq %rax, -0x338(%rbp)
jmp 0x77054
movq -0x338(%rbp), %rdi
leaq 0x56a4f(%rip), %rsi     # 0xcdab1
callq 0xa2d80
movq %rax, -0x340(%rbp)
jmp 0x77070
leaq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x77490
jmp 0x77082
movq -0x340(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xa2ef0
jmp 0x77097
leaq -0xc0(%rbp), %rdi
callq 0x10fc8
jmp 0x773ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x10fc8
jmp 0x77464
testb $0x1, -0x11(%rbp)
je 0x77268
movq -0x2e8(%rbp), %rdi
addq $0x10, %rdi
leaq -0x38(%rbp), %rsi
callq 0xa2fb0
movb %al, -0x341(%rbp)
jmp 0x770eb
movb -0x341(%rbp), %al
testb $0x1, %al
jne 0x770f7
jmp 0x77100
movb $0x1, -0x39(%rbp)
jmp 0x77263
leaq -0x238(%rbp), %rdi
callq 0x10b20
jmp 0x7710e
movq -0x2e8(%rbp), %rdi
addq $0x10, %rdi
leaq -0x238(%rbp), %rsi
callq 0xa3020
jmp 0x77127
leaq 0x569e0(%rip), %rsi     # 0xcdb0e
leaq -0x48(%rbp), %rdi
callq 0xa2f70
movq %rax, -0x350(%rbp)
jmp 0x77140
movq -0x350(%rbp), %rdi
leaq 0x569ef(%rip), %rsi     # 0xcdb3d
callq 0xa2d80
movq %rax, -0x358(%rbp)
jmp 0x7715c
leaq -0x258(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x10780
jmp 0x77171
movq -0x358(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0xa2ef0
movq %rax, -0x360(%rbp)
jmp 0x7718d
movq -0x360(%rbp), %rdi
leaq 0x5425b(%rip), %rsi     # 0xcb3f6
callq 0xa2e50
movq %rax, -0x368(%rbp)
jmp 0x771a9
movq -0x368(%rbp), %rdi
leaq 0x56993(%rip), %rsi     # 0xcdb4a
callq 0xa2d80
movq %rax, -0x370(%rbp)
jmp 0x771c5
leaq -0x278(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x77490
jmp 0x771d7
movq -0x370(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0xa2ef0
jmp 0x771ec
leaq -0x278(%rbp), %rdi
callq 0x10fc8
leaq -0x258(%rbp), %rdi
callq 0x10fc8
leaq -0x238(%rbp), %rdi
callq 0x10190
jmp 0x77263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x77252
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x77246
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x10fc8
leaq -0x258(%rbp), %rdi
callq 0x10fc8
leaq -0x238(%rbp), %rdi
callq 0x10190
jmp 0x77464
jmp 0x77391
leaq 0x568e8(%rip), %rsi     # 0xcdb57
leaq -0x48(%rbp), %rdi
callq 0xa30d0
movq %rax, -0x378(%rbp)
jmp 0x77281
movq -0x378(%rbp), %rdi
leaq 0x568fb(%rip), %rsi     # 0xcdb8a
callq 0xa2d80
movq %rax, -0x380(%rbp)
jmp 0x7729d
movq -0x2e8(%rbp), %rdi
callq 0xa3110
movl %eax, -0x384(%rbp)
jmp 0x772b1
movl -0x384(%rbp), %esi
leaq -0x298(%rbp), %rdi
callq 0x77600
jmp 0x772c5
movq -0x380(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0xa2ef0
movq %rax, -0x390(%rbp)
jmp 0x772e1
movq -0x390(%rbp), %rdi
leaq 0x54107(%rip), %rsi     # 0xcb3f6
callq 0xa2e50
movq %rax, -0x398(%rbp)
jmp 0x772fd
movq -0x398(%rbp), %rdi
leaq 0x5683f(%rip), %rsi     # 0xcdb4a
callq 0xa2d80
movq %rax, -0x3a0(%rbp)
jmp 0x77319
leaq -0x2b8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x77490
jmp 0x7732b
movq -0x3a0(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0xa2ef0
jmp 0x77340
leaq -0x2b8(%rbp), %rdi
callq 0x10fc8
leaq -0x298(%rbp), %rdi
callq 0x10fc8
jmp 0x77391
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x77380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x10fc8
leaq -0x298(%rbp), %rdi
callq 0x10fc8
jmp 0x77464
jmp 0x773ea
jmp 0x77395
leaq 0x565ba(%rip), %rdx     # 0xcd956
leaq -0x2bc(%rbp), %rdi
movl $0x3, %esi
movl $0x26e, %ecx            # imm = 0x26E
callq 0x7d880
jmp 0x773b4
leaq -0x2bc(%rbp), %rdi
callq 0x1f280
movq %rax, -0x3a8(%rbp)
jmp 0x773c9
movq -0x3a8(%rbp), %rdi
leaq 0x567c0(%rip), %rsi     # 0xcdb97
callq 0x10720
jmp 0x773de
leaq -0x2bc(%rbp), %rdi
callq 0x7d9c0
leaq -0x2e0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x77710
jmp 0x773fc
leaq -0x2e0(%rbp), %rdi
callq 0x762b0
jmp 0x7740a
leaq -0x2e0(%rbp), %rdi
callq 0x10fc8
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x1d500
leaq -0x38(%rbp), %rdi
callq 0x10fc8
jmp 0x77478
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2bc(%rbp), %rdi
callq 0x7d9c0
jmp 0x77464
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x10fc8
leaq -0x48(%rbp), %rdi
callq 0x1d500
leaq -0x38(%rbp), %rdi
callq 0x10fc8
jmp 0x77486
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x10e00
nop