// File: /workspace/github_c_makefile_star2_O1/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 0x6fe9
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 0x27489(%rip), %r15     # 0x2e480
movl 0x8(%rax,%r15), %ebx
leaq 0x29b95(%rip), %r14     # 0x30b98
cmpl $0x1, %ebx
jne 0x7022
cmpl $0x0, 0x10c(%r14)
je 0x7022
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq %rax, %r15
cmpl $0x1, %ebx
je 0x7046
cmpl $0x2, %ebx
je 0x703d
cmpl $0x3, %ebx
jne 0x704f
leaq 0x1936b(%rip), %rdx     # 0x203a6
jmp 0x7066
leaq 0x1935c(%rip), %rdx     # 0x203a0
jmp 0x7066
leaq 0x1934b(%rip), %rdx     # 0x20398
jmp 0x7071
leaq 0x1935c(%rip), %rdi     # 0x203b2
movl %ebx, %esi
xorl %eax, %eax
callq 0x52b0
leaq 0x1ec55(%rip), %rdx     # 0x25cbb
movl $0x1, 0x11c(%r14)
movq 0x27f78(%rip), %r12     # 0x2eff0
movq (%r12), %rdi
leaq 0x19345(%rip), %rsi     # 0x203c8
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 0x1b39d(%rip), %rdi     # 0x22465
movl $0x2, %esi
movl $0x1, %edx
callq 0x5270
cmpl $0x2, %ebx
je 0x70ef
cmpl $0x3, %ebx
jne 0x7012
callq 0x539d
jmp 0x7012
movl 0x118(%r14), %eax
incl %eax
movl %eax, 0x118(%r14)
cmpl 0x114(%r14), %eax
jl 0x7164
movl $0x0, 0x118(%r14)
movq 0x27eae(%rip), %rax     # 0x2efc8
movq (%rax), %rcx
leaq 0x192ac(%rip), %rdi     # 0x203d0
movl $0x20, %esi
movl $0x1, %edx
callq 0x5270
movq 0x27e96(%rip), %rax     # 0x2efd0
movq (%rax), %rdi
callq 0x51d0
callq 0x5030
movq (%rax), %rbx
callq 0x5170
movzbl %al, %eax
cmpl $0x4e, (%rbx,%rax,4)
jne 0x7164
leaq 0x29a39(%rip), %rdi     # 0x30b98
callq 0x558c
movl $0x1, 0x110(%r14)
jmp 0x7012