// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
leaq -0x80(%rbp), %rdi
leaq 0xb6488(%rip), %rsi     # 0x104990
movl $0x60, %edx
callq 0x6570
leaq 0x8f798(%rip), %rax     # 0xddcb1
movq %rax, -0x88(%rbp)
leaq 0x8f796(%rip), %rax     # 0xddcbd
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x60(%rbp), %rdx
movb $0x0, %al
callq 0x6a80
movsbl -0x11(%rbp), %eax
cmpl $0x2c, %eax
jne 0x4e5e3
movq -0x10(%rbp), %rsi
movl $0x22, %edi
callq 0x6910
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdx
leaq 0x8ba1b(%rip), %rsi     # 0xda011
movb $0x0, %al
callq 0x6a80
movsbl -0x11(%rbp), %eax
cmpl $0x2c, %eax
jne 0x4e614
movq -0x10(%rbp), %rsi
movl $0x22, %edi
callq 0x6910
movsbl -0x11(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x6910
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x40(%rbp), %rdx
movb $0x0, %al
callq 0x6a80
movsbl -0x11(%rbp), %eax
cmpl $0x2c, %eax
jne 0x4e6b4
movq -0x10(%rbp), %rsi
movl $0x22, %edi
callq 0x6910
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rsi
leaq 0x8c724(%rip), %rdi     # 0xdadf6
callq 0x2d3d0
cmpl $0x0, %eax
je 0x4e6ee
movq -0x98(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
movq -0x98(%rbp), %rdx
leaq 0x8b911(%rip), %rsi     # 0xda011
movb $0x0, %al
callq 0x6a80
movsbl -0x11(%rbp), %eax
cmpl $0x2c, %eax
jne 0x4e71e
movq -0x10(%rbp), %rsi
movl $0x22, %edi
callq 0x6910
movsbl -0x11(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x6910
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x38(%rbp), %rdx
movb $0x0, %al
callq 0x6a80
movsbl -0x11(%rbp), %eax
cmpl $0x2c, %eax
jne 0x4e758
movq -0x10(%rbp), %rsi
movl $0x22, %edi
callq 0x6910
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x28, %rdx
leaq 0x8b8a6(%rip), %rsi     # 0xda011
movb $0x0, %al
callq 0x6a80
movsbl -0x11(%rbp), %eax
cmpl $0x2c, %eax
jne 0x4e789
movq -0x10(%rbp), %rsi
movl $0x22, %edi
callq 0x6910
movsbl -0x11(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x6910
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x54(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
movsbl -0x11(%rbp), %r8d
movb $0x0, %al
callq 0x6a80
movsbl -0x12(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x6910
movq -0x10(%rbp), %rdi
callq 0x6e10
cmpl $0x0, %eax
je 0x4e80f
leaq 0x8f448(%rip), %rdi     # 0xddc44
callq 0x6590
leaq 0x8a811(%rip), %rdi     # 0xd9019
movb $0x0, %al
callq 0x35d40
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)