// File: /workspace/github_c_makefile_star2_O2/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 0x9b854
movq %rsi, %rbx
testq %rsi, %rsi
je 0x9b854
movq %rdi, %r14
movq 0x130(%rdi), %rdi
testq %rdi, %rdi
je 0x9b747
callq 0x14461
testq %rax, %rax
je 0x9b882
movq 0x130(%r14), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13eeb
movq %rbx, 0x10(%rsp)
leaq 0x14(%r14), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %bpl
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %r12d, %r12d
movl $0x0, 0x4(%rsp)
movl (%r14), %edx
movl 0x4(%rsp), %eax
cmpq %rdx, %r13
jae 0x9b807
movq 0x118(%r14), %rdx
movb (%rdx,%r13), %r15b
movzbl %r15b, %ebx
testq %r13, %r13
je 0x9b7e3
movb 0x15(%r14,%rbx), %dl
movzbl %cl, %ecx
cmpb 0x15(%r14,%rcx), %dl
jne 0x9b79f
xorl %ebp, %ebp
jmp 0x9b7e3
movl 0x4(%r14), %edx
decl %edx
movq 0x8(%rsp), %rcx
cmpl %edx, 0x4(%rsp)
jae 0x9b7ba
addq 0x120(%r14), %rax
movq %rax, %rcx
movb (%rcx), %al
cmpb %al, %r12b
movq 0x10(%rsp), %rbp
je 0x9b7d1
movsbl %al, %esi
movq %rbp, %rdi
callq 0x140b1
movq %rbp, %rdi
pushq $0xa
popq %rsi
callq 0x140b1
incl 0x4(%rsp)
movb $0x1, %bpl
movsbl %bl, %esi
movq 0x10(%rsp), %rdi
callq 0x140b1
movzbl %r12b, %r12d
testb $0x1, %bpl
cmovnel %ebx, %r12d
incq %r13
movl %r15d, %ecx
jmp 0x9b768
movl 0x4(%r14), %ecx
decl %ecx
cmpl %ecx, 0x4(%rsp)
jae 0x9b81f
addq 0x120(%r14), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movb (%rax), %al
cmpb %al, %r12b
movq 0x10(%rsp), %rbx
je 0x9b83b
movsbl %al, %esi
movq %rbx, %rdi
callq 0x140b1
pushq $0xa
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x140b1
movq 0x9275d(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x2e801(%rip), %rsi     # 0xca066
leaq 0x4e956(%rip), %rdx     # 0xea1c2
leaq 0x4e960(%rip), %rcx     # 0xea1d3
leaq 0x4e7a8(%rip), %r8      # 0xea022
movl $0x2ae, %r9d            # imm = 0x2AE
jmp 0x9b8ae
movq 0x9272f(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x2e7d3(%rip), %rsi     # 0xca066
leaq 0x4e94c(%rip), %rdx     # 0xea1e6
leaq 0x4e932(%rip), %rcx     # 0xea1d3
leaq 0x4e77a(%rip), %r8      # 0xea022
movl $0x2b0, %r9d            # imm = 0x2B0
xorl %eax, %eax
callq 0xb8c0
callq 0xb300