// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movzbl 0x13b6e(%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, 0xd(%rsp,%rcx)
movl %edi, %esi
decq %rcx
jne 0x8093
movl %ebx, %ebp
shrl $0x4, %ebp
cmpb $0xf, %bl
ja 0x8101
cmpb $0xc, %al
je 0x80f3
movzbl %al, %eax
cmpl $0xb, %eax
je 0x80dc
cmpl $0xa, %eax
jne 0x8101
movups 0x3150(%rip), %xmm0     # 0xb22a
jmp 0x80e3
movups 0x3159(%rip), %xmm0     # 0xb23c
movaps %xmm0, 0x14166(%rip)    # 0x1c250
movb $0x0, 0x1416f(%rip)     # 0x1c260
jmp 0x8101
movups 0x3154(%rip), %xmm0     # 0xb24e
movaps %xmm0, 0x1414f(%rip)    # 0x1c250
cmpb $0x10, %bl
jl 0x815e
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, 0xb(%rsp,%rax)
movl %esi, %edx
decq %rax
jne 0x8112
movabsq $0x636f6c6465657053, %rax # imm = 0x636F6C6465657053
movq %rax, 0x1410d(%rip)     # 0x1c250
movl $0x206b63, 0x1410a(%rip) # imm = 0x206B63
leaq 0x140fc(%rip), %rdi     # 0x1c250
leaq 0xc(%rsp), %rsi
callq 0x1160
cmpb $0xb, %bpl
je 0x8189
movzbl %bpl, %eax
cmpl $0x9, %eax
jne 0x81a1
movabsq $0x616f6c7065656c42, %rax # imm = 0x616F6C7065656C42
movq %rax, 0x140d2(%rip)     # 0x1c250
movw $0x64, 0x140d1(%rip)    # 0x1c258
jmp 0x81a1
movabsq $0x64616f4c6174655a, %rax # imm = 0x64616F4C6174655A
movq %rax, 0x140b6(%rip)     # 0x1c250
movb $0x0, 0x140b7(%rip)     # 0x1c258
cmpb $0x10, %bl
jb 0x81d0
leaq 0x140a3(%rip), %rbx     # 0x1c250
movq %rbx, %rdi
callq 0x10a0
movabsq $0x206b636f6c4220, %rcx # imm = 0x206B636F6C4220
movq %rcx, (%rax,%rbx)
leaq 0xe(%rsp), %rsi
movq %rbx, %rdi
callq 0x1160
leaq 0x14079(%rip), %rbx     # 0x1c250
movq %rbx, %rdi
callq 0x10a0
movb %al, 0x6fa4(%rip)       # 0xf189
xorl %r15d, %r15d
leaq 0x6f99(%rip), %r12      # 0xf188
leaq 0xb1a2(%rip), %r14      # 0x13398
movzbl (%r15,%r12), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x1e21
incq %r15
cmpq $0x1, %r15
je 0x81f6
cmpb $0x0, 0x6f71(%rip)      # 0xf189
je 0x8245
xorl %r15d, %r15d
leaq 0xb174(%rip), %r14      # 0x13398
movzbl (%r15,%rbx), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x1e21
incq %r15
movzbl 0x6f49(%rip), %eax      # 0xf189
cmpq %rax, %r15
jb 0x8224
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq