// File: /workspace/github_c_makefile_star2_O2/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 0x143be(%rip), %r15d    # 0x1bbe0
movl %r15d, %ebx
shrl $0x4, %ebx
movl %r15d, %ebp
andl $0xf, %ebp
leaq 0xc(%rsp), %rsi
pushq $0xa
popq %rdx
movl %ebp, %edi
callq 0x127c
cmpl $0xf, %r15d
ja 0x7860
cmpb $0xc, %bpl
je 0x78bb
movzbl %bpl, %eax
cmpl $0xb, %eax
je 0x78a4
cmpl $0xa, %eax
jne 0x78c9
movups 0x29cc(%rip), %xmm0     # 0xa22a
jmp 0x78ab
cmpb $0x10, %r15b
jl 0x78c9
leaq 0xe(%rsp), %r14
pushq $0xa
popq %rdx
movl %ebx, %edi
movq %r14, %rsi
callq 0x127c
movabsq $0x636f6c6465657053, %rax # imm = 0x636F6C6465657053
movq %rax, 0x149b7(%rip)     # 0x1c240
movl $0x206b63, 0x149b4(%rip) # imm = 0x206B63
leaq 0x149a6(%rip), %rdi     # 0x1c240
movq %r14, %rsi
callq 0x1150
jmp 0x78c9
movups 0x2991(%rip), %xmm0     # 0xa23c
movaps %xmm0, 0x1498e(%rip)    # 0x1c240
movb $0x0, 0x14997(%rip)     # 0x1c250
jmp 0x78c9
movups 0x298c(%rip), %xmm0     # 0xa24e
movaps %xmm0, 0x14977(%rip)    # 0x1c240
cmpb $0xb, %bl
je 0x78f2
movzbl %bl, %eax
cmpl $0x9, %eax
jne 0x790a
movabsq $0x616f6c7065656c42, %rax # imm = 0x616F6C7065656C42
movq %rax, 0x14959(%rip)     # 0x1c240
movw $0x64, 0x14958(%rip)    # 0x1c248
jmp 0x790a
movabsq $0x64616f4c6174655a, %rax # imm = 0x64616F4C6174655A
movq %rax, 0x1493d(%rip)     # 0x1c240
movb $0x0, 0x1493e(%rip)     # 0x1c248
cmpb $0x10, %r15b
jb 0x793a
leaq 0x14929(%rip), %rbx     # 0x1c240
movq %rbx, %rdi
callq 0x10a0
movabsq $0x206b636f6c4220, %rcx # imm = 0x206B636F6C4220
movq %rcx, (%rax,%rbx)
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x1150
leaq 0x148ff(%rip), %rbx     # 0x1c240
movq %rbx, %rdi
callq 0x10a0
movb %al, 0x782a(%rip)       # 0xf179
xorl %r15d, %r15d
leaq 0x781f(%rip), %r12      # 0xf178
leaq 0xba28(%rip), %r14      # 0x13388
pushq $0x1
popq %rbp
cmpq $0x2, %r15
je 0x797d
movzbl (%r15,%r12), %esi
movq %r14, %rdi
movl %ebp, %edx
callq 0x1da7
incq %r15
jmp 0x7963
xorl %r15d, %r15d
leaq 0xba01(%rip), %r14      # 0x13388
pushq $0x1
popq %rbp
movzbl 0x77e8(%rip), %eax      # 0xf179
cmpq %rax, %r15
jae 0x79aa
movzbl (%r15,%rbx), %esi
movq %r14, %rdi
movl %ebp, %edx
callq 0x1da7
incq %r15
jmp 0x798a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq