LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/internet.c
// Function: internetHostIp
bits32 internetHostIp(char *hostName)
/* Get IP v4 address (in host byte order) for hostName.
 * Warn and return 0 if there's a problem. */
{
bits32 ret;
if (internetIsDottedQuad(hostName))
    {
    internetDottedQuadToIp(hostName, &ret);
    }
else
    {
    /* getaddrinfo is thread-safe and widely supported */
    struct addrinfo hints, *res;
    struct in_addr addr;
    int err;

    zeroBytes(&hints, sizeof(hints));
    hints.ai_family = AF_INET;

    if ((err = getaddrinfo(hostName, NULL, &hints, &res)) != 0) 
	{
	warn("getaddrinfo() error on hostName=%s: %s\n", hostName, gai_strerror(err));
	return 0;
	}

    addr = ((struct sockaddr_in *)(res->ai_addr))->sin_addr;

    ret = ntohl((uint32_t)addr.s_addr);

    freeaddrinfo(res);

    }
return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6c1e0
cmpl $0x0, %eax
je 0x6c2cc
movq -0x10(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x6c360
jmp 0x6c34e
leaq -0x48(%rbp), %rdi
movl $0x30, %esi
callq 0x6c3e0
movl $0x2, -0x44(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x6940
movl %eax, -0x58(%rbp)
cmpl $0x0, %eax
je 0x6c32c
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x58(%rbp), %edi
callq 0x6a20
movq -0x60(%rbp), %rsi
movq %rax, %rdx
leaq 0x75744(%rip), %rdi     # 0xe1a60
movb $0x0, %al
callq 0x358e0
movl $0x0, -0x4(%rbp)
jmp 0x6c354
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %edi
callq 0x6970
movl %eax, -0x14(%rbp)
movq -0x50(%rbp), %rdi
callq 0x6990
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/internet.c
// Function: internetDottedQuadToIp
boolean internetDottedQuadToIp(char *dottedQuad, bits32 *retIp)
/* Convert dotted quad format address to IP4 address in
 * host byte order.  Warn and return FALSE if there's a 
 * problem. */
{
#ifndef __CYGWIN32__
struct in_addr ia;
if (inet_pton(AF_INET, dottedQuad, &ia) < 0)
    {
    warn("internetDottedQuadToIp problem on %s: %s", dottedQuad, strerror(errno));
    return FALSE;
    }
*retIp = ntohl(ia.s_addr);
return TRUE;
#else
warn("Sorry, internetDottedQuadToIp not supported in Windows.");
return FALSE;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl $0x2, %edi
leaq -0x1c(%rbp), %rdx
callq 0x6e40
cmpl $0x0, %eax
jge 0x6c3b9
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x6060
movl (%rax), %edi
callq 0x6220
movq -0x28(%rbp), %rsi
movq %rax, %rdx
leaq 0x75718(%rip), %rdi     # 0xe1ac1
movb $0x0, %al
callq 0x358e0
movl $0x0, -0x4(%rbp)
jmp 0x6c3d0
movl -0x1c(%rbp), %edi
callq 0x6970
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/internet.c
// Function: internetFillInAddress
boolean internetFillInAddress(char *hostName, int port, struct sockaddr_in *address)
/* Fill in address. Return FALSE if can't.  */
{
ZeroVar(address);
address->sin_family = AF_INET;
address->sin_port = htons(port);
if (hostName == NULL)
    address->sin_addr.s_addr = INADDR_ANY;
else
    {
    if ((address->sin_addr.s_addr = htonl(internetHostIp(hostName))) == 0)
	return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0x10, %esi
callq 0x6c3e0
movq -0x20(%rbp), %rax
movw $0x2, (%rax)
movl -0x14(%rbp), %eax
movzwl %ax, %edi
callq 0x6090
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x2(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x6c464
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
jmp 0x6c48b
movq -0x10(%rbp), %rdi
callq 0x6c2a0
movl %eax, %edi
callq 0x64f0
movq -0x20(%rbp), %rcx
movl %eax, 0x4(%rcx)
cmpl $0x0, %eax
jne 0x6c489
movl $0x0, -0x4(%rbp)
jmp 0x6c492
jmp 0x6c48b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/internet.c
// Function: internetIpToDottedQuad
boolean internetIpToDottedQuad(bits32 ip, char dottedQuad[17])
/* Convert IP4 address in host byte order to dotted quad 
 * notation.  Warn and return FALSE if there's a 
 * problem. */
{
#ifndef __CYGWIN32__
struct in_addr ia;
zeroBytes(dottedQuad, 17);
ZeroVar(&ia);
ia.s_addr = htonl(ip);
if (inet_ntop(AF_INET, &ia, dottedQuad, 16) == NULL)
    {
    warn("conversion problem on 0x%x in internetIpToDottedQuad: %s", 
    	ip, strerror(errno));
    return FALSE;
    }
return TRUE;
#else
warn("Sorry, internetIpToDottedQuad not supported in Windows.");
return FALSE;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x11, %esi
callq 0x6c3e0
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
callq 0x6c3e0
movl -0x8(%rbp), %edi
callq 0x64f0
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdx
movl $0x2, %edi
leaq -0x14(%rbp), %rsi
movl $0x10, %ecx
callq 0x6710
cmpq $0x0, %rax
jne 0x6c522
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
callq 0x6060
movl (%rax), %edi
callq 0x6220
movl -0x18(%rbp), %esi
movq %rax, %rdx
leaq 0x75576(%rip), %rdi     # 0xe1a88
movb $0x0, %al
callq 0x358e0
movl $0x0, -0x4(%rbp)
jmp 0x6c529
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/icebert[P]pblat/lib/internet.c
// Function: internetParseDottedQuad
void internetParseDottedQuad(char *dottedQuad, unsigned char quad[4])
/* Parse dotted quads into quad */
{
char *s = dottedQuad;
int i;
if (!internetIsDottedQuad(s))
    errAbort("%s is not a dotted quad", s);
for (i=0; i<4; ++i)
    {
    quad[i] = atoi(s);
    s = strchr(s, '.') + 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6c1e0
cmpl $0x0, %eax
jne 0x6c578
movq -0x18(%rbp), %rsi
leaq 0x75579(%rip), %rdi     # 0xe1aea
movb $0x0, %al
callq 0x35d40
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0x6c5bc
movq -0x18(%rbp), %rdi
callq 0x6bd0
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rdi
movl $0x2e, %esi
callq 0x6260
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6c57f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/internet.c
// Function: internetUnpackIp
void internetUnpackIp(bits32 packed, unsigned char unpacked[4])
/* Convert from 32 bit to 4-byte format with most significant
 * byte first. */
{
int i;
for (i=3; i>=0; --i)
    {
    unpacked[i] = (packed&0xff);
    packed >>= 8;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x3, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x6c611
movl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x4(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6c5e2
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/internet.c
// Function: internetIpInSubnet
boolean internetIpInSubnet(unsigned char unpackedIp[4], unsigned char subnet[4])
/* Return true if unpacked IP address is in subnet. */
{
int i;
for (i=0; i<4; ++i)
    {
    unsigned char c = subnet[i];
    if (c == 255)
        return TRUE;
    if (c != unpackedIp[i])
        return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0x6c685
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
cmpl $0xff, %eax
jne 0x6c65b
movl $0x1, -0x4(%rbp)
jmp 0x6c68c
movzbl -0x1d(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x6c678
movl $0x0, -0x4(%rbp)
jmp 0x6c68c
jmp 0x6c67a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6c633
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/portimpl.c
// Function: pathsInDirAndSubdirs
struct slName *pathsInDirAndSubdirs(char *dir, char *wildcard)
/* Return list of all non-directory files in dir and it's
 * subdirs.  Returns path to files including dir and subdir. */
{
struct slName *list = NULL;
rPathsInDirAndSubdirs(dir, wildcard, &list);
slReverse(&list);
return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x6e860
leaq -0x18(%rbp), %rdi
callq 0x2aad0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/portimpl.c
// Function: rPathsInDirAndSubdirs
static void rPathsInDirAndSubdirs(char *dir, char *wildcard, struct slName **pList)
/* Recursively add directory contents that match wildcard (* for all) to list */
{
struct fileInfo *fi, *fiList = listDirX(dir, wildcard, TRUE);
for (fi = fiList; fi != NULL; fi = fi->next)
   {
   if (fi->isDir)
       rPathsInDirAndSubdirs(fi->name, wildcard, pList);
   else
       slNameAddHead(pList, fi->name);
   }
slFreeList(&fiList);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x4ac00
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6e8da
movq -0x20(%rbp), %rax
cmpb $0x0, 0x10(%rax)
je 0x6e8ba
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6e860
jmp 0x6e8cb
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x20, %rsi
callq 0x2bc40
jmp 0x6e8cd
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x6e892
leaq -0x28(%rbp), %rdi
callq 0x2ab30
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/portimpl.c
// Function: setupWss
static void setupWss()
{
if (wss == NULL)
    {
    char *s = getenv("SERVER_SOFTWARE");
    wss = &wssDefault;
    if (s == NULL)
        {
	wss = &wssCommandLine;
        }
    else
        {
        if (strncmp(wssMicrosoftII.name, s, strlen(wssMicrosoftII.name)) == 0)
            wss = &wssMicrosoftII;
        else if (strncmp(wssMicrosoftPWS.name, s, strlen(wssMicrosoftPWS.name)) == 0)
            wss = &wssMicrosoftPWS;
	else 
	    {
	    char *t = getenv("HTTP_HOST");
	    if (t != NULL)
		{
		if (sameWord(t, "Crunx"))
		    wss = &wssLinux;
		else if (endsWith(t, "brc.mcw.edu"))
		    wss = &wssBrcMcw;
		}
	    }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
cmpq $0x0, 0xac208(%rip)     # 0x11ab08
jne 0x6ea40
leaq 0x73672(%rip), %rdi     # 0xe1f7f
callq 0x68d0
movq %rax, -0x8(%rbp)
leaq 0x985db(%rip), %rax     # 0x106ef8
movq %rax, 0xac1e4(%rip)     # 0x11ab08
cmpq $0x0, -0x8(%rbp)
jne 0x6e93e
leaq 0x98626(%rip), %rax     # 0x106f58
movq %rax, 0xac1cf(%rip)     # 0x11ab08
jmp 0x6ea3e
leaq 0x9863b(%rip), %rax     # 0x106f80
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x98625(%rip), %rax     # 0x106f80
movq (%rax), %rdi
callq 0x62c0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
callq 0x6320
cmpl $0x0, %eax
jne 0x6e98b
leaq 0x98601(%rip), %rax     # 0x106f80
movq %rax, 0xac182(%rip)     # 0x11ab08
jmp 0x6ea3c
leaq 0x9861e(%rip), %rax     # 0x106fb0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x98608(%rip), %rax     # 0x106fb0
movq (%rax), %rdi
callq 0x62c0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
callq 0x6320
cmpl $0x0, %eax
jne 0x6e9d5
leaq 0x985e4(%rip), %rax     # 0x106fb0
movq %rax, 0xac135(%rip)     # 0x11ab08
jmp 0x6ea3a
leaq 0x6e89e(%rip), %rdi     # 0xdd27a
callq 0x68d0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6ea38
movq -0x10(%rbp), %rdi
leaq 0x73598(%rip), %rsi     # 0xe1f8f
callq 0x2b9f0
cmpl $0x0, %eax
jne 0x6ea11
leaq 0x98520(%rip), %rax     # 0x106f28
movq %rax, 0xac0f9(%rip)     # 0x11ab08
jmp 0x6ea36
movq -0x10(%rbp), %rdi
leaq 0x73579(%rip), %rsi     # 0xe1f95
callq 0x2d9a0
cmpl $0x0, %eax
je 0x6ea34
leaq 0x9849b(%rip), %rax     # 0x106ec8
movq %rax, 0xac0d4(%rip)     # 0x11ab08
jmp 0x6ea36
jmp 0x6ea38
jmp 0x6ea3a
jmp 0x6ea3c
jmp 0x6ea3e
jmp 0x6ea40
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/servCrunx.c
// Function: makeTempName
static void _makeTempName(struct tempName *tn, char *base, char *suffix)
/* Figure out a temp name, and how CGI and HTML will access it. */
{
char *tname;
char *tempDirCgi = __trashDir;
char *tempDirHtml = "/trash";
int tlcLen = strlen(tempDirCgi);
int tlhLen = strlen(tempDirHtml);

tname = rTempName(tempDirCgi, base, suffix);
strcpy(tn->forCgi, tname);
memcpy(tn->forHtml, tempDirHtml, tlhLen);
strcpy(tn->forHtml+tlhLen, tn->forCgi+tlcLen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x983c5(%rip), %rax     # 0x106f50
movq %rax, -0x28(%rbp)
leaq 0x73415(%rip), %rax     # 0xe1fab
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x62c0
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x62c0
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4afe0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6680
movq -0x8(%rbp), %rdi
addq $0x1000, %rdi           # imm = 0x1000
movq -0x30(%rbp), %rsi
movslq -0x38(%rbp), %rdx
callq 0x6570
movq -0x8(%rbp), %rdi
addq $0x1000, %rdi           # imm = 0x1000
movslq -0x38(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movslq -0x34(%rbp), %rax
addq %rax, %rsi
callq 0x6680
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/servcl.c
// Function: trashDir
static char *_trashDir()
/* Return the path for temporary files: default is "." but env var JKTRASH can override. */
{
static char *__trashDir = NULL;
if (__trashDir == NULL)
    {
    char *jktrashDir = getenv("JKTRASH");
    __trashDir = jktrashDir ? jktrashDir : ".";
    }
return __trashDir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0xabe00(%rip)     # 0x11ab10
jne 0x6ed4b
leaq 0x732d4(%rip), %rdi     # 0xe1fed
callq 0x68d0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x6ed33
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x6ed40
leaq 0x6b9c6(%rip), %rax     # 0xda700
movq %rax, -0x10(%rbp)
jmp 0x6ed40
movq -0x10(%rbp), %rax
movq %rax, 0xabdc5(%rip)     # 0x11ab10
movq 0xabdbe(%rip), %rax     # 0x11ab10
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: decompress_peek
static size_t decompress_peek(hFILE *fp, unsigned char *dest, size_t destsize)
{
    // Typically at most a couple of hundred bytes of input are required
    // to get a few bytes of output from inflate(), so hopefully this buffer
    // size suffices in general.
    unsigned char buffer[512];
    z_stream zs;
    ssize_t npeek = hpeek(fp, buffer, sizeof buffer);

    if (npeek < 0) return 0;

    zs.zalloc = NULL;
    zs.zfree = NULL;
    zs.next_in = buffer;
    zs.avail_in = npeek;
    zs.next_out = dest;
    zs.avail_out = destsize;
    if (inflateInit2(&zs, 31) != Z_OK) return 0;

    while (zs.total_out < destsize)
        if (inflate(&zs, Z_SYNC_FLUSH) != Z_OK) break;

    destsize = zs.total_out;
    inflateEnd(&zs);

    return destsize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x220(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
callq 0xa1cb0
movq %rax, -0x298(%rbp)
cmpq $0x0, -0x298(%rbp)
jge 0x7055a
movq $0x0, -0x8(%rbp)
jmp 0x70614
movq $0x0, -0x250(%rbp)
movq $0x0, -0x248(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x298(%rbp), %rax
movl %eax, -0x288(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x270(%rbp)
leaq -0x290(%rbp), %rdi
movl $0x1f, %esi
leaq 0x720ee(%rip), %rdx     # 0xe26a1
movl $0x70, %ecx
callq 0x65d0
cmpl $0x0, %eax
je 0x705cc
movq $0x0, -0x8(%rbp)
jmp 0x70614
jmp 0x705ce
movq -0x268(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x705f5
leaq -0x290(%rbp), %rdi
movl $0x2, %esi
callq 0x6540
cmpl $0x0, %eax
je 0x705f3
jmp 0x705f5
jmp 0x705ce
movq -0x268(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x6720
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: parse_version
static void
parse_version(htsFormat *fmt, const unsigned char *u, const unsigned char *ulim)
{
    const char *str  = (const char *) u;
    const char *slim = (const char *) ulim;
    const char *s;

    fmt->version.major = fmt->version.minor = -1;

    for (s = str; s < slim; s++) if (!isdigit(*s)) break;
    if (s < slim) {
        fmt->version.major = atoi(str);
        if (*s == '.') {
            str = &s[1];
            for (s = str; s < slim; s++) if (!isdigit(*s)) break;
            if (s < slim)
                fmt->version.minor = atoi(str);
        }
        else
            fmt->version.minor = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movw $0xffff, 0xa(%rax)      # imm = 0xFFFF
movq -0x8(%rbp), %rax
movw $0xffff, 0x8(%rax)      # imm = 0xFFFF
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x706ac
callq 0x6780
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x7069c
jmp 0x706ac
jmp 0x7069e
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x70670
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x70756
movq -0x20(%rbp), %rdi
callq 0x6bd0
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x7074a
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x7072a
callq 0x6780
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x7071a
jmp 0x7072a
jmp 0x7071c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x706ee
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x70748
movq -0x20(%rbp), %rdi
callq 0x6bd0
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xa(%rax)
jmp 0x70754
movq -0x8(%rbp), %rax
movw $0x0, 0xa(%rax)
jmp 0x70756
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_opt_apply
int hts_opt_apply(htsFile *fp, hts_opt *opts) {
    hts_opt *last = NULL;

    for (; opts;  opts = (last=opts)->next)
        if (hts_set_opt(fp,  opts->opt,  opts->val) != 0)
            return -1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7166b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movb $0x0, %al
callq 0x71ce0
cmpl $0x0, %eax
je 0x71657
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71672
jmp 0x71659
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x71628
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_set_opt
int hts_set_opt(htsFile *fp, enum hts_fmt_option opt, ...) {
    int r;
    va_list args;

    if (opt == HTS_OPT_NTHREADS) {
        va_start(args, opt);
        int nthreads = va_arg(args, int);
        va_end(args);
        return hts_set_threads(fp, nthreads);
    }

    if (fp->format.format != cram)
        return 0;

    va_start(args, opt);
    r = cram_set_voption(fp->fp.cram, opt, args);
    va_end(args);

    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x71d1b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x65, -0x14(%rbp)
jne 0x71de5
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x71da7
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x71dc4
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
leaq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x72690
movl %eax, -0x4(%rbp)
jmp 0x71e3d
movq -0x10(%rbp), %rax
cmpl $0x6, 0x44(%rax)
je 0x71df8
movl $0x0, -0x4(%rbp)
jmp 0x71e3d
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movl -0x14(%rbp), %esi
leaq -0x30(%rbp), %rdx
callq 0x8b040
movl %eax, -0x18(%rbp)
leaq -0x30(%rbp), %rax
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: format_category
static enum htsFormatCategory format_category(enum htsExactFormat fmt)
{
    switch (fmt) {
    case bam:
    case sam:
    case cram:
        return sequence_data;

    case vcf:
    case bcf:
        return variant_data;

    case bai:
    case crai:
    case csi:
    case gzi:
    case tbi:
        return index_file;

    case bed:
        return region_list;

    case unknown_format:
    case binary_format:
    case text_format:
    case format_maximum:
        break;
    }

    return unknown_category;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0x3, %eax
jb 0x72327
jmp 0x722a8
movl -0xc(%rbp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x72303
jmp 0x722b5
movl -0xc(%rbp), %eax
subl $0x5, %eax
je 0x72315
jmp 0x722bf
movl -0xc(%rbp), %eax
subl $0x6, %eax
je 0x72303
jmp 0x722c9
movl -0xc(%rbp), %eax
subl $0x7, %eax
je 0x72315
jmp 0x722d3
movl -0xc(%rbp), %eax
addl $-0x8, %eax
subl $0x2, %eax
jb 0x7230c
jmp 0x722e0
movl -0xc(%rbp), %eax
addl $-0xa, %eax
subl $0x3, %eax
jb 0x72315
jmp 0x722ed
movl -0xc(%rbp), %eax
subl $0xd, %eax
je 0x7231e
jmp 0x722f7
movl -0xc(%rbp), %eax
subl $0x7fff, %eax           # imm = 0x7FFF
je 0x72327
jmp 0x72329
movl $0x1, -0x4(%rbp)
jmp 0x72330
movl $0x2, -0x4(%rbp)
jmp 0x72330
movl $0x3, -0x4(%rbp)
jmp 0x72330
movl $0x4, -0x4(%rbp)
jmp 0x72330
jmp 0x72329
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_format_file_extension
const char *hts_format_file_extension(const htsFormat *format) {
    if (!format)
        return "?";

    switch (format->format) {
    case sam:  return "sam";
    case bam:  return "bam";
    case bai:  return "bai";
    case cram: return "cram";
    case crai: return "crai";
    case vcf:  return "vcf";
    case bcf:  return "bcf";
    case csi:  return "csi";
    case gzi:  return "gzi";
    case tbi:  return "tbi";
    case bed:  return "bed";
    default:   return "?";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x725af
leaq 0x680c2(%rip), %rax     # 0xda668
movq %rax, -0x8(%rbp)
jmp 0x7267c
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl $-0x3, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xa, %eax
ja 0x72671
movq -0x18(%rbp), %rax
leaq 0x6fad5(%rip), %rcx     # 0xe20a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x6ff01(%rip), %rax     # 0xe24e4
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x6fef5(%rip), %rax     # 0xe24e8
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x6ffea(%rip), %rax     # 0xe25ed
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x6fedc(%rip), %rax     # 0xe24ec
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x701a1(%rip), %rax     # 0xe27be
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x6ff28(%rip), %rax     # 0xe2552
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x6ff20(%rip), %rax     # 0xe2557
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x6ffae(%rip), %rax     # 0xe25f2
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x70aaa(%rip), %rax     # 0xe30fb
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x68704(%rip), %rax     # 0xdad62
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x6feda(%rip), %rax     # 0xe2545
movq %rax, -0x8(%rbp)
jmp 0x7267c
leaq 0x67ff0(%rip), %rax     # 0xda668
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_set_threads
int hts_set_threads(htsFile *fp, int n)
{
    if (fp->format.compression == bgzf) {
        return bgzf_mt(fp->fp.bgzf, n, 256);
    } else if (fp->format.format == cram) {
        return hts_set_opt(fp, CRAM_OPT_NTHREADS, n);
    }
    else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4c(%rax)
jne 0x726c3
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movl -0x14(%rbp), %esi
movl $0x100, %edx            # imm = 0x100
callq 0x9c990
movl %eax, -0x4(%rbp)
jmp 0x726ec
movq -0x10(%rbp), %rax
cmpl $0x6, 0x44(%rax)
jne 0x726e5
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movl $0xe, %esi
movb $0x0, %al
callq 0x71ce0
movl %eax, -0x4(%rbp)
jmp 0x726ec
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_useek
int hts_useek(htsFile *fp, long uoffset, int where)
{
    if ( fp->is_bin )
        return bgzf_useek(fp->fp.bgzf, uoffset, where);
    else
    {
        ks_rewind((kstream_t*)fp->fp.voidp);
        ((kstream_t*)fp->fp.voidp)->seek_pos = uoffset;
        return bgzf_useek(((kstream_t*)fp->fp.voidp)->f, uoffset, where);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7281a
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x9e5b0
movl %eax, -0x4(%rbp)
jmp 0x72876
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x8(%rax), %ecx
andl $-0x4, %ecx
orl $0x0, %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x9e5b0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_idx_finish
void hts_idx_finish(hts_idx_t *idx, uint64_t final_offset)
{
    int i;
    if (idx == NULL || idx->z.finished) return; // do not run this function on an empty index or multiple times
    if (idx->z.save_tid >= 0) {
        insert_to_b(idx->bidx[idx->z.save_tid], idx->z.save_bin, idx->z.save_off, final_offset);
        insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.off_beg, final_offset);
        insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.n_mapped, idx->z.n_unmapped);
    }
    for (i = 0; i < idx->n; ++i) {
        update_loff(idx, i, (idx->fmt == HTS_FMT_CSI));
        compress_binning(idx, i);
    }
    idx->z.finished = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x743e1
movq -0x8(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x743e6
jmp 0x744d5
movq -0x8(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jl 0x74485
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x50(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x8(%rbp), %rax
movl 0x44(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
movq -0x10(%rbp), %rcx
callq 0x744e0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x50(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
addl $0x1, %esi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
movq -0x10(%rbp), %rcx
callq 0x744e0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x50(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
addl $0x1, %esi
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rcx
callq 0x744e0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x744ca
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %edx
callq 0x745e0
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x74850
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7448c
movq -0x8(%rbp), %rax
movl $0x1, 0x54(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: insert_to_b
static inline void insert_to_b(bidx_t *b, int bin, uint64_t beg, uint64_t end)
{
    khint_t k;
    bins_t *l;
    int absent;
    k = kh_put(bin, b, bin, &absent);
    l = &kh_value(b, k);
    if (absent) {
        l->m = 1; l->n = 0;
        l->list = (hts_pair64_t*)calloc(l->m, sizeof(hts_pair64_t));
    }
    if (l->n == l->m) {
        l->m <<= 1;
        l->list = (hts_pair64_t*)realloc(l->list, l->m * sizeof(hts_pair64_t));
    }
    l->list[l->n].u = beg;
    l->list[l->n++].v = end;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x34(%rbp), %rdx
callq 0x77ca0
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x74557
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x30(%rbp), %rax
movslq (%rax), %rdi
movl $0x10, %esi
callq 0x6460
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x74593
movq -0x30(%rbp), %rax
movl (%rax), %ecx
shll %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movslq (%rax), %rsi
shlq $0x4, %rsi
callq 0x6c80
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movl 0x4(%rsi), %edx
movl %edx, %edi
addl $0x1, %edi
movl %edi, 0x4(%rsi)
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_idx_save
int hts_idx_save(const hts_idx_t *idx, const char *fn, int fmt)
{
    int ret, save;
    char *fnidx = (char*)calloc(1, strlen(fn) + 5);
    if (fnidx == NULL) return -1;

    strcpy(fnidx, fn);
    switch (fmt) {
    case HTS_FMT_BAI: strcat(fnidx, ".bai"); break;
    case HTS_FMT_CSI: strcat(fnidx, ".csi"); break;
    case HTS_FMT_TBI: strcat(fnidx, ".tbi"); break;
    default: abort();
    }

    ret = hts_idx_save_as(idx, fn, fnidx, fmt);
    save = errno;
    free(fnidx);
    errno = save;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x62c0
movq %rax, %rsi
addq $0x5, %rsi
movl $0x1, %edi
callq 0x6460
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x75614
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x756bc
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6680
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
testl %eax, %eax
je 0x75653
jmp 0x7562d
movl -0x34(%rbp), %eax
subl $0x1, %eax
je 0x75641
jmp 0x75637
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0x75665
jmp 0x75677
movq -0x30(%rbp), %rdi
leaq 0x6cfa0(%rip), %rsi     # 0xe25ec
callq 0x6d60
jmp 0x7567c
movq -0x30(%rbp), %rdi
leaq 0x6cf93(%rip), %rsi     # 0xe25f1
callq 0x6d60
jmp 0x7567c
movq -0x30(%rbp), %rdi
leaq 0x656f1(%rip), %rsi     # 0xdad61
callq 0x6d60
jmp 0x7567c
callq 0x63b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x756d0
movl %eax, -0x20(%rbp)
callq 0x6060
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
callq 0x6880
movl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
callq 0x6060
movl -0x38(%rbp), %ecx
movl %ecx, (%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_parse_reg
const char *hts_parse_reg(const char *s, int *beg, int *end)
{
    char *hyphen;
    const char *colon = strrchr(s, ':');
    if (colon == NULL) {
        *beg = 0; *end = INT_MAX;
        return s + strlen(s);
    }

    *beg = hts_parse_decimal(colon+1, &hyphen, HTS_PARSE_THOUSANDS_SEP) - 1;
    if (*beg < 0) *beg = 0;

    if (*hyphen == '\0') *end = INT_MAX;
    else if (*hyphen == '-') *end = hts_parse_decimal(hyphen+1, NULL, HTS_PARSE_THOUSANDS_SEP);
    else return NULL;

    if (*beg >= *end) return NULL;
    return colon;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3a, %esi
callq 0x67b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x76fa5
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x7fffffff, (%rax)     # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x7704a
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0x76bc0
subq $0x1, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jge 0x76fda
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x76ff2
movq -0x20(%rbp), %rax
movl $0x7fffffff, (%rax)     # imm = 0x7FFFFFFF
jmp 0x7702a
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x7701e
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x76bc0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x77028
movq $0x0, -0x8(%rbp)
jmp 0x7704a
jmp 0x7702a
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x77042
movq $0x0, -0x8(%rbp)
jmp 0x7704a
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_itr_querys
hts_itr_t *hts_itr_querys(const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr, hts_itr_query_func *itr_query, hts_readrec_func *readrec)
{
    int tid, beg, end;
    const char *q;

    if (strcmp(reg, ".") == 0)
        return itr_query(idx, HTS_IDX_START, 0, 0, readrec);
    else if (strcmp(reg, "*") == 0)
        return itr_query(idx, HTS_IDX_NOCOOR, 0, 0, readrec);

    q = hts_parse_reg(reg, &beg, &end);
    if (q) {
        char *tmp = (char*)alloca(q - reg + 1);
        strncpy(tmp, reg, q - reg);
        tmp[q - reg] = 0;
        tid = getid(hdr, tmp);
    }
    else {
        // not parsable as a region, but possibly a sequence named "foo:a"
        tid = getid(hdr, reg);
        beg = 0; end = INT_MAX;
    }

    if (tid < 0) return NULL;
    return itr_query(idx, tid, beg, end, readrec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x63675(%rip), %rsi     # 0xda700
callq 0x6a40
cmpl $0x0, %eax
jne 0x770b5
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %r8
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq %rax, -0x8(%rbp)
jmp 0x771b0
movq -0x18(%rbp), %rdi
leaq 0x6d658(%rip), %rsi     # 0xe4718
callq 0x6a40
cmpl $0x0, %eax
jne 0x770ea
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %r8
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq %rax, -0x8(%rbp)
jmp 0x771b0
jmp 0x770ec
movq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x76f40
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x77166
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rax, %rcx
addq $0x10, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0x6370
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq *%rax
movl %eax, -0x3c(%rbp)
jmp 0x77185
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x7fffffff, -0x44(%rbp) # imm = 0x7FFFFFFF
cmpl $0x0, -0x3c(%rbp)
jge 0x77195
movq $0x0, -0x8(%rbp)
jmp 0x771b0
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movl -0x44(%rbp), %ecx
movq -0x38(%rbp), %r8
callq *%rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_idx_getfn
char *hts_idx_getfn(const char *fn, const char *ext)
{
    int i, l_fn, l_ext;
    char *fnidx;
    const char *ret;
    l_fn = strlen(fn); l_ext = strlen(ext);
    fnidx = (char*)calloc(l_fn + l_ext + 1, 1);
    strcpy(fnidx, fn); strcpy(fnidx + l_fn, ext);
    if ((ret = test_and_fetch(fnidx)) == 0) {
        for (i = l_fn - 1; i > 0; --i)
            if (fnidx[i] == '.') break;
        strcpy(fnidx + i, ext);
        ret = test_and_fetch(fnidx);
    }
    if (ret == 0) {
        free(fnidx);
        return 0;
    }
    l_fn = strlen(ret);
    memmove(fnidx, ret, l_fn + 1);
    return fnidx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x62c0
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x62c0
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x6460
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6680
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x6680
movq -0x30(%rbp), %rdi
callq 0x775b0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x77556
movl -0x20(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x77535
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0x77528
jmp 0x77535
jmp 0x7752a
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7750f
movq -0x30(%rbp), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x6680
movq -0x30(%rbp), %rdi
callq 0x775b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x77570
movq -0x30(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0x7759a
movq -0x38(%rbp), %rdi
callq 0x62c0
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x6c60
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: test_and_fetch
static const char *test_and_fetch(const char *fn)
{
    FILE *fp;
    if (hisremote(fn)) {
        hFILE *fp_remote;
#ifdef NOTNOW
        const int buf_size = 1 * 1024 * 1024;
        uint8_t *buf;
        int l;
        const char *p;
        for (p = fn + strlen(fn) - 1; p >= fn; --p)
            if (*p == '/') break;
        ++p; // p now points to the local file name
        // Attempt to open local file first
        if ((fp = fopen((char*)p, "rb")) != 0)
        {
            fclose(fp);
            return (char*)p;
        }
#endif
        // Attempt to open remote file. Stay quiet on failure, it is OK to fail when trying first .csi then .tbi index.
        if ((fp_remote = hopen(fn, "r")) == 0) return 0;
if (hclose(fp_remote) != 0) fprintf(stderr, "[E::%s] fail to close remote file '%s'\n", __func__, fn);
return fn;
#ifdef NOTNOW
        if ((fp = fopen(p, "w")) == 0) {
            if (hts_verbose >= 1) fprintf(stderr, "[E::%s] fail to create file '%s' in the working directory\n", __func__, p);
            hclose_abruptly(fp_remote);
            return 0;
        }
        if (hts_verbose >= 3) fprintf(stderr, "[M::%s] downloading file '%s' to local directory\n", __func__, fn);
        buf = (uint8_t*)calloc(buf_size, 1);
        while ((l = hread(fp_remote, buf, buf_size)) > 0) fwrite(buf, 1, l, fp);
        free(buf);
        fclose(fp);
        if (hclose(fp_remote) != 0) fprintf(stderr, "[E::%s] fail to close remote file '%s'\n", __func__, fn);
        return (char*)p;
#endif
    } else {
        if ((fp = fopen(fn, "rb")) == 0) return 0;
        fclose(fp);
        return (char*)fn;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa2db0
cmpl $0x0, %eax
je 0x77629
movq -0x10(%rbp), %rdi
leaq 0x687c1(%rip), %rsi     # 0xdfd96
callq 0xa2a70
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x775ee
movq $0x0, -0x8(%rbp)
jmp 0x7765e
movq -0x20(%rbp), %rdi
callq 0xa23e0
cmpl $0x0, %eax
je 0x7761f
movq 0x8d9cd(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x10(%rbp), %rcx
leaq 0x6b097(%rip), %rsi     # 0xe26a8
leaq 0x6b0b8(%rip), %rdx     # 0xe26d0
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7765e
movq -0x10(%rbp), %rdi
leaq 0x60d0a(%rip), %rsi     # 0xd833e
callq 0x6860
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x7764d
movq $0x0, -0x8(%rbp)
jmp 0x7765e
movq -0x18(%rbp), %rdi
callq 0x66e0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_idx_load
hts_idx_t *hts_idx_load(const char *fn, int fmt)
{
    char *fnidx;
    hts_idx_t *idx;
    fnidx = hts_idx_getfn(fn, ".csi");
    if (! fnidx) fnidx = hts_idx_getfn(fn, fmt == HTS_FMT_BAI? ".bai" : ".tbi");
    if (fnidx == 0) return 0;

    idx = hts_idx_load2(fn, fnidx);
    free(fnidx);
    return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x6af67(%rip), %rsi     # 0xe25f1
callq 0x77490
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x776bf
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %ecx
leaq 0x636b9(%rip), %rsi     # 0xdad61
leaq 0x6af3d(%rip), %rax     # 0xe25ec
cmpl $0x1, %ecx
cmoveq %rax, %rsi
callq 0x77490
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x776d0
movq $0x0, -0x8(%rbp)
jmp 0x776f2
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x77700
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6880
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_idx_load2
hts_idx_t *hts_idx_load2(const char *fn, const char *fnidx)
{
    // Check that the index file is up to date, the main file might have changed
    struct stat stat_idx,stat_main;
    if ( !stat(fn, &stat_main) && !stat(fnidx, &stat_idx) )
    {
        if ( stat_idx.st_mtime < stat_main.st_mtime )
            fprintf(stderr, "Warning: The index file is older than the data file: %s\n", fnidx);
    }

    return hts_idx_load_local(fnidx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x6630
cmpl $0x0, %eax
jne 0x77768
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x6630
cmpl $0x0, %eax
jne 0x77768
movq -0x48(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jge 0x77766
movq 0x8d87f(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x6af09(%rip), %rsi     # 0xe2668
movb $0x0, %al
callq 0x6a80
jmp 0x77768
movq -0x10(%rbp), %rdi
callq 0x77780
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw (%rax,%rax)