// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: Alignment_Cartoon
void Alignment_Cartoon(FILE *file, Alignment *align, int indent, int coord)
{ int   alen = align->alen;
  int   blen = align->blen;
  Path *path = align->path;
  int   comp = COMP(align->flags);
  int   w;

  fprintf(file,"%*s",indent,"");
  if (path->abpos > 0)
    fprintf(file,"    %*d ",coord,path->abpos);
  else
    fprintf(file,"%*s",coord+5,"");
  if (path->aepos < alen)
    fprintf(file,"%*s%d",coord+8,"",alen-path->aepos);
  fprintf(file,"\n");

  fprintf(file,"%*s",indent,"");
  if (path->abpos > 0)
    { fprintf(file,"A ");
      w = Number_Digits((int64) path->abpos);
      repchar(file,' ',coord-w);
      repchar(file,'=',w+3);
      fputc('+',file);
      repchar(file,'-',coord+5);
    }
  else
    { fprintf(file,"A %*s",coord+4,"");
      repchar(file,'-',coord+5);
    }

  if (path->aepos < alen)
    { fputc('+',file);
      w = Number_Digits((int64) (alen-path->aepos));
      repchar(file,'=',w+2);
      fputc('>',file);
      repchar(file,' ',w);
    }
  else
    { fputc('>',file);
      repchar(file,' ',coord+3);
    }

  { int asub, bsub;

    asub = path->aepos - path->abpos;
    bsub = path->bepos - path->bbpos;
    fprintf(file,"   dif/(len1+len2) = %d/(%d+%d) = %5.2f%%\n",
                 path->diffs,asub,bsub,(200.*path->diffs)/(asub+bsub));
  }

  { int   sym1e, sym2e;
    int   sym1p, sym2p;

    if (comp > 0)
      { sym1p = '<'; sym2p = '-'; sym1e = '<'; sym2e = '='; }
    else
      { sym1p = '-'; sym2p = '>'; sym1e = '='; sym2e = '>'; }

    fprintf(file,"%*s",indent,"");
    if (path->bbpos > 0)
      { fprintf(file,"B ");
        w = Number_Digits((int64) path->bbpos);
        repchar(file,' ',coord-w);
        fputc(sym1e,file);
        repchar(file,'=',w+2);
        fputc('+',file);
        repchar(file,'-',coord+5);
      }
    else
      { fprintf(file,"B ");
        repchar(file,' ',coord+3);
        fputc(sym1p,file);
        repchar(file,'-',coord+5);
      }
    if (path->bepos < blen)
      { fprintf(file,"+");
        w = Number_Digits((int64) (blen-path->bepos));
        repchar(file,'=',w+2);
        fprintf(file,"%c\n",sym2e);
      }
    else
      fprintf(file,"%c\n",sym2p);
  }

  fprintf(file,"%*s",indent,"");
  if (path->bbpos > 0)
    fprintf(file,"    %*d ",coord,path->bbpos);
  else
    fprintf(file,"%*s",coord+5,"");
  if (path->bepos < blen)
    fprintf(file,"%*s%d",coord+8,"",blen-path->bepos);
  fprintf(file,"\n");

  fflush(file);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r13d
movq %rdi, %rbx
movslq 0x20(%rsi), %rbp
movslq 0x24(%rsi), %rax
movq %rax, 0x20(%rsp)
movq (%rsi), %r14
movl 0x8(%rsi), %r12d
leaq 0xa8fc(%rip), %rsi      # 0x18586
leaq 0xb1fe(%rip), %rcx      # 0x18e8f
movl %edx, 0xc(%rsp)
xorl %eax, %eax
callq 0x11a0
movl 0x10(%r14), %ecx
testl %ecx, %ecx
jle 0xdcba
leaq 0xa967(%rip), %rsi      # 0x18612
movq %rbx, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0x11a0
jmp 0xdcd6
leal 0x5(%r13), %edx
leaq 0xa8c1(%rip), %rsi      # 0x18586
leaq 0xb1c3(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11a0
movl 0x18(%r14), %eax
cmpl %eax, %ebp
jle 0xdd00
leal 0x8(%r13), %edx
movl %ebp, %r8d
subl %eax, %r8d
leaq 0xa92c(%rip), %rsi      # 0x1861b
leaq 0xb199(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11a0
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x1170
leaq 0xa874(%rip), %rsi      # 0x18586
leaq 0xb176(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x11a0
cmpl $0x0, 0x10(%r14)
jle 0xdd7e
leaq 0xa8ec(%rip), %rdi      # 0x18621
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1290
movslq 0x10(%r14), %rdi
callq 0x114a8
movl %eax, %r15d
movl %r13d, %edx
subl %eax, %edx
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xe01f
addl $0x3, %r15d
pushq $0x3d
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0xe01f
pushq $0x2b
popq %rdi
movq %rbx, %rsi
callq 0x1170
jmp 0xdd9a
leal 0x4(%r13), %edx
leaq 0xa89b(%rip), %rsi      # 0x18624
leaq 0xb0ff(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11a0
andl $0x1, %r12d
leal 0x5(%r13), %edx
pushq $0x2d
popq %rsi
movq %rbx, %rdi
movl %edx, 0x1c(%rsp)
callq 0xe01f
pushq $0x3e
popq %rax
movl %eax, 0x8(%rsp)
cmpl %ebp, 0x18(%r14)
movq %r13, 0x10(%rsp)
jge 0xddfa
pushq $0x2b
popq %rdi
movq %rbx, %rsi
callq 0x1170
movslq 0x18(%r14), %rax
subq %rax, %rbp
movq %rbp, %rdi
callq 0x114a8
movl %eax, %ebp
leal 0x2(%rbp), %edx
pushq $0x3d
popq %rsi
movq %rbx, %rdi
callq 0xe01f
pushq $0x3e
popq %rdi
movq %rbx, %rsi
callq 0x1170
jmp 0xde09
pushq $0x3e
popq %rdi
movq %rbx, %rsi
callq 0x1170
leal 0x3(%r13), %ebp
pushq $0x20
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0xe01f
movl 0x18(%r14), %ecx
subl 0x10(%r14), %ecx
movl 0xc(%r14), %edx
movl 0x1c(%r14), %r8d
subl 0x14(%r14), %r8d
cvtsi2sd %edx, %xmm0
mulsd 0xa602(%rip), %xmm0     # 0x18438
leal (%r8,%rcx), %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
leaq 0xa7e1(%rip), %rsi      # 0x1862a
movq %rbx, %rdi
movb $0x1, %al
callq 0x11a0
xorl %r15d, %r15d
testl %r12d, %r12d
sete 0x7(%rsp)
movl 0x8(%rsp), %eax
pushq $0x2d
popq %r13
cmovnel %r13d, %eax
movl %eax, 0x8(%rsp)
leaq 0xa711(%rip), %rsi      # 0x18586
leaq 0xb013(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x11a0
movl 0x14(%r14), %ebp
leaq 0xa7c0(%rip), %rdi      # 0x18655
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1290
testl %ebp, %ebp
jle 0xdee9
pushq $0x2b
popq %rbp
xorl $0x3d, %r12d
movslq 0x14(%r14), %rdi
callq 0x114a8
movl %eax, %r13d
movq 0x10(%rsp), %rax
movl %eax, %edx
subl %r13d, %edx
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xe01f
movl %r12d, %edi
movq %rbx, %rsi
callq 0x1170
addl $0x2, %r13d
pushq $0x3d
popq %rsi
movq %rbx, %rdi
movl %r13d, %edx
jmp 0xdf01
testl %r12d, %r12d
pushq $0x3c
popq %rbp
cmovel %r13d, %ebp
movq 0x10(%rsp), %rax
leal 0x3(%rax), %edx
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xe01f
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1170
pushq $0x2d
popq %rsi
movq %rbx, %rdi
movl 0x1c(%rsp), %ebp
movl %ebp, %edx
callq 0xe01f
movq 0x20(%rsp), %r13
cmpl %r13d, 0x1c(%r14)
movl 0x8(%rsp), %edx
jge 0xdf66
movb 0x7(%rsp), %al
movb %al, %r15b
addl $0x3d, %r15d
pushq $0x2b
popq %rdi
movq %rbx, %rsi
callq 0x1170
movslq 0x1c(%r14), %rax
movq %r13, %rdi
subq %rax, %rdi
callq 0x114a8
leal 0x2(%rax), %edx
pushq $0x3d
popq %rsi
movq %rbx, %rdi
callq 0xe01f
movl %r15d, %edx
leaq 0xa6eb(%rip), %rsi      # 0x18658
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11a0
leaq 0xa608(%rip), %rsi      # 0x18586
leaq 0xaf0a(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x11a0
movl 0x14(%r14), %ecx
testl %ecx, %ecx
movq 0x10(%rsp), %r15
jle 0xdfb6
leaq 0xa66b(%rip), %rsi      # 0x18612
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x11a0
jmp 0xdfd0
leaq 0xa5c9(%rip), %rsi      # 0x18586
leaq 0xaecb(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x11a0
movl 0x1c(%r14), %eax
cmpl %eax, %r13d
jle 0xdffe
addl $0x8, %r15d
subl %eax, %r13d
leaq 0xa634(%rip), %rsi      # 0x1861b
leaq 0xaea1(%rip), %rcx      # 0x18e8f
movq %rbx, %rdi
movl %r15d, %edx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x11a0
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x1170
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1200