// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
cmpb $0x0, 0xa7b5(%rip)      # 0x130d0
je 0x8ac8
movsd 0x16e5f(%rip), %xmm0    # 0x1f788
movsd 0x716f(%rip), %xmm2     # 0xfaa0
movaps %xmm0, %xmm1
divsd %xmm2, %xmm1
movsd 0x7168(%rip), %xmm2     # 0xfaa8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x14(%rsp)
movq 0x175b8(%rip), %rax     # 0x1ff10
movl 0x14(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %xmm0
movaps 0x7203(%rip), %xmm1     # 0xfb70
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x7207(%rip), %xmm1     # 0xfb80
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x70a0(%rip), %xmm1     # 0xfa30
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x10(%rsp)
movzbl 0xa793(%rip), %eax      # 0x13137
cmpl $0xa, %eax
jge 0x8a23
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x10(%rsp), %eax
jae 0x8a1e
movl 0x16dcf(%rip), %edi     # 0x1f790
movl $0xfe, %esi
callq 0x4480
movl 0x16dbf(%rip), %eax     # 0x1f790
cvtsi2sd %rax, %xmm0
movsd 0x70c2(%rip), %xmm1     # 0xfaa0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x16db3(%rip)     # 0x1f7a0
movl 0x16d9d(%rip), %eax     # 0x1f790
cvtsi2sd %rax, %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x16d9d(%rip)     # 0x1f7a4
movl $0x2, %edi
callq 0x4520
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x89b1
jmp 0x8aa6
movl 0x10(%rsp), %edi
callq 0x45f0
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x10(%rsp), %eax
jae 0x8aa1
movl 0x16d4c(%rip), %edi     # 0x1f790
movl $0xfe, %esi
callq 0x4480
movl 0x16d3c(%rip), %eax     # 0x1f790
cvtsi2sd %rax, %xmm0
movsd 0x703f(%rip), %xmm1     # 0xfaa0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x16d30(%rip)     # 0x1f7a0
movl 0x16d1a(%rip), %eax     # 0x1f790
cvtsi2sd %rax, %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x16d1a(%rip)     # 0x1f7a4
movl $0x2, %edi
callq 0x4520
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x8a34
callq 0x4660
movl 0x16ce4(%rip), %edi     # 0x1f790
movl $0xfe, %esi
callq 0x4480
cvttsd2si 0xa741(%rip), %rax # 0x13200
movl %eax, %edi
callq 0x7510
jmp 0x8b24
movl 0x16cc2(%rip), %edi     # 0x1f790
movaps 0x709b(%rip), %xmm1     # 0xfb70
movq 0x17433(%rip), %xmm0    # 0x1ff10
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x7097(%rip), %xmm1     # 0xfb80
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x16c88(%rip), %xmm1    # 0x1f788
divsd %xmm1, %xmm0
addsd %xmm0, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %esi
callq 0x4480
cvttsd2si 0xa6e3(%rip), %rax # 0x13200
movl %eax, %edi
callq 0x7510
addq $0x18, %rsp
retq
nopl (%rax)