// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/alphabet.c
// Function: gt_alphabet_to_str
void gt_alphabet_to_str(const GtAlphabet *alphabet, GtStr *dest)
{
  GtUchar chartoshow, currentcc, previouscc = 0, firstinline = 0;
  unsigned int cnum, linenum = 0;
  bool afternewline = true;
  gt_assert(alphabet && dest);
  if (alphabet->alphadef != NULL) {
    gt_assert(gt_str_length(alphabet->alphadef));
    gt_str_append_str(dest, alphabet->alphadef);
  } else {
    for (cnum=0; cnum < alphabet->domainsize; cnum++)
    {
      currentcc = alphabet->mapdomain[cnum];
      if (cnum > 0)
      {
        if (alphabet->symbolmap[currentcc] != alphabet->symbolmap[previouscc])
        {
          if (linenum < alphabet->mapsize-1)
          {
            chartoshow = alphabet->characters[linenum];
          } else
          {
            chartoshow = alphabet->wildcardshow;
          }
          if (firstinline != chartoshow)
          {
            gt_str_append_char(dest, (char) chartoshow);
          }
          gt_str_append_char(dest, '\n');
          afternewline = true;
          linenum++;
        } else
        {
          afternewline = false;
        }
      }
      gt_str_append_char(dest, (char) currentcc);
      if (afternewline)
      {
        firstinline = currentcc;
      }
      previouscc = currentcc;
    }
    if (linenum < alphabet->mapsize-1)
    {
      chartoshow = alphabet->characters[linenum];
    } else
    {
      chartoshow = alphabet->wildcardshow;
    }
    if (firstinline != chartoshow)
    {
      gt_str_append_char(dest, (char) chartoshow);
    }
    gt_str_append_char(dest, '\n');
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0xba98c
movq %rsi, %rbx
testq %rsi, %rsi
je 0xba98c
movq %rdi, %r14
movq 0x130(%rdi), %rdi
testq %rdi, %rdi
je 0xba850
callq 0x3bb86
testq %rax, %rax
je 0xba991
movq 0x130(%r14), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3b87d
movq %rbx, 0x8(%rsp)
cmpl $0x0, (%r14)
je 0xba92f
leaq 0x14(%r14), %rax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
movb $0x1, 0x3(%rsp)
movl $0x0, 0x4(%rsp)
xorl %r13d, %r13d
xorl %eax, %eax
movq 0x118(%r14), %rcx
movb (%rcx,%r12), %r15b
movzbl %r15b, %ebx
movsbl %bl, %ebp
testq %r12, %r12
je 0xba8f4
movb 0x15(%r14,%rbx), %cl
movzbl %al, %eax
cmpb 0x15(%r14,%rax), %cl
setne 0x3(%rsp)
je 0xba90f
movl 0x4(%r14), %ecx
decl %ecx
movq 0x10(%rsp), %rax
movl 0x4(%rsp), %edx
cmpl %ecx, %edx
jae 0xba8c4
movl %edx, %eax
addq 0x120(%r14), %rax
movb (%rax), %al
cmpb %al, %r13b
movq 0x8(%rsp), %rbx
je 0xba8db
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3b9df
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3b9df
incl 0x4(%rsp)
movq %rbx, %rdi
movl %r15d, %r13d
jmp 0xba914
movq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0x3b9df
movzbl %r13b, %r13d
testb $0x1, 0x3(%rsp)
cmovnel %ebx, %r13d
jmp 0xba91b
movq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0x3b9df
incq %r12
movl (%r14), %ecx
movl %r15d, %eax
cmpq %rcx, %r12
jb 0xba87d
jmp 0xba93a
xorl %r13d, %r13d
movl $0x0, 0x4(%rsp)
movl 0x4(%r14), %eax
decl %eax
movl 0x4(%rsp), %ecx
cmpl %eax, %ecx
jae 0xba953
movl %ecx, %eax
addq 0x120(%r14), %rax
jmp 0xba95a
addq $0x14, %r14
movq %r14, %rax
movb (%rax), %al
cmpb %al, %r13b
movq 0x8(%rsp), %rbx
je 0xba971
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3b9df
movq %rbx, %rdi
movl $0xa, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3b9df
callq 0x27ddc
callq 0x27e15