// File: /workspace/github_c_makefile_star2_O1/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 0xb9885
movq %rsi, %rbx
testq %rsi, %rsi
je 0xb9885
movq %rdi, %r14
movq 0x130(%rdi), %rdi
testq %rdi, %rdi
je 0xb9765
callq 0x3c434
testq %rax, %rax
je 0xb988a
movq 0x130(%r14), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c12b
movq %rbx, 0x8(%rsp)
cmpl $0x0, (%r14)
je 0xb9829
leaq 0x14(%r14), %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
movb $0x1, %bl
movl $0x0, 0x4(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
movl %r12d, %eax
movq 0x118(%r14), %rcx
movb (%rcx,%r13), %r12b
movzbl %r12b, %r15d
testq %r13, %r13
je 0xb97ff
movb 0x15(%r14,%r15), %cl
movzbl %al, %eax
cmpb 0x15(%r14,%rax), %cl
jne 0xb97b9
xorl %ebx, %ebx
jmp 0xb97ff
movl 0x4(%r14), %ecx
decl %ecx
movq 0x10(%rsp), %rax
movl 0x4(%rsp), %edx
cmpl %ecx, %edx
jae 0xb97d5
movl %edx, %eax
addq 0x120(%r14), %rax
movb (%rax), %al
cmpb %al, %bpl
movq 0x8(%rsp), %rbx
je 0xb97ec
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3c28d
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3c28d
incl 0x4(%rsp)
movb $0x1, %bl
movsbl %r15b, %esi
movq 0x8(%rsp), %rdi
callq 0x3c28d
movzbl %bpl, %ebp
testb $0x1, %bl
cmovnel %r15d, %ebp
incq %r13
movl (%r14), %eax
cmpq %rax, %r13
jb 0xb978f
jmp 0xb9833
xorl %ebp, %ebp
movl $0x0, 0x4(%rsp)
movl 0x4(%r14), %eax
decl %eax
movl 0x4(%rsp), %ecx
cmpl %eax, %ecx
jae 0xb984c
movl %ecx, %eax
addq 0x120(%r14), %rax
jmp 0xb9853
addq $0x14, %r14
movq %r14, %rax
movq 0x8(%rsp), %rbx
movb (%rax), %al
cmpb %al, %bpl
je 0xb986a
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3c28d
movq %rbx, %rdi
movl $0xa, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c28d
callq 0x27f9e
callq 0x27fd7