// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0xd1bd
jmp 0xcf60
leaq 0x33a6(%rip), %rdi      # 0x1030d
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x5362(%rip)      # 0x122d8
je 0xcf8d
movq 0x5359(%rip), %rdi      # 0x122d8
leaq 0x3387(%rip), %rsi      # 0x1030d
movb $0x0, %al
callq 0x22d0
jmp 0xcf8f
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xd008
jmp 0xcf9f
movzbl 0x5361(%rip), %ecx      # 0x12307
leaq 0x33b3(%rip), %rsi      # 0x10360
leaq 0x33aa(%rip), %rax      # 0x1035e
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x336e(%rip), %rdi      # 0x10330
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x5307(%rip)      # 0x122d8
je 0xd004
movq 0x52fe(%rip), %rdi      # 0x122d8
movzbl 0x5326(%rip), %ecx      # 0x12307
leaq 0x3378(%rip), %rdx      # 0x10360
leaq 0x336f(%rip), %rax      # 0x1035e
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x3333(%rip), %rsi      # 0x10330
movb $0x0, %al
callq 0x22d0
jmp 0xd006
jmp 0xd008
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xd055
jmp 0xd018
movl 0x51d6(%rip), %esi      # 0x121f4
leaq 0x333c(%rip), %rdi      # 0x10361
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x52a4(%rip)      # 0x122d8
je 0xd051
movq 0x529b(%rip), %rdi      # 0x122d8
movl 0x51b1(%rip), %edx      # 0x121f4
leaq 0x3317(%rip), %rsi      # 0x10361
movb $0x0, %al
callq 0x22d0
jmp 0xd053
jmp 0xd055
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xd0a2
jmp 0xd065
movl 0x5185(%rip), %esi      # 0x121f0
leaq 0x331c(%rip), %rdi      # 0x1038e
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x5257(%rip)      # 0x122d8
je 0xd09e
movq 0x524e(%rip), %rdi      # 0x122d8
movl 0x5160(%rip), %edx      # 0x121f0
leaq 0x32f7(%rip), %rsi      # 0x1038e
movb $0x0, %al
callq 0x22d0
jmp 0xd0a0
jmp 0xd0a2
leaq 0x3314(%rip), %rdi      # 0x103bd
callq 0xc110
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xd161
movq -0x10(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0xd11c
jmp 0xd0cd
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edx
leaq 0x32e0(%rip), %rdi      # 0x103c3
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x51e6(%rip)      # 0x122d8
je 0xd118
movq 0x51dd(%rip), %rdi      # 0x122d8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x38(%rax), %ecx
leaq 0x32b2(%rip), %rsi      # 0x103c3
movb $0x0, %al
callq 0x22d0
jmp 0xd11a
jmp 0xd15f
jmp 0xd11e
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
leaq 0x32b8(%rip), %rdi      # 0x103e5
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x519c(%rip)      # 0x122d8
je 0xd15b
movq 0x5193(%rip), %rdi      # 0x122d8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x3291(%rip), %rsi      # 0x103e5
movb $0x0, %al
callq 0x22d0
jmp 0xd15d
jmp 0xd15f
jmp 0xd161
jmp 0xd163
movq -0x18(%rbp), %rsi
leaq 0x328c(%rip), %rdi      # 0x103fa
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x515b(%rip)      # 0x122d8
je 0xd198
movq 0x5152(%rip), %rdi      # 0x122d8
movq -0x18(%rbp), %rdx
leaq 0x3269(%rip), %rsi      # 0x103fa
movb $0x0, %al
callq 0x22d0
jmp 0xd19a
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x8570
movl 0x51aa(%rip), %eax      # 0x12358
addl $0x1, %eax
movl %eax, 0x51a1(%rip)      # 0x12358
movb $0x1, -0x1(%rbp)
jmp 0xd1c1
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq