// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/psl.c
// Function: pslOutFormat
void pslOutFormat(struct psl *el, FILE *f, char sep, char lastSep) 
/* Print out selected psl values.  Separate fields with sep. Follow last field with lastSep. */
/* Prints out a better format with bold field headings followed by value */
/* Requires further upstream work to ensure that only the field headers */
/* declared here are printed if replacing an existing psl print function*/
{
const char *headers[] = {"Matches", "Mismatches", "Matches in repeats", "Number of N bases", "Query name", "Size", "Start", "End", "Chromosome", "Strand", "Start", "End"};
char *hformat = "<B>%s:</B> "; /* string for formatted print for headers */
char *uformat = "<B>%s:</B> %u%c"; /* string for formatted print for unsigned variable */
char *targName;

fprintf(f, uformat, headers[0], el->match, sep);
fprintf(f, uformat, headers[1], el->misMatch, sep);
fprintf(f, uformat, headers[2], el->repMatch, sep);
fprintf(f, uformat, headers[3], el->nCount, sep);

fprintf(f, hformat, headers[4]);
if (sep == ',') fputc('"',f);
fprintf(f, "%s", el->qName);
if (sep == ',') fputc('"',f);
fputc(sep,f);

fprintf(f, uformat, headers[5], el->qSize, sep);
fprintf(f, uformat, headers[6], el->qStart, sep);
fprintf(f, uformat, headers[7], el->qEnd, sep);

fprintf(f, hformat, headers[8]);
if (sep == ',') fputc('"',f);
/* skip leading 'chr' in string to get only chromosome part */
targName = el->tName;
if (startsWith("chr", el->tName))
   targName += 3;
fprintf(f, "%s", targName);

if (sep == ',') fputc('"',f);
fputc(sep,f);

fprintf(f, hformat, headers[9]);
if (sep == ',') fputc('"',f);
fprintf(f, "%s", el->strand);
if (sep == ',') fputc('"',f);
fputc(sep,f);

fprintf(f, uformat, headers[10], el->tStart, sep);
fprintf(f, uformat, headers[11], el->tEnd, sep);

fputc(lastSep,f);

if (ferror(f))
    {
    perror("Error writing psl file\n");
    errAbort("\n");
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rdi), %ecx
leaq 0x5cbd3(%rip), %r12     # 0x93f05
leaq 0x5cb6b(%rip), %rdx     # 0x93ea4
movq %rsi, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0xc(%r15), %ecx
leaq 0x5cb58(%rip), %rdx     # 0x93eac
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x10(%r15), %ecx
leaq 0x5cb48(%rip), %rdx     # 0x93eb7
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x14(%r15), %ecx
leaq 0x5cb40(%rip), %rdx     # 0x93eca
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
leaq 0x5cb58(%rip), %rsi     # 0x93ef9
leaq 0x5cb34(%rip), %rdx     # 0x93edc
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
cmpb $0x2c, %r14b
jne 0x373e0
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
movq 0x30(%r15), %rdi
movq %rbx, %rsi
callq 0x6810
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
jmp 0x373ec
movq 0x30(%r15), %rdi
movq %rbx, %rsi
callq 0x6810
movl %r14d, %edi
movq %rbx, %rsi
callq 0x6930
movl 0x38(%r15), %ecx
leaq 0x5cb03(%rip), %r12     # 0x93f05
leaq 0x55fdd(%rip), %rdx     # 0x8d3e6
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x3c(%r15), %ecx
leaq 0x5a9a9(%rip), %rdx     # 0x91dcd
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x40(%r15), %ecx
leaq 0x564a6(%rip), %rdx     # 0x8d8e5
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
leaq 0x5caa3(%rip), %rsi     # 0x93ef9
leaq 0x5ca8a(%rip), %rdx     # 0x93ee7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
cmpb $0x2c, %r14b
jne 0x374ff
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
movq 0x48(%r15), %r12
leaq 0x59bb5(%rip), %rdi     # 0x9103e
movq %r12, %rsi
callq 0x21b23
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq (%rcx,%rcx,2), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x6810
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
movl %r14d, %edi
movq %rbx, %rsi
callq 0x6930
leaq 0x5ca33(%rip), %rsi     # 0x93ef9
leaq 0x5ca25(%rip), %rdx     # 0x93ef2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
leaq 0x28(%r15), %rdi
movq %rbx, %rsi
callq 0x6810
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
jmp 0x37557
movq 0x48(%r15), %r12
leaq 0x59b34(%rip), %rdi     # 0x9103e
movq %r12, %rsi
callq 0x21b23
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq (%rcx,%rcx,2), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x6810
movl %r14d, %edi
movq %rbx, %rsi
callq 0x6930
leaq 0x5c9bf(%rip), %rsi     # 0x93ef9
leaq 0x5c9b1(%rip), %rdx     # 0x93ef2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
leaq 0x28(%r15), %rdi
movq %rbx, %rsi
callq 0x6810
movl %r14d, %edi
movq %rbx, %rsi
callq 0x6930
movl 0x54(%r15), %ecx
leaq 0x5c998(%rip), %r12     # 0x93f05
leaq 0x5a859(%rip), %rdx     # 0x91dcd
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x58(%r15), %ecx
leaq 0x56356(%rip), %rdx     # 0x8d8e5
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movsbl %bpl, %edi
movq %rbx, %rsi
callq 0x6930
movq %rbx, %rdi
callq 0x6e00
testl %eax, %eax
jne 0x375c0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x6fa6
jmp 0x375b7