// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movb $0x0, 0x15(%rsp)
movb $0x0, 0x14(%rsp)
movl $0x0, 0xc(%rsp)
movb $0x1, 0xb(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x109f85
cmpq $0x0, 0x18(%rsp)
jne 0x109fbd
movq 0xaa04c(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x540d0(%rip), %rsi     # 0x15e066
leaq 0x79c25(%rip), %rdx     # 0x183bc2
leaq 0x79c2f(%rip), %rcx     # 0x183bd3
leaq 0x79a77(%rip), %r8      # 0x183a22
movl $0x2ae, %r9d            # imm = 0x2AE
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x109fbf
movq 0x20(%rsp), %rax
cmpq $0x0, 0x130(%rax)
je 0x10a03c
jmp 0x109fd0
movq 0x20(%rsp), %rax
movq 0x130(%rax), %rdi
callq 0x19a00
cmpq $0x0, %rax
jne 0x10a01f
movq 0xa9fea(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x5406e(%rip), %rsi     # 0x15e066
leaq 0x79be7(%rip), %rdx     # 0x183be6
leaq 0x79bcd(%rip), %rcx     # 0x183bd3
leaq 0x79a15(%rip), %r8      # 0x183a22
movl $0x2b0, %r9d            # imm = 0x2B0
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x10a021
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x130(%rax), %rsi
callq 0x191b0
jmp 0x10a1b0
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpl (%rcx), %eax
jae 0x10a14c
movq 0x20(%rsp), %rax
movq 0x118(%rax), %rax
movl 0x10(%rsp), %ecx
movb (%rax,%rcx), %al
movb %al, 0x16(%rsp)
cmpl $0x0, 0x10(%rsp)
jbe 0x10a116
movq 0x20(%rsp), %rax
movzbl 0x16(%rsp), %ecx
movzbl 0x15(%rax,%rcx), %eax
movq 0x20(%rsp), %rcx
movzbl 0x15(%rsp), %edx
movzbl 0x15(%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x10a10f
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x10a0c5
movq 0x20(%rsp), %rax
movq 0x120(%rax), %rax
movl 0xc(%rsp), %ecx
movb (%rax,%rcx), %al
movb %al, 0x17(%rsp)
jmp 0x10a0d1
movq 0x20(%rsp), %rax
movb 0x14(%rax), %al
movb %al, 0x17(%rsp)
movzbl 0x14(%rsp), %eax
movzbl 0x17(%rsp), %ecx
cmpl %ecx, %eax
je 0x10a0ee
movq 0x18(%rsp), %rdi
movsbl 0x17(%rsp), %esi
callq 0x194d0
movq 0x18(%rsp), %rdi
movl $0xa, %esi
callq 0x194d0
movb $0x1, 0xb(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x10a114
movb $0x0, 0xb(%rsp)
jmp 0x10a116
movq 0x18(%rsp), %rdi
movsbl 0x16(%rsp), %esi
callq 0x194d0
testb $0x1, 0xb(%rsp)
je 0x10a134
movb 0x16(%rsp), %al
movb %al, 0x14(%rsp)
movb 0x16(%rsp), %al
movb %al, 0x15(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x10a044
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x10a178
movq 0x20(%rsp), %rax
movq 0x120(%rax), %rax
movl 0xc(%rsp), %ecx
movb (%rax,%rcx), %al
movb %al, 0x17(%rsp)
jmp 0x10a184
movq 0x20(%rsp), %rax
movb 0x14(%rax), %al
movb %al, 0x17(%rsp)
movzbl 0x14(%rsp), %eax
movzbl 0x17(%rsp), %ecx
cmpl %ecx, %eax
je 0x10a1a1
movq 0x18(%rsp), %rdi
movsbl 0x17(%rsp), %esi
callq 0x194d0
movq 0x18(%rsp), %rdi
movl $0xa, %esi
callq 0x194d0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)