// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/psl.c
// Function: pslxFileOpenWithMetaConfig
static void pslxFileOpenWithMetaConfig(char *fileName, bool isMetaUnique, enum gfType *retQueryType, enum gfType *retTargetType, struct lineFile **retLf, FILE *f)
/* Read header part of psl and make sure it's right.  Return
 * sequence types and file handle and send meta data to output file f */
{
char *line;
int lineSize;
char *words[30];
char *version;
int wordCount;
int i;
enum gfType qt = gftRna,  tt = gftDna;
struct lineFile *lf = lineFileOpen(fileName, TRUE);

lineFileSetMetaDataOutput(lf, f);
if (isMetaUnique)
    lineFileSetUniqueMetaData(lf);
if (!lineFileNext(lf, &line, &lineSize))
    warn("%s is empty", fileName);
else
    {
    if (startsWith("psLayout version", line))
	{
	wordCount = chopLine(line, words);
	if (wordCount < 3)
	    errAbort("%s is not a psLayout file", fileName);
	version = words[2];
	if (sameString(version, "3"))
	    {
	    }
	else if (sameString(version, "4"))
	    {
	    qt = gfTypeFromName(words[3]);
	    tt = gfTypeFromName(words[4]);
	    }
	else
	    {
	    errAbort("%s is version %s of psLayout, this program can only handle through version 4",
		fileName,  version);
	    }
	for (i=0; i<4; ++i)
	    {
	    if (!lineFileNext(lf, &line, &lineSize))
		errAbort("%s severely truncated", fileName);
	    }
	}
    else
        {
	char *s = cloneString(line);
        boolean eof = FALSE;
        while ((line[0] == '#') && (!eof))
            {
            freeMem(s);
            if (!lineFileNext(lf, &line, &lineSize))
                eof = TRUE;
            s = cloneString(line);
            }
	wordCount = chopLine(s, words);
	if ((wordCount < 21 || wordCount > 23 || (words[8][0] != '+' && words[8][0] != '-')) && (!eof))
	    errAbort("%s is not a psLayout file", fileName);
	else
	    lineFileReuse(lf); 
	freeMem(s);
	}
    }
*retQueryType = qt;
*retTargetType = tt;
*retLf = lf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x1, -0x144(%rbp)
movl $0x0, -0x148(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3b290
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3a860
cmpb $0x0, -0x9(%rbp)
je 0x4f090
movq -0x150(%rbp), %rdi
callq 0x3a900
movq -0x150(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x3b660
cmpl $0x0, %eax
jne 0x4f0c0
movq -0x8(%rbp), %rsi
leaq 0x8ec47(%rip), %rdi     # 0xddcfb
movb $0x0, %al
callq 0x358e0
jmp 0x4f2f8
movq -0x38(%rbp), %rsi
leaq 0x8ec3c(%rip), %rdi     # 0xddd07
callq 0x2d3d0
cmpl $0x0, %eax
je 0x4f1e6
movq -0x38(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movl $0x1e, %edx
callq 0x2e900
movl %eax, -0x13c(%rbp)
cmpl $0x3, -0x13c(%rbp)
jge 0x4f10f
movq -0x8(%rbp), %rsi
leaq 0x8ec10(%rip), %rdi     # 0xddd18
movb $0x0, %al
callq 0x35d40
movq -0x120(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
leaq 0x9443e(%rip), %rsi     # 0xe3569
callq 0x6a40
cmpl $0x0, %eax
jne 0x4f137
jmp 0x4f190
movq -0x138(%rbp), %rdi
leaq 0x8f633(%rip), %rsi     # 0xde778
callq 0x6a40
cmpl $0x0, %eax
jne 0x4f175
movq -0x118(%rbp), %rdi
callq 0x20970
movl %eax, -0x144(%rbp)
movq -0x110(%rbp), %rdi
callq 0x20970
movl %eax, -0x148(%rbp)
jmp 0x4f18e
movq -0x8(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq 0x8ebab(%rip), %rdi     # 0xddd32
movb $0x0, %al
callq 0x35d40
jmp 0x4f190
movl $0x0, -0x140(%rbp)
cmpl $0x4, -0x140(%rbp)
jge 0x4f1e1
movq -0x150(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x3b660
cmpl $0x0, %eax
jne 0x4f1ce
movq -0x8(%rbp), %rsi
leaq 0x8ebb8(%rip), %rdi     # 0xddd7f
movb $0x0, %al
callq 0x35d40
jmp 0x4f1d0
movl -0x140(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0x4f19a
jmp 0x4f2f6
movq -0x38(%rbp), %rdi
callq 0x2a450
movq %rax, -0x158(%rbp)
movl $0x0, -0x15c(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x23, %ecx
movb %al, -0x15d(%rbp)
jne 0x4f226
cmpl $0x0, -0x15c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x15d(%rbp)
movb -0x15d(%rbp), %al
testb $0x1, %al
jne 0x4f232
jmp 0x4f273
movq -0x158(%rbp), %rdi
callq 0x40d40
movq -0x150(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x3b660
cmpl $0x0, %eax
jne 0x4f261
movl $0x1, -0x15c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2a450
movq %rax, -0x158(%rbp)
jmp 0x4f200
movq -0x158(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movl $0x1e, %edx
callq 0x2e900
movl %eax, -0x13c(%rbp)
cmpl $0x15, -0x13c(%rbp)
jl 0x4f2c1
cmpl $0x17, -0x13c(%rbp)
jg 0x4f2c1
movq -0xf0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
je 0x4f2de
movq -0xf0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x4f2de
cmpl $0x0, -0x15c(%rbp)
jne 0x4f2de
movq -0x8(%rbp), %rsi
leaq 0x8ea43(%rip), %rdi     # 0xddd18
movb $0x0, %al
callq 0x35d40
jmp 0x4f2ea
movq -0x150(%rbp), %rdi
callq 0x3b440
movq -0x158(%rbp), %rdi
callq 0x40d40
jmp 0x4f2f8
movl -0x144(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x148(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x150(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw (%rax,%rax)