// File: /workspace/github_c_makefile_star2_O0/mincebert[P]maketzx/maketzx.c
// Function: ReadBleeploadBlock
word ReadBleeploadBlock(void)
{
  word loaded=0;
  pilot.freq=808;
  syncx.freq=2450;
  bit0.freq=2044;
  bit1.freq=1022;
  SetTimings();
  pilotlength=0;
  DataLoadOK=0;
//  PushFilePointers();
  do
     do {
//        RemoveFilePointers();
	  pilotlength=0;
	  PilotSearch(50);
	  if (!blocktype) return 0; if (!PilotLinkingOK) { pilotlength=0; break;};
	  mspause=0;
	  SyncSearch();
	  if (!blocktype) return 0;
	  if (!SyncLoadOK)
	     {
	       if (searching) break;
	       if (pilotlength/samprate>0.5) WriteTZXTone(pilot.tstates,(pilotlength/pilot.samples)*2);
	       mspause+=(FindPause()/samprate)*1000;
	       if (mspause && pilotlength/samprate>0.5) WriteTZXPause(mspause);
	       break;
	     }
	  loaded=DataRead(bit0.samples,bit1.samples,expectedlength);
	  if (blocktype && !searching) mspause+=(FindPause()/samprate)*1000;
	}
     while (!DataLoadOK);
  while (!DataLoadOK);
//  PushFilePointers();
  ResetTempFile();
  return loaded;
}

// Assembly:
subq $0x28, %rsp
movl $0x0, 0x20(%rsp)
movsd 0x9544(%rip), %xmm0     # 0xf9e8
movsd %xmm0, 0x1926c(%rip)    # 0x1f718
movsd 0x95b4(%rip), %xmm0     # 0xfa68
movsd %xmm0, 0x1927c(%rip)    # 0x1f738
movsd 0x959c(%rip), %xmm0     # 0xfa60
movsd %xmm0, 0x1928c(%rip)    # 0x1f758
movsd 0x9584(%rip), %xmm0     # 0xfa58
movsd %xmm0, 0x1929c(%rip)    # 0x1f778
callq 0x2d90
movq $0x0, 0x196d4(%rip) # 0x1fbc0
movb $0x0, 0x196d6(%rip)     # 0x1fbc9
jmp 0x64f5
movq $0x0, 0x196c0(%rip) # 0x1fbc0
movl $0x32, %edi
callq 0x39e0
cmpb $0x0, 0x19190(%rip)     # 0x1f6a1
jne 0x6520
movl $0x0, 0x24(%rsp)
jmp 0x67f3
cmpb $0x0, 0x19691(%rip)     # 0x1fbb8
jne 0x6539
movq $0x0, 0x1968c(%rip) # 0x1fbc0
jmp 0x67d0
xorps %xmm0, %xmm0
movsd %xmm0, 0xccbc(%rip)     # 0x13200
callq 0x3ec0
cmpb $0x0, 0x19151(%rip)     # 0x1f6a1
jne 0x655f
movl $0x0, 0x24(%rsp)
jmp 0x67f3
cmpb $0x0, 0x19234(%rip)     # 0x1f79a
jne 0x671c
cmpb $0x0, 0xcc9f(%rip)      # 0x13212
je 0x657a
jmp 0x67d0
movq 0x1963f(%rip), %rax     # 0x1fbc0
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x18(%rsp)
testq %rax, %rax
movss %xmm0, 0x1c(%rsp)
js 0x65ba
movss 0x18(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x1c(%rsp), %xmm0
divss 0xcc08(%rip), %xmm0     # 0x131d0
cvtss2sd %xmm0, %xmm0
movsd 0x945c(%rip), %xmm1     # 0xfa30
ucomisd %xmm1, %xmm0
jbe 0x6626
movl 0x19150(%rip), %edi     # 0x1f730
movaps 0x9589(%rip), %xmm1     # 0xfb70
movq 0x195d1(%rip), %xmm0    # 0x1fbc0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x9585(%rip), %xmm1     # 0xfb80
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x19116(%rip), %xmm1    # 0x1f728
divsd %xmm1, %xmm0
addsd %xmm0, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %esi
callq 0x4480
callq 0x5d40
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x10(%rsp)
testq %rax, %rax
movss %xmm0, 0x14(%rsp)
js 0x6664
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x14(%rsp), %xmm0
divss 0xcb5e(%rip), %xmm0     # 0x131d0
movss 0x94ca(%rip), %xmm1     # 0xfb44
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0xcb76(%rip), %xmm0     # 0x13200
movsd %xmm0, 0xcb6e(%rip)     # 0x13200
movsd 0xcb66(%rip), %xmm0     # 0x13200
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x66a7
jp 0x66a7
jmp 0x6717
movq 0x19512(%rip), %rax     # 0x1fbc0
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x8(%rsp)
testq %rax, %rax
movss %xmm0, 0xc(%rsp)
js 0x66e7
movss 0x8(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
divss 0xcadb(%rip), %xmm0     # 0x131d0
cvtss2sd %xmm0, %xmm0
movsd 0x932f(%rip), %xmm1     # 0xfa30
ucomisd %xmm1, %xmm0
jbe 0x6717
cvttsd2si 0xcaf0(%rip), %rax # 0x13200
movl %eax, %edi
callq 0x7510
jmp 0x67d0
movsd 0x19044(%rip), %xmm0    # 0x1f768
movsd 0x1905c(%rip), %xmm1    # 0x1f788
movl 0xcac2(%rip), %edi      # 0x131f4
callq 0x4d70
movl %eax, 0x20(%rsp)
movzbl 0x18f5f(%rip), %eax     # 0x1f6a1
cmpl $0x0, %eax
je 0x67ba
cmpb $0x0, 0xcac4(%rip)      # 0x13212
jne 0x67ba
callq 0x5d40
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, (%rsp)
testq %rax, %rax
movss %xmm0, 0x4(%rsp)
js 0x678c
movss (%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x4(%rsp), %xmm0
divss 0xca36(%rip), %xmm0     # 0x131d0
movss 0x93a2(%rip), %xmm1     # 0xfb44
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0xca4e(%rip), %xmm0     # 0x13200
movsd %xmm0, 0xca46(%rip)     # 0x13200
jmp 0x67bc
cmpb $0x0, 0x19406(%rip)     # 0x1fbc9
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x64f5
jmp 0x67d2
cmpb $0x0, 0x193f0(%rip)     # 0x1fbc9
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x64f3
callq 0x18a0
movl 0x20(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)