// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/gfClientLib.c
// Function: maskFromOut
static void maskFromOut(struct dnaSeq *seqList, char *outFile, float minRepDivergence)
/* Mask DNA sequence by putting bits more than 85% identical to
 * repeats as defined in RepeatMasker .out file to upper case. */
{
struct lineFile *lf = lineFileOpen(outFile, TRUE);
struct hash *hash = newHash(0);
struct dnaSeq *seq;
char *line;

for (seq = seqList; seq != NULL; seq = seq->next)
    hashAdd(hash, seq->name, seq);
if (!lineFileNext(lf, &line, NULL))
    errAbort("Empty mask file %s\n", lf->fileName);
if (!startsWith("There were no", line))	/* No repeats is ok. Not much work. */
    {
    if (!startsWith("   SW", line))
	errAbort("%s isn't a RepeatMasker .out file.", lf->fileName);
    if (!lineFileNext(lf, &line, NULL) || !startsWith("score", line))
	errAbort("%s isn't a RepeatMasker .out file.", lf->fileName);
    lineFileNext(lf, &line, NULL);  /* Blank line. */
    while (lineFileNext(lf, &line, NULL))
	{
	char *words[32];
	struct repeatMaskOut rmo;
	int wordCount;
	int seqSize;
	int repSize;
	wordCount = chopLine(line, words);
	if (wordCount < 14)
	    errAbort("%s line %d - error in repeat mask .out file\n", lf->fileName, lf->lineIx);
	repeatMaskOutStaticLoad(words, &rmo);
	/* If repeat is more than 15% divergent don't worry about it. */
	if (rmo.percDiv + rmo.percDel + rmo.percInc <= minRepDivergence)
	    {
	    if((seq = hashFindVal(hash, rmo.qName)) == NULL)
		errAbort("%s is in %s but not corresponding sequence file, files out of sync?\n", 
			rmo.qName, lf->fileName);
	    seqSize = seq->size;
	    if (rmo.qStart <= 0 || rmo.qStart > seqSize || rmo.qEnd <= 0 
	    	|| rmo.qEnd > seqSize || rmo.qStart > rmo.qEnd)
		{
		warn("Repeat mask sequence out of range (%d-%d of %d in %s)\n",
		    rmo.qStart, rmo.qEnd, seqSize, rmo.qName);
		if (rmo.qStart <= 0)
		    rmo.qStart = 1;
		if (rmo.qEnd > seqSize)
		    rmo.qEnd = seqSize;
		}
	    repSize = rmo.qEnd - rmo.qStart + 1;
	    if (repSize > 0)
		toUpperN(seq->dna + rmo.qStart - 1, repSize);
	    }
	}
    }
freeHash(&hash);
lineFileClose(&lf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x3b290
movq %rax, -0x20(%rbp)
xorl %edi, %edi
movl $0x1, %esi
callq 0x398a0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x15fab
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x39230
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x15f82
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b660
cmpl $0x0, %eax
jne 0x15fd7
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xc200c(%rip), %rdi     # 0xd7fdc
movb $0x0, %al
callq 0x35d40
movq -0x38(%rbp), %rsi
leaq 0xc200e(%rip), %rdi     # 0xd7ff0
callq 0x2d3d0
cmpl $0x0, %eax
jne 0x1621f
movq -0x38(%rbp), %rsi
leaq 0xc2003(%rip), %rdi     # 0xd7ffe
callq 0x2d3d0
cmpl $0x0, %eax
jne 0x1601b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xc1ff0(%rip), %rdi     # 0xd8004
movb $0x0, %al
callq 0x35d40
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b660
cmpl $0x0, %eax
je 0x16046
movq -0x38(%rbp), %rsi
leaq 0xc3984(%rip), %rdi     # 0xd99c0
callq 0x2d3d0
cmpl $0x0, %eax
jne 0x1605c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xc1faf(%rip), %rdi     # 0xd8004
movb $0x0, %al
callq 0x35d40
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b660
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b660
cmpl $0x0, %eax
je 0x1621d
movq -0x38(%rbp), %rdi
leaq -0x140(%rbp), %rsi
movl $0x20, %edx
callq 0x2e900
movl %eax, -0x1a4(%rbp)
cmpl $0xe, -0x1a4(%rbp)
jge 0x160c8
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0xc1f66(%rip), %rdi     # 0xd8027
movb $0x0, %al
callq 0x35d40
leaq -0x140(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x55130
movss -0x194(%rbp), %xmm1
addss -0x190(%rbp), %xmm1
addss -0x18c(%rbp), %xmm1
movss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x16218
movq -0x28(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0x39630
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x16138
movq -0x188(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xc1f23(%rip), %rdi     # 0xd8054
movb $0x0, %al
callq 0x35d40
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x1a8(%rbp)
cmpl $0x0, -0x180(%rbp)
jle 0x16181
movl -0x180(%rbp), %eax
cmpl -0x1a8(%rbp), %eax
jg 0x16181
cmpl $0x0, -0x17c(%rbp)
jle 0x16181
movl -0x17c(%rbp), %eax
cmpl -0x1a8(%rbp), %eax
jg 0x16181
movl -0x180(%rbp), %eax
cmpl -0x17c(%rbp), %eax
jle 0x161d7
movl -0x180(%rbp), %esi
movl -0x17c(%rbp), %edx
movl -0x1a8(%rbp), %ecx
movq -0x188(%rbp), %r8
leaq 0xc1ef8(%rip), %rdi     # 0xd8099
movb $0x0, %al
callq 0x358e0
cmpl $0x0, -0x180(%rbp)
jg 0x161bb
movl $0x1, -0x180(%rbp)
movl -0x17c(%rbp), %eax
cmpl -0x1a8(%rbp), %eax
jle 0x161d5
movl -0x1a8(%rbp), %eax
movl %eax, -0x17c(%rbp)
jmp 0x161d7
movl -0x17c(%rbp), %eax
subl -0x180(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ac(%rbp)
cmpl $0x0, -0x1ac(%rbp)
jle 0x16216
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x180(%rbp), %rax
addq %rax, %rdi
addq $-0x1, %rdi
movl -0x1ac(%rbp), %esi
callq 0x2dc40
jmp 0x16218
jmp 0x1606d
jmp 0x1621f
leaq -0x28(%rbp), %rdi
callq 0x3a080
leaq -0x20(%rbp), %rdi
callq 0x3c110
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopw (%rax,%rax)