// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/alignment.c
// Function: gt_alignment_show_generic
void gt_alignment_show_generic(GtUchar *buffer,
                               bool downcase,
                               const GtAlignment *alignment,
                               FILE *fp,
                               unsigned int width,
                               const GtUchar *characters,
                               GtUchar wildcardshow)
{
  GtMultieop meop;
  GtUword idx_eop, idx_u = 0, idx_v = 0, meoplen;
  unsigned int pos = 0;
  GtUchar *topbuf = buffer, *midbuf = NULL, *lowbuf = NULL;

  gt_assert(alignment != NULL && (characters == NULL || !downcase));
  topbuf[width] = '\n';
  midbuf = topbuf + width + 1;
  midbuf[width] = '\n';
  lowbuf = midbuf + width + 1;
  lowbuf[width] = '\n';
  meoplen = gt_multieoplist_get_num_entries(alignment->eops);
  gt_assert(meoplen > 0);
  idx_eop = meoplen - 1;
  while (true)
  {
    meop = gt_multieoplist_get_entry(alignment->eops, idx_eop);
    switch (meop.type)
    {
      GtUword j;

      case Mismatch:
      case Match:
      case Replacement:
        for (j = 0; j < meop.steps && idx_u < alignment->ulen &&
                                      idx_v < alignment->vlen; j++)
        {
          GtUchar a = alignment->u[idx_u];
          GtUchar b = alignment->v[idx_v];
          bool is_match;

          if (characters != NULL)
          {
            topbuf[pos] = GT_ISSPECIAL(a) ? wildcardshow : characters[a];
            is_match = (a == b && !GT_ISSPECIAL(a)) ? true : false;
            lowbuf[pos] = GT_ISSPECIAL(b) ? wildcardshow : characters[b];
          } else
          {
            topbuf[pos] = a;
            is_match = ((downcase && tolower((int) a) == tolower((int) b)) ||
                        (!downcase && a == b)) ? true : false;
            lowbuf[pos] = b;
          }
          if (is_match)
          {
            midbuf[pos] = (GtUchar) MATCHSYMBOL;
          } else
          {
            midbuf[pos] = (GtUchar) MISMATCHSYMBOL;
          }
          pos = gt_alignment_show_advance(pos,width,topbuf,fp);
          idx_u++;
          idx_v++;
        }
        break;
      case Deletion:
        for (j = 0; j < meop.steps && idx_u < alignment->ulen; j++)
        {
          GtUchar a = alignment->u[idx_u++];

          if (characters != NULL)
          {
            topbuf[pos] = GT_ISSPECIAL(a) ? wildcardshow : characters[a];
          } else
          {
            topbuf[pos] = a;
          }
          midbuf[pos] = (GtUchar) MISMATCHSYMBOL;
          lowbuf[pos] = (GtUchar) GAPSYMBOL;
          pos = gt_alignment_show_advance(pos,width,topbuf,fp);
        }
        break;
      case Insertion:
        for (j = 0; j < meop.steps && idx_v < alignment->vlen; j++)
        {
          GtUchar b = alignment->v[idx_v++];

          topbuf[pos] = (GtUchar) GAPSYMBOL;
          midbuf[pos] = (GtUchar) MISMATCHSYMBOL;
          if (characters != NULL)
          {
            lowbuf[pos] = GT_ISSPECIAL(b) ? wildcardshow : characters[b];
          } else
          {
            lowbuf[pos] = b;
          }
          pos = gt_alignment_show_advance(pos,width,topbuf,fp);
        }
        break;
    }
    if (idx_eop > 0 && (idx_u < alignment->ulen || idx_v < alignment->vlen))
    {
      idx_eop--;
    } else
    {
      break;
    }
  }
  if (pos > 0)
  {
    topbuf[pos] = '\n';
    fwrite(topbuf,sizeof *topbuf,pos+1,fp);
    midbuf[pos] = '\n';
    fwrite(midbuf,sizeof *midbuf,pos+1,fp);
    lowbuf[pos] = '\n';
    fwrite(lowbuf,sizeof *lowbuf,pos+1,fp);
  }
}

