// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/genoFind.c
// Function: gfAddLargeSeq
static void gfAddLargeSeq(struct genoFind *gf, bioSeq *seq, bits32 offset)
/* Add all N-mers to segmented index.  Done after gfCountSeq. */
{
char *poly = seq->dna;
int tileSize = gf->tileSize;
int stepSize = gf->stepSize;
int tileTailSize = gf->segSize;
int tileHeadSize = tileSize - tileTailSize;
int i, lastTile = seq->size - tileSize;
int (*makeTile)(char *poly, int n) = (gf->isPep ? gfPepTile : gfDnaTile);
int tileHead;
int tileTail;
bits32 *listSizes = gf->listSizes;
bits16 **endLists = gf->endLists;
bits16 *endList;
int headCount;

initNtLookup();
for (i=0; i<=lastTile; i += stepSize)
    {
    tileHead = makeTile(poly, tileHeadSize);
    tileTail = makeTile(poly + tileHeadSize, tileTailSize);
    if (tileHead >= 0 && tileTail >= 0)
        {
	endList = endLists[tileHead];
	headCount = listSizes[tileHead]++;
	endList += headCount * 3;		/* Because have three slots per. */
	endList[0] = tileTail;
	endList[1] = (offset >> 16);
	endList[2] = (offset&0xffff);
	}
    offset += stepSize;
    poly += stepSize;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x28(%rax), %edx
leaq -0x3332(%rip), %rax     # 0xcc50
leaq -0x32b9(%rip), %rcx     # 0xccd0
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x58(%rbp)
callq 0xfde0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jg 0x1008b
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rdi
movl -0x30(%rbp), %esi
callq *%rax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rdi
movslq -0x30(%rbp), %rcx
addq %rcx, %rdi
movl -0x2c(%rbp), %esi
callq *%rax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x44(%rbp)
jl 0x10063
cmpl $0x0, -0x48(%rbp)
jl 0x10063
movq -0x58(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movl (%rcx,%rdx,4), %eax
movl %eax, %esi
addl $0x1, %esi
movl %esi, (%rcx,%rdx,4)
movl %eax, -0x64(%rbp)
imull $0x3, -0x64(%rbp), %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl -0x48(%rbp), %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, (%rax)
movl -0x14(%rbp), %eax
shrl $0x10, %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x2(%rax)
movl -0x14(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x4(%rax)
movl -0x28(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xffb8
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)