// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/psl.c
// Function: pslRc
void pslRc(struct psl *psl)
/* Reverse-complement a PSL alignment.  This makes the target strand explicit. */
{
unsigned tSize = psl->tSize, qSize = psl->qSize;
unsigned blockCount = psl->blockCount, i;
unsigned *tStarts = psl->tStarts, *qStarts = psl->qStarts, *blockSizes = psl->blockSizes;
int mult = pslIsProtein(psl) ? 3 : 1;

/* swap strand, forcing target to have an explict strand */
psl->strand[0] = (psl->strand[0] != '-') ? '-' : '+';
psl->strand[1] = (psl->strand[1] != '-') ? '-' : '+';
psl->strand[2] = 0;

for (i=0; i<blockCount; ++i)
    {
    tStarts[i] = tSize - (tStarts[i] + mult * blockSizes[i]);
    qStarts[i] = qSize - (qStarts[i] + blockSizes[i]);
    }
reverseUnsigned(tStarts, blockCount);
reverseUnsigned(qStarts, blockCount);
reverseUnsigned(blockSizes, blockCount);
if (psl->qSequence != NULL)
    {
    rcSeqs(psl->qSequence, blockCount, blockSizes);
    rcSeqs(psl->tSequence, blockCount, blockSizes);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4f750
movl %eax, %edx
movl $0x1, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x28(%rax), %edx
movl $0x2b, %eax
movl $0x2d, %ecx
cmpl $0x2d, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x28(%rax)
movq -0x8(%rbp), %rax
movsbl 0x29(%rax), %edx
movl $0x2b, %eax
movl $0x2d, %ecx
cmpl $0x2d, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x29(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x2a(%rax)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x503ac
movl -0xc(%rbp), %edx
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edi
imull (%rsi,%rdi,4), %ecx
addl %ecx, %eax
subl %eax, %edx
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %edx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %esi
addl (%rcx,%rsi,4), %eax
subl %eax, %edx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5034d
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2a640
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2a640
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2a640
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x50406
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
movl -0x14(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0x50410
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
movl -0x14(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0x50410
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)