// File: /workspace/github_c_makefile_star2_O3/mincebert[P]maketzx/maketzx.c
// Function: WriteTZXGroupStart
void WriteTZXGroupStart(void)
{
  byte count;
  byte ldrtype=((header.type)&0xf0)/0x10,block=(header.type)&0x0f;
  char bnum[2];
  itoa(block,bnum,10);
  if (!ldrtype)
     {
       switch (block)
	      {
		case 0x0a : strcpy(groupname,"Decryption Beeps\0"); break;
		case 0x0b : strcpy(groupname,"Decryption Waves\0"); break;
		case 0x0c : strcpy(groupname,"Decryption Tone\0"); break;
	      }
     }
  if (ldrtype>=1 && ldrtype<=7)
     {
       char stype[2];
       itoa(ldrtype,stype,10);
       strcpy(groupname,"Speedlock ");
       strcat(groupname,stype);
     }
  if (ldrtype==9)
     { strcpy(groupname,"Bleepload"); }
  if (ldrtype==0x0b)
     { strcpy(groupname,"ZetaLoad"); }
  if (ldrtype)
     {
       strcat(groupname," Block ");
       strcat(groupname,bnum);
       strcat(groupname,"\0");
     }
  groupstart[1]=strlen(groupname);
  for (count=0; count<sizeof(groupstart); count++) PutData(&outfile,groupstart[count],1);
  for (count=0; count<groupstart[1]; count++) PutData(&outfile,groupname[count],1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x13c4f(%rip), %ebx     # 0x1bbf0
movl %ebx, %eax
andl $0xf, %eax
movl $0x8, %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl %eax, %esi
movl %esi, %edi
imulq %rdx, %rdi
shrq $0x23, %rdi
leal (%rdi,%rdi), %r8d
leal (%r8,%r8,4), %r8d
subl %r8d, %esi
orb $0x30, %sil
movb %sil, 0x5(%rsp,%rcx)
movl %edi, %esi
decq %rcx
jne 0x7fb2
movl %ebx, %ebp
shrl $0x4, %ebp
cmpb $0xf, %bl
ja 0x8003
cmpb $0xc, %al
je 0x8079
movzbl %al, %eax
cmpl $0xb, %eax
je 0x8062
cmpl $0xa, %eax
jne 0x8087
movups 0x3229(%rip), %xmm0     # 0xb22a
jmp 0x8069
cmpb $0x10, %bl
jl 0x8087
movl $0x8, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
movl %ebp, %edx
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x23, %rsi
leal (%rsi,%rsi), %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %edx
orb $0x30, %dl
movb %dl, 0x3(%rsp,%rax)
movl %esi, %edx
decq %rax
jne 0x8014
movabsq $0x636f6c6465657053, %rax # imm = 0x636F6C6465657053
movq %rax, 0x1420b(%rip)     # 0x1c250
movl $0x206b63, 0x14208(%rip) # imm = 0x206B63
leaq 0x141fa(%rip), %rdi     # 0x1c250
leaq 0x4(%rsp), %rsi
callq 0x1160
jmp 0x8087
movups 0x31d3(%rip), %xmm0     # 0xb23c
movaps %xmm0, 0x141e0(%rip)    # 0x1c250
movb $0x0, 0x141e9(%rip)     # 0x1c260
jmp 0x8087
movups 0x31ce(%rip), %xmm0     # 0xb24e
movaps %xmm0, 0x141c9(%rip)    # 0x1c250
cmpb $0xb, %bpl
je 0x80b2
movzbl %bpl, %eax
cmpl $0x9, %eax
jne 0x80ca
movabsq $0x616f6c7065656c42, %rax # imm = 0x616F6C7065656C42
movq %rax, 0x141a9(%rip)     # 0x1c250
movw $0x64, 0x141a8(%rip)    # 0x1c258
jmp 0x80ca
movabsq $0x64616f4c6174655a, %rax # imm = 0x64616F4C6174655A
movq %rax, 0x1418d(%rip)     # 0x1c250
movb $0x0, 0x1418e(%rip)     # 0x1c258
cmpb $0x10, %bl
jb 0x80f9
leaq 0x1417a(%rip), %rbx     # 0x1c250
movq %rbx, %rdi
callq 0x10a0
movabsq $0x206b636f6c4220, %rcx # imm = 0x206B636F6C4220
movq %rcx, (%rax,%rbx)
leaq 0x6(%rsp), %rsi
movq %rbx, %rdi
callq 0x1160
leaq 0x14150(%rip), %rbx     # 0x1c250
movq %rbx, %rdi
callq 0x10a0
movb %al, 0x707b(%rip)       # 0xf189
movzbl 0x7073(%rip), %esi      # 0xf188
leaq 0xb27c(%rip), %r14      # 0x13398
movq %r14, %rdi
movl $0x1, %edx
callq 0x1e01
movzbl 0x7059(%rip), %esi      # 0xf189
movq %r14, %rdi
movl $0x1, %edx
callq 0x1e01
cmpb $0x0, 0x7045(%rip)      # 0xf189
je 0x8171
xorl %r15d, %r15d
leaq 0xb248(%rip), %r14      # 0x13398
movzbl (%r15,%rbx), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x1e01
incq %r15
movzbl 0x701d(%rip), %eax      # 0xf189
cmpq %rax, %r15
jb 0x8150
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq