LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_lpileup.c
// Function: bam_lplbuf_reset
void bam_lplbuf_reset(bam_lplbuf_t *buf)
{
	freenode_t *p, *q;
	bam_plbuf_reset(buf->plbuf);
	for (p = buf->head; p->next;) {
		q = p->next;
		mp_free(buf->mp, p);
		p = q;
	}
	buf->head = buf->tail;
	buf->max_level = 0;
	buf->n_cur = buf->n_pre = 0;
	buf->n_nodes = 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x476140
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x477e0c
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x477e60
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x477dd5
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x4(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x40(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_lpileup.c
// Function: mp_free
static inline void mp_free(mempool_t *mp, freenode_t *p)
{
	--mp->cnt; p->next = 0; p->cnt = TV_GAP;
	if (mp->n == mp->max) {
		mp->max = mp->max? mp->max<<1 : 256;
		mp->buf = (freenode_t**)realloc(mp->buf, sizeof(freenode_t*) * mp->max);
	}
	mp->buf[mp->n++] = p;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x8(%rsp), %rax
movl (%rax), %ecx
andl $0xfffffff, %ecx        # imm = 0xFFFFFFF
orl $0x20000000, %ecx       # imm = 0x20000000
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
movq 0x10(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x477f07
movq 0x10(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x477ec9
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
shll %eax
movl %eax, 0x4(%rsp)
jmp 0x477ed4
movl $0x100, %eax            # imm = 0x100
movl %eax, 0x4(%rsp)
jmp 0x477ed4
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rax
movslq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x340d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x4(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x4(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_lpileup.c
// Function: bam_lplbuf_init
bam_lplbuf_t *bam_lplbuf_init(bam_pileup_f func, void *data)
{
	bam_lplbuf_t *tv;
	tv = (bam_lplbuf_t*)calloc(1, sizeof(bam_lplbuf_t));
	tv->mp = mp_init();
	tv->head = tv->tail = mp_alloc(tv->mp);
	tv->func = func;
	tv->user_data = data;
	tv->plbuf = bam_plbuf_init(tview_func, tv);
	return (bam_lplbuf_t*)tv;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl $0x1, %edi
movl $0x60, %esi
callq 0x32f50
movq %rax, (%rsp)
callq 0x478890
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rax)
movq (%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x477fd0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x38(%rax)
movq (%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x50(%rax)
movq (%rsp), %rsi
leaq 0x8a(%rip), %rdi        # 0x478040
callq 0x475ff0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x58(%rax)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_lpileup.c
// Function: bam_lplbuf_destroy
void bam_lplbuf_destroy(bam_lplbuf_t *tv)
{
	freenode_t *p, *q;
	free(tv->cur_level); free(tv->pre_level);
	bam_plbuf_destroy(tv->plbuf);
	free(tv->aux);
	for (p = tv->head; p->next;) {
		q = p->next;
		mp_free(tv->mp, p); p = q;
	}
	mp_free(tv->mp, p);
	assert(tv->mp->cnt == 0);
	mp_destroy(tv->mp);
	free(tv);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x34078
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x34078
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x476120
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x34078
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x478796
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x477e60
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x47875f
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x477e60
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
cmpl $0x0, (%rax)
jne 0x4787b9
jmp 0x4787d8
leaq 0x101f26(%rip), %rdi    # 0x57a6e6
leaq 0x101f30(%rip), %rsi    # 0x57a6f7
movl $0xbe, %edx
leaq 0x101f4f(%rip), %rcx    # 0x57a722
callq 0x2fdc0
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x478800
movq 0x10(%rsp), %rdi
callq 0x34078
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: kftp_connect
int kftp_connect(knetFile *ftp)
{
	ftp->ctrl_fd = socket_connect(ftp->host, ftp->port);
	if (ftp->ctrl_fd == -1) return -1;
	kftp_get_response(ftp);
	kftp_send_cmd(ftp, "USER anonymous\r\n", 1);
	kftp_send_cmd(ftp, "PASS kftp@\r\n", 1);
	kftp_send_cmd(ftp, "TYPE I\r\n", 1);
	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x482b70
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x8(%rsp), %rax
cmpl $-0x1, 0x20(%rax)
jne 0x482b0f
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x482b63
movq 0x8(%rsp), %rdi
callq 0x482d40
movq 0x8(%rsp), %rdi
leaq 0xf83cb(%rip), %rsi     # 0x57aef0
movl $0x1, %edx
callq 0x482f20
movq 0x8(%rsp), %rdi
leaq 0xf83c6(%rip), %rsi     # 0x57af01
movl $0x1, %edx
callq 0x482f20
movq 0x8(%rsp), %rdi
leaq 0xf83bd(%rip), %rsi     # 0x57af0e
movl $0x1, %edx
callq 0x482f20
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: kftp_reconnect
int kftp_reconnect(knetFile *ftp)
{
	if (ftp->ctrl_fd != -1) {
		netclose(ftp->ctrl_fd);
		ftp->ctrl_fd = -1;
	}
	netclose(ftp->fd);
	ftp->fd = -1;
	return kftp_connect(ftp);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
cmpl $-0x1, 0x20(%rax)
je 0x482fe6
movq (%rsp), %rax
movl 0x20(%rax), %edi
callq 0x2f750
movq (%rsp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq (%rsp), %rax
movl 0x4(%rax), %edi
callq 0x2f750
movq (%rsp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq (%rsp), %rdi
callq 0x482ad0
popq %rcx
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: kftp_parse_url
knetFile *kftp_parse_url(const char *fn, const char *mode)
{
	knetFile *fp;
	char *p;
	int l;
	if (strstr(fn, "ftp://") != fn) return 0;
	for (p = (char*)fn + 6; *p && *p != '/'; ++p);
	if (*p != '/') return 0;
	l = p - fn - 6;
	fp = calloc(1, sizeof(knetFile));
	fp->type = KNF_TYPE_FTP;
	fp->fd = -1;
	/* the Linux/Mac version of socket_connect() also recognizes a port
	 * like "ftp", but the Windows version does not. */
	fp->port = strdup("21");
	fp->host = calloc(l + 1, 1);
	if (strchr(mode, 'c')) fp->no_reconnect = 1;
	strncpy(fp->host, fn + 6, l);
	fp->retr = calloc(strlen(p) + 8, 1);
	sprintf(fp->retr, "RETR %s\r\n", p);
    fp->size_cmd = calloc(strlen(p) + 8, 1);
    sprintf(fp->size_cmd, "SIZE %s\r\n", p);
	fp->seek_offset = 0;
	return fp;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
leaq 0xf7220(%rip), %rsi     # 0x57a24a
callq 0x31a20
cmpq 0x28(%rsp), %rax
je 0x483044
movq $0x0, 0x30(%rsp)
jmp 0x483200
movq 0x28(%rsp), %rax
addq $0x6, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xb(%rsp)
je 0x483077
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x483081
jmp 0x483093
jmp 0x483083
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x483052
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x4830ae
movq $0x0, 0x30(%rsp)
jmp 0x483200
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
subq $0x6, %rax
movl %eax, 0xc(%rsp)
movl $0x1, %edi
movl $0x80, %esi
callq 0x32f50
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl $0x2, (%rax)
movq 0x18(%rsp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
leaq 0xf7e22(%rip), %rdi     # 0x57af17
callq 0x326e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x18(%rax)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x32f50
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rdi
movl $0x63, %esi
callq 0x322d0
cmpq $0x0, %rax
je 0x483147
movq 0x18(%rsp), %rax
movl $0x1, 0x3c(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x28(%rsp), %rsi
addq $0x6, %rsi
movslq 0xc(%rsp), %rdx
callq 0x33190
movq 0x10(%rsp), %rdi
callq 0x30e70
movq %rax, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x32f50
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x10(%rsp), %rdx
leaq 0xf7d7b(%rip), %rsi     # 0x57af1a
movb $0x0, %al
callq 0x31400
movq 0x10(%rsp), %rdi
callq 0x30e70
movq %rax, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x32f50
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x10(%rsp), %rdx
leaq 0xf7d42(%rip), %rsi     # 0x57af24
movb $0x0, %al
callq 0x31400
movq 0x18(%rsp), %rax
movq $0x0, 0x60(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: kftp_connect_file
int kftp_connect_file(knetFile *fp)
{
	int ret;
	long long file_size;
	if (fp->fd != -1) {
		netclose(fp->fd);
		if (fp->no_reconnect) kftp_get_response(fp);
	}
	kftp_pasv_prep(fp);
    kftp_send_cmd(fp, fp->size_cmd, 1);
#ifndef _WIN32
    if ( sscanf(fp->response,"%*d %lld", &file_size) != 1 )
    {
        fprintf(stderr,"[kftp_connect_file] %s\n", fp->response);
        return -1;
    }
#else
	const char *p = fp->response;
	while (*p != ' ') ++p;
	while (*p < '0' || *p > '9') ++p;
	file_size = strtoint64(p);
#endif
	fp->file_size = file_size;
	if (fp->offset>=0) {
		char tmp[32];
#ifndef _WIN32
		sprintf(tmp, "REST %lld\r\n", (long long)fp->offset);
#else
		strcpy(tmp, "REST ");
		int64tostr(tmp + 5, fp->offset);
		strcat(tmp, "\r\n");
#endif
		kftp_send_cmd(fp, tmp, 1);
	}
	kftp_send_cmd(fp, fp->retr, 0);
	kftp_pasv_connect(fp);
	ret = kftp_get_response(fp);
	if (ret != 150) {
		fprintf(stderr, "[kftp_connect_file] %s\n", fp->response);
		netclose(fp->fd);
		fp->fd = -1;
		return -1;
	}
	fp->is_ready = 1;
	return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpl $-0x1, 0x4(%rax)
je 0x483248
movq 0x38(%rsp), %rax
movl 0x4(%rax), %edi
callq 0x2f750
movq 0x38(%rsp), %rax
cmpl $0x0, 0x3c(%rax)
je 0x483246
movq 0x38(%rsp), %rdi
callq 0x482d40
jmp 0x483248
movq 0x38(%rsp), %rdi
callq 0x4833a0
movq 0x38(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x58(%rax), %rsi
movl $0x1, %edx
callq 0x482f20
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
leaq 0xf7cb4(%rip), %rsi     # 0x57af2e
leaq 0x28(%rsp), %rdx
movb $0x0, %al
callq 0x2fce0
cmpl $0x1, %eax
je 0x4832b9
movq 0x178d36(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdx
leaq 0xf7c92(%rip), %rsi     # 0x57af37
movb $0x0, %al
callq 0x33960
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x48338e
movq 0x28(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x68(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jl 0x4832ff
movq %rsp, %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0xf7c69(%rip), %rsi     # 0x57af4f
movb $0x0, %al
callq 0x31400
movq 0x38(%rsp), %rdi
movq %rsp, %rsi
movl $0x1, %edx
callq 0x482f20
movq 0x38(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rsi
xorl %edx, %edx
callq 0x482f20
movq 0x38(%rsp), %rdi
callq 0x4834d0
movq 0x38(%rsp), %rdi
callq 0x482d40
movl %eax, 0x34(%rsp)
cmpl $0x96, 0x34(%rsp)
je 0x48337a
movq 0x178c8b(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdx
leaq 0xf7be7(%rip), %rsi     # 0x57af37
movb $0x0, %al
callq 0x33960
movq 0x38(%rsp), %rax
movl 0x4(%rax), %edi
callq 0x2f750
movq 0x38(%rsp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x48338e
movq 0x38(%rsp), %rax
movl $0x1, 0x40(%rax)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: kftp_pasv_prep
static int kftp_pasv_prep(knetFile *ftp)
{
	char *p;
	int v[6];
	kftp_send_cmd(ftp, "PASV\r\n", 1);
	for (p = ftp->response; *p && *p != '('; ++p);
	if (*p != '(') return -1;
	++p;
	sscanf(p, "%d,%d,%d,%d,%d,%d", &v[0], &v[1], &v[2], &v[3], &v[4], &v[5]);
	memcpy(ftp->pasv_ip, v, 4 * sizeof(int));
	ftp->pasv_port = (v[4]<<8&0xff00) + v[5];
	return 0;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
leaq 0xf7cbe(%rip), %rsi     # 0x57b073
movl $0x1, %edx
callq 0x482f20
movq 0x48(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x1f(%rsp)
je 0x4833f2
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
setne %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x4833fc
jmp 0x48340e
jmp 0x4833fe
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x4833cd
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
je 0x483428
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x4834bc
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
leaq 0x20(%rsp), %rcx
addq $0x4, %rcx
leaq 0x20(%rsp), %r8
addq $0x8, %r8
leaq 0x20(%rsp), %r9
addq $0xc, %r9
leaq 0x20(%rsp), %r10
addq $0x10, %r10
leaq 0x20(%rsp), %rax
addq $0x14, %rax
leaq 0xf7c06(%rip), %rsi     # 0x57b07a
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2fce0
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x24(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x2c(%rax)
movl 0x30(%rsp), %ecx
shll $0x8, %ecx
andl $0xff00, %ecx           # imm = 0xFF00
addl 0x34(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x34(%rax)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: kftp_pasv_connect
static int kftp_pasv_connect(knetFile *ftp)
{
	char host[80], port[10];
	if (ftp->pasv_port == 0) {
		fprintf(stderr, "[kftp_pasv_connect] kftp_pasv_prep() is not called before hand.\n");
		return -1;
	}
	sprintf(host, "%d.%d.%d.%d", ftp->pasv_ip[0], ftp->pasv_ip[1], ftp->pasv_ip[2], ftp->pasv_ip[3]);
	sprintf(port, "%d", ftp->pasv_port);
	ftp->fd = socket_connect(host, port);
	if (ftp->fd == -1) return -1;
	return 0;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq 0x68(%rsp), %rax
cmpl $0x0, 0x34(%rax)
jne 0x483509
movq 0x178add(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0xf7b97(%rip), %rsi     # 0x57b08c
movb $0x0, %al
callq 0x33960
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x48358f
leaq 0x10(%rsp), %rdi
movq 0x68(%rsp), %rax
movl 0x24(%rax), %edx
movq 0x68(%rsp), %rax
movl 0x28(%rax), %ecx
movq 0x68(%rsp), %rax
movl 0x2c(%rax), %r8d
movq 0x68(%rsp), %rax
movl 0x30(%rax), %r9d
leaq 0xf7b96(%rip), %rsi     # 0x57b0cd
movb $0x0, %al
callq 0x31400
leaq 0x6(%rsp), %rdi
movq 0x68(%rsp), %rax
movl 0x34(%rax), %edx
leaq 0xf6e9d(%rip), %rsi     # 0x57a3ef
movb $0x0, %al
callq 0x31400
leaq 0x10(%rsp), %rdi
leaq 0x6(%rsp), %rsi
callq 0x482b70
movl %eax, %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x68(%rsp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0x483587
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x48358f
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: my_netread
static off_t my_netread(int fd, void *buf, off_t len)
{
	off_t rest = len, curr, l = 0;
	/* recv() and read() may not read the required length of data with
	 * one call. They have to be called repeatedly. */
	while (rest) {
		if (socket_wait(fd, 1) <= 0) break; // socket is not ready for reading
		curr = netread(fd, buf + l, rest);
		/* According to the glibc manual, section 13.2, a zero returned
		 * value indicates end-of-file (EOF), which should mean that
		 * read() will not return zero if EOF has not been met but data
		 * are not immediately available. */
		if (curr == 0) break;
		l += curr; rest -= curr;
	}
	return l;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x8(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x483c7c
movl 0x34(%rsp), %edi
movl $0x1, %esi
callq 0x4842f0
cmpl $0x0, %eax
jg 0x483c32
jmp 0x483c7c
movl 0x34(%rsp), %edi
movq 0x28(%rsp), %rsi
addq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x30190
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x483c59
jmp 0x483c7c
movq 0x10(%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x483c15
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: knet_open
knetFile *knet_open(const char *fn, const char *mode)
{
	knetFile *fp = 0;
	if (mode[0] != 'r') {
		fprintf(stderr, "[kftp_open] only mode \"r\" is supported.\n");
		return 0;
	}
	if (strstr(fn, "ftp://") == fn) {
		fp = kftp_parse_url(fn, mode);
		if (fp == 0) return 0;
		if (kftp_connect(fp) == -1) {
			knet_close(fp);
			return 0;
		}
		kftp_connect_file(fp);
	} else if (strstr(fn, "http://") == fn) {
		fp = khttp_parse_url(fn, mode);
		if (fp == 0) return 0;
		khttp_connect_file(fp);
	} else { // local file
#ifdef _WIN32
		/* In windows, O_BINARY is necessary. In Linux/Mac, O_BINARY may
		 * be undefined on some systems, although it is defined on my
		 * Mac and the Linux I have tested on. */
		int fd = open(fn, O_RDONLY | O_BINARY);
#else		
		int fd = open(fn, O_RDONLY);
#endif
		if (fd == -1) {
			perror("open");
			return 0;
		}
		fp = (knetFile*)calloc(1, sizeof(knetFile));
		fp->type = KNF_TYPE_LOCAL;
		fp->fd = fd;
		fp->ctrl_fd = -1;
	}
	if (fp && fp->fd == -1) {
		knet_close(fp);
		return 0;
	}
	return fp;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
je 0x483cda
movq 0x17830d(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0xf7310(%rip), %rsi     # 0x57afd5
movb $0x0, %al
callq 0x33960
movq $0x0, 0x20(%rsp)
jmp 0x483e3b
movq 0x18(%rsp), %rdi
leaq 0xf6564(%rip), %rsi     # 0x57a24a
callq 0x31a20
cmpq 0x18(%rsp), %rax
jne 0x483d52
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x483010
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x483d1c
movq $0x0, 0x20(%rsp)
jmp 0x483e3b
movq 0x8(%rsp), %rdi
callq 0x482ad0
cmpl $-0x1, %eax
jne 0x483d43
movq 0x8(%rsp), %rdi
callq 0x483e50
movq $0x0, 0x20(%rsp)
jmp 0x483e3b
movq 0x8(%rsp), %rdi
callq 0x483210
jmp 0x483e09
movq 0x18(%rsp), %rdi
leaq 0xf64f3(%rip), %rsi     # 0x57a251
callq 0x31a20
cmpq 0x18(%rsp), %rax
jne 0x483da0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4835a0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x483d94
movq $0x0, 0x20(%rsp)
jmp 0x483e3b
movq 0x8(%rsp), %rdi
callq 0x483910
jmp 0x483e07
movq 0x18(%rsp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x319f0
movl %eax, 0x4(%rsp)
cmpl $-0x1, 0x4(%rsp)
jne 0x483dd0
leaq 0x86520(%rip), %rdi     # 0x50a2e0
callq 0x33870
movq $0x0, 0x20(%rsp)
jmp 0x483e3b
movl $0x1, %edi
movl $0x80, %esi
callq 0x32f50
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x1, (%rax)
movl 0x4(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x8(%rsp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
jmp 0x483e09
cmpq $0x0, 0x8(%rsp)
je 0x483e31
movq 0x8(%rsp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0x483e31
movq 0x8(%rsp), %rdi
callq 0x483e50
movq $0x0, 0x20(%rsp)
jmp 0x483e3b
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: knet_close
int knet_close(knetFile *fp)
{
	if (fp == 0) return 0;
	if (fp->ctrl_fd != -1) netclose(fp->ctrl_fd); // FTP specific
	if (fp->fd != -1) {
		/* On Linux/Mac, netclose() is an alias of close(), but on
		 * Windows, it is an alias of closesocket(). */
		if (fp->type == KNF_TYPE_LOCAL) close(fp->fd);
		else netclose(fp->fd);
	}
	free(fp->host); free(fp->port);
	free(fp->response); free(fp->retr); // FTP specific
	free(fp->path); free(fp->http_host); // HTTP specific
	free(fp);
	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x483e6e
movl $0x0, 0x14(%rsp)
jmp 0x483f1f
movq 0x8(%rsp), %rax
cmpl $-0x1, 0x20(%rax)
je 0x483e86
movq 0x8(%rsp), %rax
movl 0x20(%rax), %edi
callq 0x2f750
movq 0x8(%rsp), %rax
cmpl $-0x1, 0x4(%rax)
je 0x483eb9
movq 0x8(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x483eaa
movq 0x8(%rsp), %rax
movl 0x4(%rax), %edi
callq 0x2f750
jmp 0x483eb7
movq 0x8(%rsp), %rax
movl 0x4(%rax), %edi
callq 0x2f750
jmp 0x483eb9
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x34078
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x34078
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x34078
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x34078
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x34078
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x34078
movq 0x8(%rsp), %rdi
callq 0x34078
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: knet_dopen
knetFile *knet_dopen(int fd, const char *mode)
{
	knetFile *fp = (knetFile*)calloc(1, sizeof(knetFile));
	fp->type = KNF_TYPE_LOCAL;
	fp->fd = fd;
	return fp;
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movq %rsi, 0x8(%rsp)
movl $0x1, %edi
movl $0x80, %esi
callq 0x32f50
movq %rax, (%rsp)
movq (%rsp), %rax
movl $0x1, (%rax)
movl 0x14(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0x4(%rax)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: knet_read
off_t knet_read(knetFile *fp, void *buf, off_t len)
{
	off_t l = 0;
	if (fp->fd == -1) return 0;
	if (fp->type == KNF_TYPE_FTP) {
		if (fp->is_ready == 0) {
			if (!fp->no_reconnect) kftp_reconnect(fp);
			kftp_connect_file(fp);
		}
	} else if (fp->type == KNF_TYPE_HTTP) {
		if (fp->is_ready == 0)
			khttp_connect_file(fp);
	}
	if (fp->type == KNF_TYPE_LOCAL) { // on Windows, the following block is necessary; not on UNIX
		off_t rest = len, curr;
		while (rest) {
			do {
				curr = read(fp->fd, buf + l, rest);
			} while (curr < 0 && EINTR == errno);
			if (curr < 0) return -1;
			if (curr == 0) break;
			l += curr; rest -= curr;
		}
	} else l = my_netread(fp->fd, buf, len);
	fp->offset += l;
	return l;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x38(%rsp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0x483fa5
movq $0x0, 0x40(%rsp)
jmp 0x4840ee
movq 0x38(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x483fdb
movq 0x38(%rsp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x483fd9
movq 0x38(%rsp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0x483fcf
movq 0x38(%rsp), %rdi
callq 0x482fc0
movq 0x38(%rsp), %rdi
callq 0x483210
jmp 0x483ffe
movq 0x38(%rsp), %rax
cmpl $0x3, (%rax)
jne 0x483ffc
movq 0x38(%rsp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x483ffa
movq 0x38(%rsp), %rdi
callq 0x483910
jmp 0x483ffc
jmp 0x483ffe
movq 0x38(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x4840b6
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x4840b4
jmp 0x484024
movq 0x38(%rsp), %rax
movl 0x4(%rax), %edi
movq 0x30(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x30190
movq %rax, 0x10(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x10(%rsp)
movb %al, 0xf(%rsp)
jge 0x484069
callq 0x32640
movq %rax, %rcx
movl $0x4, %eax
cmpl (%rcx), %eax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x484024
cmpq $0x0, 0x10(%rsp)
jge 0x484084
movq $-0x1, 0x40(%rsp)
jmp 0x4840ee
cmpq $0x0, 0x10(%rsp)
jne 0x48408e
jmp 0x4840b4
movq 0x10(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x484016
jmp 0x4840d2
movq 0x38(%rsp), %rax
movl 0x4(%rax), %edi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x483bf0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rcx
movq 0x38(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/knetfile.c
// Function: socket_wait
static int socket_wait(int fd, int is_read)
{
	fd_set fds, *fdr = 0, *fdw = 0;
	struct timeval tv;
	int ret;
	tv.tv_sec = 5; tv.tv_usec = 0; // 5 seconds time out
	FD_ZERO(&fds);
	FD_SET(fd, &fds);
	if (is_read) fdr = &fds;
	else fdw = &fds;
	ret = select(fd+1, fdr, fdw, 0, &tv);
#ifndef _WIN32
	if (ret == -1) perror("select");
#else
	if (ret == 0)
		fprintf(stderr, "select time-out\n");
	else if (ret == SOCKET_ERROR)
		fprintf(stderr, "select: %d\n", WSAGetLastError());
#endif
	return ret;
}

// Assembly:
subq $0xb8, %rsp
movl %edi, 0xb4(%rsp)
movl %esi, 0xb0(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x5, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpq $0x10, %rax
jae 0x484361
movq (%rsp), %rax
movl 0x8(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48433a
jmp 0x484363
movl 0xb4(%rsp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl 0xb4(%rsp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq 0x30(%rsp,%rax,8), %rcx
movq %rcx, 0x30(%rsp,%rax,8)
cmpl $0x0, 0xb0(%rsp)
je 0x4843b2
leaq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x4843bc
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0xb4(%rsp), %edi
addl $0x1, %edi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq 0x10(%rsp), %r8
callq 0x2fd10
movl %eax, 0xc(%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0x4843f5
leaq 0xbd8f2(%rip), %rdi     # 0x541ce2
callq 0x33870
movl 0xc(%rsp), %eax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_sort.c
// Function: heap_lt
static inline int heap_lt(const heap1_t a, const heap1_t b)
{
	if (g_is_by_qname) {
		int t;
		if (a.b == 0 || b.b == 0) return a.b == 0? 1 : 0;
		t = strnum_cmp(bam1_qname(a.b), bam1_qname(b.b));
		return (t > 0 || (t == 0 && __pos_cmp(a, b)));
	} else return __pos_cmp(a, b);
}

// Assembly:
subq $0x28, %rsp
leaq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x183135(%rip)    # 0x607d04
je 0x484d05
movq 0x18(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x484bed
movq 0x10(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x484c0d
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovel %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0x484da3
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x30(%rcx), %rdi
movq 0x18(%rax), %rax
movq 0x30(%rax), %rsi
callq 0x489520
movl %eax, 0x20(%rsp)
movb $0x1, %al
cmpl $0x0, 0x20(%rsp)
movb %al, 0xf(%rsp)
jg 0x484cf3
xorl %eax, %eax
cmpl $0x0, 0x20(%rsp)
movb %al, 0xe(%rsp)
jne 0x484ceb
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
movb $0x1, %al
cmpq 0x8(%rdx), %rcx
movb %al, 0xd(%rsp)
ja 0x484ce3
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, 0xc(%rsp)
jne 0x484cdb
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movl (%rax), %ecx
movb $0x1, %al
cmpl (%rdx), %ecx
movb %al, 0xb(%rsp)
jg 0x484cd3
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, 0xa(%rsp)
jne 0x484ccb
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
cmpq 0x10(%rcx), %rax
seta %al
movb %al, 0xa(%rsp)
movb 0xa(%rsp), %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
movb %al, 0xc(%rsp)
movb 0xc(%rsp), %al
movb %al, 0xd(%rsp)
movb 0xd(%rsp), %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x24(%rsp)
jmp 0x484da3
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
movb $0x1, %al
cmpq 0x8(%rdx), %rcx
movb %al, 0x9(%rsp)
ja 0x484d96
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, 0x8(%rsp)
jne 0x484d8e
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movl (%rax), %ecx
movb $0x1, %al
cmpl (%rdx), %ecx
movb %al, 0x7(%rsp)
jg 0x484d86
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, 0x6(%rsp)
jne 0x484d7e
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
cmpq 0x10(%rcx), %rax
seta %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
movb %al, 0x8(%rsp)
movb 0x8(%rsp), %al
movb %al, 0x9(%rsp)
movb 0x9(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_sort.c
// Function: sort_blocks
static void sort_blocks(int n, int k, bam1_p *buf, const char *prefix, const bam_header_t *h, int is_stdout)
{
	char *name, mode[3];
	int i;
	bamFile fp;
	ks_mergesort(sort, k, buf, 0);
	name = (char*)calloc(strlen(prefix) + 20, 1);
	if (n >= 0) {
		sprintf(name, "%s.%.4d.bam", prefix, n);
		strcpy(mode, "w1");
	} else {
		sprintf(name, "%s.bam", prefix);
		strcpy(mode, "w");
	}
	fp = is_stdout? bam_dopen(fileno(stdout), mode) : bam_open(name, mode);
	if (fp == 0) {
		fprintf(stderr, "[sort_blocks] fail to create file %s.\n", name);
		free(name);
		// FIXME: possible memory leak
		return;
	}
	free(name);
	bam_header_write(fp, h);
	for (i = 0; i < k; ++i)
		bam_write1_core(fp, &buf[i]->core, buf[i]->data_len, buf[i]->data);
	bam_close(fp);
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x44(%rsp)
movl %esi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movl %r9d, 0x24(%rsp)
movslq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x487a50
movq 0x30(%rsp), %rdi
callq 0x30e70
movq %rax, %rdi
addq $0x14, %rdi
movl $0x1, %esi
callq 0x32f50
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x44(%rsp)
jl 0x489299
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl 0x44(%rsp), %ecx
leaq 0xf24c3(%rip), %rsi     # 0x57b742
movb $0x0, %al
callq 0x31400
leaq 0x15(%rsp), %rdi
leaq 0xf20e5(%rip), %rsi     # 0x57b377
callq 0x32b70
jmp 0x4892c2
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0xf2491(%rip), %rsi     # 0x57b73b
movb $0x0, %al
callq 0x31400
leaq 0x15(%rsp), %rdi
leaq 0xaeeb5(%rip), %rsi     # 0x538172
callq 0x32b70
cmpl $0x0, 0x24(%rsp)
je 0x4892ea
movq 0x172d20(%rip), %rax    # 0x5fbff0
movq (%rax), %rdi
callq 0x2f230
movl %eax, %edi
leaq 0x15(%rsp), %rsi
callq 0x464980
movq %rax, (%rsp)
jmp 0x4892fd
movq 0x18(%rsp), %rdi
leaq 0x15(%rsp), %rsi
callq 0x464500
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x489337
movq 0x172cb3(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
leaq 0xf246f(%rip), %rsi     # 0x57b793
movb $0x0, %al
callq 0x33960
movq 0x18(%rsp), %rdi
callq 0x34078
jmp 0x4893b4
movq 0x18(%rsp), %rdi
callq 0x34078
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x4694a0
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x40(%rsp), %eax
jge 0x4893aa
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x38(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x24(%rax), %edx
movq 0x38(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rax), %rcx
callq 0x469dc0
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x489358
movq 0x8(%rsp), %rdi
callq 0x4646c0
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_sort.c
// Function: bam1_lt
static inline int bam1_lt(const bam1_p a, const bam1_p b)
{
	if (g_is_by_qname) {
		int t = strnum_cmp(bam1_qname(a), bam1_qname(b));
		return (t < 0 || (t == 0 && (((uint64_t)a->core.tid<<32|(a->core.pos+1)) < ((uint64_t)b->core.tid<<32|(b->core.pos+1)))));
	} else return (((uint64_t)a->core.tid<<32|(a->core.pos+1)) < ((uint64_t)b->core.tid<<32|(b->core.pos+1)));
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
cmpl $0x0, 0x17fd2f(%rip)    # 0x607d04
je 0x48806b
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rsi
callq 0x489520
movl %eax, 0xc(%rsp)
movb $0x1, %al
cmpl $0x0, 0xc(%rsp)
movb %al, 0xb(%rsp)
jl 0x48805c
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
movb %al, 0xa(%rsp)
jne 0x488054
movq 0x18(%rsp), %rax
movslq (%rax), %rax
shlq $0x20, %rax
movq 0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
orq %rcx, %rax
movq 0x10(%rsp), %rcx
movslq (%rcx), %rcx
shlq $0x20, %rcx
movq 0x10(%rsp), %rdx
movl 0x4(%rdx), %edx
addl $0x1, %edx
movslq %edx, %rdx
orq %rdx, %rcx
cmpq %rcx, %rax
setb %al
movb %al, 0xa(%rsp)
movb 0xa(%rsp), %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x24(%rsp)
jmp 0x4880b4
movq 0x18(%rsp), %rax
movslq (%rax), %rax
shlq $0x20, %rax
movq 0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
orq %rcx, %rax
movq 0x10(%rsp), %rcx
movslq (%rcx), %rcx
shlq $0x20, %rcx
movq 0x10(%rsp), %rdx
movl 0x4(%rdx), %edx
addl $0x1, %edx
movslq %edx, %rdx
orq %rdx, %rcx
cmpq %rcx, %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_sort.c
// Function: bam_sort
int bam_sort(int argc, char *argv[])
{
	size_t max_mem = 500000000;
	int c, is_by_qname = 0, is_stdout = 0;
	while ((c = getopt(argc, argv, "nom:")) >= 0) {
		switch (c) {
		case 'o': is_stdout = 1; break;
		case 'n': is_by_qname = 1; break;
		case 'm': max_mem = atol(optarg); break;
		}
	}
	if (optind + 2 > argc) {
		fprintf(stderr, "Usage: samtools sort [-on] [-m <maxMem>] <in.bam> <out.prefix>\n");
		return 1;
	}
	bam_sort_core_ext(is_by_qname, argv[optind], argv[optind+1], max_mem, is_stdout);
	return 0;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq $0x1dcd6500, 0x10(%rsp) # imm = 0x1DCD6500
movl $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x20(%rsp), %edi
movq 0x18(%rsp), %rsi
leaq 0xf2318(%rip), %rdx     # 0x57b74e
callq 0x30020
movl %eax, 0xc(%rsp)
cmpl $0x0, %eax
jl 0x489490
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
subl $0x6d, %eax
je 0x48947a
jmp 0x489452
movl (%rsp), %eax
subl $0x6e, %eax
je 0x489470
jmp 0x48945c
movl (%rsp), %eax
subl $0x6f, %eax
jne 0x48948e
jmp 0x489466
movl $0x1, 0x4(%rsp)
jmp 0x48948e
movl $0x1, 0x8(%rsp)
jmp 0x48948e
movq 0x172adf(%rip), %rax    # 0x5fbf60
movq (%rax), %rdi
callq 0x31690
movq %rax, 0x10(%rsp)
jmp 0x489426
movq 0x172a81(%rip), %rax    # 0x5fbf18
movl (%rax), %eax
addl $0x2, %eax
cmpl 0x20(%rsp), %eax
jle 0x4894c4
movq 0x172b1f(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0xf22a0(%rip), %rsi     # 0x57b753
movb $0x0, %al
callq 0x33960
movl $0x1, 0x24(%rsp)
jmp 0x48950a
movl 0x8(%rsp), %edi
movq 0x18(%rsp), %rax
movq 0x172a44(%rip), %rcx    # 0x5fbf18
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x18(%rsp), %rax
movq 0x172a31(%rip), %rcx    # 0x5fbf18
movl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x10(%rsp), %rcx
movl 0x4(%rsp), %r8d
callq 0x488de0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_reheader.c
// Function: bam_reheader
int bam_reheader(BGZF *in, const bam_header_t *h, int fd)
{
	BGZF *fp;
	bam_header_t *old;
	int len;
	uint8_t *buf;
	if (in->open_mode != 'r') return -1;
	buf = malloc(BUF_SIZE);
	old = bam_header_read(in);
	fp = bgzf_fdopen(fd, "w");
	bam_header_write(fp, h);
	if (in->block_offset < in->block_length) {
		bgzf_write(fp, in->uncompressed_block + in->block_offset, in->block_length - in->block_offset);
		bgzf_flush(fp);
	}
#ifdef _USE_KNETFILE
	while ((len = knet_read(in->x.fpr, buf, BUF_SIZE)) > 0)
		fwrite(buf, 1, len, fp->x.fpw);
#else
	while (!feof(in->file) && (len = fread(buf, 1, BUF_SIZE, in->file)) > 0)
		fwrite(buf, 1, len, fp->file);
#endif
	free(buf);
	fp->block_offset = in->block_offset = 0;
	bgzf_close(fp);
	return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq 0x38(%rsp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x72, %eax
je 0x48bf4d
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x48c07f
movl $0x10000, %edi          # imm = 0x10000
callq 0x34068
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x4691e0
movq %rax, 0x18(%rsp)
movl 0x2c(%rsp), %edi
leaq 0xac1fc(%rip), %rsi     # 0x538172
callq 0x464980
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x4694a0
movq 0x38(%rsp), %rax
movl 0x3c(%rax), %eax
movq 0x38(%rsp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x48bfda
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x38(%rsp), %rax
movslq 0x3c(%rax), %rax
addq %rax, %rsi
movq 0x38(%rsp), %rax
movl 0x38(%rax), %edx
movq 0x38(%rsp), %rax
subl 0x3c(%rax), %edx
callq 0x4658c0
movq 0x20(%rsp), %rdi
callq 0x465380
jmp 0x48bfdc
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x33010
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x7(%rsp)
jne 0x48c022
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rcx
movl $0x1, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x32390
movl %eax, 0x14(%rsp)
cmpl $0x0, %eax
setg %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x48c02c
jmp 0x48c04b
movq 0x8(%rsp), %rdi
movslq 0x14(%rsp), %rdx
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
movl $0x1, %esi
callq 0x33760
jmp 0x48bfdc
movq 0x8(%rsp), %rdi
callq 0x34078
movq 0x38(%rsp), %rax
movl $0x0, 0x3c(%rax)
movq 0x20(%rsp), %rax
movl $0x0, 0x3c(%rax)
movq 0x20(%rsp), %rdi
callq 0x4646c0
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_reheader.c
// Function: main_reheader
int main_reheader(int argc, char *argv[])
{
	bam_header_t *h;
	BGZF *in;
	if (argc != 3) {
		fprintf(stderr, "Usage: samtools reheader <in.header.sam> <in.bam>\n");
		return 1;
	}
	{ // read the header
		tamFile fph = sam_open(argv[1]);
		if (fph == 0) {
			fprintf(stderr, "[%s] fail to read the header from %s.\n", __func__, argv[1]);
			return 1;
		}
		h = sam_header_read(fph);
		sam_close(fph);
	}
	in = strcmp(argv[2], "-")? bam_open(argv[2], "r") : bam_dopen(fileno(stdin), "r");
	if (in == 0) {
		fprintf(stderr, "[%s] fail to open file %s.\n", __func__, argv[2]);
		return 1;
	}
	bam_reheader(in, h, fileno(stdout));
	bgzf_close(in);
	return 0;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
cmpl $0x3, 0x40(%rsp)
je 0x48c0c9
movq 0x16ff1d(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0xef9fb(%rip), %rsi     # 0x57bab0
movb $0x0, %al
callq 0x33960
movl $0x1, 0x44(%rsp)
jmp 0x48c214
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x46e8a0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x48c119
movq 0x16fedd(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rcx
leaq 0xef9e5(%rip), %rsi     # 0x57bae3
leaq 0xefa05(%rip), %rdx     # 0x57bb0a
movb $0x0, %al
callq 0x33960
movl $0x1, 0x44(%rsp)
jmp 0x48c214
movq 0x20(%rsp), %rdi
callq 0x46c370
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rdi
callq 0x46e980
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xeb48d(%rip), %rsi     # 0x5775cf
callq 0x32950
cmpl $0x0, %eax
je 0x48c168
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x731df(%rip), %rsi     # 0x4ff33b
callq 0x464500
movq %rax, 0x18(%rsp)
jmp 0x48c18a
movq 0x16fdd1(%rip), %rax    # 0x5fbf40
movq (%rax), %rdi
callq 0x2f230
movl %eax, %edi
leaq 0x731bb(%rip), %rsi     # 0x4ff33b
callq 0x464980
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x48c1ce
movq 0x16fe25(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rcx
leaq 0xef962(%rip), %rsi     # 0x57bb18
leaq 0xef94d(%rip), %rdx     # 0x57bb0a
movb $0x0, %al
callq 0x33960
movl $0x1, 0x44(%rsp)
jmp 0x48c214
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x16fe07(%rip), %rax    # 0x5fbff0
movq (%rax), %rdi
callq 0x2f230
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %eax, %edx
callq 0x48bf20
movq 0x28(%rsp), %rdi
callq 0x4646c0
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/bam_cat.c
// Function: main_cat
int main_cat(int argc, char *argv[])
{
    bam_header_t *h = 0;
	char *outfn = 0;
	int c, ret;
	while ((c = getopt(argc, argv, "h:o:")) >= 0) {
		switch (c) {
			case 'h': {
        		tamFile fph = sam_open(optarg);
		        if (fph == 0) {
    		        fprintf(stderr, "[%s] ERROR: fail to read the header from '%s'.\n", __func__, argv[1]);
        		    return 1;
	        	}
	    	    h = sam_header_read(fph);
    	    	sam_close(fph);
				break;
			}
			case 'o': outfn = strdup(optarg); break;
		}
	}
	if (argc - optind < 2) {
        fprintf(stderr, "Usage: samtools cat [-h header.sam] [-o out.bam] <in1.bam> <in2.bam> [...]\n");
        return 1;
    }
    ret = bam_cat(argc - optind, argv + optind, h, outfn? outfn : "-");
	free(outfn);
	return ret;
}

// Assembly:
subq $0x58, %rsp
movl %edi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movl 0x50(%rsp), %edi
movq 0x48(%rsp), %rsi
leaq 0xed12b(%rip), %rdx     # 0x57bc1a
callq 0x30020
movl %eax, 0x34(%rsp)
cmpl $0x0, %eax
jl 0x48eba3
movl 0x34(%rsp), %eax
movl %eax, 0x24(%rsp)
subl $0x68, %eax
je 0x48eb1e
jmp 0x48eb10
movl 0x24(%rsp), %eax
subl $0x6f, %eax
je 0x48eb8a
jmp 0x48eb9e
movq 0x16d43b(%rip), %rax    # 0x5fbf60
movq (%rax), %rdi
callq 0x46e8a0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x48eb6f
movq 0x16d487(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rcx
leaq 0xed0cb(%rip), %rsi     # 0x57bc1f
leaq 0xed0f4(%rip), %rdx     # 0x57bc4f
movb $0x0, %al
callq 0x33960
movl $0x1, 0x54(%rsp)
jmp 0x48ec5d
movq 0x28(%rsp), %rdi
callq 0x46c370
movq %rax, 0x40(%rsp)
movq 0x28(%rsp), %rdi
callq 0x46e980
jmp 0x48eb9e
movq 0x16d3cf(%rip), %rax    # 0x5fbf60
movq (%rax), %rdi
callq 0x326e0
movq %rax, 0x38(%rsp)
jmp 0x48eadf
movl 0x50(%rsp), %eax
movq 0x16d36a(%rip), %rcx    # 0x5fbf18
subl (%rcx), %eax
cmpl $0x2, %eax
jge 0x48ebda
movq 0x16d40c(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0xed092(%rip), %rsi     # 0x57bc58
movb $0x0, %al
callq 0x33960
movl $0x1, 0x54(%rsp)
jmp 0x48ec5d
movl 0x50(%rsp), %eax
movq 0x16d333(%rip), %rcx    # 0x5fbf18
subl (%rcx), %eax
movl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rax
movq 0x16d321(%rip), %rcx    # 0x5fbf18
movslq (%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x48ec23
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
jmp 0x48ec30
leaq 0xe89a5(%rip), %rax     # 0x5775cf
movq %rax, (%rsp)
jmp 0x48ec30
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edi
movq (%rsp), %rcx
callq 0x48e5c0
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x34078
movl 0x30(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: xmalloc_init
static void
xmalloc_init(void)
{
  if (xmalloc_table == NULL)
    {
      xmalloc_table = hash_table_new();
      xmalloc_peak = 0;
      xmalloc_peak_blocks = 0;
      xmalloc_current = 0;
      xmalloc_current_blocks = 0;
      xmalloc_fail_after = -1;
    }
  assert(xmalloc_table != NULL);
  assert(xmalloc_table->table != NULL);
}

// Assembly:
pushq %rax
cmpq $0x0, 0x14403f(%rip)    # 0x608218
jne 0x4c421f
callq 0x4c4af0
movq %rax, 0x144031(%rip)    # 0x608218
movl $0x0, 0x14402f(%rip)    # 0x608220
movl $0x0, 0x144029(%rip)    # 0x608224
leaq 0x144026(%rip), %rax    # 0x608228
movl $0x0, (%rax)
leaq 0x14401d(%rip), %rax    # 0x60822c
movl $0x0, (%rax)
movl $0xffffffff, 0x143ff1(%rip) # imm = 0xFFFFFFFF
cmpq $0x0, 0x143ff1(%rip)    # 0x608218
je 0x4c422b
jmp 0x4c424a
leaq 0xbc012(%rip), %rdi     # 0x580244
leaq 0xbbe8f(%rip), %rsi     # 0x5800c8
movl $0xb7, %edx
leaq 0xbc015(%rip), %rcx     # 0x58025a
callq 0x2fdc0
movq 0x143fc7(%rip), %rax    # 0x608218
cmpq $0x0, (%rax)
je 0x4c4259
jmp 0x4c4278
leaq 0xbc012(%rip), %rdi     # 0x580272
leaq 0xbbe61(%rip), %rsi     # 0x5800c8
movl $0xb8, %edx
leaq 0xbbfe7(%rip), %rcx     # 0x58025a
callq 0x2fdc0
popq %rax
retq
nopw (%rax,%rax)