// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslCheck2
int pslCheck2(unsigned opts, char *pslDesc, FILE* out, struct psl* psl)
/* Validate a PSL for consistency.  pslDesc is printed the error messages to
 * file out (open /dev/null to discard). Return count of errors.  Option
 * PSL_CHECK_IGNORE_INSERT_CNTS doesn't validate problems insert counts fields
 * in each PSL.  Useful because protein PSL doesn't seen to compute these in a
 * consistent way.
 */
{
static char* VALID_STRANDS[] = {
    "+", "-", "++", "+-", "-+", "--", NULL
};
int i, errCount = 0;
int tBlockSizeMult = pslIsProtein(psl) ? 3 : 1;

/* check strand value */
for (i = 0; VALID_STRANDS[i] != NULL; i++)
    {
    if (strcmp(psl->strand, VALID_STRANDS[i]) == 0)
        break;
    }
if (VALID_STRANDS[i] == NULL)
    chkError(pslDesc, out, psl, &errCount,
             "\tinvalid PSL strand: \"%s\"\n", psl->strand);

/* check query */
chkRanges(pslDesc, out, psl, psl->qName, "query", 'q', pslQStrand(psl), psl->qSize, psl->qStart, psl->qEnd,
          psl->qStarts, 1, &errCount);
if ((opts & PSL_CHECK_IGNORE_INSERT_CNTS) == 0)
    chkInsertCounts(pslDesc, out, psl, psl->qName, 'q', psl->qStarts, psl->qNumInsert, psl->qBaseInsert, &errCount);

/* check target */
chkRanges(pslDesc, out, psl, psl->tName, "target", 't', pslTStrand(psl), psl->tSize, psl->tStart, psl->tEnd,
          psl->tStarts, tBlockSizeMult, &errCount);
if ((opts & PSL_CHECK_IGNORE_INSERT_CNTS) == 0)
    chkInsertCounts(pslDesc, out, psl, psl->tName, 't', psl->tStarts, psl->tNumInsert, psl->tBaseInsert, &errCount);

return errCount;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq %rcx, %rdi
callq 0x37d73
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal 0x1(,%rcx,2), %eax
movq %rax, 0x10(%rsp)
leaq 0x28(%rbx), %r12
xorl %r13d, %r13d
leaq 0x85b79(%rip), %rbp     # 0xbe810
movq (%r13,%rbp), %rsi
movq %r12, %rdi
callq 0x6a50
testl %eax, %eax
je 0x38cd1
addq $0x8, %r13
cmpq $0x30, %r13
jne 0x38c97
leaq 0x5b326(%rip), %r8      # 0x93fdf
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r9
xorl %eax, %eax
callq 0x38df1
movq 0x30(%rbx), %rcx
movsbl 0x28(%rbx), %eax
movl 0x38(%rbx), %r10d
movl 0x3c(%rbx), %r11d
movl 0x40(%rbx), %r13d
subq $0x8, %rsp
leaq 0x10(%rsp), %r12
leaq 0x550d8(%rip), %r8      # 0x8ddcd
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x71, %r9d
pushq %r12
pushq $0x1
pushq 0x68(%rbx)
pushq %r13
pushq %r11
pushq %r10
pushq %rax
callq 0x38ed1
addq $0x40, %rsp
movl 0xc(%rsp), %ebp
testb $0x1, %bpl
jne 0x38d55
movq 0x30(%rbx), %rcx
movq 0x68(%rbx), %r9
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %r10d
subq $0x8, %rsp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x71, %r8d
pushq %r12
pushq %r10
pushq %rax
callq 0x3924e
addq $0x20, %rsp
movq 0x48(%rbx), %rcx
xorl %eax, %eax
cmpb $0x2d, 0x29(%rbx)
sete %al
movl 0x50(%rbx), %r10d
movl 0x54(%rbx), %r11d
movl 0x58(%rbx), %r13d
subq $0x8, %rsp
leal 0x2b(,%rax,2), %eax
leaq 0x5b27a(%rip), %r8      # 0x93ffa
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x74, %r9d
pushq %r12
pushq 0x20(%rsp)
pushq 0x70(%rbx)
pushq %r13
pushq %r11
pushq %r10
pushq %rax
callq 0x38ed1
addq $0x40, %rsp
testb $0x1, %bpl
jne 0x38dde
movq 0x48(%rbx), %rcx
movq 0x70(%rbx), %r9
movl 0x20(%rbx), %eax
movl 0x24(%rbx), %r10d
subq $0x8, %rsp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x74, %r8d
pushq %r12
pushq %r10
pushq %rax
callq 0x3924e
addq $0x20, %rsp
movl 0x8(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq