// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/psl.c
// Function: chkRanges
static void chkRanges(char* pslDesc, FILE* out, struct psl* psl,
                      char* pName, char* pLabel, char pCLabel, char pStrand,
                      unsigned pSize, unsigned pStart, unsigned pEnd,
                      unsigned* pBlockStarts, int blockSizeMult, int* errCount)
/* check the target or query ranges in a PSL, increment errorCnt */
{
unsigned iBlk;
if (pStart >= pEnd)
    chkError(pslDesc, out, psl, errCount,
             "\t%s %cStart %u >= %cEnd %u\n",
             pName, pCLabel, pStart, pCLabel, pEnd);
if (pEnd > pSize)
    chkError(pslDesc, out, psl, errCount,
             "\t%s %cEnd %u >= %cSize %u\n",
             pName, pCLabel, pEnd, pCLabel, pSize);
// check that block start/end matches overall start end
unsigned pStartStrand = pStart, pEndStrand = pEnd;
if (pStrand != '+')
    reverseUnsignedRange(&pStartStrand, &pEndStrand, pSize);
unsigned lastBlkEnd = pBlockStarts[psl->blockCount-1] + (blockSizeMult * psl->blockSizes[psl->blockCount-1]);
if ((pStartStrand != pBlockStarts[0]) || (pEndStrand != lastBlkEnd))
    chkError(pslDesc, out, psl, errCount,
             "\t%s strand \"%c\" adjusted %cStart-%cEnd range %u-%u != block range %u-%u\n",
             pName, pStrand, pCLabel, pCLabel, pStartStrand, pEndStrand, pBlockStarts[0], lastBlkEnd);

for (iBlk = 0; iBlk < psl->blockCount; iBlk++)
    chkBlkRanges(pslDesc, out, psl, pName, pLabel, pCLabel, pStrand,
                 pSize, pStart, pEnd, iBlk, pBlockStarts, errCount);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movb %r9b, %al
movq 0x40(%rbp), %r9
movl 0x38(%rbp), %r9d
movq 0x30(%rbp), %r9
movl 0x28(%rbp), %r9d
movl 0x20(%rbp), %r9d
movl 0x18(%rbp), %r9d
movb 0x10(%rbp), %r9b
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movb %al, -0x49(%rbp)
movl 0x20(%rbp), %eax
cmpl 0x28(%rbp), %eax
jb 0x51643
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x40(%rbp), %r9
movsbl -0x49(%rbp), %ebx
movl 0x20(%rbp), %r11d
movsbl -0x49(%rbp), %r10d
movl 0x28(%rbp), %eax
leaq 0x8cc62(%rip), %r8      # 0xde28d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x514f0
movl 0x28(%rbp), %eax
cmpl 0x18(%rbp), %eax
jbe 0x5168e
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x40(%rbp), %r9
movsbl -0x49(%rbp), %ebx
movl 0x28(%rbp), %r11d
movsbl -0x49(%rbp), %r10d
movl 0x18(%rbp), %eax
leaq 0x8cc33(%rip), %r8      # 0xde2a9
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x514f0
movl 0x20(%rbp), %eax
movl %eax, -0x54(%rbp)
movl 0x28(%rbp), %eax
movl %eax, -0x58(%rbp)
movsbl 0x10(%rbp), %eax
cmpl $0x2b, %eax
je 0x516b3
movl 0x18(%rbp), %edx
leaq -0x54(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x33390
movq 0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x5c(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x38(%rbp), %ecx
movq -0x38(%rbp), %rdx
movq 0x60(%rdx), %rdx
movq -0x38(%rbp), %rsi
movl 0x5c(%rsi), %esi
subl $0x1, %esi
movl %esi, %esi
imull (%rdx,%rsi,4), %ecx
addl %ecx, %eax
movl %eax, -0x5c(%rbp)
movl -0x54(%rbp), %eax
movq 0x30(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x516f9
movl -0x58(%rbp), %eax
cmpl -0x5c(%rbp), %eax
je 0x5175b
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x40(%rbp), %r9
movsbl 0x10(%rbp), %r12d
movsbl -0x49(%rbp), %r15d
movsbl -0x49(%rbp), %r14d
movl -0x54(%rbp), %ebx
movl -0x58(%rbp), %r11d
movq 0x30(%rbp), %rax
movl (%rax), %r10d
movl -0x5c(%rbp), %eax
leaq 0x8cb90(%rip), %r8      # 0xde2c4
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x514f0
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jae 0x517da
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %r8
movb -0x49(%rbp), %r9b
movb 0x10(%rbp), %r12b
movl 0x18(%rbp), %r15d
movl 0x20(%rbp), %r14d
movl 0x28(%rbp), %ebx
movl -0x50(%rbp), %r11d
movq 0x30(%rbp), %r10
movq 0x40(%rbp), %rax
movsbl %r9b, %r9d
movsbl %r12b, %r12d
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x53210
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x51762
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)