// File: /workspace/github_c_makefile_star2_O1/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, 0x89e5(%rip)      # 0xf0f0
je 0x67d3
movsd 0x1508f(%rip), %xmm0    # 0x1b7a8
movapd %xmm0, %xmm1
divsd 0x4c0b(%rip), %xmm1     # 0xb330
mulsd 0x4c0b(%rip), %xmm0     # 0xb338
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
movq 0x157f3(%rip), %rax     # 0x1bf30
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %xmm0
punpckldq 0x4cbf(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x4cc7(%rip), %xmm0     # 0xb420
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
addsd 0x4b63(%rip), %xmm1     # 0xb2d0
cvttsd2si %xmm1, %r14
cmpb $0x9, 0x89de(%rip)      # 0xf157
ja 0x6853
testl %r14d, %r14d
je 0x68ea
movl 0x15022(%rip), %edi     # 0x1b7b0
movl $0xfe, %esi
callq 0x3321
movl 0x15012(%rip), %eax     # 0x1b7b0
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x4b82(%rip), %xmm0     # 0xb330
cvttsd2si %xmm0, %rax
movl %eax, 0x15007(%rip)     # 0x1b7c0
movl %eax, 0x15005(%rip)     # 0x1b7c4
movl $0x2, %edi
callq 0x3374
decl %r14d
jne 0x6788
jmp 0x68ea
movsd 0x15755(%rip), %xmm0    # 0x1bf30
unpcklps 0x4c2e(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x4c36(%rip), %xmm0     # 0xb420
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x14faa(%rip), %xmm1    # 0x1b7a8
movl 0x14fac(%rip), %edi     # 0x1b7b0
addsd %xmm1, %xmm1
cvttsd2si %xmm1, %rsi
callq 0x3321
cvttsd2si 0x8a05(%rip), %rax # 0xf220
movw %ax, 0x8964(%rip)       # 0xf186
xorl %r14d, %r14d
leaq 0x8959(%rip), %r15      # 0xf185
leaq 0xcb65(%rip), %rbx      # 0x13398
movzbl (%r14,%r15), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1e21
incq %r14
cmpq $0x3, %r14
jne 0x6833
jmp 0x6936
movw %r14w, 0x8931(%rip)     # 0xf18c
xorl %r15d, %r15d
leaq 0x8926(%rip), %r12      # 0xf18b
leaq 0xcb2c(%rip), %rbx      # 0x13398
movzbl (%r15,%r12), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1e21
incq %r15
cmpq $0x3, %r15
jne 0x686c
testl %r14d, %r14d
je 0x68d2
movl 0x14f1e(%rip), %edi     # 0x1b7b0
movl $0xfe, %esi
callq 0x3321
movl 0x14f0e(%rip), %eax     # 0x1b7b0
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x4a7e(%rip), %xmm0     # 0xb330
cvttsd2si %xmm0, %rax
movl %eax, 0x14f03(%rip)     # 0x1b7c0
movl %eax, 0x14f01(%rip)     # 0x1b7c4
movl $0x2, %edi
callq 0x3374
decl %r14d
jne 0x688c
movzbl 0x88b5(%rip), %esi      # 0xf18e
leaq 0xcab8(%rip), %rdi      # 0x13398
movl $0x1, %edx
callq 0x1e21
movl 0x14ec0(%rip), %edi     # 0x1b7b0
movl $0xfe, %esi
callq 0x3321
cvttsd2si 0x891d(%rip), %rax # 0xf220
movw %ax, 0x887c(%rip)       # 0xf186
xorl %r14d, %r14d
leaq 0x8871(%rip), %r15      # 0xf185
leaq 0xca7d(%rip), %rbx      # 0x13398
movzbl (%r14,%r15), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1e21
incq %r14
cmpq $0x3, %r14
jne 0x691b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq