// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/error.c
// Function: Error
int Error(int err_num,const char *s)
{
  int fatal = 0;

  if ( err_num < 0 ){
    fatal = 1;
    err_num = -err_num;
  }
  ++error;

  ++cntError;

  if ( fatal ){
    fprintf(stderr,"Fatal Error %d!\n",err_num);
  }

  if (Current.File >= 0){
    if ( Current.Macro.Line && err_num != FAIL_ERR ){
      fprintf(my_stderr,"ERROR: %s:%d:Macro-Line %5d:<%s>: '%s'\n",
	      file_list[Current.File].name,Current.Line,
	      Current.Macro.Line,file_list[Current.Macro.File].name,
              srcLine);
    } else if ( err_num != FAIL_ERR ) {
      fprintf(my_stderr,"ERROR: %s:%5d: '%s'\n",
              file_list[Current.File].name,Current.Line, srcLine);
    }
  }
  switch (err_num) {
  case  INCLUDE_ERR:
    fprintf(my_stderr,"To many includes\n");
    break;
  case FILE_ERR:
    fprintf(my_stderr,"Can't open file <%s>\n",s);
    break;
  case LABEL_ERR:
    fprintf(my_stderr,"Wrong character in label\n");
    break;
  case MLABEL_ERR:
    fprintf(my_stderr,"Macro-label outside macro\n");
    break;
  case NOMEM_ERR:
    fprintf(my_stderr,"No more memory available\n");
    break;
  case REDEF_ERR:
    fprintf(my_stderr,"Label redefined ! First use here: %5d : <%s>\n",
	    ((label_t *)s)->line,file_list[ ((label_t *)s)->file ].name );
    break;
  case LREDEF_ERR:
    fprintf(my_stderr,"Local label redefined ! First use here: %5d : <%s>\n",
	    ((label_t *)s)->line,file_list[ ((label_t *)s)->file ].name );
    break;
  case LMREDEF_ERR:
    fprintf(my_stderr,"Local macro label redefined ! First use here: %5d : <%s>\n",
	    ((label_t *)s)->line,file_list[ ((label_t *)s)->file ].name );
    break;
  case MREDEF_ERR:
    fprintf(my_stderr,"Macro-name redefined ! First use here: %5d : <%s>\n",
	    ((label_t *)s)->line,file_list[ ((label_t *)s)->file ].name );
    break;
  case TOOMANY_ERR:
    fprintf(my_stderr,"Global symbol memory exhausted\n");
    break;
  case LTOOMANY_ERR:
    fprintf(my_stderr,"Local symbol memory exhausted\n");
    break;
  case LMTOOMANY_ERR:
    fprintf(my_stderr,"Local-macro symbol memory exhausted\n");
    break;
  case MTOOMANY_ERR:
    fprintf(my_stderr,"Macro-name memory exhausted\n");
    break;
  case UNKNOWN_ERR:
    fprintf(my_stderr,"Unknown opcode : (%s)\n",s);
    break;
  case TOOBIG_ERR:
    fprintf(my_stderr,"Constant to big\n");
    break;
  case EXPR_ERR:
    fprintf(my_stderr,"Error in expression\n");
    break;
  case SYNTAX_ERR:
    if ( s ){
      fprintf(my_stderr,"Syntax Error:%s\n",s);
    } else {
      fprintf(my_stderr,"Syntax Error\n");
    }
    break;
  case NEEDCONST_ERR:
    fprintf(my_stderr,"%s needs constant expression\n",s);
    break;
  case MLABEL2_ERR:
    fprintf(my_stderr,"Only .\\label allowed inside a macro\n");
    break;
  case CODEMEM_ERR:
    fprintf(my_stderr,"Code-memory exhausted. Code > %dK\n",MAX_CODE_SIZE/1024);
    break;
  case DISTANCE_ERR:
    fprintf(my_stderr,"Relative distance to large\n");
    break;
  case NOREFMEM_ERR:
    fprintf(my_stderr,"No more reference-memory\n");
    break;
  case GARBAGE_ERR:
    fprintf(my_stderr,"Garbage at the end of line:'%s'\n",s);
    break;
  case MACRONESTED_ERR:
    fprintf(my_stderr,"Macro-definition nested to deep (max. 2)\n");
    break;
  case BYTE_ERR:
    fprintf(my_stderr,"Byte value out of range\n");
    break;
  case WORD_ERR:
    fprintf(my_stderr,"Word value out of range\n");
    break;
  case TYPE_ERR:
    fprintf(my_stderr,"Label-type mismatch\n");
    break;
  case UNSOLVED_ERR:
    fprintf(my_stderr,"Unsolved %s labels\n",s);
    break;
  case TOOMANYIF_ERR:
    fprintf(my_stderr,"To many nested IF\n");
    break;
  case ENDIF1_ERR:
    fprintf(my_stderr,"ENDIF without IF\n");
    break;
  case FAIL_ERR:
    break;
  case SWITCH_ERR:
    fprintf(my_stderr,"Nested SWITCH\n");
    break;
  case CASE_ERR:
    fprintf(my_stderr,"CASE without SWITCH\n");
    break;
  case DEFAULT_ERR:
    fprintf(my_stderr,"DEFAULT/ELSES without SWITCH\n");
    break;
  case ENDS_ERR:
    fprintf(my_stderr,"ENDS without SWITCH\n");
    break;
  case REPT1_ERR:
    fprintf(my_stderr,"Nested REPT\n");
    break;
  case REPT2_ERR:
    fprintf(my_stderr,"ENDR without REPT\n");
    break;
  case ISYMS_ERR:
    fprintf(my_stderr,"ISYMS only supported in the original Atari version!\n");
    break;
  case CMD_ERR:
    fprintf(my_stderr,"Error in command-line\n");
    break;
  case WRITE_ERR:
    fprintf(my_stderr,"Could not write :%s\n",s);
    break;
  case LOAD_ERR:
    fprintf(my_stderr,"LoadBuffer not big enough for :%s\n",s);
    break;
  case IMM_ERR:
    fprintf(my_stderr,"Quick immediate value out of range (%s)!\n",s);
    break;
  case REG_ERR:
    if ( s ) {
      fprintf(my_stderr,"Missing Register:%s\n",s);
    } else {
      fprintf(my_stderr,"Missing Register\n");
    }
    break;
  case REG1_ERR:
    fprintf(my_stderr,"Redefining register-symbol\n");
    break;
  case MISC_ERR:
    fprintf(my_stderr,"%s\n",s);
    break;
  }

  if ( !verbose) verbose=1;
  killLine();

  if ( fatal ){
    fprintf(stderr,"leaving ...\n");
    exit(1);
  }
  return err_num;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebp
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
leaq 0x12801(%rip), %rax     # 0x1cae4
incl (%rax)
leaq 0xa0a4(%rip), %rax      # 0x14390
incl (%rax)
testl %edi, %edi
js 0xa3ed
leaq 0xa30b(%rip), %rax      # 0x14608
movslq 0x4(%rax), %rcx
testq %rcx, %rcx
js 0xa3bb
movl 0x10(%rax), %r8d
testl %r8d, %r8d
setne %dl
cmpl $0x20, %ebx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xa37c
leaq 0xa2cd(%rip), %rdx      # 0x145f8
movq (%rdx), %rdi
movq %rcx, %rdx
shlq $0x9, %rdx
leaq (%rdx,%rcx,4), %rcx
leaq 0xa4a0(%rip), %rsi      # 0x147e0
leaq (%rsi,%rcx), %rdx
addq $0x4, %rdx
movl (%rax), %ecx
movslq 0x14(%rax), %rax
movq %rax, %r9
shlq $0x9, %r9
leaq (%r9,%rax,4), %rax
leaq (%rsi,%rax), %r9
addq $0x4, %r9
leaq 0x12ab8(%rip), %rax     # 0x1ce20
movq %rax, (%rsp)
leaq 0x3256(%rip), %rsi      # 0xd5c9
xorl %eax, %eax
callq 0x3130
jmp 0xa3bb
cmpl $0x20, %ebx
je 0xa3bb
leaq 0xa270(%rip), %rdx      # 0x145f8
movq (%rdx), %rdi
movq %rcx, %rdx
shlq $0x9, %rdx
leaq (%rdx,%rcx,4), %rcx
leaq 0xa443(%rip), %rdx      # 0x147e0
addq %rcx, %rdx
addq $0x4, %rdx
movl (%rax), %ecx
leaq 0x3244(%rip), %rsi      # 0xd5f1
leaq 0x12a6c(%rip), %r8      # 0x1ce20
xorl %eax, %eax
callq 0x3130
leal -0x1(%rbx), %eax
cmpl $0x2d, %eax
ja 0xa8c7
leaq 0x3132(%rip), %rcx      # 0xd500
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa21a(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x321e(%rip), %rdi      # 0xd606
jmp 0xa8b8
movq 0x8c04(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x31ba(%rip), %rsi      # 0xd5b8
movl %ebx, %edx
xorl %eax, %eax
callq 0x3130
jmp 0xa2f6
leaq 0xa1e5(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3647(%rip), %rsi      # 0xda64
jmp 0xa88d
leaq 0xa1cf(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x359f(%rip), %rdi      # 0xd9d2
jmp 0xa7fa
leaq 0xa1b9(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x361f(%rip), %rsi      # 0xda68
jmp 0xa88d
leaq 0xa1a3(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x35f4(%rip), %rsi      # 0xda53
jmp 0xa88d
leaq 0xa18d(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3592(%rip), %rdi      # 0xda07
movl $0x34, %esi
jmp 0xa8bd
leaq 0xa172(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x34b2(%rip), %rdi      # 0xd942
jmp 0xa7fa
leaq 0xa15c(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x33a1(%rip), %rdi      # 0xd847
jmp 0xa59c
leaq 0xa146(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3290(%rip), %rdi      # 0xd74c
movl $0x1f, %esi
jmp 0xa8bd
leaq 0xa12b(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3510(%rip), %rdi      # 0xd9e7
movl $0xc, %esi
jmp 0xa8bd
leaq 0xa110(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x33b9(%rip), %rdi      # 0xd8ab
jmp 0xa773
leaq 0xa0fa(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x32c5(%rip), %rsi      # 0xd7cd
jmp 0xa88d
leaq 0xa0e4(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x340b(%rip), %rdi      # 0xd929
jmp 0xa78e
leaq 0xa0ce(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x33b2(%rip), %rdi      # 0xd8e6
movl $0x29, %esi
jmp 0xa8bd
leaq 0xa0b3(%rip), %rax      # 0x145f8
movq (%rax), %rdi
movl 0x10(%r14), %edx
movslq 0x14(%r14), %rax
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,4), %rax
leaq 0xa27e(%rip), %rcx      # 0x147e0
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x313b(%rip), %rsi      # 0xd6ab
jmp 0xa656
leaq 0xa07c(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3505(%rip), %rsi      # 0xda8b
jmp 0xa88d
leaq 0xa066(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x31ef(%rip), %rdi      # 0xd78b
movl $0x24, %esi
jmp 0xa8bd
leaq 0xa04b(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x33b4(%rip), %rdi      # 0xd96b
jmp 0xa815
leaq 0xa035(%rip), %rax      # 0x145f8
movq (%rax), %rdi
movl 0x10(%r14), %edx
movslq 0x14(%r14), %rax
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,4), %rax
leaq 0xa200(%rip), %rcx      # 0x147e0
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x312b(%rip), %rsi      # 0xd719
jmp 0xa656
leaq 0xa001(%rip), %rax      # 0x145f8
movq (%rax), %rdi
movl 0x10(%r14), %edx
movslq 0x14(%r14), %rax
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,4), %rax
leaq 0xa1cc(%rip), %rcx      # 0x147e0
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x305b(%rip), %rsi      # 0xd67d
jmp 0xa656
leaq 0x9fcd(%rip), %rax      # 0x145f8
movq (%rax), %rdi
movl 0x10(%r14), %edx
movslq 0x14(%r14), %rax
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,4), %rax
leaq 0xa198(%rip), %rcx      # 0x147e0
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x3089(%rip), %rsi      # 0xd6df
xorl %eax, %eax
callq 0x3130
jmp 0xa8c7
leaq 0x9f8f(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x2fd5(%rip), %rdi      # 0xd648
movl $0x1a, %esi
jmp 0xa8bd
leaq 0x9f74(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x32f0(%rip), %rdi      # 0xd97e
jmp 0xa8b8
leaq 0x9f5e(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x32fb(%rip), %rdi      # 0xd99f
jmp 0xa7fa
leaq 0x9f48(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x320b(%rip), %rsi      # 0xd8c5
jmp 0xa88d
leaq 0x9f32(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x2f93(%rip), %rdi      # 0xd663
jmp 0xa773
leaq 0x9f1c(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x30ca(%rip), %rdi      # 0xd7b0
movl $0x1c, %esi
jmp 0xa8bd
leaq 0x9f01(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x316b(%rip), %rsi      # 0xd86c
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x3130
jmp 0xa8c7
leaq 0x9edf(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3049(%rip), %rdi      # 0xd76c
movl $0x1e, %esi
jmp 0xa8bd
leaq 0x9ec4(%rip), %rax      # 0x145f8
movq (%rax), %rcx
testq %r14, %r14
je 0xa8b1
leaq 0x336e(%rip), %rsi      # 0xdab5
jmp 0xa84c
leaq 0x9ea5(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x2ebb(%rip), %rsi      # 0xd618
jmp 0xa88d
leaq 0x9e8f(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x2ebb(%rip), %rdi      # 0xd62e
movl $0x19, %esi
jmp 0xa8bd
leaq 0x9e74(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3182(%rip), %rdi      # 0xd910
movl $0x18, %esi
jmp 0xa8bd
leaq 0x9e59(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3293(%rip), %rdi      # 0xda3c
movl $0x16, %esi
jmp 0xa8bd
leaq 0x9e3e(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x31cc(%rip), %rdi      # 0xd990
movl $0xe, %esi
jmp 0xa8bd
leaq 0x9e23(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3005(%rip), %rdi      # 0xd7e4
movl $0x10, %esi
jmp 0xa8bd
leaq 0x9e08(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x2ffb(%rip), %rdi      # 0xd7f5
movl $0x14, %esi
jmp 0xa8bd
leaq 0x9ded(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x31df(%rip), %rdi      # 0xd9f4
movl $0x12, %esi
jmp 0xa8bd
leaq 0x9dd2(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x2ff9(%rip), %rsi      # 0xd829
jmp 0xa88d
leaq 0x9dbf(%rip), %rax      # 0x145f8
movq (%rax), %rcx
testq %r14, %r14
je 0xa8ed
leaq 0x2fbe(%rip), %rsi      # 0xd80a
movq %rcx, %rdi
jmp 0xa88d
leaq 0x9da0(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x327a(%rip), %rdi      # 0xdadc
jmp 0xa875
leaq 0x9d8d(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x301a(%rip), %rdi      # 0xd88f
movl $0x1b, %esi
jmp 0xa8bd
leaq 0x9d75(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x30ca(%rip), %rsi      # 0xd957
movq %r14, %rdx
xorl %eax, %eax
callq 0x3130
jmp 0xa8c7
leaq 0x9d58(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x310a(%rip), %rdi      # 0xd9b4
movl $0x1d, %esi
jmp 0xa8bd
leaq 0x3212(%rip), %rdi      # 0xdaca
movl $0x11, %esi
movl $0x1, %edx
callq 0x31d0
leaq 0x9aae(%rip), %rax      # 0x1437c
cmpl $0x0, (%rax)
jne 0xa8d9
movl $0x1, (%rax)
callq 0x5192
testl %ebp, %ebp
js 0xa8fb
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2f27(%rip), %rdi      # 0xd81b
movl $0xd, %esi
jmp 0xa8bd
callq 0x3200