// File: /workspace/github_c_makefile_star2_O1/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 0x5ce02(%rip), %r12     # 0x93e35
leaq 0x5cd9a(%rip), %rdx     # 0x93dd4
movq %rsi, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0xc(%r15), %ecx
leaq 0x5cd87(%rip), %rdx     # 0x93ddc
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x10(%r15), %ecx
leaq 0x5cd77(%rip), %rdx     # 0x93de7
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x14(%r15), %ecx
leaq 0x5cd6f(%rip), %rdx     # 0x93dfa
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
leaq 0x5cd87(%rip), %rsi     # 0x93e29
leaq 0x5cd63(%rip), %rdx     # 0x93e0c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
cmpb $0x2c, %r14b
jne 0x370e1
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 0x370ed
movq 0x30(%r15), %rdi
movq %rbx, %rsi
callq 0x6810
movl %r14d, %edi
movq %rbx, %rsi
callq 0x6930
movl 0x38(%r15), %ecx
leaq 0x5cd32(%rip), %r12     # 0x93e35
leaq 0x562dc(%rip), %rdx     # 0x8d3e6
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x3c(%r15), %ecx
leaq 0x5abb8(%rip), %rdx     # 0x91cdd
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x40(%r15), %ecx
leaq 0x567a5(%rip), %rdx     # 0x8d8e5
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
leaq 0x5ccd2(%rip), %rsi     # 0x93e29
leaq 0x5ccb9(%rip), %rdx     # 0x93e17
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
cmpb $0x2c, %r14b
jne 0x371e3
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
movq 0x48(%r15), %r12
leaq 0x59dc8(%rip), %rdi     # 0x90f4e
movq %r12, %rsi
callq 0x217c8
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 0x5cc66(%rip), %rsi     # 0x93e29
leaq 0x5cc58(%rip), %rdx     # 0x93e22
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
jmp 0x3722f
movq 0x48(%r15), %r12
leaq 0x59d60(%rip), %rdi     # 0x90f4e
movq %r12, %rsi
callq 0x217c8
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 0x5cc0b(%rip), %rsi     # 0x93e29
leaq 0x5cbfd(%rip), %rdx     # 0x93e22
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
leaq 0x28(%r15), %rdi
movq %rbx, %rsi
callq 0x6810
cmpb $0x2c, %r14b
jne 0x3724e
movl $0x22, %edi
movq %rbx, %rsi
callq 0x6930
movl %r14d, %edi
movq %rbx, %rsi
callq 0x6930
movl 0x54(%r15), %ecx
leaq 0x5cbd1(%rip), %r12     # 0x93e35
leaq 0x5aa72(%rip), %rdx     # 0x91cdd
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6a90
movl 0x58(%r15), %ecx
leaq 0x5665f(%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 0x372b7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x6fe6
jmp 0x372ae