// File: /workspace/github_c_makefile_star2_O2/mincebert[P]maketzx/maketzx.c
// Function: ReadBleeploadGroup
dword ReadBleeploadGroup(void)
{
  word bytes;
  dword grandtotal=0;
  do {
       subblocks++;
       header.type=9;
       expectedlength=0x10b;
       grandtotal+=(bytes=ReadBleeploadBlock());
       if (!DataLoadOK) { strcpy(errstring,"Bad mid-sync detection or data error"); Error(8); }
       GetBleeploadInfo(bytes);
       if (bleepblock[0x101]!=subblocks-1) Error(12);
       PrintBlockInfo(nxtloadpos,bytes-2);
       WriteTZXTurboBlock(pilotlength,8,bytes);
     }
  while (bleepblock[0x103]+1!=bleepblock[0x105]);
  pilotlength=0;
  PilotSearch(50);
  if (!blocktype) return grandtotal;
  if (!PilotLinkingOK) pilotlength=0;
  mspause=0;
  SyncSearch();
  if (!SyncLoadOK && (pilotlength/samprate>0.5))
     {
       WriteTZXTone(pilot.tstates,(pilotlength/pilot.samples)*2);
       mspause+=(FindPause()/samprate)*1000;
       if (mspause) WriteTZXPause(mspause);
     }
  pilotlength=0;
  header.type=0x9f;
  subblocks=0;
  PrintBlockInfo(0,grandtotal);
  return grandtotal;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
pushq $0x8
popq %rbp
incl 0xad39(%rip)            # 0xf238
movb $0x9, 0x176da(%rip)     # 0x1bbe0
movl $0x10b, 0xacf4(%rip)    # imm = 0x10B
callq 0x4704
cmpb $0x0, 0x176bd(%rip)     # 0x1bbd9
je 0x46cb
movl %eax, %r14d
movl %r14d, %edi
callq 0x497f
movzbl 0x177cd(%rip), %eax     # 0x1bd01
movl 0xacfe(%rip), %ecx      # 0xf238
decl %ecx
cmpl %eax, %ecx
jne 0x46fc
addq %r14, %rbx
movl 0xacb3(%rip), %edi      # 0xf200
leal -0x2(%r14), %esi
callq 0x4a02
movq 0x17673(%rip), %rdi     # 0x1bbd0
movl %ebp, %esi
movq %r14, %rdx
callq 0x5303
movzbl 0x17795(%rip), %eax     # 0x1bd03
incl %eax
movzbl 0x1778e(%rip), %ecx     # 0x1bd05
cmpl %ecx, %eax
jne 0x44f9
andq $0x0, 0x17649(%rip)     # 0x1bbd0
pushq $0x32
popq %rdi
callq 0x2a7c
cmpb $0x0, 0x1711b(%rip)     # 0x1b6b1
je 0x46c3
cmpb $0x0, 0x17625(%rip)     # 0x1bbc8
jne 0x45ad
andq $0x0, 0x17623(%rip)     # 0x1bbd0
andq $0x0, 0xac5b(%rip)      # 0xf210
callq 0x2dad
cmpb $0x0, 0x171e9(%rip)     # 0x1b7aa
jne 0x46a3
movq 0x17602(%rip), %rax     # 0x1bbd0
testq %rax, %rax
js 0x45da
cvtsi2ss %rax, %xmm0
jmp 0x45f1
movq %rax, %rcx
shrq %rcx
movl %eax, %edx
andl $0x1, %edx
orq %rcx, %rdx
cvtsi2ss %rdx, %xmm0
addss %xmm0, %xmm0
divss 0xabe7(%rip), %xmm0     # 0xf1e0
ucomiss 0x5de8(%rip), %xmm0     # 0xa3e8
jbe 0x46a3
movq %rax, %xmm0
punpckldq 0x5dfd(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x5e05(%rip), %xmm0     # 0xa420
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x17109(%rip), %xmm1    # 0x1b738
movl 0x1710b(%rip), %edi     # 0x1b740
addsd %xmm1, %xmm1
cvttsd2si %xmm1, %rsi
callq 0x3141
callq 0x4167
testq %rax, %rax
js 0x4654
cvtsi2ss %rax, %xmm0
jmp 0x4669
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
divss 0xab6f(%rip), %xmm0     # 0xf1e0
mulss 0x5d6b(%rip), %xmm0     # 0xa3e4
cvtss2sd %xmm0, %xmm0
addsd 0xab8b(%rip), %xmm0     # 0xf210
movsd %xmm0, 0xab83(%rip)     # 0xf210
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4699
jnp 0x46a3
cvttsd2si %xmm0, %rdi
callq 0x5486
andq $0x0, 0x17525(%rip)     # 0x1bbd0
movb $-0x61, 0x1752e(%rip)   # 0x1bbe0
andl $0x0, 0xab7f(%rip)      # 0xf238
xorl %edi, %edi
movq %rbx, %rsi
callq 0x4a02
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movups 0x62df(%rip), %xmm0     # 0xa9b1
movaps %xmm0, 0x17007(%rip)    # 0x1b6e0
movups 0x62c1(%rip), %xmm0     # 0xa9a1
movaps %xmm0, 0x16fe9(%rip)    # 0x1b6d0
movabsq $0x726f7272652061, %rax # imm = 0x726F7272652061
movq %rax, 0x16ff5(%rip)     # 0x1b6ed
pushq $0x8
jmp 0x46fe
pushq $0xc
popq %rdi
callq 0x13ed