// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/axt.c
// Function: axtGetSubsetOnT
boolean axtGetSubsetOnT(struct axt *axt, struct axt *axtOut,
            int newStart, int newEnd, struct axtScoreScheme *ss,
            boolean includeEdgeGaps)
/* Return FALSE if axt is not in the new range.  Otherwise, set axtOut to
 * a subset that goes from newStart to newEnd in target coordinates. 
 * If includeEdgeGaps, don't trim target gaps before or after the range. */
{
if (axt == NULL)
    return FALSE;
if (newStart < axt->tStart)
    newStart = axt->tStart;
if (newEnd > axt->tEnd)
    newEnd = axt->tEnd;
if (includeEdgeGaps ? (newEnd < newStart) : (newEnd <= newStart)) 
    return FALSE;
if (newStart == axt->tStart && newEnd == axt->tEnd)
    {
    axt->score = axtScore(axt, ss);
    *axtOut = *axt;
    return TRUE;
    }
else
    {
    struct axt a = *axt;
    char *tSymStart = skipIgnoringDash(a.tSym, newStart - a.tStart, TRUE);
    char *tSymEnd = skipIgnoringDash(tSymStart, newEnd - newStart, FALSE);
    if (includeEdgeGaps)
    {
    while (tSymStart > a.tSym)
        if (*(--tSymStart) != '-')
        {
        tSymStart++;
        break;
        }
    while (tSymEnd < a.tSym + a.symCount)
        if (*(++tSymEnd) != '-')
        {
        tSymEnd--;
        break;
        }
    if (newEnd == newStart && tSymEnd > tSymStart)
        {
        if (*tSymStart != '-')
        tSymStart++;
        if (*(tSymEnd-1) != '-')
        tSymEnd--;
        }
    }
    int symCount = tSymEnd - tSymStart;
    char *qSymStart = a.qSym + (tSymStart - a.tSym);
    a.qStart += countNonDash(a.qSym, qSymStart - a.qSym);
    a.qEnd = a.qStart + countNonDash(qSymStart, symCount);
    a.tStart = newStart;
    a.tEnd = newEnd;
    a.symCount = symCount;
    a.qSym = qSymStart;
    a.tSym = tSymStart;
    a.score = axtScore(&a, ss);
    if ((a.qStart < a.qEnd && a.tStart < a.tEnd) ||
    (includeEdgeGaps && (a.qStart < a.qEnd || a.tStart < a.tEnd)))
    {
    *axtOut = a;
    return TRUE;
    }
    return FALSE;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x21604
movl $0x0, -0x4(%rbp)
jmp 0x218e7
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x2161a
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
jle 0x21630
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x21640
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x21648
jmp 0x21654
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x21654
movl $0x0, -0x4(%rbp)
jmp 0x218e7
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jne 0x216a0
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
jne 0x216a0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x21510
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x34(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x58, %edx
callq 0x6570
movl $0x1, -0x4(%rbp)
jmp 0x218e7
movq -0x10(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movl $0x58, %edx
callq 0x6570
movq -0x40(%rbp), %rdi
movl -0x1c(%rbp), %esi
subl -0x60(%rbp), %esi
movl $0x1, %edx
callq 0x336a0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
movl -0x20(%rbp), %esi
subl -0x1c(%rbp), %esi
xorl %edx, %edx
callq 0x336a0
movq %rax, -0x98(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x217e4
jmp 0x216f7
movq -0x90(%rbp), %rax
cmpq -0x40(%rbp), %rax
jbe 0x21738
movq -0x90(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x90(%rbp)
movsbl -0x1(%rax), %eax
cmpl $0x2d, %eax
je 0x21736
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x21738
jmp 0x216f7
jmp 0x2173a
movq -0x98(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq -0x50(%rbp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x21785
movq -0x98(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x98(%rbp)
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
je 0x21783
movq -0x98(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x21785
jmp 0x2173a
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x217e2
movq -0x98(%rbp), %rax
cmpq -0x90(%rbp), %rax
jbe 0x217e2
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x217be
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2d, %eax
je 0x217e0
movq -0x98(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x217e2
jmp 0x217e4
movq -0x98(%rbp), %rax
movq -0x90(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x9c(%rbp)
movq -0x48(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0x40(%rbp), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rdi
movq -0xa8(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
movl %eax, %esi
callq 0x33710
addl -0x78(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0xac(%rbp)
movq -0xa8(%rbp), %rdi
movl -0x9c(%rbp), %esi
callq 0x33710
movl %eax, %ecx
movl -0xac(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x74(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x21510
movl %eax, -0x54(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x218ac
movl -0x60(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jl 0x218c2
cmpl $0x0, -0x2c(%rbp)
je 0x218e0
movl -0x78(%rbp), %eax
cmpl -0x74(%rbp), %eax
jl 0x218c2
movl -0x60(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x218e0
movq -0x18(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movl $0x58, %edx
callq 0x6570
movl $0x1, -0x4(%rbp)
jmp 0x218e7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)