// Assembly:
subq $0xd8, %rsp
movb %sil, %al
movb 0xe0(%rsp), %sil
movq %rdi, 0xd0(%rsp)
andb $0x1, %al
movb %al, 0xcf(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
movl %r8d, 0xb4(%rsp)
movq %r9, 0xa8(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movl $0x0, 0x6c(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x12b4df
cmpq $0x0, 0xa8(%rsp)
je 0x12b517
testb $0x1, 0xcf(%rsp)
je 0x12b517
movq 0x510aba(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3eab23(%rip), %rsi    # 0x516013
leaq 0x41bbf3(%rip), %rdx    # 0x5470ea
leaq 0x41bc23(%rip), %rcx    # 0x547121
leaq 0x41b943(%rip), %r8     # 0x546e48
movl $0x21d, %r9d            # imm = 0x21D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x12b519
movq 0x60(%rsp), %rax
movl 0xb4(%rsp), %ecx
movb $0xa, (%rax,%rcx)
movq 0x60(%rsp), %rax
movl 0xb4(%rsp), %ecx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl 0xb4(%rsp), %ecx
movb $0xa, (%rax,%rcx)
movq 0x58(%rsp), %rax
movl 0xb4(%rsp), %ecx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movl 0xb4(%rsp), %ecx
movb $0xa, (%rax,%rcx)
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x1b0390
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
ja 0x12b5cf
movq 0x510a02(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3eaa6b(%rip), %rsi    # 0x516013
leaq 0x41bb8c(%rip), %rdx    # 0x54713b
leaq 0x41bb6b(%rip), %rcx    # 0x547121
leaq 0x41b88b(%rip), %r8     # 0x546e48
movl $0x224, %r9d            # imm = 0x224
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x12b5d1
movq 0x70(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x88(%rsp)
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x88(%rsp), %rsi
callq 0x1b03a0
movl %eax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movups 0x40(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movl 0x90(%rsp), %eax
movl %eax, 0x2c(%rsp)
subl $0x3, %eax
jb 0x12b644
jmp 0x12b623
movl 0x2c(%rsp), %eax
subl $0x3, %eax
je 0x12b8c8
jmp 0x12b632
movl 0x2c(%rsp), %eax
subl $0x4, %eax
je 0x12b9e9
jmp 0x12bafe
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rcx
xorl %eax, %eax
cmpq 0x98(%rsp), %rcx
movb %al, 0x2b(%rsp)
jae 0x12b696
movq 0x80(%rsp), %rcx
movq 0xc0(%rsp), %rdx
xorl %eax, %eax
cmpq 0x38(%rdx), %rcx
movb %al, 0x2b(%rsp)
jae 0x12b696
movq 0x78(%rsp), %rax
movq 0xc0(%rsp), %rcx
cmpq 0x40(%rcx), %rax
setb %al
movb %al, 0x2b(%rsp)
movb 0x2b(%rsp), %al
testb $0x1, %al
jne 0x12b6a3
jmp 0x12b8c3
movq 0xc0(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x80(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x37(%rsp)
movq 0xc0(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x36(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x12b7b0
movzbl 0x37(%rsp), %eax
cmpl $0xfe, %eax
jl 0x12b6ff
movzbl 0xe0(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x12b714
movq 0xa8(%rsp), %rax
movzbl 0x37(%rsp), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movb %al, %dl
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
movzbl 0x37(%rsp), %ecx
movzbl 0x36(%rsp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, 0x23(%rsp)
jne 0x12b74d
movzbl 0x37(%rsp), %eax
cmpl $0xfe, %eax
setge %al
xorb $-0x1, %al
movb %al, 0x23(%rsp)
movb 0x23(%rsp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x35(%rsp)
movzbl 0x36(%rsp), %eax
cmpl $0xfe, %eax
jl 0x12b784
movzbl 0xe0(%rsp), %eax
movl %eax, 0x1c(%rsp)
jmp 0x12b799
movq 0xa8(%rsp), %rax
movzbl 0x36(%rsp), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movb %al, %dl
movq 0x50(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x12b84a
movb 0x37(%rsp), %dl
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
testb $0x1, 0xcf(%rsp)
je 0x12b7f2
movzbl 0x37(%rsp), %edi
callq 0x19a20
movl %eax, 0x14(%rsp)
movzbl 0x36(%rsp), %edi
callq 0x19a20
movl 0x14(%rsp), %ecx
movl %eax, %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, 0x1b(%rsp)
je 0x12b81d
xorl %eax, %eax
testb $0x1, 0xcf(%rsp)
movb %al, 0x13(%rsp)
jne 0x12b815
movzbl 0x37(%rsp), %eax
movzbl 0x36(%rsp), %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0x13(%rsp)
movb 0x13(%rsp), %al
movb %al, 0x1b(%rsp)
movb 0x1b(%rsp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x35(%rsp)
movb 0x36(%rsp), %dl
movq 0x50(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
testb $0x1, 0x35(%rsp)
je 0x12b860
movq 0x58(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0x7c, (%rax,%rcx)
jmp 0x12b86d
movq 0x58(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0x20, (%rax,%rcx)
movl 0x6c(%rsp), %edi
movl 0xb4(%rsp), %esi
movq 0x60(%rsp), %rdx
movq 0xb8(%rsp), %rcx
callq 0x12bbf0
movl %eax, 0x6c(%rsp)
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x12b64d
jmp 0x12bafe
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rcx
xorl %eax, %eax
cmpq 0x98(%rsp), %rcx
movb %al, 0x12(%rsp)
jae 0x12b901
movq 0x80(%rsp), %rax
movq 0xc0(%rsp), %rcx
cmpq 0x38(%rcx), %rax
setb %al
movb %al, 0x12(%rsp)
movb 0x12(%rsp), %al
testb $0x1, %al
jne 0x12b90e
jmp 0x12b9e4
movq 0xc0(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x80(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x80(%rsp)
movb (%rax,%rcx), %al
movb %al, 0x34(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x12b986
movzbl 0x34(%rsp), %eax
cmpl $0xfe, %eax
jl 0x12b95d
movzbl 0xe0(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x12b972
movq 0xa8(%rsp), %rax
movzbl 0x34(%rsp), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movb %al, %dl
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x12b996
movb 0x34(%rsp), %dl
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
movq 0x58(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0x20, (%rax,%rcx)
movq 0x50(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0x2d, (%rax,%rcx)
movl 0x6c(%rsp), %edi
movl 0xb4(%rsp), %esi
movq 0x60(%rsp), %rdx
movq 0xb8(%rsp), %rcx
callq 0x12bbf0
movl %eax, 0x6c(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x12b8d1
jmp 0x12bafe
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rcx
xorl %eax, %eax
cmpq 0x98(%rsp), %rcx
movb %al, 0xb(%rsp)
jae 0x12ba1f
movq 0x78(%rsp), %rax
movq 0xc0(%rsp), %rcx
cmpq 0x40(%rcx), %rax
setb %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x12ba2c
jmp 0x12bafc
movq 0xc0(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x78(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x78(%rsp)
movb (%rax,%rcx), %al
movb %al, 0x33(%rsp)
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0x2d, (%rax,%rcx)
movq 0x58(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0x20, (%rax,%rcx)
cmpq $0x0, 0xa8(%rsp)
je 0x12bab8
movzbl 0x33(%rsp), %eax
cmpl $0xfe, %eax
jl 0x12ba8f
movzbl 0xe0(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0x12baa4
movq 0xa8(%rsp), %rax
movzbl 0x33(%rsp), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movb %al, %dl
movq 0x50(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x12bac8
movb 0x33(%rsp), %dl
movq 0x50(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb %dl, (%rax,%rcx)
movl 0x6c(%rsp), %edi
movl 0xb4(%rsp), %esi
movq 0x60(%rsp), %rdx
movq 0xb8(%rsp), %rcx
callq 0x12bbf0
movl %eax, 0x6c(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x12b9f2
jmp 0x12bafe
cmpq $0x0, 0x88(%rsp)
jbe 0x12bb48
movq 0x80(%rsp), %rax
movq 0xc0(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jb 0x12bb32
movq 0x78(%rsp), %rax
movq 0xc0(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x12bb48
movq 0x88(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0x12bb4a
jmp 0x12bb4f
jmp 0x12b5e2
cmpl $0x0, 0x6c(%rsp)
jbe 0x12bbe7
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0xa, (%rax,%rcx)
movq 0x60(%rsp), %rdi
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq 0xb8(%rsp), %rcx
movl $0x1, %esi
callq 0x19ea0
movq 0x58(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0xa, (%rax,%rcx)
movq 0x58(%rsp), %rdi
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq 0xb8(%rsp), %rcx
movl $0x1, %esi
callq 0x19ea0
movq 0x50(%rsp), %rax
movl 0x6c(%rsp), %ecx
movb $0xa, (%rax,%rcx)
movq 0x50(%rsp), %rdi
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq 0xb8(%rsp), %rcx
movl $0x1, %esi
callq 0x19ea0
addq $0xd8, %rsp
retq
nop