// File: /workspace/github_c_makefile_star2_O2/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 0x6c7e
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 0x277f4(%rip), %r15     # 0x2e480
movl 0x8(%rax,%r15), %ebx
leaq 0x2a2f0(%rip), %r14     # 0x30f88
cmpl $0x1, %ebx
jne 0x6cb7
cmpl $0x0, 0x10c(%r14)
je 0x6cb7
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq %rax, %r15
cmpl $0x1, %ebx
je 0x6cdb
cmpl $0x2, %ebx
je 0x6cd2
cmpl $0x3, %ebx
jne 0x6ce4
leaq 0x176cb(%rip), %rdx     # 0x1e39b
jmp 0x6cfb
leaq 0x176bc(%rip), %rdx     # 0x1e395
jmp 0x6cfb
leaq 0x176ab(%rip), %rdx     # 0x1e38d
jmp 0x6d06
leaq 0x176bc(%rip), %rdi     # 0x1e3a7
movl %ebx, %esi
xorl %eax, %eax
callq 0x6b2c
leaq 0x1cbc0(%rip), %rdx     # 0x238bb
movl $0x1, 0x11c(%r14)
movq 0x282e3(%rip), %r12     # 0x2eff0
movq (%r12), %rdi
leaq 0x176a5(%rip), %rsi     # 0x1e3bd
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 0x5240
movq (%r12), %rcx
leaq 0x19708(%rip), %rdi     # 0x20465
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x5280
cmpl $0x2, %ebx
je 0x6d9d
cmpl $0x3, %ebx
jne 0x6ca7
movq (%r12), %rcx
leaq 0x17601(%rip), %rdi     # 0x1e382
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x5280
leaq 0x2a1f5(%rip), %rdi     # 0x30f88
callq 0x53ac
jmp 0x6ca7
movl 0x118(%r14), %eax
incl %eax
movl %eax, 0x118(%r14)
cmpl 0x114(%r14), %eax
jl 0x6e0b
andl $0x0, 0x118(%r14)
movq 0x28203(%rip), %rax     # 0x2efc8
movq (%rax), %rcx
leaq 0x175f6(%rip), %rdi     # 0x1e3c5
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
callq 0x5280
movq 0x281ef(%rip), %rax     # 0x2efd0
movq (%rax), %rdi
callq 0x51d0
callq 0x5030
movq (%rax), %rbx
callq 0x5170
movzbl %al, %eax
cmpl $0x4e, (%rbx,%rax,4)
jne 0x6e0b
leaq 0x2a182(%rip), %rdi     # 0x30f88
callq 0x53ac
movl $0x1, 0x110(%r14)
jmp 0x6ca7
nop