// File: /workspace/github_c_makefile_star2_O2/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)
andl $0x0, 0x8(%rsp)
movq %rcx, %rdi
callq 0x324ba
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 0x7f4f8(%rip), %rbp     # 0xb2840
cmpq $0x30, %r13
je 0x33365
movq (%r13,%rbp), %rsi
movq %r12, %rdi
callq 0x6a50
addq $0x8, %r13
testl %eax, %eax
jne 0x33348
jmp 0x33384
leaq 0x4fc46(%rip), %r8      # 0x82fb2
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r9
xorl %eax, %eax
callq 0x3349c
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 0x49a05(%rip), %r8      # 0x7cdad
pushq $0x71
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
pushq %r12
pushq $0x1
pushq 0x68(%rbx)
pushq %r13
pushq %r11
pushq %r10
pushq %rax
callq 0x3357c
addq $0x40, %rsp
movl 0xc(%rsp), %ebp
testb $0x1, %bpl
jne 0x33404
movq 0x30(%rbx), %rcx
movq 0x68(%rbx), %r9
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %r10d
subq $0x8, %rsp
pushq $0x71
popq %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
pushq %r12
pushq %r10
pushq %rax
callq 0x338fb
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 0x4fb9e(%rip), %r8      # 0x82fcd
pushq $0x74
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
pushq %r12
pushq 0x20(%rsp)
pushq 0x70(%rbx)
pushq %r13
pushq %r11
pushq %r10
pushq %rax
callq 0x3357c
addq $0x40, %rsp
testb $0x1, %bpl
jne 0x33489
movq 0x48(%rbx), %rcx
movq 0x70(%rbx), %r9
movl 0x20(%rbx), %eax
movl 0x24(%rbx), %r10d
subq $0x8, %rsp
pushq $0x74
popq %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
pushq %r12
pushq %r10
pushq %rax
callq 0x338fb
addq $0x20, %rsp
movl 0x8(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq