// File: /workspace/github_c_makefile_star2_O0/mincebert[P]maketzx/maketzx.c
// Function: WriteTZXPureData
void WriteTZXPureData(byte lastbyte,dword datalen)
{
  dword count;
  puredata[1]=Lo(bit0.tstates); puredata[2]=Hi(bit0.tstates);
  puredata[3]=Lo(bit1.tstates); puredata[4]=Hi(bit1.tstates);
  puredata[5]=lastbyte;
  if (!saveslockflag) { puredata[6]=Lo(mspause); puredata[7]=Hi(mspause); }
  else puredata[6]=puredata[7]=0;
  puredata[8]=Lo(datalen); puredata[9]=Hi(datalen); puredata[10]=Ehi(datalen);
  for (count=0; count<sizeof(puredata); count++) PutData(&outfile,puredata[count],1);
  if (saveslockflag) PutData(&outfile,slockflag,1);
  else if (savemidsync)
	  { for (count=0; count<datalen; count++) PutData(&outfile,midsync[count],1); }
       else {
	      PushFilePointers();
	      ResetTempFile();
	      for (count=0; count<datalen; count++)
		  { PutData(&outfile,GetData(&tempfile),1); }
	      PopFilePointers();
	      lseek(inpfile.handle,filepos,SEEK_SET);
	      inpfile.bufpoint=0;
	    }
  ResetTempFile();
}

// Assembly:
subq $0x28, %rsp
movb %dil, %al
movb %al, 0x27(%rsp)
movq %rsi, 0x18(%rsp)
movl 0x1728a(%rip), %eax     # 0x1f770
movl %eax, %edi
callq 0x2560
movb %al, 0xac68(%rip)       # 0x1315b
movl 0x17277(%rip), %eax     # 0x1f770
movl %eax, %edi
callq 0x2520
movb %al, 0xac56(%rip)       # 0x1315c
movl 0x17284(%rip), %eax     # 0x1f790
movl %eax, %edi
callq 0x2560
movb %al, 0xac44(%rip)       # 0x1315d
movl 0x17271(%rip), %eax     # 0x1f790
movl %eax, %edi
callq 0x2520
movb %al, 0xac32(%rip)       # 0x1315e
movb 0x27(%rsp), %al
movb %al, 0xac29(%rip)       # 0x1315f
cmpb $0x0, 0xacf0(%rip)      # 0x1322d
jne 0x85b7
movsd 0xacb9(%rip), %xmm0     # 0x13200
movsd 0x74f9(%rip), %xmm2     # 0xfa48
movsd %xmm2, 0x8(%rsp)
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rdi
movq %rdi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rdi
callq 0x2560
movsd 0x8(%rsp), %xmm2
movb %al, 0xabdc(%rip)       # 0x13160
movsd 0xac74(%rip), %xmm0     # 0x13200
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rdi
movq %rdi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rdi
callq 0x2520
movb %al, 0xabac(%rip)       # 0x13161
jmp 0x85c5
movb $0x0, 0xaba3(%rip)      # 0x13161
movb $0x0, 0xab9b(%rip)      # 0x13160
movq 0x18(%rsp), %rdi
callq 0x2560
movb %al, 0xab8d(%rip)       # 0x13162
movq 0x18(%rsp), %rdi
callq 0x2520
movb %al, 0xab7e(%rip)       # 0x13163
movq 0x18(%rsp), %rdi
callq 0x2510
movb %al, 0xab6f(%rip)       # 0x13164
movq $0x0, 0x10(%rsp)
cmpq $0xb, 0x10(%rsp)
jae 0x8637
movq 0x10(%rsp), %rcx
leaq 0xed66(%rip), %rdi      # 0x17378
movl $0x1, %edx
leaq 0xab3c(%rip), %rax      # 0x1315a
movzbl (%rax,%rcx), %esi
callq 0x2440
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x85fe
cmpb $0x0, 0xabef(%rip)      # 0x1322d
je 0x865d
leaq 0xed31(%rip), %rdi      # 0x17378
movl $0x1, %edx
movzbl 0xabd9(%rip), %esi      # 0x1322c
callq 0x2440
jmp 0x8723
cmpb $0x0, 0xabca(%rip)      # 0x1322e
je 0x86ae
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x86ac
movq 0x10(%rsp), %rcx
leaq 0xecf1(%rip), %rdi      # 0x17378
movl $0x1, %edx
leaq 0xaa7a(%rip), %rax      # 0x1310d
movzbl (%rax,%rcx), %esi
callq 0x2440
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x866f
jmp 0x8721
callq 0x18e0
callq 0x18a0
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x86fd
leaq 0x12dc4(%rip), %rdi     # 0x1b498
callq 0x2370
leaq 0xec98(%rip), %rdi      # 0x17378
movl $0x1, %edx
movzbl %al, %esi
callq 0x2440
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x86c1
callq 0x1a10
movzbl 0xab57(%rip), %edi      # 0x13260
movq 0xaab8(%rip), %rsi      # 0x131c8
xorl %edx, %edx
callq 0x10b0
movl $0x0, 0xac3f(%rip)      # 0x13360
jmp 0x8723
callq 0x18a0
addq $0x28, %rsp
retq
nopl (%rax)