// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]tundra/unittest/googletest/googletest/src/gtest-death-test.cc
// Function: testing::internal::DeathTestImpl::ReadAndInterpretStatusByte()
void DeathTestImpl::ReadAndInterpretStatusByte() {
  char flag;
  int bytes_read;

  // The read() here blocks until data is available (signifying the
  // failure of the death test) or until the pipe is closed (signifying
  // its success), so it's okay to call this in the parent before
  // the child process has exited.
  do {
    bytes_read = posix::Read(read_fd(), &flag, 1);
  } while (bytes_read == -1 && errno == EINTR);

  if (bytes_read == 0) {
    set_outcome(DIED);
  } else if (bytes_read == 1) {
    switch (flag) {
      case kDeathTestReturned:
        set_outcome(RETURNED);
        break;
      case kDeathTestThrew:
        set_outcome(THREW);
        break;
      case kDeathTestLived:
        set_outcome(LIVED);
        break;
      case kDeathTestInternalError:
        FailFromInternalError(read_fd());  // Does not return.
        break;
      default:
        GTEST_LOG_(FATAL) << "Death test child process reported "
                          << "unexpected status byte ("
                          << static_cast<unsigned int>(flag) << ")";
    }
  } else {
    GTEST_LOG_(FATAL) << "Read from death test child process failed: "
                      << GetLastErrnoDescription();
  }
  GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));
  set_read_fd(-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, %rbx
leaq 0x6(%rsp), %r14
pushq $0x1
popq %r15
movl 0x24(%rbx), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd980
cmpl $-0x1, %eax
jne 0x1b066
callq 0xd070
cmpl $0x4, (%rax)
je 0x1b047
jmp 0x1b0aa
testl %eax, %eax
je 0x1b10f
cmpl $0x1, %eax
jne 0x1b0aa
movzbl 0x6(%rsp), %r14d
cmpl $0x49, %r14d
je 0x1b22a
cmpl $0x4c, %r14d
je 0x1b212
cmpl $0x54, %r14d
je 0x1b21e
cmpl $0x52, %r14d
jne 0x1b28a
movl $0x3, 0x20(%rbx)
jmp 0x1b116
leaq 0x29dc1(%rip), %rdx     # 0x44e72
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rsi
movl $0x1d6, %ecx            # imm = 0x1D6
callq 0x1e178
movq 0x4df1e(%rip), %rdi     # 0x68fe8
leaq 0x29e14(%rip), %rsi     # 0x44ee5
callq 0xd5e0
movq %rax, %r14
leaq 0xf0(%rsp), %rdi
callq 0x1af3f
leaq 0xf0(%rsp), %rsi
movq %r14, %rdi
callq 0xd520
leaq 0xf0(%rsp), %rdi
callq 0xdd68
leaq 0x8(%rsp), %rdi
callq 0x1e23c
jmp 0x1b116
movl $0x1, 0x20(%rbx)
movl 0x24(%rbx), %edi
callq 0xdd40
cmpl $-0x1, %eax
jne 0x1b200
callq 0xd070
cmpl $0x4, (%rax)
je 0x1b116
leaq 0x29dd9(%rip), %rsi     # 0x44f11
leaq 0x90(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1f4d6
leaq 0x29d21(%rip), %rdx     # 0x44e72
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1f511
leaq 0x29db8(%rip), %rdx     # 0x44f25
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1f511
leaq 0x6c(%rsp), %rsi
movl $0x1d9, (%rsi)          # imm = 0x1D9
leaq 0x70(%rsp), %rdi
callq 0x21107
leaq 0x28(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x210a0
leaq 0x290cd(%rip), %rdx     # 0x44282
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1f511
leaq 0x29d62(%rip), %rdx     # 0x44f2d
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1f511
leaq 0x29f61(%rip), %rdx     # 0x45142
leaq 0xf0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1f511
leaq 0xf0(%rsp), %rdi
callq 0x1aed0
orl $-0x1, 0x24(%rbx)
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x2, 0x20(%rbx)
jmp 0x1b116
movl $0x4, 0x20(%rbx)
jmp 0x1b116
movl 0x24(%rbx), %r14d
leaq 0x48(%rsp), %rdi
callq 0x11c8e
leaq 0xf0(%rsp), %r15
movl $0xff, %edx
movl %r14d, %edi
movq %r15, %rsi
callq 0xd980
testl %eax, %eax
jle 0x1b274
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x0, 0xf0(%rsp,%rax)
movq 0x48(%rsp), %rdi
addq $0x10, %rdi
movq %r15, %rsi
callq 0xd5e0
jmp 0x1b240
cmpl $-0x1, %eax
jne 0x1b2f7
callq 0xd070
movl (%rax), %ebp
cmpl $0x4, %ebp
je 0x1b240
jmp 0x1b33d
leaq 0x29be1(%rip), %rdx     # 0x44e72
leaq 0xf0(%rsp), %rdi
pushq $0x3
popq %rsi
movl $0x1d1, %ecx            # imm = 0x1D1
callq 0x1e178
movq 0x4dd3b(%rip), %rdi     # 0x68fe8
leaq 0x29bf5(%rip), %rsi     # 0x44ea9
callq 0xd5e0
leaq 0x29c0c(%rip), %rsi     # 0x44ecc
movq %rax, %rdi
callq 0xd5e0
movsbq %r14b, %rcx
movl %ecx, %esi
movq %rax, %rdi
callq 0xd3d0
leaq 0x2d109(%rip), %rsi     # 0x483e6
movq %rax, %rdi
callq 0xd5e0
leaq 0xf0(%rsp), %rdi
callq 0x1e23c
jmp 0x1b116
testl %eax, %eax
jne 0x1b336
leaq 0x29b70(%rip), %rdx     # 0x44e72
leaq 0x28(%rsp), %rdi
pushq $0x3
popq %rsi
movl $0x150, %ecx            # imm = 0x150
callq 0x1e178
movq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e63
movq 0x4dcbe(%rip), %rdi     # 0x68fe8
leaq 0x8(%rsp), %rsi
callq 0xd520
jmp 0x1b3ab
callq 0xd070
movl (%rax), %ebp
leaq 0x29b2e(%rip), %rdx     # 0x44e72
leaq 0x28(%rsp), %rdi
pushq $0x3
popq %rsi
movl $0x153, %ecx            # imm = 0x153
callq 0x1e178
movq 0x4dc8b(%rip), %rdi     # 0x68fe8
leaq 0x2a5ce(%rip), %rsi     # 0x45932
callq 0xd5e0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1af3f
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0xd520
leaq 0x2aa10(%rip), %rsi     # 0x45d9a
movq %rax, %rdi
callq 0xd5e0
movq %rax, %rdi
movl %ebp, %esi
callq 0xdbd0
leaq 0x29ef9(%rip), %rsi     # 0x4529c
movq %rax, %rdi
callq 0xd5e0
leaq 0x8(%rsp), %rdi
callq 0xdd68
leaq 0x28(%rsp), %rdi
callq 0x1e23c
leaq 0x48(%rsp), %rdi
callq 0x1f8e0
jmp 0x1b116
jmp 0x1b404
jmp 0x1b3d9
jmp 0x1b48c
jmp 0x1b3d9
movq %rax, %rbx
jmp 0x1b411
jmp 0x1b48c
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xdd68
jmp 0x1b3f8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xdd68
jmp 0x1b42d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xdd68
leaq 0x28(%rsp), %rdi
callq 0x1e23c
jmp 0x1b48f
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
jmp 0x1b464
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xdd68
jmp 0x1b43c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xdd68
jmp 0x1b46e
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xdd68
jmp 0x1b45f
jmp 0x1b45c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1e23c
jmp 0x1b4c2
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xdd68
jmp 0x1b47d
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0xdd68
jmp 0x1b49e
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x1f8e0
jmp 0x1b4c2
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xdd68
jmp 0x1b4b0
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xdd68
jmp 0x1b4c2
movq %rax, %rbx
movq %rbx, %rdi
callq 0xdbf0