// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movq %r9, 0x20(%rsp)
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, 0x28(%rsp)
movq 0x18(%rdx), %r12
movq %rsi, %rdi
callq 0x323cb5
movq 0x48(%r13), %rcx
movq %rbx, %rdx
subq %rcx, %rdx
testq %rbx, %rbx
cmoveq %rcx, %rdx
movq %rdx, 0x10(%rsp)
movl %eax, 0x4(%rsp)
movq %r14, 0x30(%rsp)
testq %r14, %r14
setne %al
orb 0x78(%rsp), %al
je 0x32411f
movb 0x70(%rsp), %bpl
movq 0x38(%r13), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%r13), %rbx
movl 0x20(%r15), %eax
cmpq %rax, %rbx
cmovael %eax, %ebx
leaq (%r12,%rbx), %r11
testl %ebx, %ebx
movq %r11, 0x18(%rsp)
je 0x323fc0
movq %r11, %rdi
movl $0x7c, %esi
movq %rbx, %rdx
callq 0x173a0
movq 0x18(%rsp), %r11
leaq (%r11,%rbx), %r15
movq 0x40(%r13), %rax
movzbl %bpl, %ecx
movl %ecx, (%rsp)
testq %rax, %rax
je 0x3240b0
movq 0x88(%rsp), %rsi
xorl %r14d, %r14d
movq $-0x1, %rbp
xorl %ecx, %ecx
addq %rbp, %rax
cmpb $0x0, 0x78(%rsp)
cmovneq %r14, %rax
movq 0x28(%r13), %rdx
movb (%rdx,%rax), %al
testq %rsi, %rsi
je 0x32401f
movb $0x3, %dl
subb %al, %dl
movzbl %dl, %edx
movzbl %al, %eax
cmpb $0x0, 0x80(%rsp)
cmovnel %edx, %eax
movzbl %al, %eax
movb (%rsi,%rax), %al
movl %ecx, %edx
movb %al, (%r12,%rdx)
movb %al, (%r15,%rdx)
movq 0x38(%r13), %rax
addq %r14, %rax
movq 0x48(%r13), %r10
addq %r14, %r10
movq 0x20(%rsp), %rdi
movl (%rsp), %esi
movl 0x4(%rsp), %edx
movl %ebx, %r8d
movq %r12, %r9
pushq 0x28(%rsp)
pushq %r10
pushq 0x20(%rsp)
pushq %r15
pushq %r11
pushq %rax
pushq 0x38(%rsp)
pushq 0x68(%rsp)
callq 0x323d17
addq $0x40, %rsp
movl %eax, %ecx
testl %eax, %eax
jne 0x32408e
movq 0x38(%r13), %rax
movq 0x48(%r13), %rdx
addq %r14, %rax
incq %rax
movq %rax, 0x8(%rsp)
leaq (%r14,%rdx), %rax
incq %rax
movq %rax, 0x10(%rsp)
incq %r14
movq 0x40(%r13), %rax
decq %rbp
cmpq %rax, %r14
movq 0x18(%rsp), %r11
movq 0x88(%rsp), %rsi
jb 0x323fec
jmp 0x3240b5
xorl %ecx, %ecx
xorl %r14d, %r14d
testl %ecx, %ecx
je 0x324110
decq %rax
cmpq %rax, %r14
cmovbq %r14, %rax
addq 0x38(%r13), %rax
movq 0x50(%r13), %r10
decq %r10
cmpq %r10, %r14
cmovbq %r14, %r10
addq 0x48(%r13), %r10
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movq %r12, %r8
movq 0x38(%rsp), %r9
pushq 0x30(%rsp)
pushq %r10
pushq 0x28(%rsp)
pushq %r15
pushq %r11
pushq %rax
pushq 0x40(%rsp)
callq 0x323d76
addq $0x78, %rsp
jmp 0x324114
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x942fe