// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/axt.c
// Function: axtAddBlocksToBoxInList
void axtAddBlocksToBoxInList(struct cBlock **pList, struct axt *axt)
/* Add blocks (gapless subalignments) from (non-NULL!) axt to block list. 
 * Note: list will be in reverse order of axt blocks. */
{
boolean thisIn, lastIn = FALSE;
int qPos = axt->qStart, tPos = axt->tStart;
int qStart = 0, tStart = 0;
int i;

for (i=0; i<=axt->symCount; ++i)
{
    int advanceQ = (isalpha(axt->qSym[i]) ? 1 : 0);
    int advanceT = (isalpha(axt->tSym[i]) ? 1 : 0);
    thisIn = (advanceQ && advanceT);
    if (thisIn)
    {
        if (!lastIn)
        {
            qStart = qPos;
            tStart = tPos;
        }
    }
    else
    {
        if (lastIn)
        {
            int size = qPos - qStart;
            assert(size == tPos - tStart);
            if (size > 0)
            {
                struct cBlock *b;
                AllocVar(b);
                b->qStart = qStart;
                b->qEnd = qPos;
                b->tStart = tStart;
                b->tEnd = tPos;
                slAddHead(pList, b);
            }
        }
    }
    lastIn = thisIn;
    qPos += advanceQ;
    tPos += advanceT;
}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jg 0x231fb
callq 0x6780
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %edx
andl $0x400, %edx            # imm = 0x400
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
callq 0x6780
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %edx
andl $0x400, %edx            # imm = 0x400
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x30(%rbp)
movb %al, -0x41(%rbp)
je 0x2311f
cmpl $0x0, -0x34(%rbp)
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x23147
cmpl $0x0, -0x18(%rbp)
jne 0x23142
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x231d5
cmpl $0x0, -0x18(%rbp)
je 0x231d3
movl -0x1c(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl -0x20(%rbp), %ecx
subl -0x28(%rbp), %ecx
cmpl %ecx, %eax
jne 0x23169
jmp 0x23188
leaq 0xb57c5(%rip), %rdi     # 0xd8935
leaq 0xb578f(%rip), %rsi     # 0xd8906
movl $0x3db, %edx            # imm = 0x3DB
leaq 0xb57c8(%rip), %rcx     # 0xd894b
callq 0x6450
cmpl $0x0, -0x38(%rbp)
jle 0x231d1
movl $0x28, %edi
callq 0x40c50
movq %rax, -0x40(%rbp)
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x1c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x28(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x20(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x23210
jmp 0x231d3
jmp 0x231d5
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x30(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x34(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x23090
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)