// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/ft-eoplist.c
// Function: gt_eoplist_format_exact
void gt_eoplist_format_exact(FILE *fp,
                             const GtEoplist *eoplist,
                             GtEoplistReader *eoplist_reader,
                             GtUword top_seqlength,
                             GtUword low_reference,
                             GtUword one_off,
                             bool subject_first,
                             bool alignment_show_forward,
                             bool show_complement_characters,
                             const GtUchar *characters)
{
  GtUword idx;
  unsigned int pos = 0, width;
  GtUchar *topbuf = eoplist_reader->outbuffer, *midbuf = NULL, *lowbuf = NULL;
  const int numwidth = gt_eoplist_numwidth(eoplist);
  GtUword top_start_pos = eoplist->ustart,
          low_start_pos = low_reference == 0 ? eoplist->vstart
                                             : low_reference - eoplist->vstart;

  gt_assert(alignment_show_forward || top_seqlength > 0);
  width = GT_MIN(eoplist->ulen, eoplist_reader->width);
  midbuf = topbuf + width;
  for (idx = 0; idx < (GtUword) width; idx++)
  {
    midbuf[idx] = (GtUchar) EOPLIST_MATCHSYMBOL;
  }
  lowbuf = midbuf + width;
  for (idx = 0; idx < eoplist->ulen; idx++)
  {
    GtUchar cc_a = eoplist->useq[alignment_show_forward ? idx
                                                        : eoplist->ulen-1-idx];

    if (characters != NULL)
    {
      if (show_complement_characters)
      {
        cc_a = GT_COMPLEMENTBASE(cc_a);
      }
      cc_a = characters[cc_a];
    }
    lowbuf[pos] = topbuf[pos] = cc_a;
    pos = gt_eoplist_show_advance(one_off,
                                  subject_first,
                                  numwidth,
                                  pos,
                                  width,
                                  topbuf,
                                  top_seqlength,
                                  top_start_pos,
                                  eoplist->ustart + idx,
                                  midbuf,
                                  lowbuf,
                                  low_start_pos,
                                  eoplist->vstart + idx,fp);
    if (pos == 0)
    {
      top_start_pos = eoplist->ustart + idx + 1;
      low_start_pos = eoplist->vstart + idx + 1;
    }
  }
  if (pos > 0)
  {
    gt_eoplist_write_lines(one_off,
                           subject_first,
                           numwidth,
                           pos,
                           topbuf,
                           top_seqlength,
                           top_start_pos,
                           eoplist->ustart + GT_MIN(idx,eoplist->ulen - 1),
                           midbuf,
                           lowbuf,
                           low_start_pos,
                           eoplist->vstart + GT_MIN(idx,eoplist->vlen - 1),
                           fp);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x30(%rsp)
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, 0x38(%rsp)
movq 0x18(%rdx), %r12
movq %rsi, %rdi
callq 0x31999e
movq 0x48(%r13), %rcx
movq %r15, %rdx
subq %rcx, %rdx
testq %r15, %r15
cmoveq %rcx, %rdx
movq %rdx, 0x20(%rsp)
movl %eax, 0xc(%rsp)
movq %r14, 0x40(%rsp)
testq %r14, %r14
setne %al
orb 0x88(%rsp), %al
je 0x319e3c
movq 0x38(%r13), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%r13), %r10
movl 0x20(%rbx), %eax
cmpq %rax, %r10
movl %r10d, %r8d
cmovael %eax, %r8d
leaq (%r12,%r8), %rbx
testl %r8d, %r8d
movq %r8, 0x10(%rsp)
je 0x319caf
movq %rbx, %rdi
movl $0x7c, %esi
movq %r8, %rdx
callq 0x173a0
movq 0x10(%rsp), %r8
movq 0x40(%r13), %r10
testq %r10, %r10
je 0x319dcc
movq 0x98(%rsp), %rsi
leaq (%rbx,%r8), %rbp
xorl %r14d, %r14d
movzbl 0x80(%rsp), %eax
movl %eax, 0x8(%rsp)
movq %rbx, 0x28(%rsp)
movq %r14, %rbx
notq %rbx
xorl %r15d, %r15d
xorl %eax, %eax
leaq (%r14,%r15), %r11
addq %rbx, %r10
cmpb $0x0, 0x88(%rsp)
cmovneq %r11, %r10
movq 0x28(%r13), %rcx
movb (%rcx,%r10), %cl
testq %rsi, %rsi
je 0x319d1e
movb $0x3, %dl
subb %cl, %dl
movzbl %dl, %edx
movzbl %cl, %ecx
cmpb $0x0, 0x90(%rsp)
cmovnel %edx, %ecx
movzbl %cl, %ecx
movb (%rsi,%rcx), %cl
movl %eax, %edx
movb %cl, (%r12,%rdx)
movb %cl, (%rbp,%rdx)
movq 0x38(%r13), %r10
addq %r11, %r10
addq 0x48(%r13), %r11
movq 0x30(%rsp), %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movl %eax, %ecx
movq %r12, %r9
pushq 0x38(%rsp)
pushq %r11
pushq 0x30(%rsp)
pushq %rbp
pushq 0x48(%rsp)
pushq %r10
pushq 0x48(%rsp)
pushq 0x78(%rsp)
callq 0x319a00
addq $0x40, %rsp
testl %eax, %eax
je 0x319d94
movq 0x40(%r13), %r10
decq %rbx
leaq (%r14,%r15), %rcx
incq %rcx
incq %r15
cmpq %r10, %rcx
movq 0x10(%rsp), %r8
movq 0x98(%rsp), %rsi
jb 0x319ce3
jmp 0x319dd2
movq %rbx, %r14
negq %r14
movq 0x38(%r13), %rax
movq 0x40(%r13), %r10
subq %rbx, %rax
movq %rax, 0x18(%rsp)
movq 0x48(%r13), %rax
subq %rbx, %rax
movq %rax, 0x20(%rsp)
cmpq %r10, %r14
movq 0x10(%rsp), %r8
movq 0x98(%rsp), %rsi
jb 0x319cd8
addq $0x48, %rsp
jmp 0x319e31
decq %r10
addq %r15, %r14
cmpq %r10, %r14
cmovbq %r14, %r10
addq 0x38(%r13), %r10
movq 0x50(%r13), %r11
decq %r11
cmpq %r11, %r14
cmovbq %r14, %r11
addq 0x48(%r13), %r11
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
movl %eax, %ecx
movq %r12, %r8
movq 0x48(%rsp), %r9
pushq 0x40(%rsp)
pushq %r11
pushq 0x38(%rsp)
pushq %rbp
pushq 0x50(%rsp)
pushq %r10
pushq 0x50(%rsp)
callq 0x319a5f
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x923eb