// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/psl.c
// Function: chkBlkRanges
static void chkBlkRanges(char* pslDesc, FILE* out, struct psl* psl,
                         char* pName, char* pLabel, char pCLabel, char pStrand,
                         unsigned pSize, unsigned pStart, unsigned pEnd,
                         unsigned iBlk, unsigned* pBlockStarts, int* errCount)
/* check the target or query ranges in a PSL incrementing errorCnt */
{
unsigned blkStart = pBlockStarts[iBlk];
unsigned blkEnd = blkStart+psl->blockSizes[iBlk];
/* translate stand to genomic coords */
unsigned gBlkStart = (pStrand == '+') ? blkStart : (pSize - blkEnd);
unsigned gBlkEnd = (pStrand == '+') ? blkEnd : (pSize - blkStart);

if ((pSize > 0) && (blkEnd > pSize))
    chkError(pslDesc, out, psl, errCount,
             "\t%s %s block %u end %u > %cSize %u\n",
             pName, pLabel, iBlk, blkEnd, pCLabel, pSize);
if (gBlkStart < pStart)
    chkError(pslDesc, out, psl, errCount,
             "\t%s %s block %u start %u < %cStart %u\n",
             pName, pLabel, iBlk, gBlkStart, pCLabel, pStart);
if (gBlkStart >= pEnd)
    chkError(pslDesc, out, psl, errCount,
             "\t%s %s block %u start %u >= %cEnd %u\n",
             pName, pLabel, iBlk, gBlkStart, pCLabel, pEnd);
if (gBlkEnd < pStart)
    chkError(pslDesc, out, psl, errCount,
             "\t%s %s block %u end %u < %cStart %u\n",
             pName, pLabel, iBlk, gBlkEnd, pCLabel, pStart);
if (gBlkEnd > pEnd)
    chkError(pslDesc, out, psl, errCount,
             "\t%s %s block %u end %u > %cEnd %u\n",
             pName, pLabel, iBlk, gBlkEnd, pCLabel, pEnd);
if (iBlk > 0)
    {
    unsigned prevBlkEnd = pBlockStarts[iBlk-1]+psl->blockSizes[iBlk-1];
    if (blkStart < prevBlkEnd)
        chkError(pslDesc, out, psl, errCount,
                 "\t%s %s block %u start %u < previous block end %u\n",
                 pName, pLabel, iBlk, blkStart, prevBlkEnd);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movb %r9b, %al
movq 0x40(%rbp), %r9
movq 0x38(%rbp), %r9
movl 0x30(%rbp), %r9d
movl 0x28(%rbp), %r9d
movl 0x20(%rbp), %r9d
movl 0x18(%rbp), %r9d
movb 0x10(%rbp), %r9b
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movb %al, -0x39(%rbp)
movq 0x38(%rbp), %rax
movl 0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0x60(%rcx), %rcx
movl 0x30(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x44(%rbp)
movsbl 0x10(%rbp), %eax
cmpl $0x2b, %eax
jne 0x53283
movl -0x40(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x5328c
movl 0x18(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x48(%rbp)
movsbl 0x10(%rbp), %eax
cmpl $0x2b, %eax
jne 0x532a3
movl -0x44(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0x532ac
movl 0x18(%rbp), %eax
subl -0x40(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, 0x18(%rbp)
jbe 0x5330b
movl -0x44(%rbp), %eax
cmpl 0x18(%rbp), %eax
jbe 0x5330b
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %r14
movl 0x30(%rbp), %ebx
movl -0x44(%rbp), %r11d
movsbl -0x39(%rbp), %r10d
movl 0x18(%rbp), %eax
leaq 0x8b01f(%rip), %r8      # 0xde30d
movq %r14, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x514f0
movl -0x48(%rbp), %eax
cmpl 0x20(%rbp), %eax
jae 0x5335e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %r14
movl 0x30(%rbp), %ebx
movl -0x48(%rbp), %r11d
movsbl -0x39(%rbp), %r10d
movl 0x20(%rbp), %eax
leaq 0x8aff0(%rip), %r8      # 0xde331
movq %r14, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x514f0
movl -0x48(%rbp), %eax
cmpl 0x28(%rbp), %eax
jb 0x533b1
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %r14
movl 0x30(%rbp), %ebx
movl -0x48(%rbp), %r11d
movsbl -0x39(%rbp), %r10d
movl 0x28(%rbp), %eax
leaq 0x8afc4(%rip), %r8      # 0xde358
movq %r14, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x514f0
movl -0x4c(%rbp), %eax
cmpl 0x20(%rbp), %eax
jae 0x53404
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %r14
movl 0x30(%rbp), %ebx
movl -0x4c(%rbp), %r11d
movsbl -0x39(%rbp), %r10d
movl 0x20(%rbp), %eax
leaq 0x8af97(%rip), %r8      # 0xde37e
movq %r14, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x514f0
movl -0x4c(%rbp), %eax
cmpl 0x28(%rbp), %eax
jbe 0x53457
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %r14
movl 0x30(%rbp), %ebx
movl -0x4c(%rbp), %r11d
movsbl -0x39(%rbp), %r10d
movl 0x28(%rbp), %eax
leaq 0x8af69(%rip), %r8      # 0xde3a3
movq %r14, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x514f0
cmpl $0x0, 0x30(%rbp)
jbe 0x534cf
movq 0x38(%rbp), %rax
movl 0x30(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0x28(%rbp), %rcx
movq 0x60(%rcx), %rcx
movl 0x30(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x50(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x534cd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq 0x40(%rbp), %rcx
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %rbx
movl 0x30(%rbp), %r11d
movl -0x40(%rbp), %r10d
movl -0x50(%rbp), %eax
leaq 0x8af12(%rip), %r8      # 0xde3c6
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x514f0
jmp 0x534cf
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax,%rax)