// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebx
movl %edi, %edx
negl %edx
movl %edi, %r15d
cmovnsl %edx, %r15d
leaq 0x128ec(%rip), %rax     # 0x1cae4
incl (%rax)
leaq 0xa18f(%rip), %rax      # 0x14390
incl (%rax)
testl %edi, %edi
js 0xa309
leaq 0xa3f6(%rip), %rax      # 0x14608
movslq 0x4(%rax), %rcx
testq %rcx, %rcx
js 0xa2d6
movl 0x10(%rax), %r8d
testl %r8d, %r8d
setne %dl
cmpl $0x20, %r15d
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xa292
leaq 0xa3b7(%rip), %rdx      # 0x145f8
movq (%rdx), %rdi
movq %rcx, %rdx
shlq $0x9, %rdx
leaq (%rdx,%rcx,4), %rcx
leaq 0xa58a(%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 0x12ba2(%rip), %rax     # 0x1ce20
movq %rax, (%rsp)
leaq 0x33a8(%rip), %rsi      # 0xd631
xorl %eax, %eax
callq 0x3130
jmp 0xa2d6
cmpl $0x20, %r15d
je 0xa7e1
leaq 0xa355(%rip), %rdx      # 0x145f8
movq (%rdx), %rdi
movq %rcx, %rdx
shlq $0x9, %rdx
leaq (%rdx,%rcx,4), %rcx
leaq 0xa528(%rip), %rdx      # 0x147e0
addq %rcx, %rdx
addq $0x4, %rdx
movl (%rax), %ecx
leaq 0x3391(%rip), %rsi      # 0xd659
leaq 0x12b51(%rip), %r8      # 0x1ce20
xorl %eax, %eax
callq 0x3130
decl %r15d
cmpl $0x2d, %r15d
ja 0xa7e1
leaq 0x327e(%rip), %rax      # 0xd568
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xa2fe(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x336a(%rip), %rdi      # 0xd66e
jmp 0xa7d2
movq 0x8ce8(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x3306(%rip), %rsi      # 0xd620
xorl %eax, %eax
callq 0x3130
jmp 0xa20b
leaq 0xa2cb(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3795(%rip), %rsi      # 0xdacc
jmp 0xa7a7
leaq 0xa2b5(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x36ed(%rip), %rdi      # 0xda3a
jmp 0xa714
leaq 0xa29f(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x376d(%rip), %rsi      # 0xdad0
jmp 0xa7a7
leaq 0xa289(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3742(%rip), %rsi      # 0xdabb
jmp 0xa7a7
leaq 0xa273(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x36e0(%rip), %rdi      # 0xda6f
movl $0x34, %esi
jmp 0xa7d7
leaq 0xa258(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3600(%rip), %rdi      # 0xd9aa
jmp 0xa714
leaq 0xa242(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x34ef(%rip), %rdi      # 0xd8af
jmp 0xa4b6
leaq 0xa22c(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x33de(%rip), %rdi      # 0xd7b4
movl $0x1f, %esi
jmp 0xa7d7
leaq 0xa211(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x365e(%rip), %rdi      # 0xda4f
movl $0xc, %esi
jmp 0xa7d7
leaq 0xa1f6(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3507(%rip), %rdi      # 0xd913
jmp 0xa68d
leaq 0xa1e0(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3413(%rip), %rsi      # 0xd835
jmp 0xa7a7
leaq 0xa1ca(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3559(%rip), %rdi      # 0xd991
jmp 0xa6a8
leaq 0xa1b4(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3500(%rip), %rdi      # 0xd94e
movl $0x29, %esi
jmp 0xa7d7
leaq 0xa199(%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 0xa364(%rip), %rcx      # 0x147e0
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x3289(%rip), %rsi      # 0xd713
jmp 0xa570
leaq 0xa162(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3653(%rip), %rsi      # 0xdaf3
jmp 0xa7a7
leaq 0xa14c(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x333d(%rip), %rdi      # 0xd7f3
movl $0x24, %esi
jmp 0xa7d7
leaq 0xa131(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3502(%rip), %rdi      # 0xd9d3
jmp 0xa72f
leaq 0xa11b(%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 0xa2e6(%rip), %rcx      # 0x147e0
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x3279(%rip), %rsi      # 0xd781
jmp 0xa570
leaq 0xa0e7(%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 0xa2b2(%rip), %rcx      # 0x147e0
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x31a9(%rip), %rsi      # 0xd6e5
jmp 0xa570
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 0x31d7(%rip), %rsi      # 0xd747
xorl %eax, %eax
callq 0x3130
jmp 0xa7e1
leaq 0xa075(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3123(%rip), %rdi      # 0xd6b0
movl $0x1a, %esi
jmp 0xa7d7
leaq 0xa05a(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x343e(%rip), %rdi      # 0xd9e6
jmp 0xa7d2
leaq 0xa044(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3449(%rip), %rdi      # 0xda07
jmp 0xa714
leaq 0xa02e(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3359(%rip), %rsi      # 0xd92d
jmp 0xa7a7
leaq 0xa018(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x30e1(%rip), %rdi      # 0xd6cb
jmp 0xa68d
leaq 0xa002(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3218(%rip), %rdi      # 0xd818
movl $0x1c, %esi
jmp 0xa7d7
leaq 0x9fe7(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x32b9(%rip), %rsi      # 0xd8d4
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x3130
jmp 0xa7e1
leaq 0x9fc5(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3197(%rip), %rdi      # 0xd7d4
movl $0x1e, %esi
jmp 0xa7d7
leaq 0x9faa(%rip), %rax      # 0x145f8
movq (%rax), %rcx
testq %r14, %r14
je 0xa7cb
leaq 0x34bc(%rip), %rsi      # 0xdb1d
jmp 0xa766
leaq 0x9f8b(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3009(%rip), %rsi      # 0xd680
jmp 0xa7a7
leaq 0x9f75(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3009(%rip), %rdi      # 0xd696
movl $0x19, %esi
jmp 0xa7d7
leaq 0x9f5a(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x32d0(%rip), %rdi      # 0xd978
movl $0x18, %esi
jmp 0xa7d7
leaq 0x9f3f(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x33e1(%rip), %rdi      # 0xdaa4
movl $0x16, %esi
jmp 0xa7d7
leaq 0x9f24(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x331a(%rip), %rdi      # 0xd9f8
movl $0xe, %esi
jmp 0xa7d7
leaq 0x9f09(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3153(%rip), %rdi      # 0xd84c
movl $0x10, %esi
jmp 0xa7d7
leaq 0x9eee(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3149(%rip), %rdi      # 0xd85d
movl $0x14, %esi
jmp 0xa7d7
leaq 0x9ed3(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x332d(%rip), %rdi      # 0xda5c
movl $0x12, %esi
jmp 0xa7d7
leaq 0x9eb8(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3147(%rip), %rsi      # 0xd891
jmp 0xa7a7
leaq 0x9ea5(%rip), %rax      # 0x145f8
movq (%rax), %rcx
testq %r14, %r14
je 0xa808
leaq 0x310c(%rip), %rsi      # 0xd872
movq %rcx, %rdi
jmp 0xa7a7
leaq 0x9e86(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x33c8(%rip), %rdi      # 0xdb44
jmp 0xa78f
leaq 0x9e73(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3168(%rip), %rdi      # 0xd8f7
movl $0x1b, %esi
jmp 0xa7d7
leaq 0x9e5b(%rip), %rax      # 0x145f8
movq (%rax), %rdi
leaq 0x3218(%rip), %rsi      # 0xd9bf
movq %r14, %rdx
xorl %eax, %eax
callq 0x3130
jmp 0xa7e1
leaq 0x9e3e(%rip), %rax      # 0x145f8
movq (%rax), %rcx
leaq 0x3258(%rip), %rdi      # 0xda1c
movl $0x1d, %esi
jmp 0xa7d7
leaq 0x3360(%rip), %rdi      # 0xdb32
movl $0x11, %esi
movl $0x1, %edx
callq 0x31d0
leaq 0x9b94(%rip), %rax      # 0x1437c
cmpl $0x0, (%rax)
jne 0xa7f3
movl $0x1, (%rax)
callq 0x5124
testl %ebx, %ebx
js 0xa816
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3074(%rip), %rdi      # 0xd883
movl $0xd, %esi
jmp 0xa7d7
callq 0x3200