// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/psl.c
// Function: pslxFileOpen
void pslxFileOpen(char *fileName, enum gfType *retQueryType, enum gfType *retTargetType, struct lineFile **retLf)
/* Read header part of psl and make sure it's right.  Return
 * sequence types and file handle. */
{
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);

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
	lineFileReuse(lf); 
    }
*retQueryType = qt;
*retTargetType = tt;
*retLf = lf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x1, -0x134(%rbp)
movl $0x0, -0x138(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3b290
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x3b660
cmpl $0x0, %eax
jne 0x4ee74
movq -0x8(%rbp), %rsi
leaq 0x8ee93(%rip), %rdi     # 0xddcfb
movb $0x0, %al
callq 0x358e0
jmp 0x4efa5
movq -0x28(%rbp), %rsi
leaq 0x8ee88(%rip), %rdi     # 0xddd07
callq 0x2d3d0
cmpl $0x0, %eax
je 0x4ef97
movq -0x28(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0x1e, %edx
callq 0x2e900
movl %eax, -0x12c(%rbp)
cmpl $0x3, -0x12c(%rbp)
jge 0x4eec3
movq -0x8(%rbp), %rsi
leaq 0x8ee5c(%rip), %rdi     # 0xddd18
movb $0x0, %al
callq 0x35d40
movq -0x110(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
leaq 0x9468a(%rip), %rsi     # 0xe3569
callq 0x6a40
cmpl $0x0, %eax
jne 0x4eeeb
jmp 0x4ef44
movq -0x128(%rbp), %rdi
leaq 0x8f87f(%rip), %rsi     # 0xde778
callq 0x6a40
cmpl $0x0, %eax
jne 0x4ef29
movq -0x108(%rbp), %rdi
callq 0x20970
movl %eax, -0x134(%rbp)
movq -0x100(%rbp), %rdi
callq 0x20970
movl %eax, -0x138(%rbp)
jmp 0x4ef42
movq -0x8(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq 0x8edf7(%rip), %rdi     # 0xddd32
movb $0x0, %al
callq 0x35d40
jmp 0x4ef44
movl $0x0, -0x130(%rbp)
cmpl $0x4, -0x130(%rbp)
jge 0x4ef95
movq -0x140(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x3b660
cmpl $0x0, %eax
jne 0x4ef82
movq -0x8(%rbp), %rsi
leaq 0x8ee04(%rip), %rdi     # 0xddd7f
movb $0x0, %al
callq 0x35d40
jmp 0x4ef84
movl -0x130(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x130(%rbp)
jmp 0x4ef4e
jmp 0x4efa3
movq -0x140(%rbp), %rdi
callq 0x3b440
jmp 0x4efa5
movl -0x134(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x138(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x140(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)