// File: /workspace/github_c_makefile_star2_O1/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 $0x78, %rsp
movl %r9d, 0x14(%rsp)
movl %r8d, 0x10(%rsp)
movq %rcx, %r13
movq %rdx, 0x50(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %r15
movl 0x10(%rdi), %r12d
movl 0x14(%rdi), %edi
movl 0x28(%r15), %ebx
callq 0x324b6
movl %eax, %ebp
movl 0x2c(%r15), %edi
callq 0x324b6
movl %eax, %edx
cmpl %eax, %ebp
cmovgl %ebp, %edx
movl 0x38(%r15), %esi
testl %esi, %esi
jle 0x1b4f3
movl 0x10(%r15), %eax
movl 0x28(%r15), %ecx
addl 0x14(%r15), %eax
addl 0x2c(%r15), %ecx
movq %rax, 0x68(%rsp)
incl %eax
movl %eax, 0x4c(%rsp)
leal 0x1(%rdx), %eax
movl %eax, 0x48(%rsp)
movq 0x50(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x70(%rsp)
movq %rcx, 0x60(%rsp)
leal 0x1(%rcx), %eax
movl %eax, 0x44(%rsp)
movslq 0xc(%rsp), %rax
movq %rax, 0x58(%rsp)
xorl %ecx, %ecx
movq %r13, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
subl %ecx, %esi
movl 0xc(%rsp), %eax
cmpl %eax, %esi
cmovgel %eax, %esi
movq %rsi, 0x38(%rsp)
movq %rcx, %r15
leal (%rsi,%rcx), %ebp
movq 0x68(%rsp), %rax
subl %r12d, %eax
leal 0x1(%r12), %ecx
cmpl $0x0, 0x14(%rsp)
cmovnel %eax, %ecx
movq %r13, %rdi
leaq 0x73736(%rip), %rsi     # 0x8ea72
xorl %eax, %eax
callq 0x6a90
movslq %ebp, %rax
cmpl $0x0, 0x38(%rsp)
movq %r15, 0x30(%rsp)
jle 0x1b385
movq %r15, %r14
movq 0x20(%rsp), %r13
movq %rax, %r15
movq 0x40(%r13), %rax
movsbl (%rax,%r14), %ebp
movl %ebp, %edi
movq 0x18(%rsp), %rsi
callq 0x6930
leal -0x2f(%rbp), %eax
cmpb $-0x2, %al
adcl $0x0, %r12d
incq %r14
cmpq %r15, %r14
jl 0x1b35d
jmp 0x1b388
movq %rax, %r15
movl 0x4c(%rsp), %ecx
subl %r12d, %ecx
cmpl $0x0, 0x14(%rsp)
cmovel %r12d, %ecx
movq 0x18(%rsp), %r14
movq %r14, %rdi
leaq 0x736d1(%rip), %rsi     # 0x8ea78
movq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0x6a90
movq %r14, %rdi
movl 0x48(%rsp), %esi
callq 0x2278f
cmpl $0x0, 0x38(%rsp)
movq 0x50(%rsp), %r13
jle 0x1b42d
movq 0x30(%rsp), %rbp
testq %r13, %r13
sete %dl
movq 0x20(%rsp), %rcx
movq 0x40(%rcx), %rax
movq 0x48(%rcx), %rcx
movsbq (%rax,%rbp), %rax
movsbq (%rcx,%rbp), %rcx
movl $0x7c, %edi
cmpb %cl, %al
sete %sil
je 0x1b3ff
movl $0x20, %edi
orb %dl, %sil
jne 0x1b41d
shlq $0xa, %rax
addq 0x70(%rsp), %rax
cmpl $0x0, (%rax,%rcx,4)
movl $0x2b, %edi
jg 0x1b41d
movl $0x20, %edi
movq %r14, %rsi
callq 0x6930
incq %rbp
cmpq %r15, %rbp
jl 0x1b3d0
movl $0xa, %edi
movq %r14, %rsi
callq 0x6930
movq 0x60(%rsp), %rax
subl %ebx, %eax
leal 0x1(%rbx), %ecx
cmpl $0x0, 0x10(%rsp)
cmovnel %eax, %ecx
movq %r14, %rdi
leaq 0x7361c(%rip), %rsi     # 0x8ea72
movq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0x6a90
cmpl $0x0, 0x38(%rsp)
jle 0x1b49d
movq 0x30(%rsp), %r14
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movsbl (%rax,%r14), %ebp
movl %ebp, %edi
movq %r13, %rsi
callq 0x6930
leal -0x2f(%rbp), %eax
cmpb $-0x2, %al
adcl $0x0, %ebx
incq %r14
cmpq %r15, %r14
jl 0x1b473
jmp 0x1b4a2
movq 0x18(%rsp), %r13
movl 0x44(%rsp), %ecx
subl %ebx, %ecx
cmpl $0x0, 0x10(%rsp)
cmovel %ebx, %ecx
movq %r13, %rdi
leaq 0x735be(%rip), %rsi     # 0x8ea78
movq 0x28(%rsp), %r15
movl %r15d, %edx
xorl %eax, %eax
callq 0x6a90
movl $0xa, %edi
movq %r13, %rsi
callq 0x6930
movq 0x30(%rsp), %rcx
addq 0x58(%rsp), %rcx
movq 0x20(%rsp), %rax
movl 0x38(%rax), %esi
cmpl %ecx, %esi
movq %r15, %rdx
jg 0x1b307
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq