// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/errors.c
// Function: error
void error(int errn,...)
/* prints errors and warnings */
{
  struct GlobalVars *gv = &gvars;
  va_list vl;
  char *errtype;
  int flags = errors[errn].flags;

  if ((flags == EF_WARNING) && gv->dontwarn)
    return;
  switch(flags) {
    case EF_WARNING:
      errtype = "Warning";
      break;
    case EF_ERROR:
      gv->returncode = EXIT_FAILURE;
      errtype = "Error";
      break;
    case EF_FATAL:
      gv->returncode = EXIT_FAILURE;
      errtype = "Fatal error";
      break;
    default:
      ierror("Illegal error type %d",flags);
      gv->returncode = EXIT_FAILURE;
      errtype = "";
      break;
  }

  /* print error message */
  fprintf(stderr,"%s %d: ",errtype,errn);
  va_start(vl,errn);
  vfprintf(stderr,errors[errn].txt,vl);
  va_end(vl);
  fprintf(stderr,".\n");

  switch(flags) {
    case EF_ERROR:
      /* check if maximum number of errors reached */
      if (++gv->errcnt >= gv->maxerrors) {
        gv->errcnt = 0;
        fprintf(stdout,"Do you want to continue (y/n) ? ");
        fflush(stdin);
        if (toupper((unsigned char)getchar()) == 'N')
          cleanup(gv);
      }
      /* avoid writing of output file in error case */
      gv->errflag = TRUE;
      break;
    case EF_FATAL:
      fprintf(stderr,"Aborting.\n");  /* fatal error aborts the linker */
      cleanup(gv);
      break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movl %edi, %ebp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x6f79
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movslq %edi, %rax
shlq $0x4, %rax
leaq 0x274f9(%rip), %r15     # 0x2e480
movl 0x8(%rax,%r15), %ebx
leaq 0x29c05(%rip), %r14     # 0x30b98
cmpl $0x1, %ebx
jne 0x6fb2
cmpl $0x0, 0x10c(%r14)
je 0x6fb2
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq %rax, %r15
cmpl $0x1, %ebx
je 0x6fd6
cmpl $0x2, %ebx
je 0x6fcd
cmpl $0x3, %ebx
jne 0x6fdf
leaq 0x193d0(%rip), %rdx     # 0x2039b
jmp 0x6ff6
leaq 0x193c1(%rip), %rdx     # 0x20395
jmp 0x6ff6
leaq 0x193b0(%rip), %rdx     # 0x2038d
jmp 0x7001
leaq 0x193c1(%rip), %rdi     # 0x203a7
movl %ebx, %esi
xorl %eax, %eax
callq 0x52b0
leaq 0x1eca5(%rip), %rdx     # 0x25c9b
movl $0x1, 0x11c(%r14)
movq 0x27fe8(%rip), %r12     # 0x2eff0
movq (%r12), %rdi
leaq 0x193aa(%rip), %rsi     # 0x203bd
movl %ebp, %ecx
xorl %eax, %eax
callq 0x5180
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rdx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rdx)
movq (%r12), %rdi
movq (%r15), %rsi
callq 0x5230
movq (%r12), %rcx
leaq 0x1b3fd(%rip), %rdi     # 0x22455
movl $0x2, %esi
movl $0x1, %edx
callq 0x5270
cmpl $0x2, %ebx
je 0x707f
cmpl $0x3, %ebx
jne 0x6fa2
callq 0x539d
jmp 0x6fa2
movl 0x118(%r14), %eax
incl %eax
movl %eax, 0x118(%r14)
cmpl 0x114(%r14), %eax
jl 0x70f4
movl $0x0, 0x118(%r14)
movq 0x27f1e(%rip), %rax     # 0x2efc8
movq (%rax), %rcx
leaq 0x19311(%rip), %rdi     # 0x203c5
movl $0x20, %esi
movl $0x1, %edx
callq 0x5270
movq 0x27f06(%rip), %rax     # 0x2efd0
movq (%rax), %rdi
callq 0x51d0
callq 0x5030
movq (%rax), %rbx
callq 0x5170
movzbl %al, %eax
cmpl $0x4e, (%rbx,%rax,4)
jne 0x70f4
leaq 0x29aa9(%rip), %rdi     # 0x30b98
callq 0x558c
movl $0x1, 0x110(%r14)
jmp 0x6fa2