// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainReadChainLine
struct chain *chainReadChainLine(struct lineFile *lf)
/* Read line that starts with chain.  Allocate memory
 * and fill in values.  However don't read link lines. */
{
char *row[13];
int wordCount;
struct chain *chain;

wordCount = lineFileChop(lf, row);
if (wordCount == 0)
    return NULL;
if (wordCount < 12)
    errAbort("Expecting at least 12 words line %d of %s", 
    	lf->lineIx, lf->fileName);
if (!sameString(row[0], "chain"))
    errAbort("Expecting 'chain' line %d of %s", lf->lineIx, lf->fileName);
AllocVar(chain);
chain->score = atof(row[1]);
chain->tName = cloneString(row[2]);
chain->tSize = lineFileNeedNum(lf, row, 3);
if (wordCount >= 13)
    chain->id = lineFileNeedNum(lf, row, 12);
else
    chainIdNext(chain);

/* skip tStrand for now, always implicitly + */
chain->tStart = lineFileNeedNum(lf, row, 5);
chain->tEnd = lineFileNeedNum(lf, row, 6);
chain->qName = cloneString(row[7]);
chain->qSize = lineFileNeedNum(lf, row, 8);
chain->qStrand = row[9][0];
chain->qStart = lineFileNeedNum(lf, row, 10);
chain->qEnd = lineFileNeedNum(lf, row, 11);
if (chain->qStart >= chain->qEnd || chain->tStart >= chain->tEnd)
    errAbort("End before start line %d of %s", lf->lineIx, lf->fileName);
if (chain->qStart < 0 || chain->tStart < 0)
    errAbort("Start before zero line %d of %s", lf->lineIx, lf->fileName);
if (chain->qEnd > chain->qSize || chain->tEnd > chain->tSize)
    errAbort("Past end of sequence line %d of %s", lf->lineIx, lf->fileName);
return chain;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq %rsp, %rsi
movl $0xd, %edx
callq 0x2b03f
testl %eax, %eax
je 0x1e851
movl %eax, %ebp
cmpl $0xb, %eax
jg 0x1e7d1
movl 0x28(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x713cf(%rip), %rdi     # 0x8fb99
xorl %eax, %eax
callq 0x26b6f
movq (%rsp), %rdi
leaq 0x713e7(%rip), %rsi     # 0x8fbc3
callq 0x6a50
testl %eax, %eax
je 0x1e7fa
movl 0x28(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x713d6(%rip), %rdi     # 0x8fbc9
xorl %eax, %eax
callq 0x26b6f
movl $0x50, %edi
callq 0x2dc95
movq %rax, %r14
movq %rsp, %r15
movq 0x8(%r15), %rdi
callq 0x6920
movsd %xmm0, 0x10(%r14)
movq 0x10(%r15), %rdi
callq 0x1f9f6
movq %rax, 0x18(%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq 0x2b2eb
movl %eax, 0x20(%r14)
cmpl $0xd, %ebp
jl 0x1e859
movq %rsp, %rsi
movq %rbx, %rdi
movl $0xc, %edx
callq 0x2b2eb
jmp 0x1e868
xorl %r14d, %r14d
jmp 0x1e95b
movl 0xa1dad(%rip), %eax     # 0xc060c
leal 0x1(%rax), %ecx
movl %ecx, 0xa1da4(%rip)     # 0xc060c
movl %eax, 0x48(%r14)
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %edx
callq 0x2b2eb
movl %eax, 0x24(%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x6, %edx
callq 0x2b2eb
movl %eax, 0x28(%r14)
movq 0x38(%r15), %rdi
callq 0x1f9f6
movq %rax, 0x30(%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x2b2eb
movl %eax, 0x38(%r14)
movq 0x48(%r15), %rax
movb (%rax), %al
movb %al, 0x3c(%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x2b2eb
movl %eax, 0x40(%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0xb, %edx
callq 0x2b2eb
movl %eax, 0x44(%r14)
cmpl %eax, 0x40(%r14)
jge 0x1e8fa
movl 0x24(%r14), %eax
cmpl 0x28(%r14), %eax
jl 0x1e90f
movl 0x28(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x712e1(%rip), %rdi     # 0x8fbe9
xorl %eax, %eax
callq 0x26b6f
cmpl $0x0, 0x40(%r14)
js 0x1e91d
cmpl $0x0, 0x24(%r14)
jns 0x1e932
movl 0x28(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x712dd(%rip), %rdi     # 0x8fc08
xorl %eax, %eax
callq 0x26b6f
movl 0x44(%r14), %eax
cmpl 0x38(%r14), %eax
jg 0x1e946
movl 0x28(%r14), %eax
cmpl 0x20(%r14), %eax
jle 0x1e95b
movl 0x28(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x712d4(%rip), %rdi     # 0x8fc28
xorl %eax, %eax
callq 0x26b6f
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq