LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: sleep1000
void sleep1000(int milli)
/* Sleep for given number of 1000ths of second */
{
if (milli > 0)
    {
    struct timeval tv;
    tv.tv_sec = milli/1000;
    tv.tv_usec = (milli%1000)*1000;
    select(0, NULL, NULL, NULL, &tv);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jle 0x1837e
movl -0x4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
cltq
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
imull $0x3e8, %edx, %eax      # imm = 0x3E8
cltq
movq %rax, -0x10(%rbp)
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x18(%rbp), %r8
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x34c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: listDir
struct slName *listDir(char *dir, char *pattern)
/* Return an alphabetized list of all files that match 
 * the wildcard pattern in directory. */
{
struct slName *list = NULL, *name;
struct dirent *de;
DIR *d;

if ((d = opendir(dir)) == NULL)
    return NULL;
while ((de = readdir(d)) != NULL)
    {
    char *fileName = de->d_name;
    if (differentString(fileName, ".") && differentString(fileName, ".."))
	{
	if (pattern == NULL || wildMatch(pattern, fileName))
	    {
	    name = newSlName(fileName);
	    slAddHead(&list, name);
	    }
	}
    }
closedir(d);
slNameSort(&list);
return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31c0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x184a8
movq $0x0, -0x8(%rbp)
jmp 0x18544
jmp 0x184aa
movq -0x38(%rbp), %rdi
callq 0x35b0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x1852a
movq -0x30(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq 0xc4e8(%rip), %rsi      # 0x249bc
callq 0x3410
cmpl $0x0, %eax
je 0x18528
movq -0x40(%rbp), %rdi
leaq 0xdb98(%rip), %rsi      # 0x26081
callq 0x3410
cmpl $0x0, %eax
je 0x18528
cmpq $0x0, -0x18(%rbp)
je 0x1850c
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1b210
cmpl $0x0, %eax
je 0x18526
movq -0x40(%rbp), %rdi
callq 0x8650
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x18550
jmp 0x18528
jmp 0x184aa
movq -0x38(%rbp), %rdi
callq 0x3360
leaq -0x20(%rbp), %rdi
callq 0x8940
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: listDirRegEx
struct slName *listDirRegEx(char *dir, char *regEx, int flags)
/* Return an alphabetized list of all files that match 
 * the regular expression pattern in directory.
 * See REGCOMP(3) for flags (e.g. REG_ICASE)  */
{
struct slName *list = NULL, *name;
struct dirent *de;
DIR *d;
regex_t re;
int err = regcomp(&re, regEx, flags | REG_NOSUB);
if(err)
    errAbort("regcomp failed; err: %d", err);

if ((d = opendir(dir)) == NULL)
    return NULL;
while ((de = readdir(d)) != NULL)
    {
    char *fileName = de->d_name;
    if (differentString(fileName, ".") && differentString(fileName, ".."))
	{
	if (!regexec(&re, fileName, 0, NULL, 0))
	    {
	    name = newSlName(fileName);
	    slAddHead(&list, name);
	    }
	}
    }
closedir(d);
regfree(&re);
slNameSort(&list);
return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
orl $0x8, %edx
leaq -0x80(%rbp), %rdi
callq 0x3370
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
je 0x185e4
movl -0x84(%rbp), %esi
leaq 0xd830(%rip), %rdi      # 0x25e0d
movb $0x0, %al
callq 0xfd50
movq -0x10(%rbp), %rdi
callq 0x31c0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x18604
movq $0x0, -0x8(%rbp)
jmp 0x186c2
jmp 0x18606
movq -0x40(%rbp), %rdi
callq 0x35b0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1869f
movq -0x38(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
leaq 0xc382(%rip), %rsi      # 0x249bc
callq 0x3410
cmpl $0x0, %eax
je 0x1869a
movq -0x90(%rbp), %rdi
leaq 0xda2f(%rip), %rsi      # 0x26081
callq 0x3410
cmpl $0x0, %eax
je 0x1869a
movq -0x90(%rbp), %rsi
leaq -0x80(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
movq %rcx, %rdx
callq 0x3520
cmpl $0x0, %eax
jne 0x18698
movq -0x90(%rbp), %rdi
callq 0x8650
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x18550
jmp 0x1869a
jmp 0x18606
movq -0x40(%rbp), %rdi
callq 0x3360
leaq -0x80(%rbp), %rdi
callq 0x31e0
leaq -0x28(%rbp), %rdi
callq 0x8940
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: newFileInfo
struct fileInfo *newFileInfo(char *name, off_t size, bool isDir, int statErrno, 
	time_t lastAccess)
/* Return a new fileInfo. */
{
int len = strlen(name);
struct fileInfo *fi = needMem(sizeof(*fi) + len);
fi->size = size;
fi->isDir = isDir;
fi->statErrno = statErrno;
fi->lastAccess = lastAccess;
strcpy(fi->name, name);
return fi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31f0
movl %eax, -0x24(%rbp)
movslq -0x24(%rbp), %rdi
addq $0x28, %rdi
callq 0x152f0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movb -0x11(%rbp), %cl
movq -0x30(%rbp), %rax
movb %cl, 0x10(%rax)
movl -0x18(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
movq -0x8(%rbp), %rsi
callq 0x30c0
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: makeDir
boolean makeDir(char *dirName)
/* Make dir.  Returns TRUE on success.  Returns FALSE
 * if failed because directory exists.  Prints error
 * message and aborts on other error. */
{
int err;
if ((err = mkdir(dirName, 0777)) < 0)
    {
    if (errno != EEXIST)
	{
	perror("");
	errAbort("Couldn't make directory %s", dirName);
	}
    return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x30d0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jge 0x187f3
callq 0x30a0
cmpl $0x11, (%rax)
je 0x187ea
leaq 0xc527(%rip), %rdi      # 0x24cfa
callq 0x3610
movq -0x10(%rbp), %rsi
leaq 0xd642(%rip), %rdi      # 0x25e25
movb $0x0, %al
callq 0xfd50
movl $0x0, -0x4(%rbp)
jmp 0x187fa
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: getHost
char *getHost()
/* Return host name. */
{
static char *hostName = NULL;
static char buf[128];
if (hostName == NULL)
    {
    hostName = getenv("HTTP_HOST");
    if (hostName == NULL)
        {
	hostName = getenv("HOST");
	if (hostName == NULL)
	    {
	    if (hostName == NULL)
		{
		static struct utsname unamebuf;
		if (uname(&unamebuf) >= 0)
		    hostName = unamebuf.nodename;
		else
		    hostName = "unknown";
		}
	    }
        }
    strncpy(buf, hostName, sizeof(buf));
    chopSuffix(buf);
    hostName = buf;
    }
return hostName;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x1a094(%rip)     # 0x32b30
jne 0x18b51
leaq 0xd3ce(%rip), %rdi      # 0x25e77
callq 0x3030
movq %rax, 0x1a07b(%rip)     # 0x32b30
cmpq $0x0, 0x1a073(%rip)     # 0x32b30
jne 0x18b1f
leaq 0xd3d2(%rip), %rdi      # 0x25e98
callq 0x3030
movq %rax, 0x1a05e(%rip)     # 0x32b30
cmpq $0x0, 0x1a056(%rip)     # 0x32b30
jne 0x18b1d
cmpq $0x0, 0x1a04c(%rip)     # 0x32b30
jne 0x18b1b
leaq 0x1a0d3(%rip), %rdi     # 0x32bc0
callq 0x32b0
cmpl $0x0, %eax
jl 0x18b0b
leaq 0x1a0c2(%rip), %rax     # 0x32bc0
addq $0x41, %rax
movq %rax, 0x1a027(%rip)     # 0x32b30
jmp 0x18b19
leaq 0xd36f(%rip), %rax      # 0x25e81
movq %rax, 0x1a017(%rip)     # 0x32b30
jmp 0x18b1b
jmp 0x18b1d
jmp 0x18b1f
movq 0x1a00a(%rip), %rsi     # 0x32b30
leaq 0x1a013(%rip), %rdi     # 0x32b40
movl $0x80, %edx
callq 0x30b0
leaq 0x1a002(%rip), %rdi     # 0x32b40
callq 0xcda0
leaq 0x19ff6(%rip), %rax     # 0x32b40
movq %rax, 0x19fdf(%rip)     # 0x32b30
movq 0x19fd8(%rip), %rax     # 0x32b30
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: mysqlHost
char *mysqlHost()
/* Return host computer on network for mySQL database. */
{
boolean gotIt = FALSE;
static char *host = NULL;
if (!gotIt)
    {
    static char hostBuf[128];
    gotIt = TRUE;
    if (fileExists("mysqlHost"))
	{
	return (host = firstWordInFile("mysqlHost", hostBuf, sizeof(hostBuf)));
	}
    else
	return (host = getenv("MYSQLHOST"));
    }
return host;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x18bcb
movl $0x1, -0xc(%rbp)
leaq 0xd306(%rip), %rdi      # 0x25e89
callq 0xda10
cmpl $0x0, %eax
je 0x18bb2
leaq 0xd2f5(%rip), %rdi      # 0x25e89
leaq 0x1a1b5(%rip), %rsi     # 0x32d50
movl $0x80, %edx
callq 0xcf60
movq %rax, 0x1a19c(%rip)     # 0x32d48
movq %rax, -0x8(%rbp)
jmp 0x18bd6
leaq 0xd2da(%rip), %rdi      # 0x25e93
callq 0x3030
movq %rax, 0x1a183(%rip)     # 0x32d48
movq %rax, -0x8(%rbp)
jmp 0x18bd6
movq 0x1a176(%rip), %rax     # 0x32d48
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: semiUniqName
char *semiUniqName(char *base)
/* Figure out a name likely to be unique.
 * Name will have no periods.  Returns a static
 * buffer, so best to clone result unless using
 * immediately. */
{
int pid = getpid();
int num = time(NULL)&0xFFFFF;
char host[512];
strcpy(host, getHost());
char *s = strchr(host, '.');
if (s != NULL)
     *s = 0;
subChar(host, '-', '_');
subChar(host, ':', '_');
static char name[PATH_LEN];
safef(name, sizeof(name), "%s_%s_%x_%x",
	base, host, pid, num);
return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
callq 0x31a0
movl %eax, -0xc(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x34a0
andq $0xfffff, %rax          # imm = 0xFFFFF
movl %eax, -0x10(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x220(%rbp)
callq 0x18a90
movq -0x220(%rbp), %rdi
movq %rax, %rsi
callq 0x30c0
leaq -0x210(%rbp), %rdi
movl $0x2e, %esi
callq 0x3250
movq %rax, -0x218(%rbp)
cmpq $0x0, -0x218(%rbp)
je 0x18c57
movq -0x218(%rbp), %rax
movb $0x0, (%rax)
leaq -0x210(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x31f0
movq -0x230(%rbp), %rdi
movl %eax, %esi
movl $0x2d, %edx
movl $0x5f, %ecx
callq 0xb1b0
leaq -0x210(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x31f0
movq -0x228(%rbp), %rdi
movl %eax, %esi
movl $0x3a, %edx
movl $0x5f, %ecx
callq 0xb1b0
movq -0x8(%rbp), %rcx
leaq -0x210(%rbp), %r8
movl -0xc(%rbp), %r9d
movl -0x10(%rbp), %eax
leaq 0x1a0fc(%rip), %rdi     # 0x32dd0
movl $0x200, %esi            # imm = 0x200
leaq 0xd1bd(%rip), %rdx      # 0x25e9d
movl %eax, (%rsp)
movb $0x0, %al
callq 0xdc90
leaq 0x1a0df(%rip), %rax     # 0x32dd0
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: rTempName
char *rTempName(char *dir, char *base, char *suffix)
/* Make a temp name that's almost certainly unique. */
{
char *x;
static char fileName[PATH_LEN];
int i;
char *lastSlash = (lastChar(dir) == '/' ? "" : "/");
for (i=0;;++i)
    {
    x = semiUniqName(base);
    safef(fileName, sizeof(fileName), "%s%s%s%d%s",
    	dir, lastSlash, x, i, suffix);
    if (!fileExists(fileName))
        break;
    }
return fileName;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xaa00
movsbl %al, %edx
leaq 0xd1f1(%rip), %rax      # 0x25f18
leaq 0xbfcc(%rip), %rcx      # 0x24cfa
cmpl $0x2f, %edx
cmoveq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18be0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x20(%rbp), %r9
movl -0x24(%rbp), %r10d
movq -0x18(%rbp), %rax
leaq 0x1a268(%rip), %rdi     # 0x32fd0
movl $0x200, %esi            # imm = 0x200
leaq 0xd135(%rip), %rdx      # 0x25ea9
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0xdc90
leaq 0x1a245(%rip), %rdi     # 0x32fd0
callq 0xda10
cmpl $0x0, %eax
jne 0x18d97
jmp 0x18da4
jmp 0x18d99
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x18d40
leaq 0x1a225(%rip), %rax     # 0x32fd0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: simplifyPathToDir
char *simplifyPathToDir(char *path)
/* Return path with ~ and .. taken out.  Also any // or trailing /.   
 * freeMem result when done. */
{
/* Expand ~ if any with result in newPath */
char newPath[PATH_LEN];
int newLen = 0;
char *s = path;
if (*s == '~')
    {
    char *homeDir = getenv("HOME");
    if (homeDir == NULL)
        errAbort("No HOME environment var defined after ~ in simplifyPathToDir");
    ++s;
    if (*s == '/')  /*    ~/something      */
        {
	++s;
	safef(newPath, sizeof(newPath), "%s/", homeDir);
	}
    else            /*   ~something        */
	{
	safef(newPath, sizeof(newPath), "%s/../", homeDir);
	}
    newLen = strlen(newPath);
    }
int remainingLen  = strlen(s);
if (newLen + remainingLen >= sizeof(newPath))
    errAbort("path too big in simplifyPathToDir");
strcpy(newPath+newLen, s);

/* Remove //, .. and trailing / */
eatSlashSlashInPath(newPath);
eatExcessDotDotInPath(newPath);
int lastPos = strlen(newPath)-1;
if (lastPos > 0 && newPath[lastPos] == '/')
    newPath[lastPos] = 0;

return cloneString(newPath);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movl $0x0, -0x214(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x18efb
leaq 0xd07f(%rip), %rdi      # 0x25ecd
callq 0x3030
movq %rax, -0x228(%rbp)
cmpq $0x0, -0x228(%rbp)
jne 0x18e72
leaq 0xd067(%rip), %rdi      # 0x25ed2
movb $0x0, %al
callq 0xfd50
movq -0x220(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x18ec8
movq -0x220(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x228(%rbp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq 0xd050(%rip), %rdx      # 0x25f0f
movb $0x0, %al
callq 0xdc90
jmp 0x18ee9
leaq -0x210(%rbp), %rdi
movq -0x228(%rbp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq 0xd031(%rip), %rdx      # 0x25f13
movb $0x0, %al
callq 0xdc90
leaq -0x210(%rbp), %rdi
callq 0x31f0
movl %eax, -0x214(%rbp)
movq -0x220(%rbp), %rdi
callq 0x31f0
movl %eax, -0x22c(%rbp)
movl -0x214(%rbp), %eax
addl -0x22c(%rbp), %eax
cltq
cmpq $0x200, %rax            # imm = 0x200
jb 0x18f31
leaq 0xcff0(%rip), %rdi      # 0x25f1a
movb $0x0, %al
callq 0xfd50
leaq -0x210(%rbp), %rdi
movslq -0x214(%rbp), %rax
addq %rax, %rdi
movq -0x220(%rbp), %rsi
callq 0x30c0
leaq -0x210(%rbp), %rdi
callq 0x18fc0
leaq -0x210(%rbp), %rdi
callq 0x19030
leaq -0x210(%rbp), %rdi
callq 0x31f0
subq $0x1, %rax
movl %eax, -0x230(%rbp)
cmpl $0x0, -0x230(%rbp)
jle 0x18fa8
movslq -0x230(%rbp), %rax
movsbl -0x210(%rbp,%rax), %eax
cmpl $0x2f, %eax
jne 0x18fa8
movslq -0x230(%rbp), %rax
movb $0x0, -0x210(%rbp,%rax)
leaq -0x210(%rbp), %rdi
callq 0x7530
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: eatSlashSlashInPath
static void eatSlashSlashInPath(char *path)
/* Convert multiple // to single // */
{
char *s, *d;
s = d = path;
char c, lastC = 0;
while ((c = *s++) != 0)
    {
    if (c == '/' && lastC == c)
        continue;
    *d++ = c;
    lastC = c;
    }
*d = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, -0x10(%rbp)
movb $0x0, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movb %al, -0x19(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x19027
movsbl -0x19(%rbp), %eax
cmpl $0x2f, %eax
jne 0x1900b
movsbl -0x1a(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1900b
jmp 0x18fd8
movb -0x19(%rbp), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movb -0x19(%rbp), %al
movb %al, -0x1a(%rbp)
jmp 0x18fd8
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: eatExcessDotDotInPath
static void eatExcessDotDotInPath(char *path)
/* If there's a /.. in path take it out.  Turns 
 *      'this/long/../dir/file' to 'this/dir/file
 * and
 *      'this/../file' to 'file'  
 *
 * and
 *      'this/long/..' to 'this'
 * and
 *      'this/..' to  ''   
 * and
 *       /this/..' to '/' */
{
/* Take out each /../ individually */
for (;;)
    {
    /* Find first bit that needs to be taken out. */
    char *excess= strstr(path, "/../");
    char *excessEnd = excess+4;
    if (excess == NULL || excess == path)
        break;

    /* Look for a '/' before this */
    char *excessStart = matchingCharBeforeInLimits(path, excess, '/');
    if (excessStart == NULL) /* Preceding '/' not found */
         excessStart = path;
    else 
         excessStart += 1;
    strcpy(excessStart, excessEnd);
    }

/* Take out final /.. if any */
if (endsWith(path, "/.."))
    {
    if (!sameString(path, "/.."))  /* We don't want to turn this to blank. */
	{
	int len = strlen(path);
	char *excessStart = matchingCharBeforeInLimits(path, path+len-3, '/');
	if (excessStart == NULL) /* Preceding '/' not found */
	     excessStart = path;
	else 
	     excessStart += 1;
	*excessStart = 0;
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xcece(%rip), %rsi      # 0x25f15
callq 0x3730
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1906d
movq -0x10(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x1906f
jmp 0x190b1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x2f, %edx
callq 0xab40
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x19096
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x190a2
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x30c0
jmp 0x1903c
movq -0x8(%rbp), %rdi
leaq 0xcfc4(%rip), %rsi      # 0x26080
callq 0xa990
cmpl $0x0, %eax
je 0x1912e
movq -0x8(%rbp), %rdi
leaq 0xcfaf(%rip), %rsi      # 0x26080
callq 0x3410
cmpl $0x0, %eax
je 0x1912c
movq -0x8(%rbp), %rdi
callq 0x31f0
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq %rax, %rsi
addq $-0x3, %rsi
movl $0x2f, %edx
callq 0xab40
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x19119
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x19125
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
jmp 0x1912e
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: getUser
char *getUser()
/* Get user name */
{
uid_t uid = geteuid();
struct passwd *pw = getpwuid(uid);
if (pw == NULL)
    errnoAbort("getUser: can't get user name for uid %d", (int)uid);
return pw->pw_name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x32f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x31d0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x19174
movl -0x4(%rbp), %esi
leaq 0xcdcf(%rip), %rdi      # 0x25f3c
movb $0x0, %al
callq 0xfed0
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: mustFork
int mustFork()
/* Fork or abort. */
{
int childId = fork();
if (childId == -1)
    errnoAbort("mustFork: Unable to fork");
return childId;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x3720
movl %eax, -0x4(%rbp)
cmpl $-0x1, -0x4(%rbp)
jne 0x191b4
leaq 0xcdb7(%rip), %rdi      # 0x25f64
movb $0x0, %al
callq 0xfed0
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: rawKeyIn
int rawKeyIn()
/* Read in an unbuffered, unechoed character from keyboard. */
{
struct termios attr;
tcflag_t old;
char c;

/* Set terminal to non-echoing non-buffered state. */
if (tcgetattr(STDIN_FILENO, &attr) != 0)
    errAbort("Couldn't do tcgetattr");
old = attr.c_lflag;
attr.c_lflag &= ~ICANON;
attr.c_lflag &= ~ECHO;
if (tcsetattr(STDIN_FILENO, TCSANOW, &attr) == -1)
    errAbort("Couldn't do tcsetattr");

/* Read one byte */
if (read(STDIN_FILENO,&c,1) != 1)
   errnoAbort("rawKeyIn: I/O error");

/* Put back terminal to how it was. */
attr.c_lflag = old;
if (tcsetattr(STDIN_FILENO, TCSANOW, &attr) == -1)
    errAbort("Couldn't do tcsetattr2");
return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
xorl %edi, %edi
leaq -0x3c(%rbp), %rsi
callq 0x35f0
cmpl $0x0, %eax
je 0x191e6
leaq 0xcd9e(%rip), %rdi      # 0x25f7d
movb $0x0, %al
callq 0xfd50
movl -0x30(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x30(%rbp), %eax
andl $-0x3, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x30(%rbp)
xorl %esi, %esi
leaq -0x3c(%rbp), %rdx
movl %esi, %edi
callq 0x3600
cmpl $-0x1, %eax
jne 0x1921e
leaq 0xcd7c(%rip), %rdi      # 0x25f93
movb $0x0, %al
callq 0xfd50
xorl %edi, %edi
leaq -0x41(%rbp), %rsi
movl $0x1, %edx
callq 0x33a0
cmpq $0x1, %rax
je 0x19242
leaq 0xcd6e(%rip), %rdi      # 0x25fa9
movb $0x0, %al
callq 0xfed0
movl -0x40(%rbp), %eax
movl %eax, -0x30(%rbp)
xorl %esi, %esi
leaq -0x3c(%rbp), %rdx
movl %esi, %edi
callq 0x3600
cmpl $-0x1, %eax
jne 0x19268
leaq 0xcd5c(%rip), %rdi      # 0x25fbd
movb $0x0, %al
callq 0xfd50
movsbl -0x41(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: vaDumpStack
void vaDumpStack(char *format, va_list args)
/* debugging function to run the pstack program on the current process. In
 * prints a message, following by a new line, and then the stack track.  Just
 * prints errors to stderr rather than aborts. For debugging purposes
 * only.  */
{
static boolean inDumpStack = FALSE;  // don't allow re-entry if called from error handler
if (inDumpStack)
    return;
inDumpStack = TRUE;

fflush(stdout);  // clear buffer before forking
vfprintf(stderr, format, args);
fputc('\n', stderr);
fflush(stderr);
pid_t ppid = getpid();
pid_t pid = fork();
if (pid < 0)
    {
    perror("can't fork pstack");
    return;
    }
if (pid == 0)
    execPStack(ppid);
int wstat;
if (waitpid(pid, &wstat, 0) < 0)
    perror("waitpid on pstack failed");
else
    {
    if (WIFEXITED(wstat))
        {
        if (WEXITSTATUS(wstat) != 0)
            fprintf(stderr, "pstack failed\n");
        }
    else if (WIFSIGNALED(wstat))
        fprintf(stderr, "pstack signaled %d\n", WTERMSIG(wstat));
    }
inDumpStack = FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, 0x19ee9(%rip)     # 0x331d0
je 0x192ee
jmp 0x1940b
movl $0x1, 0x19ed8(%rip)     # 0x331d0
movq 0x18cc1(%rip), %rax     # 0x31fc0
movq (%rax), %rdi
callq 0x3500
movq 0x18ce2(%rip), %rax     # 0x31ff0
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x3640
movq 0x18ccb(%rip), %rax     # 0x31ff0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x3380
movq 0x18cb7(%rip), %rax     # 0x31ff0
movq (%rax), %rdi
callq 0x3500
callq 0x31a0
movl %eax, -0x14(%rbp)
callq 0x3720
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x19368
leaq 0xcc8b(%rip), %rdi      # 0x25fe9
callq 0x3610
jmp 0x1940b
cmpl $0x0, -0x18(%rbp)
jne 0x19376
movl -0x14(%rbp), %edi
callq 0x19420
movl -0x18(%rbp), %edi
leaq -0x1c(%rbp), %rsi
xorl %edx, %edx
callq 0x35e0
cmpl $0x0, %eax
jge 0x19397
leaq 0xcc6b(%rip), %rdi      # 0x25ffb
callq 0x3610
jmp 0x19401
movl -0x1c(%rbp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x193cc
movl -0x1c(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
cmpl $0x0, %eax
je 0x193ca
movq 0x18c37(%rip), %rax     # 0x31ff0
movq (%rax), %rdi
leaq 0xcc51(%rip), %rsi      # 0x26014
movb $0x0, %al
callq 0x3440
jmp 0x193ff
movl -0x1c(%rbp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0x193fd
movq 0x18c0a(%rip), %rax     # 0x31ff0
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
andl $0x7f, %edx
leaq 0xcc2d(%rip), %rsi      # 0x26023
movb $0x0, %al
callq 0x3440
jmp 0x193ff
jmp 0x19401
movl $0x0, 0x19dc5(%rip)     # 0x331d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: execPStack
static void execPStack(pid_t ppid)
/* exec pstack on the specified pid */
{
char *cmd[3], pidStr[32];
safef(pidStr, sizeof(pidStr), "%ld", (long)ppid);
cmd[0] = "pstack";
cmd[1] = pidStr;
cmd[2] = NULL;

// redirect stdout to stderr
if (dup2(2, 1) < 0)
    errAbort("dup2 failed");

execvp(cmd[0], cmd);
errAbort("exec failed: %s", cmd[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
leaq -0x40(%rbp), %rdi
movslq -0x4(%rbp), %rcx
movl $0x20, %esi
leaq 0xcc45(%rip), %rdx      # 0x26084
movb $0x0, %al
callq 0xdc90
leaq 0xcba7(%rip), %rax      # 0x25ff4
movq %rax, -0x20(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x10(%rbp)
movl $0x2, %edi
movl $0x1, %esi
callq 0x3230
cmpl $0x0, %eax
jge 0x19483
leaq 0xcc0c(%rip), %rdi      # 0x26088
movb $0x0, %al
callq 0xfd50
movq -0x20(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3660
movq -0x20(%rbp), %rsi
leaq 0xcbf9(%rip), %rdi      # 0x26094
movb $0x0, %al
callq 0xfd50
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: maybeTouchFile
boolean maybeTouchFile(char *fileName)
/* If file exists, set its access and mod times to now.  If it doesn't exist, create it.
 * Return FALSE if we have a problem doing so (e.g. when qateam is gdb'ing and code tries 
 * to touch some file owned by www). */
{
if (fileExists(fileName))
    {
    struct utimbuf ut;
    ut.actime = ut.modtime = clock1();
    int ret = utime(fileName, &ut);
    if (ret != 0)
	{
	warn("utime(%s) failed (ownership?)", fileName);
	return FALSE;
	}
    }
else
    {
    FILE *f = fopen(fileName, "w");
    if (f == NULL)
	return FALSE;
    else
	carefulClose(&f);
    }
return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xda10
cmpl $0x0, %eax
je 0x195aa
callq 0x18390
movq %rax, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3040
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x195a8
movq -0x10(%rbp), %rsi
leaq 0xca9f(%rip), %rdi      # 0x26037
movb $0x0, %al
callq 0xf8f0
movl $0x0, -0x4(%rbp)
jmp 0x195e0
jmp 0x195d9
movq -0x10(%rbp), %rdi
leaq 0xb4a0(%rip), %rsi      # 0x24a55
callq 0x3450
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x195ce
movl $0x0, -0x4(%rbp)
jmp 0x195e0
leaq -0x30(%rbp), %rdi
callq 0xcf30
jmp 0x195d9
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/osunix.c
// Function: isRegularFile
boolean isRegularFile(char *fileName)
/* Return TRUE if fileName is a regular file. */
{
struct stat st;

if (stat(fileName, &st) < 0)
    return FALSE;
if (S_ISREG(st.st_mode))
    return TRUE;
return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3240
cmpl $0x0, %eax
jge 0x1961d
movl $0x0, -0x4(%rbp)
jmp 0x1963f
movl -0x88(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x19638
movl $0x1, -0x4(%rbp)
jmp 0x1963f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineFree
void pipelineFree(struct pipeline **plPtr)
/* free a pipeline object */
{
struct pipeline *pl = *plPtr;
if (pl != NULL)
    {
    struct plProc *proc = pl->procs;
    while (proc != NULL)
        {
        struct plProc *delProc = proc;
        proc = proc->next;
        plProcFree(delProc);
        }
    freez(&pl->procName);
    freez(&pl->stdioBuf);
    freez(plPtr);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x19711
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x196ee
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x19720
jmp 0x196c9
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x15410
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x15410
movq -0x8(%rbp), %rdi
callq 0x15410
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: plProcFree
static void plProcFree(struct plProc *proc)
/* free a plProc object. */
{
int i;
for (i = 0; proc->cmd[i] != NULL; i++)
    freeMem(proc->cmd[i]);
freeMem(proc->cmd);
freeMem(proc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x19766
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x153e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x19733
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x153e0
movq -0x8(%rbp), %rdi
callq 0x153e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineOpenFd
struct pipeline *pipelineOpenFd(char ***cmds, unsigned opts,
                                int otherEndFd, int stderrFd)
/* Create a pipeline from an array of commands.  See pipeline.h for
 * full documentation. */
{
struct pipeline *pl;

checkOpts(opts);
pl = pipelineNew(cmds, opts);
if (opts & pipelineRead)
    pipelineStartRead(pl, otherEndFd, stderrFd, NULL, 0);
else
    pipelineStartWrite(pl, otherEndFd, stderrFd);
return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0xc(%rbp), %edi
callq 0x19800
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x19860
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x197e1
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x19950
jmp 0x197f0
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x199b0
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: checkOpts
static void checkOpts(unsigned opts)
/* check option set for consistency */
{
if (((opts & (pipelineRead|pipelineWrite)) == 0)
    || ((opts & (pipelineRead|pipelineWrite)) == (pipelineRead|pipelineWrite)))
    errAbort("must specify one of pipelineRead or pipelineWrite to pipelineOpen");
if ((opts & pipelineAppend) && ((opts & pipelineWrite) == 0))
    errAbort("pipelineAppend is valid only in conjunction with pipelineWrite");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x19821
movl -0x4(%rbp), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x1982f
leaq 0xc99a(%rip), %rdi      # 0x261c2
movb $0x0, %al
callq 0xfd50
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x19853
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x19853
leaq 0xc9b8(%rip), %rdi      # 0x26204
movb $0x0, %al
callq 0xfd50
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineNew
static struct pipeline* pipelineNew(char ***cmds, unsigned options)
/* create a new pipeline object. Doesn't start processes */
{
static char *memPseudoCmd[] = {"[mem]", NULL};
struct pipeline *pl;
int iCmd;

AllocVar(pl);
pl->groupLeader = -1;
pl->pipeFd = -1;
pl->options = options;
pl->procName = joinCmds(cmds);

if (cmds[0] == NULL)
    errAbort("no commands in pipeline");

if (options & pipelineMemInput)
    {
    /* add proc for forked process to write memory to pipeline */
    slAddTail(&pl->procs, plProcNew(memPseudoCmd, pl));
    }

for(iCmd = 0; cmds[iCmd] != NULL; iCmd++)
    slAddTail(&pl->procs, plProcNew(cmds[iCmd], pl));

return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x38, %edi
callq 0x152f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rdi
callq 0x1a130
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x198c9
leaq 0xc987(%rip), %rdi      # 0x26249
movb $0x0, %al
callq 0xfd50
movl -0xc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x198f8
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x18cd9(%rip), %rdi     # 0x325c0
callq 0x1a200
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x7a40
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x19942
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x1a200
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x7a40
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x198ff
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineOpen
struct pipeline *pipelineOpen(char ***cmds, unsigned opts,
                              char *otherEndFile, char *stderrFile)
/* Create a pipeline from an array of commands.  See pipeline.h for
 * full documentation */
{
int otherEndFd;
int stderrFd = (stderrFile == NULL) ? STDERR_FILENO : openWrite(stderrFile, FALSE);

checkOpts(opts);
boolean append = ((opts & pipelineAppend) != 0);
if (opts & pipelineRead)
    otherEndFd = (otherEndFile == NULL) ? STDIN_FILENO : openRead(otherEndFile);
else
    otherEndFd = (otherEndFile == NULL) ? STDOUT_FILENO : openWrite(otherEndFile, append);
struct pipeline *pl = pipelineOpenFd(cmds, opts, otherEndFd, stderrFd);
safeClose(&otherEndFd);
if (stderrFile != NULL)
    safeClose(&stderrFd);
return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x19a28
movl $0x2, %eax
movl %eax, -0x3c(%rbp)
jmp 0x19a36
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x19af0
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0xc(%rbp), %edi
callq 0x19800
movl -0xc(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x19a85
cmpq $0x0, -0x18(%rbp)
jne 0x19a71
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0x19a7d
movq -0x18(%rbp), %rdi
callq 0x19b60
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x19aab
cmpq $0x0, -0x18(%rbp)
jne 0x19a96
movl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x19aa5
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x19af0
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
callq 0x19790
movq %rax, -0x38(%rbp)
leaq -0x24(%rbp), %rdi
callq 0x19ba0
cmpq $0x0, -0x20(%rbp)
je 0x19ada
leaq -0x28(%rbp), %rdi
callq 0x19ba0
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: openWrite
static int openWrite(char *fname, boolean append)
/* open a file for write access */
{
int flags = O_WRONLY|O_CREAT;
if (append)
    flags |= O_APPEND;
else
    flags |= O_TRUNC;
int fd = open(fname, flags, 0666);
if (fd < 0)
    errnoAbort("can't open for write access: %s", fname);
return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x41, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x19b19
movl -0x10(%rbp), %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, -0x10(%rbp)
jmp 0x19b24
movl -0x10(%rbp), %eax
orl $0x200, %eax            # imm = 0x200
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x3580
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x19b52
movq -0x8(%rbp), %rsi
leaq 0xc9fc(%rip), %rdi      # 0x26547
movb $0x0, %al
callq 0xfed0
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: openRead
static int openRead(char *fname)
/* open a file for reading */
{
int fd = open(fname, O_RDONLY);
if (fd < 0)
    errnoAbort("can't open for read access: %s", fname);
return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x3580
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x19b94
movq -0x8(%rbp), %rsi
leaq 0xc9da(%rip), %rdi      # 0x26567
movb $0x0, %al
callq 0xfed0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: safeClose
static void safeClose(int *fdPtr)
/* Close with error checking.  *fdPtr == -1 indicated already closed */
{
int fd = *fdPtr;
if (fd != -1)
    {
    if (close(fd) < 0)
        errnoAbort("close failed on fd %d", fd);
    *fdPtr = -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
je 0x19be3
movl -0xc(%rbp), %edi
callq 0x3330
cmpl $0x0, %eax
jge 0x19bd9
movl -0xc(%rbp), %esi
leaq 0xc9b4(%rip), %rdi      # 0x26586
movb $0x0, %al
callq 0xfed0
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineOpenMem
struct pipeline *pipelineOpenMem(char ***cmds, unsigned opts,
                                 void *otherEndBuf, size_t otherEndBufSize,
                                 int stderrFd)
/* Create a pipeline from an array of commands, with the pipeline input/output
 * in a memory buffer.  See pipeline.h for full documentation.  Currently only
 * input to a read pipeline is supported  */
{
struct pipeline *pl;
checkOpts(opts);
if (opts & pipelineWrite)
    errAbort("pipelineOpenMem only supports read pipelines at this time");
opts |= pipelineMemInput;

pl = pipelineNew(cmds, opts);
pipelineStartRead(pl, STDIN_FILENO, stderrFd, otherEndBuf, otherEndBufSize);
return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl -0xc(%rbp), %edi
callq 0x19800
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x19c2c
leaq 0xc47f(%rip), %rdi      # 0x260a4
movb $0x0, %al
callq 0xfd50
movl -0xc(%rbp), %eax
orl $0x8, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x19860
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
xorl %esi, %esi
callq 0x19950
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineFile
FILE *pipelineFile(struct pipeline *pl)
/* Get a FILE object wrapped around the pipeline.  Do not close the FILE, is
 * owned by the pipeline object.  A FILE is created on first call to this
 * function.  Subsequent calls return the same FILE.*/
{
if (pl->pipeFh == NULL)
    {
    /* create FILE* on first access */
    char *mode = (pl->options & pipelineRead) ? "r" : "w";
    if (pl->pipeLf != NULL)
        errAbort("can't call pipelineFile after having associated a lineFile with a pipeline");
    pl->pipeFh = fdopen(pl->pipeFd, mode);
    if (pl->pipeFh == NULL)
        errnoAbort("fdopen failed for: %s", pl->procName);
    pl->stdioBuf = needLargeMem(FILE_BUF_SIZE);
    setvbuf(pl->pipeFh, pl->stdioBuf,  _IOFBF, FILE_BUF_SIZE);
    }
return pl->pipeFh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x19e54
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edx
andl $0x1, %edx
leaq 0xac99(%rip), %rax      # 0x24a55
leaq 0xda85(%rip), %rcx      # 0x27848
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x19de7
leaq 0xc2fe(%rip), %rdi      # 0x260de
movb $0x0, %al
callq 0xfd50
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rsi
callq 0x3550
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x19e23
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0xc30d(%rip), %rdi      # 0x26129
movb $0x0, %al
callq 0xfed0
movl $0x10000, %edi          # imm = 0x10000
callq 0x14ff0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
xorl %edx, %edx
movl $0x10000, %ecx          # imm = 0x10000
callq 0x3560
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineLineFile
struct lineFile *pipelineLineFile(struct pipeline *pl)
/* Get a lineFile object wrapped around the pipeline.  Do not close the
 * lineFile, is owned by the pipeline object.  A lineFile is created on first
 * call to this function.  Subsequent calls return the same object.*/
{
if (pl->pipeLf == NULL)
    {
    /* create line on first acess */
    if (pl->pipeFh != NULL)
        errAbort("can't call pipelineLineFile after having associated a FILE with a pipeline");
    if (pl->options & pipelineWrite)
        errAbort("can't associated a lineFile with a write pipeline");
    pl->pipeLf = lineFileAttach(pipelineDesc(pl), TRUE, pl->pipeFd);
    }
return pl->pipeLf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x19ee5
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x19ea0
leaq 0xc2a6(%rip), %rdi      # 0x2613f
movb $0x0, %al
callq 0xfd50
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x19ebd
leaq 0xc2d4(%rip), %rdi      # 0x2618a
movb $0x0, %al
callq 0xfd50
movq -0x8(%rbp), %rdi
callq 0x19d50
movq %rax, %rdi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movl $0x1, %esi
callq 0x12010
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: closePipeline
static void closePipeline(struct pipeline *pl)
/* Close the pipe file */
{
if (pl->pipeFh != NULL)
    closePipelineFile(pl);
else if (pl->pipeLf != NULL)
    lineFileClose(&pl->pipeLf);
else
    {
    if (close(pl->pipeFd) < 0)
        errAbort("close failed on pipeline: %s ", pl->procName);
    }
pl->pipeFd = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x19f52
movq -0x8(%rbp), %rdi
callq 0x1acd0
jmp 0x19f97
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x19f6c
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
callq 0x12ea0
jmp 0x19f95
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edi
callq 0x3330
cmpl $0x0, %eax
jge 0x19f93
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0xc610(%rip), %rdi      # 0x2659c
movb $0x0, %al
callq 0xfd50
jmp 0x19f95
jmp 0x19f97
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/pipeline.c
// Function: groupLeaderWait
static int groupLeaderWait(struct pipeline *pl)
/* Wait for group leader to complete. If pipelineNoAbort was specified, return
 * the exit code of the first group process exit non-zero, or zero if none
 * failed. */
{
int status;
pid_t pid = waitpid(-pl->groupLeader, &status, 0);
if (pid < 0)
    errnoAbort("waitpid failed");
if (WIFSIGNALED(status))
    errAbort("process pipeline terminated on signal %d", WTERMSIG(status));
assert(WIFEXITED(status));

if ((WEXITSTATUS(status) != 0) && !(pl->options & pipelineNoAbort))
    errAbort("pipeline exited with %d", WEXITSTATUS(status));
return WEXITSTATUS(status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
xorl %edi, %edi
subl 0xc(%rax), %edi
leaq -0xc(%rbp), %rsi
xorl %edx, %edx
callq 0x35e0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x19fe7
leaq 0xc455(%rip), %rdi      # 0x26435
movb $0x0, %al
callq 0xfed0
movl -0xc(%rbp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0x1a00e
movl -0xc(%rbp), %esi
andl $0x7f, %esi
leaq 0xc5f0(%rip), %rdi      # 0x265f7
movb $0x0, %al
callq 0xfd50
movl -0xc(%rbp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x1a01b
jmp 0x1a03a
leaq 0xc5fe(%rip), %rdi      # 0x26620
leaq 0xc262(%rip), %rsi      # 0x2628b
movl $0x1a3, %edx            # imm = 0x1A3
leaq 0xc5fd(%rip), %rcx      # 0x26632
callq 0x32d0
movl -0xc(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
cmpl $0x0, %eax
je 0x1a073
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x1a073
movl -0xc(%rbp), %esi
andl $0xff00, %esi           # imm = 0xFF00
sarl $0x8, %esi
leaq 0xc5ed(%rip), %rdi      # 0x26659
movb $0x0, %al
callq 0xfd50
movl -0xc(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)