// File: /workspace/github_c_makefile_star2_O2/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 0x9ff0
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x3bb4(%rip), %rdi      # 0xda68
callq 0x2330
movq 0x63a8(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0x9ed7
leaq 0x34cb(%rip), %rdi      # 0xd397
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
callq 0x23b0
testb $0x2, (%rbx)
je 0x9f2e
leaq 0x3505(%rip), %r15      # 0xd3e8
cmpb $0x0, 0x63ad(%rip)      # 0x10297
leaq 0x34f9(%rip), %r14      # 0xd3ea
movq %r14, %rsi
cmovneq %r15, %rsi
leaq 0x34bb(%rip), %rdi      # 0xd3ba
xorl %eax, %eax
callq 0x2030
movq 0x635b(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x9f2e
cmpb $0x0, 0x637e(%rip)      # 0x10297
cmovneq %r15, %r14
leaq 0x3496(%rip), %rsi      # 0xd3ba
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
testb $0x1, (%rbx)
je 0x9f67
movl 0x62c3(%rip), %esi      # 0x101fc
leaq 0x34ab(%rip), %rdi      # 0xd3eb
xorl %eax, %eax
callq 0x2030
movq 0x631a(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x9f67
movl 0x62a3(%rip), %edx      # 0x101fc
leaq 0x348b(%rip), %rsi      # 0xd3eb
xorl %eax, %eax
callq 0x22d0
testb $0x4, (%rbx)
je 0x9fa0
movl 0x6286(%rip), %esi      # 0x101f8
leaq 0x349f(%rip), %rdi      # 0xd418
xorl %eax, %eax
callq 0x2030
movq 0x62e1(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x9fa0
movl 0x6266(%rip), %edx      # 0x101f8
leaq 0x347f(%rip), %rsi      # 0xd418
xorl %eax, %eax
callq 0x22d0
leaq 0x34a0(%rip), %rdi      # 0xd447
callq 0x9a6e
movq %rax, %r14
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xa01f
movl 0x38(%rbx), %edx
testl %edx, %edx
je 0x9ff3
leaq 0x3487(%rip), %rdi      # 0xd44d
xorl %eax, %eax
callq 0x2030
movq 0x6294(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa01f
movq 0x20(%rbx), %rdx
movl 0x38(%rbx), %ecx
leaq 0x3466(%rip), %rsi      # 0xd44d
xorl %eax, %eax
callq 0x22d0
jmp 0xa01f
xorl %eax, %eax
retq
leaq 0x3475(%rip), %rdi      # 0xd46f
xorl %eax, %eax
callq 0x2030
movq 0x6260(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa01f
movq 0x20(%rbx), %rdx
leaq 0x3457(%rip), %rsi      # 0xd46f
xorl %eax, %eax
callq 0x22d0
leaq 0x345e(%rip), %rdi      # 0xd484
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x6231(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa04d
leaq 0x3441(%rip), %rsi      # 0xd484
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8190
incl 0x628a(%rip)            # 0x102e8
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq