// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/psl.c
// Function: pslToFfAli
struct ffAli *pslToFfAli(struct psl *psl, struct dnaSeq *query, struct dnaSeq *target,
	int targetOffset)
/* Convert from psl to ffAli format.  Clip to parts that we actually
 * have sequence for. */
{
struct ffAli *ffList = NULL, *ff;
DNA *needle = query->dna;
DNA *haystack = target->dna;
int blockCount = psl->blockCount;
unsigned *blockSizes = psl->blockSizes;
unsigned *qStarts = psl->qStarts;
unsigned *tStarts = psl->tStarts;
int size;
int i;
int tMin = targetOffset;
int tMax = targetOffset + target->size;
int tStart, tEnd;
int clipStart, clipEnd, clipOffset, clipSize;

for (i=0; i<blockCount; ++i)
    {
    clipStart = tStart = tStarts[i];
    size = blockSizes[i];
    clipEnd = tEnd = tStart + size;
    if (tStart < tMax && tEnd > tMin)
	{
	if (clipStart < tMin) clipStart = tMin;
	if (clipEnd > tMax) clipEnd = tMax;
	clipOffset = clipStart - tStart;
	clipSize = clipEnd - clipStart;
	AllocVar(ff);
	ff->left = ffList;
	ffList = ff;
	ff->nStart = ff->nEnd = needle + qStarts[i] + clipOffset;
	ff->nEnd += clipSize;
	ff->hStart = ff->hEnd = haystack + clipStart - targetOffset;
	ff->hEnd += clipSize;
	}
    }
ffList = ffMakeRightLinks(ffList);
ffCountGoodEnds(ffList);
return ffList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
addl 0x18(%rcx), %eax
movl %eax, -0x70(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x4fe89
movq -0x60(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x74(%rbp)
movl %eax, -0x7c(%rbp)
movq -0x50(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x64(%rbp)
movl -0x74(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x78(%rbp)
movl %eax, -0x80(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x4fe79
movl -0x78(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jle 0x4fe79
movl -0x7c(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x4fdaf
movl -0x6c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x80(%rbp), %eax
cmpl -0x70(%rbp), %eax
jle 0x4fdbd
movl -0x70(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x7c(%rbp), %eax
subl -0x74(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x80(%rbp), %eax
subl -0x7c(%rbp), %eax
movl %eax, -0x88(%rbp)
movl $0x38, %edi
callq 0x40c50
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rax
movslq -0x68(%rbp), %rdx
movl (%rax,%rdx,4), %eax
addq %rax, %rcx
movslq -0x84(%rbp), %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x88(%rbp), %edx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x40(%rbp), %rcx
movslq -0x7c(%rbp), %rax
addq %rax, %rcx
movslq -0x1c(%rbp), %rdx
xorl %eax, %eax
subq %rdx, %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x88(%rbp), %edx
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x28(%rax)
jmp 0x4fe7b
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x4fd52
movq -0x28(%rbp), %rdi
callq 0x37bc0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x37c10
movq -0x28(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)