// File: /workspace/github_c_makefile_star2_O2/mincebert[P]maketzx/maketzx.c
// Function: Error
void Error (byte errornumber)
{
  printf("\nERROR - ");
  switch (errornumber)
	 {
	   case 1  : printf("Could not open input file\n\n"); break;
	   case 2  : printf("Could not create output file\n\n"); break;
	   case 3  : printf("Could not read from input file\n\n"); break;
	   case 4  : printf("Could not write to output file\n\n"); break;
	   case 5  : printf("Input file is corrupted or in a wrong format\n\n"); break;
	   case 6  : printf("Extended block contains nonsense data\n\n"); break;
	   case 7  : printf("Found a block at a different sample rate\n\n"); break;
	   case 8  : printf("Tape loading error at sample %lu\n",totalread-lastpulse-currpulse-1);
		     printf("        Probable cause: %s\n\n",errstring); break;
	   case 9  : printf("Unexpected end of input file\n\n"); break;
	   case 10 : printf("Not enough memory for ");
		     if (zeta) printf("ZetaLoad");
		     else printf("Speedlock");
		     printf(" block 1\n\n"); break;
	   case 11 : printf("Cannot determine ");
		     if (zeta) printf("ZetaLoad");
		     else printf("Speedlock");
		     printf(" block 1 loading address\n\n"); break;
	   case 12 : printf("Bleepload block missing\n\n"); break;
	   case 13 : printf("Too many loading standards specified!\n\n"); break;
	   case 14 : printf("Loader is probably not Bleepload\n\n"); break;
	 }
  if (errornumber!=4)
     {
       CloseFiles();
       if (tempfile.bufpoint) Flush(&tempfile);
     }
  close(tempfile.handle);
  remove(tempfile.name);  /* for beta testing comment this line */
  exit(1);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x90b3(%rip), %rdi      # 0xa4aa
xorl %eax, %eax
callq 0x10b0
decl %ebx
cmpl $0xd, %ebx
ja 0x1544
leaq 0x8c00(%rip), %rax      # 0xa010
movslq (%rax,%rbx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x9f92(%rip), %rdi      # 0xb3b2
jmp 0x153f
leaq 0x9e4e(%rip), %rdi      # 0xb27a
jmp 0x153f
leaq 0x9eee(%rip), %rdi      # 0xb326
jmp 0x153f
leaq 0x9e0f(%rip), %rdi      # 0xb253
jmp 0x153f
leaq 0x90a3(%rip), %rdi      # 0xa4f3
xorl %eax, %eax
callq 0x10b0
cmpb $0x0, 0xdd47(%rip)      # 0xf1a5
leaq 0x90ae(%rip), %rax      # 0xa513
leaq 0x909e(%rip), %rdi      # 0xa50a
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x10b0
leaq 0x9e2f(%rip), %rdi      # 0xb2ad
jmp 0x153f
leaq 0x9eea(%rip), %rdi      # 0xb374
jmp 0x153f
leaq 0x9ebe(%rip), %rdi      # 0xb354
callq 0x1070
jmp 0x155e
movq 0x1a221(%rip), %rsi     # 0x1b6c8
addq 0x1a212(%rip), %rsi     # 0x1b6c0
notq %rsi
addq 0xdd08(%rip), %rsi      # 0xf1c0
leaq 0x8ff5(%rip), %rdi      # 0xa4b4
xorl %eax, %eax
callq 0x10b0
leaq 0x9009(%rip), %rdi      # 0xa4d6
leaq 0x1a1fc(%rip), %rsi     # 0x1b6d0
xorl %eax, %eax
callq 0x10b0
jmp 0x1544
leaq 0x9eb0(%rip), %rdi      # 0xb394
jmp 0x153f
leaq 0x9e12(%rip), %rdi      # 0xb2ff
jmp 0x153f
leaq 0x9d3b(%rip), %rdi      # 0xb231
jmp 0x153f
leaq 0x9dd6(%rip), %rdi      # 0xb2d5
jmp 0x153f
leaq 0x9015(%rip), %rdi      # 0xa51d
xorl %eax, %eax
callq 0x10b0
cmpb $0x0, 0xdc8f(%rip)      # 0xf1a5
leaq 0x8ff6(%rip), %rax      # 0xa513
leaq 0x8fe6(%rip), %rdi      # 0xa50a
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x10b0
leaq 0x9d5d(%rip), %rdi      # 0xb293
jmp 0x153f
leaq 0x9d78(%rip), %rdi      # 0xb2b7
callq 0x1070
callq 0x1597
cmpl $0x0, 0x16058(%rip)     # 0x175a8
je 0x155e
leaq 0x15f4f(%rip), %rdi     # 0x174a8
callq 0x15d2
movzbl 0x15f43(%rip), %edi     # 0x174a8
callq 0x10e0
leaq 0x15f38(%rip), %rdi     # 0x174a9
callq 0x1050
pushq $0x1
popq %rdi
callq 0x1160