// File: /workspace/github_c_makefile_star2_O0/mincebert[P]maketzx/maketzx.c
// Function: DecodeSpeedlockTable
void DecodeSpeedlockTable(word limit,byte offset)
{
  word count;
  dword savepos=filepos;
  if (zeta) { xorbyte=0x5a; addbyte=0; }
  ResetTempFile();
  if (limit>sizeof(slockdata)) Error(10);
  for (count=0; count<limit; count++)
      {
	slockdata[count+offset+tableoffset]=(byte)((GetData(&tempfile) ^ xorbyte)+addbyte);
	if (zeta)
	   {
	     slockdata[count+offset+tableoffset]^=0xff;
	     xorbyte+=0x35;
	   }
      }
  if (blocks==blockskip+2 && !subblocks)
     {
       for (count=0; count<limit; count++)
	   {
	     if (slocktype)
		{
		  if (slockdata[count]==0xdd && slockdata[count+1]==0x21 && count<0x11 && !tableoffset) { nxtloadpos=slockdata[count+2]+(256*slockdata[count+3]); }
		  if (slockdata[count]==0x11 && count<0x11 && !tableoffset) { expectedlength=1+slockdata[count+1]+(256*slockdata[count+2]); }
		  if ((slockdata[count]==0) && (slockdata[count+1]==0x80) && (slockdata[count+2]==0xff) && (slockdata[count+3]==0x02) && (slockdata[count+4]==0x10))
		     { tablepointer=tableoffset=count; break; }
		}
	     if (zeta)
		{
		  if ((slockdata[count]==0x10) && (slockdata[count+1]==0xff) && (slockdata[count+2]==0x02) && (slockdata[count+3]==0) && (slockdata[count+4]==0x80))
		     { tablepointer=tableoffset=count; break; }
		}
	   }
       if (!tableoffset)
	  {
	    byte rpage1=slockdata[0x27],rpage2=slockdata[0x65];
	    if (rpage1>=0x10 && rpage1<=0x17) tablepointer=tableoffset=0x23;
	    else if (rpage2>=0x10 && rpage2<=0x17) tablepointer=tableoffset=0x61;
	  }
     }
  loadertableadd=slockloadaddress+tablepointer;
  filepos=savepos;
  lseek(inpfile.handle,filepos,SEEK_SET);
  inpfile.bufpoint=0;
  ResetTempFile();
}

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movl %edi, 0x24(%rsp)
movb %al, 0x23(%rsp)
movq 0xa2b2(%rip), %rax      # 0x131c8
movq %rax, 0x10(%rsp)
cmpb $0x0, 0xa273(%rip)      # 0x13195
je 0x8f32
movb $0x5a, 0xa1b5(%rip)     # 0x130e0
movb $0x0, 0xa1af(%rip)      # 0x130e1
callq 0x18a0
movl 0x24(%rsp), %eax
cmpq $0x300, %rax            # imm = 0x300
jbe 0x8f4d
movl $0xa, %edi
callq 0x15c0
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x9001
leaq 0x1252e(%rip), %rdi     # 0x1b498
callq 0x2370
movzbl %al, %eax
movzbl 0xa167(%rip), %ecx      # 0x130e0
xorl %ecx, %eax
movzbl 0xa15f(%rip), %ecx      # 0x130e1
addl %ecx, %eax
movb %al, %dl
movl 0x1c(%rsp), %eax
movzbl 0x23(%rsp), %ecx
addl %ecx, %eax
addl 0xa289(%rip), %eax      # 0x13220
movl %eax, %eax
movl %eax, %ecx
leaq 0x16f7e(%rip), %rax     # 0x1ff20
movb %dl, (%rax,%rcx)
cmpb $0x0, 0xa1e9(%rip)      # 0x13195
je 0x8fef
movl 0x1c(%rsp), %eax
movzbl 0x23(%rsp), %ecx
addl %ecx, %eax
addl 0xa261(%rip), %eax      # 0x13220
movl %eax, %eax
movl %eax, %ecx
leaq 0x16f56(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
xorl $0xff, %eax
movb %al, %dl
leaq 0x16f44(%rip), %rax     # 0x1ff20
movb %dl, (%rax,%rcx)
movzbl 0xa0fa(%rip), %eax      # 0x130e0
addl $0x35, %eax
movb %al, 0xa0f1(%rip)       # 0x130e0
jmp 0x8ff1
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x8f55
movl 0xa201(%rip), %eax      # 0x13208
movl 0xa1ff(%rip), %ecx      # 0x1320c
addl $0x2, %ecx
cmpl %ecx, %eax
jne 0x92f5
cmpl $0x0, 0xa209(%rip)      # 0x13228
jne 0x92f5
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x9280
cmpb $0x0, 0xa152(%rip)      # 0x13194
je 0x91c3
movl 0x1c(%rsp), %eax
movl %eax, %ecx
leaq 0x16ecb(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0xdd, %eax
jne 0x90c2
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16eae(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x21, %eax
jne 0x90c2
cmpl $0x11, 0x1c(%rsp)
jae 0x90c2
cmpl $0x0, 0xa197(%rip)      # 0x13220
jne 0x90c2
movl 0x1c(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16e83(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
movl 0x1c(%rsp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movl %ecx, %edx
leaq 0x16e6d(%rip), %rcx     # 0x1ff20
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, 0xa12e(%rip)      # 0x131f0
movl 0x1c(%rsp), %eax
movl %eax, %ecx
leaq 0x16e51(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x11, %eax
jne 0x9122
cmpl $0x11, 0x1c(%rsp)
jae 0x9122
cmpl $0x0, 0xa13a(%rip)      # 0x13220
jne 0x9122
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16e26(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
addl $0x1, %eax
movl 0x1c(%rsp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movl %ecx, %edx
leaq 0x16e0d(%rip), %rcx     # 0x1ff20
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, 0xa0d2(%rip)      # 0x131f4
movl 0x1c(%rsp), %eax
movl %eax, %ecx
leaq 0x16df1(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x91c1
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16dd2(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x80, %eax
jne 0x91c1
movl 0x1c(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16db5(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
jne 0x91c1
movl 0x1c(%rsp), %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16d98(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x2, %eax
jne 0x91c1
movl 0x1c(%rsp), %eax
addl $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16d7d(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x10, %eax
jne 0x91c1
movl 0x1c(%rsp), %eax
movl %eax, 0xa06a(%rip)      # 0x13220
movl %eax, 0xa068(%rip)      # 0x13224
jmp 0x9280
jmp 0x91c3
cmpb $0x0, 0x9fcb(%rip)      # 0x13195
je 0x926e
movl 0x1c(%rsp), %eax
movl %eax, %ecx
leaq 0x16d43(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x10, %eax
jne 0x926c
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16d24(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
jne 0x926c
movl 0x1c(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16d07(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x2, %eax
jne 0x926c
movl 0x1c(%rsp), %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16cec(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x926c
movl 0x1c(%rsp), %eax
addl $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x16cd1(%rip), %rax     # 0x1ff20
movzbl (%rax,%rcx), %eax
cmpl $0x80, %eax
jne 0x926c
movl 0x1c(%rsp), %eax
movl %eax, 0x9fbc(%rip)      # 0x13220
movl %eax, 0x9fba(%rip)      # 0x13224
jmp 0x9280
jmp 0x926e
jmp 0x9270
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x902d
cmpl $0x0, 0x9f99(%rip)      # 0x13220
jne 0x92f3
movb 0x16cb8(%rip), %al      # 0x1ff47
movb %al, 0xf(%rsp)
movb 0x16cec(%rip), %al      # 0x1ff85
movb %al, 0xe(%rsp)
movzbl 0xf(%rsp), %eax
cmpl $0x10, %eax
jl 0x92c7
movzbl 0xf(%rsp), %eax
cmpl $0x17, %eax
jg 0x92c7
movl $0x23, 0x9f65(%rip)     # 0x13220
movl $0x23, 0x9f5f(%rip)     # 0x13224
jmp 0x92f1
movzbl 0xe(%rsp), %eax
cmpl $0x10, %eax
jl 0x92ef
movzbl 0xe(%rsp), %eax
cmpl $0x17, %eax
jg 0x92ef
movl $0x61, 0x9f3b(%rip)     # 0x13220
movl $0x61, 0x9f35(%rip)     # 0x13224
jmp 0x92f1
jmp 0x92f3
jmp 0x92f5
movl 0x9f1d(%rip), %eax      # 0x13218
addl 0x9f23(%rip), %eax      # 0x13224
movl %eax, 0x9f15(%rip)      # 0x1321c
movq 0x10(%rsp), %rax
movq %rax, 0x9eb5(%rip)      # 0x131c8
movzbl 0x9f46(%rip), %edi      # 0x13260
movq 0x9ea7(%rip), %rsi      # 0x131c8
xorl %edx, %edx
callq 0x10b0
movl $0x0, 0xa02e(%rip)      # 0x13360
callq 0x18a0
addq $0x28, %rsp
retq
nopl (%rax)