// File: /workspace/github_c_makefile_star2_O3/mabdi[P]bunney/bunny-main.c
// Function: check_crash
static _u8 check_crash(struct bunny_traceitem* t) {

  if (t->exit_status & (EXITF_CRASH | EXITF_TIMEOUT | EXITF_STUCK)) {
    _u8* fn;

    outf("\n"
         "+++ FAULT CONDITION DETECTED +++\n");

    if (t->exit_status & EXITF_CRASH)    outf("%sDiagnosis : CRASH (died on supplied input)\n", use_beep ? "\x07\x08" : "");
    if (t->exit_status & EXITF_TIMEOUT)  outf("Diagnosis : timeout (no response for %u ms)\n", time_limit);
    if (t->exit_status & EXITF_STUCK)    outf("Diagnosis : stall (no trace output for %u ms)\n", stall_limit);

    fn = make_input("FAULT");
    
    if (t->fault_loc) {
      if (t->func_skip)
        outf("Location  : %s(...) + %u skipped\n",t->fault_loc,t->func_skip);
        else outf("Location  : %s(...)\n",t->fault_loc);
    }
    
    outf("Capture   : %s\n"
         "Trigger   : ", fn);

    /* Registering the path is counterproductive, and will result in 
       incomplete traces being recorded, causing BunnySnoop error
       messages. Just get rid of the thing. */

    discard_context(t,1);
    crash_cnt++;

    return 1;
  }

  return 0;

}

// Assembly:
testb $0x7, (%rdi)
je 0xa702
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x34a6(%rip), %rdi      # 0xda68
callq 0x2330
movq 0x5c9a(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa5e9
leaq 0x2dbd(%rip), %rdi      # 0xd397
movl $0x22, %esi
movl $0x1, %edx
callq 0x23b0
testb $0x2, (%rbx)
je 0xa640
leaq 0x2df3(%rip), %r15      # 0xd3e8
cmpb $0x0, 0x5c9b(%rip)      # 0x10297
leaq 0x2de7(%rip), %r14      # 0xd3ea
movq %r14, %rsi
cmovneq %r15, %rsi
leaq 0x2da9(%rip), %rdi      # 0xd3ba
xorl %eax, %eax
callq 0x2030
movq 0x5c49(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa640
cmpb $0x0, 0x5c6c(%rip)      # 0x10297
cmovneq %r15, %r14
leaq 0x2d84(%rip), %rsi      # 0xd3ba
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
testb $0x1, (%rbx)
je 0xa679
movl 0x5bb1(%rip), %esi      # 0x101fc
leaq 0x2d99(%rip), %rdi      # 0xd3eb
xorl %eax, %eax
callq 0x2030
movq 0x5c08(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa679
movl 0x5b91(%rip), %edx      # 0x101fc
leaq 0x2d79(%rip), %rsi      # 0xd3eb
xorl %eax, %eax
callq 0x22d0
testb $0x4, (%rbx)
je 0xa6b2
movl 0x5b74(%rip), %esi      # 0x101f8
leaq 0x2d8d(%rip), %rdi      # 0xd418
xorl %eax, %eax
callq 0x2030
movq 0x5bcf(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa6b2
movl 0x5b54(%rip), %edx      # 0x101f8
leaq 0x2d6d(%rip), %rsi      # 0xd418
xorl %eax, %eax
callq 0x22d0
leaq 0x2d8e(%rip), %rdi      # 0xd447
callq 0xa252
movq %rax, %r14
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xa731
movl 0x38(%rbx), %edx
testl %edx, %edx
je 0xa705
leaq 0x2d75(%rip), %rdi      # 0xd44d
xorl %eax, %eax
callq 0x2030
movq 0x5b82(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa731
movq 0x20(%rbx), %rdx
movl 0x38(%rbx), %ecx
leaq 0x2d54(%rip), %rsi      # 0xd44d
xorl %eax, %eax
callq 0x22d0
jmp 0xa731
xorl %eax, %eax
retq
leaq 0x2d63(%rip), %rdi      # 0xd46f
xorl %eax, %eax
callq 0x2030
movq 0x5b4e(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa731
movq 0x20(%rbx), %rdx
leaq 0x2d45(%rip), %rsi      # 0xd46f
xorl %eax, %eax
callq 0x22d0
leaq 0x2d4c(%rip), %rdi      # 0xd484
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x5b1f(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa75f
leaq 0x2d2f(%rip), %rsi      # 0xd484
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8a2c
incl 0x5b76(%rip)            # 0x102e8
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq