// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/axt.c
// Function: axtPrintTraditionalExtra
void axtPrintTraditionalExtra(struct axt *axt, int maxLine,
			      struct axtScoreScheme *ss, FILE *f,
			      boolean reverseTPos, boolean reverseQPos)
/* Print out an alignment with line-breaks.  If reverseTPos is true, then
 * the sequence has been reverse complemented, so show the coords starting
 * at tEnd and decrementing down to tStart; likewise for reverseQPos. */
{
int qPos = axt->qStart;
int tPos = axt->tStart;
int symPos;
int aDigits = digitsBaseTen(axt->qEnd);
int bDigits = digitsBaseTen(axt->tEnd);
int digits = max(aDigits, bDigits);
int qFlipOff = axt->qEnd + axt->qStart;
int tFlipOff = axt->tEnd + axt->tStart;

for (symPos = 0; symPos < axt->symCount; symPos += maxLine)
    {
    /* Figure out which part of axt to use for this line. */
    int lineSize = axt->symCount - symPos;
    int lineEnd, i;
    if (lineSize > maxLine)
        lineSize = maxLine;
    lineEnd = symPos + lineSize;

    /* Draw query line including numbers. */
    fprintf(f, "%0*d ", digits, (reverseQPos ? qFlipOff - qPos: qPos+1));
    for (i=symPos; i<lineEnd; ++i)
        {
    char c = axt->qSym[i];
    fputc(c, f);
    if (c != '.' && c != '-')
        ++qPos;
    }
    fprintf(f, " %0*d\n", digits, (reverseQPos? qFlipOff - qPos + 1 : qPos));

    /* Draw line with match/mismatch symbols. */
    spaceOut(f, digits+1);
    for (i=symPos; i<lineEnd; ++i)
        {
    char q = axt->qSym[i];
    char t = axt->tSym[i];
    char out = ' ';
    if (q == t)
        out = '|';
    else if (ss != NULL && ss->matrix[(int)q][(int)t] > 0)
        out = '+';
    fputc(out, f);
    }
    fputc('\n', f);

    /* Draw target line including numbers. */
    fprintf(f, "%0*d ", digits, (reverseTPos ? tFlipOff - tPos : tPos+1));
    for (i=symPos; i<lineEnd; ++i)
        {
    char c = axt->tSym[i];
    fputc(c, f);
    if (c != '.' && c != '-')
        ++tPos;
    }
    fprintf(f, " %0*d\n", digits, (reverseTPos ? tFlipOff - tPos + 1: tPos));

    /* Draw extra empty line. */
    fputc('\n', f);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r13
movl 0x10(%rdi), %eax
movq %rax, 0x18(%rsp)
movl 0x14(%rdi), %edi
movl 0x28(%r13), %ebx
callq 0x2d0d3
movl %eax, %r12d
movl 0x2c(%r13), %edi
callq 0x2d0d3
cmpl %eax, %r12d
cmovgl %r12d, %eax
movl 0x10(%r13), %edi
movl 0x14(%r13), %ecx
leal (%rdi,%rcx), %edx
movl %edx, 0x38(%rsp)
movl 0x2c(%r13), %edx
movl 0x28(%r13), %esi
leal (%rsi,%rdx), %r8d
movl %r8d, 0x34(%rsp)
leal 0x1(%rdi,%rcx), %ecx
movl %ecx, 0x30(%rsp)
movq %rax, 0x10(%rsp)
incl %eax
movl %eax, 0x2c(%rsp)
leaq 0x8(%r15), %rax
movq %rax, 0x50(%rsp)
leal 0x1(%rsi,%rdx), %eax
movl %eax, 0x28(%rsp)
movl %ebp, 0x3c(%rsp)
movslq %ebp, %rax
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
movq %r15, 0x48(%rsp)
movl 0x38(%r13), %ebp
subl %r12d, %ebp
jle 0x18163
movl 0x3c(%rsp), %eax
cmpl %eax, %ebp
cmovgel %eax, %ebp
addl %r12d, %ebp
movl 0x38(%rsp), %eax
movq 0x18(%rsp), %rcx
subl %ecx, %eax
incl %ecx
cmpl $0x0, 0xc(%rsp)
cmovnel %eax, %ecx
movq %r14, %rdi
leaq 0x65a73(%rip), %rsi     # 0x7da68
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x6a90
movslq %ebp, %r15
movq %r12, 0x20(%rsp)
cmpq %r15, %r12
jge 0x18038
movq 0x40(%r13), %rax
movsbl (%rax,%r12), %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x6930
leal -0x2f(%rbp), %eax
cmpb $-0x2, %al
movq 0x18(%rsp), %rax
adcl $0x0, %eax
movq %rax, 0x18(%rsp)
incq %r12
jmp 0x18009
movl 0x30(%rsp), %ecx
movq 0x18(%rsp), %rax
subl %eax, %ecx
cmpl $0x0, 0xc(%rsp)
cmovel %eax, %ecx
movq %r14, %rdi
leaq 0x65a19(%rip), %rsi     # 0x7da6e
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x6a90
movq %r14, %rdi
movl 0x2c(%rsp), %esi
callq 0x1e8d8
movq 0x20(%rsp), %rbp
movq 0x48(%rsp), %r12
cmpq %r15, %rbp
jge 0x180c9
testq %r12, %r12
sete %dl
movq 0x40(%r13), %rax
movq 0x48(%r13), %rcx
movsbq (%rax,%rbp), %rax
movsbq (%rcx,%rbp), %rcx
pushq $0x7c
popq %rdi
cmpb %cl, %al
sete %sil
je 0x180a2
pushq $0x20
popq %rdi
orb %dl, %sil
jne 0x180bc
shlq $0xa, %rax
addq 0x50(%rsp), %rax
cmpl $0x0, (%rax,%rcx,4)
pushq $0x2b
popq %rdi
jg 0x180bc
pushq $0x20
popq %rdi
movq %r14, %rsi
callq 0x6930
incq %rbp
jmp 0x18077
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x6930
movl 0x34(%rsp), %eax
subl %ebx, %eax
leal 0x1(%rbx), %ecx
cmpl $0x0, 0x8(%rsp)
cmovnel %eax, %ecx
movq %r14, %rdi
leaq 0x65979(%rip), %rsi     # 0x7da68
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x6a90
movq 0x20(%rsp), %r12
cmpq %r15, %r12
jge 0x18125
movq 0x48(%r13), %rax
movsbl (%rax,%r12), %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x6930
leal -0x2f(%rbp), %eax
cmpb $-0x2, %al
adcl $0x0, %ebx
incq %r12
jmp 0x18100
movl 0x28(%rsp), %ecx
subl %ebx, %ecx
cmpl $0x0, 0x8(%rsp)
cmovel %ebx, %ecx
movq %r14, %rdi
leaq 0x65931(%rip), %rsi     # 0x7da6e
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x6a90
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x6930
movq 0x20(%rsp), %r12
addq 0x40(%rsp), %r12
jmp 0x17fbd
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq