// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/blastOut.c
// Function: blastiodAxtOutput
static void blastiodAxtOutput(FILE *f, struct axt *axt, int tSize, int qSize, 
	int lineSize, boolean isProt, boolean isTranslated)
/* Output base-by-base part of alignment in blast-like fashion. */
{
int tOff = axt->tStart;
int dt = (isTranslated ? 3 : 1);
int qOff = axt->qStart;
int lineStart, lineEnd, i;
int digits = calcDigitCount(axt, tSize, qSize);
struct axtScoreScheme *ss = NULL;

if (isProt)
    ss = axtScoreSchemeProteinDefault();
for (lineStart = 0; lineStart < axt->symCount; lineStart = lineEnd)
    {
    lineEnd = lineStart + lineSize;
    if (lineEnd > axt->symCount) lineEnd = axt->symCount;
    fprintf(f, "Query: %-*d ", digits, plusStrandPos(qOff, qSize, axt->qStrand, FALSE));
    for (i=lineStart; i<lineEnd; ++i)
	{
	char c = axt->qSym[i];
	fputc(c, f);
	if (c != '-')
	    ++qOff;
	}
    fprintf(f, " %-d\n", plusStrandPos(qOff, qSize, axt->qStrand, TRUE));
    fprintf(f, "       %*s ", digits, " ");
    for (i=lineStart; i<lineEnd; ++i)
        {
	char q, t, c;
	q = axt->qSym[i];
	t = axt->tSym[i];
	if (isProt)
	    {
	    if (q == t)
	        c = q;
	    else if (ss->matrix[(int)q][(int)t] > 0)
	        c = '+';
	    else
	        c = ' ';
	    }
	else
	    c = ((toupper(q) == toupper(t)) ? '|' : ' ');

	fputc(c, f);
	}
    fprintf(f, "\n");
    fprintf(f, "Sbjct: %-*d ", digits, plusStrandPos(tOff, tSize, axt->tStrand, FALSE));
    for (i=lineStart; i<lineEnd; ++i)
	{
	char c = axt->tSym[i];
	fputc(c, f);
	if (c != '-')
	    tOff += dt;
	}
    fprintf(f, " %-d\n", plusStrandPos(tOff, tSize, axt->tStrand, TRUE));
    fprintf(f, "\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, 0x1c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, %r13
movq %rdi, %r12
xorl %ebx, %ebx
testl %r9d, %r9d
setne %al
movl 0x10(%rsi), %ebp
cmpb $0x2d, 0x18(%rsi)
movq %rcx, 0x28(%rsp)
movb %al, 0x8(%rsp)
jne 0x1ded2
movl %ecx, %edi
subl %ebp, %edi
incl %edi
jmp 0x1ded6
movl 0x14(%r13), %edi
movl 0x28(%r13), %r14d
callq 0x324b6
movl %eax, %r15d
cmpb $0x2d, 0x30(%r13)
jne 0x1def8
movq 0x30(%rsp), %rax
movl %eax, %edi
subl 0x28(%r13), %edi
incl %edi
jmp 0x1defc
movl 0x2c(%r13), %edi
callq 0x324b6
cmpl %r15d, %eax
cmovgl %eax, %r15d
movl %r15d, (%rsp)
cmpl $0x0, 0x1c(%rsp)
je 0x1df21
xorl %eax, %eax
callq 0x1a986
movq %rax, 0x38(%rsp)
jmp 0x1df2a
movq $0x0, 0x38(%rsp)
movq 0x28(%rsp), %rsi
movl 0x38(%r13), %ecx
testl %ecx, %ecx
jle 0x1e192
movb 0x8(%rsp), %al
movb %al, %bl
leal 0x1(,%rbx,2), %r15d
leal 0x1(%rsi), %eax
movl %eax, 0x4c(%rsp)
addq $0x8, 0x38(%rsp)
movq 0x30(%rsp), %rax
incl %eax
movl %eax, 0x48(%rsp)
xorl %edx, %edx
movq %r13, 0x40(%rsp)
movq %r12, 0x10(%rsp)
movl %r15d, 0x54(%rsp)
movq %rdx, 0x20(%rsp)
movl %ecx, 0x4(%rsp)
leal 0x3c(%rdx), %ebx
cmpl %ecx, %ebx
cmovgel %ecx, %ebx
movl %esi, %eax
subl %ebp, %eax
leal 0x1(%rbp), %ecx
cmpb $0x2d, 0x18(%r13)
cmovel %eax, %ecx
movq %r12, %rdi
leaq 0x712bf(%rip), %rsi     # 0x8f25b
movl (%rsp), %edx
xorl %eax, %eax
callq 0x6a90
movq 0x20(%rsp), %rax
movl %ebx, 0x50(%rsp)
movslq %ebx, %r12
cmpl %eax, 0x4(%rsp)
movq %r12, 0x8(%rsp)
jle 0x1dff2
movslq %eax, %r15
movq 0x10(%rsp), %rbx
movq 0x40(%r13), %rax
movsbl (%rax,%r15), %edi
xorl %r12d, %r12d
cmpl $0x2d, %edi
setne %r12b
movq %rbx, %rsi
callq 0x6930
addl %r12d, %ebp
movq 0x8(%rsp), %r12
incq %r15
cmpq %r12, %r15
jl 0x1dfc5
jmp 0x1dff7
movq 0x10(%rsp), %rbx
movl 0x4c(%rsp), %edx
subl %ebp, %edx
cmpb $0x2d, 0x18(%r13)
cmovnel %ebp, %edx
movq %rbx, %rdi
leaq 0x71259(%rip), %rsi     # 0x8f268
xorl %eax, %eax
callq 0x6a90
movq %rbx, %rdi
leaq 0x7124e(%rip), %rsi     # 0x8f26e
movl (%rsp), %edx
leaq 0x703c8(%rip), %rcx     # 0x8e3f2
xorl %eax, %eax
callq 0x6a90
movq 0x20(%rsp), %rax
cmpl %eax, 0x4(%rsp)
jle 0x1e0b7
movslq 0x20(%rsp), %r15
movq 0x40(%r13), %rax
movq 0x48(%r13), %rcx
movb (%rax,%r15), %al
movsbq %al, %r12
movsbq (%rcx,%r15), %r13
cmpl $0x0, 0x1c(%rsp)
je 0x1e079
cmpb %r13b, %al
je 0x1e095
shlq $0xa, %r12
addq 0x38(%rsp), %r12
cmpl $0x0, (%r12,%r13,4)
movl $0x2b, %eax
jle 0x1e090
jmp 0x1e095
callq 0x6100
movq (%rax), %rcx
movl (%rcx,%r12,4), %edx
movl $0x7c, %eax
cmpl (%rcx,%r13,4), %edx
je 0x1e095
movl $0x20, %eax
movsbl %al, %edi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x6930
incq %r15
movq 0x8(%rsp), %r12
cmpq %r12, %r15
movq 0x40(%rsp), %r13
jl 0x1e041
movq %rbp, 0x8(%rsp)
movl $0xa, %edi
movq %rbx, %rsi
callq 0x6930
movq 0x30(%rsp), %rax
subl %r14d, %eax
leal 0x1(%r14), %ecx
cmpb $0x2d, 0x30(%r13)
cmovel %eax, %ecx
movq %rbx, %rdi
leaq 0x71193(%rip), %rsi     # 0x8f27a
movl (%rsp), %edx
xorl %eax, %eax
callq 0x6a90
movq 0x20(%rsp), %rax
cmpl %eax, 0x4(%rsp)
jle 0x1e13a
movslq %eax, %r13
movq 0x40(%rsp), %rbx
movq 0x10(%rsp), %rbp
movq 0x48(%rbx), %rax
movsbl (%rax,%r13), %r15d
movl %r15d, %edi
movq %rbp, %rsi
callq 0x6930
cmpl $0x2d, %r15d
movl 0x54(%rsp), %eax
movl $0x0, %ecx
cmovel %ecx, %eax
addl %eax, %r14d
incq %r13
cmpq %r12, %r13
jl 0x1e109
jmp 0x1e144
movq 0x40(%rsp), %rbx
movq 0x10(%rsp), %rbp
movl 0x48(%rsp), %edx
subl %r14d, %edx
cmpb $0x2d, 0x30(%rbx)
cmovnel %r14d, %edx
movq %rbp, %rdi
leaq 0x7110b(%rip), %rsi     # 0x8f268
xorl %eax, %eax
callq 0x6a90
movl $0xa, %edi
movq %rbp, %rsi
callq 0x6930
movl 0x38(%rbx), %ecx
movl 0x50(%rsp), %eax
movl %eax, %edx
cmpl %ecx, %eax
movq %rbx, %r13
movq %rbp, %r12
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbp
jl 0x1df72
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq