// File: /workspace/github_c_makefile_star2_O3/mincebert[P]maketzx/maketzx.c
// Function: WriteDecryptTone
void WriteDecryptTone(void)
{
  if (hifi)
     {
       word tsplitsmp=127*bit1.samples+bit1.samples/1.375,
	    splitnum=beeplength/tsplitsmp+.5,
	    count;
       if (tzxhead[9]<0x0a)
	  for (count=0; count<splitnum; count++)
	      {
		WriteTZXTone(bit1.tstates,254);
		pulseseq[0]=bit1.tstates/1.375; pulseseq[1]=bit1.tstates/1.375;
		WriteTZXPulseSequence(2);
	      }
       else {
	      WriteTZXLoopStart(splitnum);
	      for (count=0; count<splitnum; count++)
		  {
		    WriteTZXTone(bit1.tstates,254);
		    pulseseq[0]=bit1.tstates/1.375; pulseseq[1]=bit1.tstates/1.375;
		    WriteTZXPulseSequence(2);
		  }
	      WriteTZXLoopEnd();
	    }
       WriteTZXTone(bit1.tstates,254);
       WriteTZXPause(mspause);
     }
  else {
	 WriteTZXTone(bit1.tstates,(beeplength/bit1.samples)*2);
	 WriteTZXPause(mspause);
       }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0x8a9a(%rip)      # 0xf0f0
je 0x671e
movsd 0x15144(%rip), %xmm0    # 0x1b7a8
movapd %xmm0, %xmm1
divsd 0x4cc0(%rip), %xmm1     # 0xb330
mulsd 0x4cc0(%rip), %xmm0     # 0xb338
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
movq 0x158a8(%rip), %rax     # 0x1bf30
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %xmm0
punpckldq 0x4d74(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x4d7c(%rip), %xmm0     # 0xb420
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
addsd 0x4c18(%rip), %xmm1     # 0xb2d0
cvttsd2si %xmm1, %r14
cmpb $0x9, 0x8a93(%rip)      # 0xf157
ja 0x679e
testl %r14d, %r14d
je 0x6835
movl 0x150d7(%rip), %edi     # 0x1b7b0
movl $0xfe, %esi
callq 0x329a
movl 0x150c7(%rip), %eax     # 0x1b7b0
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x4c37(%rip), %xmm0     # 0xb330
cvttsd2si %xmm0, %rax
movl %eax, 0x150bc(%rip)     # 0x1b7c0
movl %eax, 0x150ba(%rip)     # 0x1b7c4
movl $0x2, %edi
callq 0x32ed
decl %r14d
jne 0x66d3
jmp 0x6835
movsd 0x1580a(%rip), %xmm0    # 0x1bf30
unpcklps 0x4ce3(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x4ceb(%rip), %xmm0     # 0xb420
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x1505f(%rip), %xmm1    # 0x1b7a8
movl 0x15061(%rip), %edi     # 0x1b7b0
addsd %xmm1, %xmm1
cvttsd2si %xmm1, %rsi
callq 0x329a
cvttsd2si 0x8aba(%rip), %rax # 0xf220
movw %ax, 0x8a19(%rip)       # 0xf186
xorl %r14d, %r14d
leaq 0x8a0e(%rip), %r15      # 0xf185
leaq 0xcc1a(%rip), %rbx      # 0x13398
movzbl (%r14,%r15), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1e01
incq %r14
cmpq $0x3, %r14
jne 0x677e
jmp 0x6881
movw %r14w, 0x89e6(%rip)     # 0xf18c
xorl %r15d, %r15d
leaq 0x89db(%rip), %r12      # 0xf18b
leaq 0xcbe1(%rip), %rbx      # 0x13398
movzbl (%r15,%r12), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1e01
incq %r15
cmpq $0x3, %r15
jne 0x67b7
testl %r14d, %r14d
je 0x681d
movl 0x14fd3(%rip), %edi     # 0x1b7b0
movl $0xfe, %esi
callq 0x329a
movl 0x14fc3(%rip), %eax     # 0x1b7b0
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x4b33(%rip), %xmm0     # 0xb330
cvttsd2si %xmm0, %rax
movl %eax, 0x14fb8(%rip)     # 0x1b7c0
movl %eax, 0x14fb6(%rip)     # 0x1b7c4
movl $0x2, %edi
callq 0x32ed
decl %r14d
jne 0x67d7
movzbl 0x896a(%rip), %esi      # 0xf18e
leaq 0xcb6d(%rip), %rdi      # 0x13398
movl $0x1, %edx
callq 0x1e01
movl 0x14f75(%rip), %edi     # 0x1b7b0
movl $0xfe, %esi
callq 0x329a
cvttsd2si 0x89d2(%rip), %rax # 0xf220
movw %ax, 0x8931(%rip)       # 0xf186
xorl %r14d, %r14d
leaq 0x8926(%rip), %r15      # 0xf185
leaq 0xcb32(%rip), %rbx      # 0x13398
movzbl (%r14,%r15), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1e01
incq %r14
cmpq $0x3, %r14
jne 0x6866
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq