// File: /workspace/github_c_makefile_star2_O2/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, 0x18(%rsp)
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, 0x20(%rsp)
movq 0x18(%rdx), %r12
movq %rsi, %rdi
callq 0x2b9a9d
movq 0x48(%r13), %rcx
movq %r14, %rdx
subq %rcx, %rdx
testq %r14, %r14
cmoveq %rcx, %rdx
movq %rdx, 0x10(%rsp)
movl %eax, 0x4(%rsp)
movq %rbx, 0x28(%rsp)
testq %rbx, %rbx
setne %al
orb 0x78(%rsp), %al
je 0x2b9feb
movq 0x88(%rsp), %rdi
movb 0x70(%rsp), %cl
movq 0x38(%r13), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%r13), %rdx
movl 0x20(%r15), %eax
cmpq %rax, %rdx
cmovael %eax, %edx
leaq (%r12,%rdx), %rbp
movq %rdx, 0x30(%rsp)
movq %rdx, %rax
negq %rax
xorl %edx, %edx
movq %rax, %rsi
addq %rdx, %rsi
je 0x2b9e9d
movb $0x7c, (%rbp,%rdx)
incq %rdx
jmp 0x2b9e8b
movq 0x30(%rsp), %rax
leaq (%rax,%rbp), %rbx
xorl %eax, %eax
movzbl %cl, %ecx
movl %ecx, (%rsp)
xorl %r15d, %r15d
movq %r15, %r14
notq %r14
movq 0x40(%r13), %r10
cmpq %r10, %r15
jae 0x2b9f80
addq %r14, %r10
cmpb $0x0, 0x78(%rsp)
cmovneq %r15, %r10
movq 0x28(%r13), %rcx
movb (%rcx,%r10), %cl
testq %rdi, %rdi
je 0x2b9ef8
movb $0x3, %dl
subb %cl, %dl
movzbl %dl, %edx
movzbl %cl, %ecx
cmpb $0x0, 0x80(%rsp)
cmovnel %edx, %ecx
movzbl %cl, %ecx
movb (%rdi,%rcx), %cl
movl %eax, %edx
movb %cl, (%r12,%rdx)
movb %cl, (%rbx,%rdx)
movq 0x38(%r13), %r10
addq %r15, %r10
movq 0x48(%r13), %r11
addq %r15, %r11
movq 0x18(%rsp), %rdi
movl (%rsp), %esi
movl 0x4(%rsp), %edx
movl %eax, %ecx
movq 0x30(%rsp), %r8
movq %r12, %r9
pushq 0x20(%rsp)
pushq %r11
pushq 0x20(%rsp)
pushq %rbx
pushq %rbp
pushq %r10
pushq 0x38(%rsp)
pushq 0x60(%rsp)
callq 0x2b9b32
addq $0x40, %rsp
incq %r15
testl %eax, %eax
je 0x2b9f5b
decq %r14
movq 0x88(%rsp), %rdi
jmp 0x2b9eb7
movq 0x38(%r13), %rcx
addq %r15, %rcx
movq %rcx, 0x8(%rsp)
movq 0x48(%r13), %rcx
addq %r15, %rcx
movq %rcx, 0x10(%rsp)
movq 0x88(%rsp), %rdi
jmp 0x2b9eb1
testl %eax, %eax
je 0x2b9fdc
decq %r10
cmpq %r10, %r15
cmovbq %r15, %r10
addq 0x38(%r13), %r10
movq 0x50(%r13), %r11
decq %r11
cmpq %r11, %r15
cmovbq %r15, %r11
addq 0x48(%r13), %r11
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movl %eax, %ecx
movq %r12, %r8
movq 0x30(%rsp), %r9
pushq 0x28(%rsp)
pushq %r11
pushq 0x28(%rsp)
pushq %rbx
pushq %rbp
pushq %r10
pushq 0x40(%rsp)
callq 0x2b9bed
addq $0x78, %rsp
jmp 0x2b9fe0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x17df76(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b017(%rip), %rsi     # 0x2e5013
leaq 0xc935f(%rip), %rdx     # 0x383362
leaq 0xc9481(%rip), %rcx     # 0x38348b
leaq 0xc8fbf(%rip), %r8      # 0x382fd0
movl $0x4a0, %r9d            # imm = 0x4A0
xorl %eax, %eax
callq 0x17a50
callq 0x17390