// File: /workspace/github_c_makefile_star2_O1/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 0xa6d6
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x34d2(%rip), %rdi      # 0xda68
callq 0x2330
movq 0x5cc6(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa5bd
leaq 0x2de9(%rip), %rdi      # 0xd397
movl $0x22, %esi
movl $0x1, %edx
callq 0x23b0
testb $0x2, (%rbx)
je 0xa614
leaq 0x2e1f(%rip), %r15      # 0xd3e8
cmpb $0x0, 0x5cc7(%rip)      # 0x10297
leaq 0x2e13(%rip), %r14      # 0xd3ea
movq %r14, %rsi
cmovneq %r15, %rsi
leaq 0x2dd5(%rip), %rdi      # 0xd3ba
xorl %eax, %eax
callq 0x2030
movq 0x5c75(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa614
cmpb $0x0, 0x5c98(%rip)      # 0x10297
cmovneq %r15, %r14
leaq 0x2db0(%rip), %rsi      # 0xd3ba
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
testb $0x1, (%rbx)
je 0xa64d
movl 0x5bdd(%rip), %esi      # 0x101fc
leaq 0x2dc5(%rip), %rdi      # 0xd3eb
xorl %eax, %eax
callq 0x2030
movq 0x5c34(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa64d
movl 0x5bbd(%rip), %edx      # 0x101fc
leaq 0x2da5(%rip), %rsi      # 0xd3eb
xorl %eax, %eax
callq 0x22d0
testb $0x4, (%rbx)
je 0xa686
movl 0x5ba0(%rip), %esi      # 0x101f8
leaq 0x2db9(%rip), %rdi      # 0xd418
xorl %eax, %eax
callq 0x2030
movq 0x5bfb(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa686
movl 0x5b80(%rip), %edx      # 0x101f8
leaq 0x2d99(%rip), %rsi      # 0xd418
xorl %eax, %eax
callq 0x22d0
leaq 0x2dba(%rip), %rdi      # 0xd447
callq 0xa226
movq %rax, %r14
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xa705
movl 0x38(%rbx), %edx
testl %edx, %edx
je 0xa6d9
leaq 0x2da1(%rip), %rdi      # 0xd44d
xorl %eax, %eax
callq 0x2030
movq 0x5bae(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa705
movq 0x20(%rbx), %rdx
movl 0x38(%rbx), %ecx
leaq 0x2d80(%rip), %rsi      # 0xd44d
xorl %eax, %eax
callq 0x22d0
jmp 0xa705
xorl %eax, %eax
retq
leaq 0x2d8f(%rip), %rdi      # 0xd46f
xorl %eax, %eax
callq 0x2030
movq 0x5b7a(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa705
movq 0x20(%rbx), %rdx
leaq 0x2d71(%rip), %rsi      # 0xd46f
xorl %eax, %eax
callq 0x22d0
leaq 0x2d78(%rip), %rdi      # 0xd484
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x5b4b(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa733
leaq 0x2d5b(%rip), %rsi      # 0xd484
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x89b5
incl 0x5ba2(%rip)            # 0x102e8
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq