LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/sam.c
// Function: samclose
void samclose(samfile_t *fp)
{
	if (fp == 0) return;
	if (fp->header) bam_header_destroy(fp->header);
	if (fp->type & TYPE_BAM) bam_close(fp->x.bam);
	else if (fp->type & TYPE_READ) sam_close(fp->x.tamr);
	else fclose(fp->x.tamw);
	free(fp);
}

// Assembly:
testq %rdi, %rdi
je 0xe997
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xe982
callq 0x9b77
movl (%rbx), %eax
testb $0x1, %al
jne 0xe998
movq 0x8(%rbx), %rdi
testb $0x2, %al
jne 0xe9a3
callq 0x31c0
jmp 0xe9a8
retq
movq 0x8(%rbx), %rdi
callq 0x18719
jmp 0xe9a8
callq 0xe3b4
movq %rbx, %rdi
popq %rbx
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/sam.c
// Function: samwrite
int samwrite(samfile_t *fp, const bam1_t *b)
{
	if (fp == 0 || (fp->type & TYPE_READ)) return -1; // not open for writing
	if (fp->type & TYPE_BAM) return bam_write1(fp->x.bam, b);
	else {
		char *s = bam_format1_core(fp->header, b, fp->type>>2&3);
		int l = strlen(s);
		fputs(s, fp->x.tamw); fputc('\n', fp->x.tamw);
		free(s);
		return l + 1;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0xea47
movq %rdi, %rbx
movl (%rdi), %edx
testb $0x2, %dl
jne 0xea47
testb $0x1, %dl
jne 0xea50
movq 0x10(%rbx), %rdi
shrl $0x2, %edx
andl $0x3, %edx
callq 0xa97c
movq %rax, %r15
movq %rax, %rdi
callq 0x31e0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x3240
movq 0x8(%rbx), %rsi
movl $0xa, %edi
callq 0x3280
movq %r15, %rdi
callq 0x3060
incl %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xa970
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/sam.c
// Function: sampileup
int sampileup(samfile_t *fp, int mask, bam_pileup_f func, void *func_data)
{
	bam_plbuf_t *buf;
	int ret;
	bam1_t *b;
	b = bam_init1();
	buf = bam_plbuf_init(func, func_data);
	bam_plbuf_set_mask(buf, mask);
	while ((ret = samread(fp, b)) >= 0)
		bam_plbuf_push(b, buf);
	bam_plbuf_push(0, buf);
	bam_plbuf_destroy(buf);
	bam_destroy1(b);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x32e0
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1255f
movq %rax, %r15
movq %rax, %rdi
movl %ebp, %esi
callq 0x12599
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe9b1
testl %eax, %eax
js 0xeab7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x125af
jmp 0xea9b
xorl %edi, %edi
movq %r15, %rsi
callq 0x125af
movq %r15, %rdi
callq 0x1263c
testq %rbx, %rbx
je 0xeadf
movq 0x30(%rbx), %rdi
callq 0x3060
movq %rbx, %rdi
callq 0x3060
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/sam.c
// Function: samfaipath
char *samfaipath(const char *fn_ref)
{
	char *fn_list = 0;
	if (fn_ref == 0) return 0;
	fn_list = calloc(strlen(fn_ref) + 5, 1);
	strcat(strcpy(fn_list, fn_ref), ".fai");
	if (access(fn_list, R_OK) == -1) { // fn_list is unreadable
		if (access(fn_ref, R_OK) == -1) {
			fprintf(stderr, "[samfaipath] fail to read file %s.\n", fn_ref);
		} else {
			if (bam_verbose >= 3) fprintf(stderr, "[samfaipath] build FASTA index...\n");
			if (fai_build(fn_ref) == -1) {
				fprintf(stderr, "[samfaipath] fail to build FASTA index.\n");
				free(fn_list); fn_list = 0;
			}
		}
	}
	return fn_list;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xeb70
movq %rdi, %r14
callq 0x31e0
leaq 0x5(%rax), %rdi
movl $0x1, %esi
callq 0x32e0
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x30d0
movq %rbx, %rdi
callq 0x31e0
movl $0x6961662e, (%rbx,%rax) # imm = 0x6961662E
movb $0x0, 0x4(%rbx,%rax)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3490
cmpl $-0x1, %eax
jne 0xeb72
movq %r14, %rdi
movl $0x4, %esi
callq 0x3490
cmpl $-0x1, %eax
je 0xeb7d
leaq 0x149ba(%rip), %rax     # 0x23510
cmpl $0x3, (%rax)
jge 0xeb9a
movq %r14, %rdi
callq 0x1465b
cmpl $-0x1, %eax
jne 0xeb72
movq %rbx, %rdi
callq 0x3eca
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x14474(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0xd5bb(%rip), %rsi      # 0x1c149
movq %r14, %rdx
xorl %eax, %eax
callq 0x3320
jmp 0xeb72
callq 0x3eae
jmp 0xeb5b
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_index.c
// Function: bam_index_destroy
void bam_index_destroy(bam_index_t *idx)
{
	khint_t k;
	int i;
	if (idx == 0) return;
	for (i = 0; i < idx->n; ++i) {
		khash_t(i) *index = idx->index[i];
		bam_lidx_t *index2 = idx->index2 + i;
		for (k = kh_begin(index); k != kh_end(index); ++k) {
			if (kh_exist(index, k))
				free(kh_value(index, k).list);
		}
		kh_destroy(i, index);
		free(index2->offset);
	}
	free(idx->index); free(idx->index2);
	free(idx);
}

// Assembly:
testq %rdi, %rdi
je 0xff8b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0xff63
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %r12
movq (%rax,%r15,8), %r14
movl (%r14), %eax
testl %eax, %eax
je 0xff20
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x10(%r14), %rcx
movl %r13d, %edx
shrl $0x4, %edx
movl (%rcx,%rdx,4), %edx
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %edx
testb $0x3, %dl
jne 0xff15
movq 0x20(%r14), %rax
movl %r13d, %ecx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rdi
callq 0x3060
movl (%r14), %eax
incl %r13d
addl $0x2, %ebp
cmpl %eax, %r13d
jne 0xfee4
movq 0x18(%r14), %rdi
callq 0x3060
movq 0x10(%r14), %rdi
callq 0x3060
movq 0x20(%r14), %rdi
callq 0x3060
movq %r14, %rdi
callq 0x3060
movq %r15, %rax
shlq $0x4, %rax
movq 0x8(%r12,%rax), %rdi
callq 0x3060
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0xfecc
movq 0x10(%rbx), %rdi
callq 0x3060
movq 0x18(%rbx), %rdi
callq 0x3060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3060
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_index.c
// Function: bam_index_load
bam_index_t *bam_index_load(const char *fn)
{
	bam_index_t *idx;
	idx = bam_index_load_local(fn);
	if (idx == 0 && (strstr(fn, "ftp://") == fn || strstr(fn, "http://") == fn)) {
		char *fnidx = calloc(strlen(fn) + 5, 1);
		strcat(strcpy(fnidx, fn), ".bai");
		fprintf(stderr, "[bam_index_load] attempting to download the remote index file.\n");
		download_from_remote(fnidx);
        free(fnidx);
		idx = bam_index_load_local(fn);
	}
	if (idx == 0) fprintf(stderr, "[bam_index_load] fail to load BAM index.\n");
	return idx;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x102e2
testq %rax, %rax
je 0x1074c
addq $0x10, %rsp
popq %rbx
retq
leaq 0xbc54(%rip), %rsi      # 0x1c3a7
movl $0x6, %edx
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0x1077c
leaq 0xbc43(%rip), %rsi      # 0x1c3ae
movl $0x7, %edx
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
jne 0x10794
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f54
testb $0x1, %al
jne 0x10794
movq 0x8(%rsp), %rax
jmp 0x10746
callq 0x410e
xorl %eax, %eax
jmp 0x10746
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_index.c
// Function: bam_index_build2
int bam_index_build2(const char *fn, const char *_fnidx)
{
	char *fnidx;
	FILE *fpidx;
	bamFile fp;
	bam_index_t *idx;
	if ((fp = bam_open(fn, "r")) == 0) {
		fprintf(stderr, "[bam_index_build2] fail to open the BAM file.\n");
		return -1;
	}
	idx = bam_index_core(fp);
	bam_close(fp);
	if(idx == 0) {
		fprintf(stderr, "[bam_index_build2] fail to index the BAM file.\n");
		return -1;
	}
	if (_fnidx == 0) {
		fnidx = (char*)calloc(strlen(fn) + 5, 1);
		strcpy(fnidx, fn); strcat(fnidx, ".bai");
	} else fnidx = strdup(_fnidx);
	fpidx = fopen(fnidx, "wb");
	if (fpidx == 0) {
		fprintf(stderr, "[bam_index_build2] fail to create the index file.\n");
		free(fnidx);
        bam_index_destroy(idx);
		return -1;
	}
	bam_index_save(idx, fpidx);
	bam_index_destroy(idx);
	fclose(fpidx);
	free(fnidx);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc174(%rip), %rsi      # 0x1c926
callq 0x17710
testq %rax, %rax
je 0x10873
movq %rax, %r12
movq %rax, %rdi
callq 0xf477
movq %rax, %rbx
movq %r12, %rdi
callq 0x18719
testq %rbx, %rbx
je 0x1087a
testq %r14, %r14
je 0x107f1
movq %r14, %rdi
callq 0x3590
movq %rax, %r14
jmp 0x1082b
movq %r15, %rdi
callq 0x31e0
leaq 0x5(%rax), %rdi
movl $0x1, %esi
callq 0x32e0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x30d0
movq %r14, %rdi
callq 0x31e0
movl $0x6961622e, (%r14,%rax) # imm = 0x6961622E
movb $0x0, 0x4(%r14,%rax)
leaq 0xbc52(%rip), %rsi      # 0x1c484
movq %r14, %rdi
callq 0x3340
testq %rax, %rax
je 0x10881
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0xff8c
movq %rbx, %rdi
callq 0xfea9
movq %r15, %rdi
callq 0x31c0
movq %r14, %rdi
callq 0x3060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x4183
jmp 0x1088c
callq 0x4167
jmp 0x1088c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x412a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x10867
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_index.c
// Function: bam_index
int bam_index(int argc, char *argv[])
{
	if (argc < 2) {
		fprintf(stderr, "Usage: samtools index <in.bam> [out.index]\n");
		return 1;
	}
	if (argc >= 3) bam_index_build2(argv[1], argv[2]);
	else bam_index_build(argv[1]);
	return 0;
}

// Assembly:
pushq %rbx
cmpl $0x1, %edi
jle 0x108c5
movl %edi, %eax
movq 0x8(%rsi), %rdi
cmpl $0x2, %eax
jne 0x108b6
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1079d
jmp 0x108c1
movq 0x10(%rsi), %rsi
callq 0x1079d
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
callq 0x419f
movl $0x1, %ebx
jmp 0x108c1
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_index.c
// Function: get_chunk_coordinates
pair64_t *get_chunk_coordinates(const bam_index_t *idx, int tid, int beg, int end, int *cnt_off)
{ // for pysam compatibility
	bam_iter_t iter;
	pair64_t *off;
	iter = bam_iter_query(idx, tid, beg, end);
	off = iter->off; *cnt_off = iter->n_off;
	free(iter);
	return off;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
callq 0x10a84
movq 0x28(%rax), %r14
movl 0x10(%rax), %ecx
movl %ecx, (%rbx)
movq %rax, %rdi
callq 0x3060
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_index.c
// Function: bam_fetch
int bam_fetch(bamFile fp, const bam_index_t *idx, int tid, int beg, int end, void *data, bam_fetch_f func)
{
	int ret;
	bam_iter_t iter;
	bam1_t *b;
	b = bam_init1();
	iter = bam_iter_query(idx, tid, beg, end);
	while ((ret = bam_iter_read(fp, iter, b)) >= 0) func(b, data);
	bam_iter_destroy(iter);
	bam_destroy1(b);
	return (ret == -1)? 0 : ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, 0x4(%rsp)
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %rbp
movq %rdi, %r15
movl $0x1, %edi
movl $0x38, %esi
callq 0x32e0
movq %rax, %rbx
movq %rbp, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl 0x4(%rsp), %ecx
callq 0x10a84
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x112b6
testl %eax, %eax
js 0x114f2
movq 0x40(%rsp), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq *%r13
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x112b6
testl %eax, %eax
jns 0x114d7
movl %eax, %ebp
movq %r12, %rdi
callq 0x1129a
testq %rbx, %rbx
je 0x11512
movq 0x30(%rbx), %rdi
callq 0x3060
movq %rbx, %rdi
callq 0x3060
xorl %eax, %eax
cmpl $-0x1, %ebp
cmovnel %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_plp_init
bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
{
	bam_plp_t iter;
	iter = calloc(1, sizeof(struct __bam_plp_t));
	iter->mp = mp_init();
	iter->head = iter->tail = mp_alloc(iter->mp);
	iter->dummy = mp_alloc(iter->mp);
	iter->max_tid = iter->max_pos = -1;
	iter->flag_mask = BAM_DEF_MASK;
	iter->maxcnt = 8000;
	if (func) {
		iter->func = func;
		iter->data = data;
		iter->b = bam_init1();
	}
	return iter;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x68, %esi
callq 0x32e0
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x32e0
movq %rax, %r12
movq %rax, (%rbx)
movl $0x1, %edi
movl $0x58, %esi
callq 0x32e0
movq %rax, 0x10(%rbx)
movq %rax, 0x8(%rbx)
movl $0x2, (%r12)
movl $0x1, %edi
movl $0x58, %esi
callq 0x32e0
movq %rax, 0x18(%rbx)
movq $-0x1, 0x28(%rbx)
movl $0x704, 0x34(%rbx)      # imm = 0x704
movl $0x1f40, 0x40(%rbx)     # imm = 0x1F40
testq %r15, %r15
je 0x11969
movq %r15, 0x58(%rbx)
movq %r14, 0x60(%rbx)
movl $0x1, %edi
movl $0x38, %esi
callq 0x32e0
movq %rax, 0x50(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_plp_destroy
void bam_plp_destroy(bam_plp_t iter)
{
	mp_free(iter->mp, iter->dummy);
	mp_free(iter->mp, iter->head);
	if (iter->mp->cnt != 0)
		fprintf(stderr, "[bam_plp_destroy] memory leak: %d. Continue anyway.\n", iter->mp->cnt);
	mp_destroy(iter->mp);
	if (iter->b) bam_destroy1(iter->b);
	free(iter->plp);
	free(iter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x18(%rdi), %r14
decl (%r15)
movq $0x0, 0x50(%r14)
movl 0x4(%r15), %ecx
cmpl 0x8(%r15), %ecx
jne 0x119c7
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x100, %ecx            # imm = 0x100
cmovnel %eax, %ecx
movl %ecx, 0x8(%r15)
movq 0x10(%r15), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x3430
movq %rax, 0x10(%r15)
movl 0x4(%r15), %ecx
jmp 0x119cb
movq 0x10(%r15), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r15)
movslq %ecx, %rcx
movq %r14, (%rax,%rcx,8)
movq (%rbx), %r15
movq 0x8(%rbx), %r14
decl (%r15)
movq $0x0, 0x50(%r14)
movl 0x4(%r15), %ecx
cmpl 0x8(%r15), %ecx
jne 0x11a20
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x100, %ecx            # imm = 0x100
cmovnel %eax, %ecx
movl %ecx, 0x8(%r15)
movq 0x10(%r15), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x3430
movq %rax, 0x10(%r15)
movl 0x4(%r15), %ecx
jmp 0x11a24
movq 0x10(%r15), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r15)
movslq %ecx, %rcx
movq %r14, (%rax,%rcx,8)
movq (%rbx), %r14
movl (%r14), %edx
testl %edx, %edx
jne 0x11ab2
cmpl $0x0, 0x4(%r14)
jle 0x11a70
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x30(%rax), %rdi
callq 0x3060
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x3060
incq %r15
movslq 0x4(%r14), %rax
cmpq %rax, %r15
jl 0x11a46
movq 0x10(%r14), %rdi
callq 0x3060
movq %r14, %rdi
callq 0x3060
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0x11a9c
movq 0x30(%rax), %rdi
callq 0x3060
movq 0x50(%rbx), %rdi
callq 0x3060
movq 0x48(%rbx), %rdi
callq 0x3060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3060
movq 0x1153f(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0xac4d(%rip), %rsi      # 0x1c710
xorl %eax, %eax
callq 0x3320
movq (%rbx), %r14
jmp 0x11a3c
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_plp_auto
const bam_pileup1_t *bam_plp_auto(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
{
	const bam_pileup1_t *plp;
	if (iter->func == 0 || iter->error) { *_n_plp = -1; return 0; }
	if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
	else { // no pileup line can be obtained; read alignments
		*_n_plp = 0;
		if (iter->is_eof) return 0;
		while (iter->func(iter->data, iter->b) >= 0) {
			if (bam_plp_push(iter, iter->b) < 0) {
				*_n_plp = -1;
				return 0;
			}
			if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
			// otherwise no pileup line can be returned; read the next alignment.
		}
		bam_plp_push(iter, 0);
		if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
		return 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
cmpq $0x0, 0x58(%rdi)
je 0x12338
movq %rdi, %r12
cmpl $0x0, 0x3c(%rdi)
je 0x1234c
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rsi, %r15
movq %r12, %rdi
movq %rbx, %rcx
callq 0x11ad2
testq %rax, %rax
jne 0x12340
movl $0x0, (%rbx)
cmpl $0x0, 0x30(%r12)
jne 0x1233e
jmp 0x12399
movq 0x50(%r12), %rsi
movq %r12, %rdi
callq 0x12151
testl %eax, %eax
js 0x12338
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x11ad2
testq %rax, %rax
jne 0x12340
movq 0x50(%r12), %rsi
movq 0x60(%r12), %rdi
callq *0x58(%r12)
testl %eax, %eax
jns 0x12372
cmpl $0x0, 0x3c(%r12)
jne 0x123bd
movl $0x1, 0x30(%r12)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11ad2
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_plp_reset
void bam_plp_reset(bam_plp_t iter)
{
	lbnode_t *p, *q;
	iter->max_tid = iter->max_pos = -1;
	iter->tid = iter->pos = 0;
	iter->is_eof = 0;
	for (p = iter->head; p->next;) {
		q = p->next;
		mp_free(iter->mp, p);
		p = q;
	}
	iter->head = iter->tail;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movaps 0xa305(%rip), %xmm0     # 0x1c6f0
movups %xmm0, 0x20(%rdi)
movl $0x0, 0x30(%rdi)
movq 0x8(%rdi), %r14
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x12470
movl $0x100, %ebp            # imm = 0x100
movq %rax, %r15
movq (%rbx), %r12
decl (%r12)
movq $0x0, 0x50(%r14)
movl 0x4(%r12), %ecx
cmpl 0x8(%r12), %ecx
jne 0x12450
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
cmovel %ebp, %eax
movl %eax, 0x8(%r12)
movq 0x10(%r12), %rdi
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x3430
movq %rax, 0x10(%r12)
movl 0x4(%r12), %ecx
jmp 0x12455
movq 0x10(%r12), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r12)
movslq %ecx, %rcx
movq %r14, (%rax,%rcx,8)
movq 0x50(%r15), %rax
movq %r15, %r14
testq %rax, %rax
jne 0x12408
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_pileup_file
int bam_pileup_file(bamFile fp, int mask, bam_pileup_f func, void *func_data)
{
	bam_plbuf_t *buf;
	int ret;
	bam1_t *b;
	b = bam_init1();
	buf = bam_plbuf_init(func, func_data);
	bam_plbuf_set_mask(buf, mask);
	while ((ret = bam_read1(fp, b)) >= 0)
		bam_plbuf_push(b, buf);
	bam_plbuf_push(0, buf);
	bam_plbuf_destroy(buf);
	bam_destroy1(b);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x32e0
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x32e0
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0x118cc
movq %rax, %r12
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movq (%rsp), %rax
movq %rax, 0x10(%r15)
movl %ebp, %eax
orl $0x4, %eax
testl %ebp, %ebp
movl $0x704, %ecx            # imm = 0x704
cmovnsl %eax, %ecx
movl %ecx, 0x34(%r12)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9f3b
testl %eax, %eax
js 0x1251e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x125af
jmp 0x12502
xorl %edi, %edi
movq %r15, %rsi
callq 0x125af
movq %r12, %rdi
callq 0x11978
movq %r15, %rdi
callq 0x3060
testq %rbx, %rbx
je 0x1254e
movq 0x30(%rbx), %rdi
callq 0x3060
movq %rbx, %rdi
callq 0x3060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_plbuf_push
int bam_plbuf_push(const bam1_t *b, bam_plbuf_t *buf)
{
	int ret, n_plp, tid, pos;
	const bam_pileup1_t *plp;
	ret = bam_plp_push(buf->iter, b);
	if (ret < 0) return ret;
	while ((plp = bam_plp_next(buf->iter, &tid, &pos, &n_plp)) != 0)
		buf->func(tid, pos, n_plp, plp, buf->data);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
movq (%rbx), %rdi
callq 0x12151
testl %eax, %eax
js 0x12628
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x11ad2
xorl %ebp, %ebp
testq %rax, %rax
je 0x1262d
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %r15
leaq 0xc(%rsp), %r12
movl 0x8(%rsp), %edi
movl 0x4(%rsp), %esi
movl 0xc(%rsp), %edx
movq 0x10(%rbx), %r8
movq %rax, %rcx
callq *0x8(%rbx)
movq (%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x11ad2
testq %rax, %rax
jne 0x125fa
jmp 0x1262d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_mplp_init
bam_mplp_t bam_mplp_init(int n, bam_plp_auto_f func, void **data)
{
	int i;
	bam_mplp_t iter;
	iter = calloc(1, sizeof(struct __bam_mplp_t));
	iter->pos = calloc(n, 8);
	iter->n_plp = calloc(n, sizeof(int));
	iter->plp = calloc(n, sizeof(void*));
	iter->iter = calloc(n, sizeof(void*));
	iter->n = n;
	iter->min = (uint64_t)-1;
	for (i = 0; i < n; ++i) {
		iter->iter[i] = bam_plp_init(func, data[i]);
		iter->pos[i] = iter->min;
	}
	return iter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x1, %edi
movl $0x30, %esi
callq 0x32e0
movq %rax, %r15
movl %ebp, 0xc(%rsp)
movslq %ebp, %r13
movl $0x8, %esi
movq %r13, %rdi
callq 0x32e0
movq %rax, %r12
movq %rax, 0x10(%r15)
movl $0x4, %esi
movq %r13, %rdi
callq 0x32e0
movq %rax, 0x20(%r15)
movl $0x8, %esi
movq %r13, %rdi
callq 0x32e0
movq %rax, 0x28(%r15)
movl $0x8, %esi
movq %r13, %rdi
callq 0x32e0
movq %rax, 0x18(%r15)
movl %r13d, (%r15)
movq %r15, 0x10(%rsp)
movq $-0x1, 0x8(%r15)
testl %r13d, %r13d
jle 0x12710
movq %rax, %rbp
movl 0xc(%rsp), %r13d
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x118cc
movq %rax, (%rbp,%r15,8)
movq $-0x1, (%r12,%r15,8)
incq %r15
cmpq %r15, %r13
jne 0x126ef
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_mplp_destroy
void bam_mplp_destroy(bam_mplp_t iter)
{
	int i;
	for (i = 0; i < iter->n; ++i) bam_plp_destroy(iter->iter[i]);
	free(iter->iter); free(iter->pos); free(iter->n_plp); free(iter->plp);
	free(iter);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x12769
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x11978
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x12751
movq 0x18(%rbx), %rdi
callq 0x3060
movq 0x10(%rbx), %rdi
callq 0x3060
movq 0x20(%rbx), %rdi
callq 0x3060
movq 0x28(%rbx), %rdi
callq 0x3060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_pileup.c
// Function: bam_mplp_auto
int bam_mplp_auto(bam_mplp_t iter, int *_tid, int *_pos, int *n_plp, const bam_pileup1_t **plp)
{
	int i, ret = 0;
	uint64_t new_min = (uint64_t)-1;
	for (i = 0; i < iter->n; ++i) {
		if (iter->pos[i] == iter->min) {
			int tid, pos;
			iter->plp[i] = bam_plp_auto(iter->iter[i], &tid, &pos, &iter->n_plp[i]);
			iter->pos[i] = (uint64_t)tid<<32 | pos;
		}
		if (iter->plp[i] && iter->pos[i] < new_min) new_min = iter->pos[i];
	}
	iter->min = new_min;
	if (new_min == (uint64_t)-1) return 0;
	*_tid = new_min>>32; *_pos = (uint32_t)new_min;
	for (i = 0; i < iter->n; ++i) {
		if (iter->pos[i] == iter->min) { // FIXME: valgrind reports "uninitialised value(s) at this line"
			n_plp[i] = iter->n_plp[i], plp[i] = iter->plp[i];
			++ret;
		} else n_plp[i] = 0, plp[i] = 0;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
cmpl $0x0, (%rdi)
jle 0x128b6
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movq 0x10(%r15), %rax
movq $-0x1, %r13
xorl %ebx, %ebx
leaq 0x4(%rsp), %rbp
movq %rsp, %r12
xorl %r14d, %r14d
movq (%rax,%rbx,2), %rcx
cmpq 0x8(%r15), %rcx
jne 0x12825
movq 0x18(%r15), %rax
movq (%rax,%rbx,2), %rdi
movq 0x20(%r15), %rcx
addq %rbx, %rcx
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1231d
movq 0x28(%r15), %rcx
movq %rax, (%rcx,%rbx,2)
movl 0x4(%rsp), %eax
shlq $0x20, %rax
movslq (%rsp), %rcx
orq %rax, %rcx
movq 0x10(%r15), %rax
movq %rcx, (%rax,%rbx,2)
movq 0x28(%r15), %rcx
cmpq $0x0, (%rcx,%rbx,2)
je 0x1283b
movq (%rax,%rbx,2), %rcx
cmpq %r13, %rcx
cmovbq %rcx, %r13
incq %r14
movslq (%r15), %rcx
addq $0x4, %rbx
cmpq %rcx, %r14
jl 0x127e2
movq %r13, 0x8(%r15)
xorl %eax, %eax
cmpq $-0x1, %r13
je 0x128c0
movq %r13, %rcx
shrq $0x20, %rcx
movq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
movq 0x10(%rsp), %rcx
movl %r13d, (%rcx)
cmpl $0x0, (%r15)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %r8
jle 0x128c0
xorl %ecx, %ecx
xorl %eax, %eax
movq 0x10(%r15), %rdx
cmpq %r13, (%rdx,%rcx,8)
jne 0x1289d
movq 0x20(%r15), %rdx
movq 0x28(%r15), %rsi
movl (%rdx,%rcx,4), %edx
movq (%rsi,%rcx,8), %rsi
incl %eax
jmp 0x128a1
xorl %edx, %edx
xorl %esi, %esi
movl %edx, (%r8,%rcx,4)
movq %rsi, (%rdi,%rcx,8)
incq %rcx
movslq (%r15), %rdx
cmpq %rdx, %rcx
jl 0x12880
jmp 0x128c0
movq $-0x1, 0x8(%r15)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_buffered_write
static void _razf_buffered_write(RAZF *rz, const void *data, int size){
	int i, n;
	while(1){
		if(rz->buf_len == RZ_BUFFER_SIZE){
			_razf_write(rz, rz->inbuf, rz->buf_len);
			rz->buf_len = 0;
		}
		if(size + rz->buf_len < RZ_BUFFER_SIZE){
			for(i=0;i<size;i++) ((char*)rz->inbuf + rz->buf_len)[i] = ((char*)data)[i];
			rz->buf_len += size;
			return;
		} else {
			n = RZ_BUFFER_SIZE - rz->buf_len;
			for(i=0;i<n;i++) ((char*)rz->inbuf + rz->buf_len)[i] = ((char*)data)[i];
			size -= n;
			data += n;
			rz->buf_len += n;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x84(%rdi), %eax
cmpl $0x1000, %eax           # imm = 0x1000
jne 0x12b32
movq 0x60(%rbx), %rsi
movl $0x1000, %ebp           # imm = 0x1000
movq %rbx, %rdi
movl $0x1000, %edx           # imm = 0x1000
callq 0x13978
movl $0x0, 0x84(%rbx)
cmpl $0xfff, %r14d           # imm = 0xFFF
jg 0x12b4c
jmp 0x12b92
leal (%rax,%r14), %ecx
cmpl $0x1000, %ecx           # imm = 0x1000
jl 0x12b95
movl $0x1000, %ebp           # imm = 0x1000
subl %eax, %ebp
cmpl $0xfff, %eax            # imm = 0xFFF
jg 0x12b7a
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
xorl %ecx, %ecx
movslq 0x84(%rbx), %rdx
addq 0x60(%rbx), %rdx
movb (%r15,%rcx), %sil
movb %sil, (%rcx,%rdx)
incq %rcx
cmpq %rcx, %rax
jne 0x12b59
movl 0x84(%rbx), %eax
subl %ebp, %r14d
movslq %ebp, %rcx
addq %rcx, %r15
addl %eax, %ecx
movl %ecx, 0x84(%rbx)
movl %ecx, %eax
jmp 0x12b00
movl %r14d, %ecx
testl %r14d, %r14d
jle 0x12bc4
movl %r14d, %eax
xorl %ecx, %ecx
movslq 0x84(%rbx), %rdx
addq 0x60(%rbx), %rdx
movb (%r15,%rcx), %sil
movb %sil, (%rcx,%rdx)
incq %rcx
cmpq %rcx, %rax
jne 0x12b9f
addl 0x84(%rbx), %r14d
movl %r14d, %ecx
movl %ecx, 0x84(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_open_w
static RAZF* razf_open_w(int fd){
	RAZF *rz;
#ifdef _WIN32
	setmode(fd, O_BINARY);
#endif
	rz = calloc(1, sizeof(RAZF));
	rz->mode = 'w';
#ifdef _USE_KNETFILE
    rz->x.fpw = fd;
#else
	rz->filedes = fd;
#endif
	rz->stream = calloc(sizeof(z_stream), 1);
	rz->inbuf  = malloc(RZ_BUFFER_SIZE);
	rz->outbuf = malloc(RZ_BUFFER_SIZE);
	rz->index = calloc(sizeof(ZBlockIndex), 1);
	deflateInit2(rz->stream, RZ_COMPRESS_LEVEL, Z_DEFLATED, WINDOW_BITS + 16, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
	rz->stream->avail_out = RZ_BUFFER_SIZE;
	rz->stream->next_out  = rz->outbuf;
	rz->header = calloc(sizeof(gz_header), 1);
	rz->header->os    = 0x03; //Unix
	rz->header->text  = 0;
	rz->header->time  = 0;
	rz->header->extra = malloc(7);
	strncpy((char*)rz->header->extra, "RAZF", 4);
	rz->header->extra[4] = 1; // obsolete field
	// block size = RZ_BLOCK_SIZE, Big-Endian
	rz->header->extra[5] = RZ_BLOCK_SIZE >> 8;
	rz->header->extra[6] = RZ_BLOCK_SIZE & 0xFF;
	rz->header->extra_len = 7;
	rz->header->name = rz->header->comment  = 0;
	rz->header->hcrc = 0;
	deflateSetHeader(rz->stream, rz->header);
	rz->block_pos = rz->block_off = 0;
	return rz;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x1, %edi
movl $0x98, %esi
callq 0x32e0
movq %rax, %rbx
movb $0x77, (%rax)
movl %ebp, 0x8(%rax)
movl $0x70, %edi
movl $0x1, %esi
callq 0x32e0
movq %rax, %r14
movq %rax, 0x10(%rbx)
movl $0x1000, %edi           # imm = 0x1000
callq 0x33e0
movq %rax, 0x60(%rbx)
movl $0x1000, %edi           # imm = 0x1000
callq 0x33e0
movq %rax, %r15
movq %rax, 0x68(%rbx)
movl $0x18, %edi
movl $0x1, %esi
callq 0x32e0
movq %rax, 0x18(%rbx)
leaq 0x9c13(%rip), %rax      # 0x1c89f
movq %r14, %rdi
movl $0x6, %esi
movl $0x8, %edx
movl $0x1f, %ecx
movl $0x8, %r8d
xorl %r9d, %r9d
pushq $0x70
pushq %rax
callq 0x3290
addq $0x10, %rsp
movl $0x1000, 0x20(%r14)     # imm = 0x1000
movq %r15, 0x18(%r14)
movl $0x50, %edi
movl $0x1, %esi
callq 0x32e0
movq %rax, %r15
movq %rax, 0x78(%rbx)
movl $0x3, 0x14(%rax)
movl $0x7, %edi
callq 0x33e0
movq %rax, 0x18(%r15)
movl $0x465a4152, (%rax)     # imm = 0x465A4152
movw $0x8001, 0x4(%rax)      # imm = 0x8001
movb $0x0, 0x6(%rax)
movl $0x7, 0x20(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x34a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_get_data_size
int razf_get_data_size(RAZF *rz, int64_t *u_size, int64_t *c_size){
	int64_t n;
	if(rz->mode != 'r' && rz->mode != 'R') return 0;
	switch(rz->file_type){
		case FILE_TYPE_PLAIN:
			if(rz->end == 0x7fffffffffffffffLL){
#ifdef _USE_KNETFILE
				if(knet_seek(rz->x.fpr, 0, SEEK_CUR) == -1) return 0;
                n = knet_tell(rz->x.fpr);
				knet_seek(rz->x.fpr, 0, SEEK_END);
                rz->end = knet_tell(rz->x.fpr);
				knet_seek(rz->x.fpr, n, SEEK_SET);
#else
				if((n = lseek(rz->filedes, 0, SEEK_CUR)) == -1) return 0;
				rz->end = lseek(rz->filedes, 0, SEEK_END);
				lseek(rz->filedes, n, SEEK_SET);
#endif                
			}
			*u_size = *c_size = rz->end;
			return 1;
		case FILE_TYPE_GZ:
			return 0;
		case FILE_TYPE_RZ:
			if(rz->src_end == rz->end) return 0;
			*u_size = rz->src_end;
			*c_size = rz->end;
			return 1;
		default:
			return 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movzbl (%rdi), %eax
xorl %r12d, %r12d
orl $0x20, %eax
cmpl $0x72, %eax
jne 0x131da
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x4(%rdi), %eax
cmpl $0x1, %eax
je 0x131c0
cmpl $0x2, %eax
jne 0x131da
movq 0x30(%r15), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jne 0x131b8
movq 0x8(%r15), %rdi
xorl %r12d, %r12d
xorl %esi, %esi
movl $0x1, %edx
callq 0x15ed4
cmpq $-0x1, %rax
je 0x131da
movq 0x8(%r15), %rdi
movq 0x8(%rdi), %r12
xorl %esi, %esi
movl $0x2, %edx
callq 0x15ed4
movq 0x8(%r15), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x30(%r15)
movq %r12, %rsi
xorl %edx, %edx
callq 0x15ed4
movq 0x30(%r15), %rax
movq %rax, (%rbx)
movq %rax, (%r14)
jmp 0x131d4
movq 0x38(%r15), %rax
cmpq 0x30(%r15), %rax
je 0x131da
movq %rax, (%r14)
movq 0x30(%r15), %rax
movq %rax, (%rbx)
movl $0x1, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_read
int razf_read(RAZF *rz, void *data, int size){
	int ori_size, i;
	ori_size = size;
	while(size > 0){
		if(rz->buf_len){
			if(size < rz->buf_len){
				for(i=0;i<size;i++) ((char*)data)[i] = ((char*)rz->outbuf + rz->buf_off)[i];
				rz->buf_off += size;
				rz->buf_len -= size;
				data += size;
				rz->block_off += size;
				size = 0;
				break;
			} else {
				for(i=0;i<rz->buf_len;i++) ((char*)data)[i] = ((char*)rz->outbuf + rz->buf_off)[i];
				data += rz->buf_len;
				size -= rz->buf_len;
				rz->block_off += rz->buf_len;
				rz->buf_off = 0;
				rz->buf_len = 0;
				if(rz->buf_flush){
					rz->block_pos = rz->next_block_pos;
					rz->block_off = 0;
					rz->buf_flush = 0;
				}
			}
		} else if(rz->buf_flush){
			rz->block_pos = rz->next_block_pos;
			rz->block_off = 0;
			rz->buf_flush = 0;
		}
		if(rz->buf_flush) continue;
		rz->buf_len = _razf_read(rz, rz->outbuf, RZ_BUFFER_SIZE);
		if(rz->z_eof && rz->buf_len == 0) break;
	}
	rz->out += ori_size - size;
	return ori_size - size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl %edx, %ebp
testl %edx, %edx
jle 0x132df
movq %rsi, %r15
movl 0x84(%r14), %eax
movl %ebx, %ebp
testl %eax, %eax
je 0x1325a
cmpl %eax, %ebp
jl 0x132ad
testl %eax, %eax
jle 0x13243
xorl %ecx, %ecx
movslq 0x80(%r14), %rax
addq 0x68(%r14), %rax
movb (%rcx,%rax), %al
movb %al, (%r15,%rcx)
incq %rcx
movl 0x84(%r14), %eax
movslq %eax, %rdx
cmpq %rdx, %rcx
jl 0x1321d
jmp 0x13246
movslq %eax, %rdx
addq %rdx, %r15
addq %rdx, 0x50(%r14)
subl %eax, %ebp
movq $0x0, 0x80(%r14)
cmpl $0x0, 0x40(%r14)
je 0x13279
movq 0x58(%r14), %rax
movq %rax, 0x48(%r14)
movq $0x0, 0x50(%r14)
movl $0x0, 0x40(%r14)
movq 0x68(%r14), %rsi
movq %r14, %rdi
callq 0x132f3
movl %eax, 0x84(%r14)
cmpl $0x0, 0x8c(%r14)
sete %cl
testl %eax, %eax
setne %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x132df
testl %ebp, %ebp
jg 0x1320b
jmp 0x132df
movl %ebp, %eax
xorl %ecx, %ecx
movslq 0x80(%r14), %rdx
addq 0x68(%r14), %rdx
movb (%rcx,%rdx), %dl
movb %dl, (%r15,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x132b1
addl %ebp, 0x80(%r14)
subl %ebp, 0x84(%r14)
addq %rax, 0x50(%r14)
xorl %ebp, %ebp
subl %ebp, %ebx
movslq %ebx, %rax
addq %rax, 0x28(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_skip
int razf_skip(RAZF* rz, int size){
	int ori_size;
	ori_size = size;
	while(size > 0){
		if(rz->buf_len){
			if(size < rz->buf_len){
				rz->buf_off += size;
				rz->buf_len -= size;
				rz->block_off += size;
				size = 0;
				break;
			} else {
				size -= rz->buf_len;
				rz->buf_off = 0;
				rz->buf_len = 0;
				rz->block_off += rz->buf_len;
				if(rz->buf_flush){
					rz->block_pos = rz->next_block_pos;
					rz->block_off = 0;
					rz->buf_flush = 0;
				}
			}
		} else if(rz->buf_flush){
			rz->block_pos = rz->next_block_pos;
			rz->block_off = 0;
			rz->buf_flush = 0;
		}
		if(rz->buf_flush) continue;
		rz->buf_len = _razf_read(rz, rz->outbuf, RZ_BUFFER_SIZE);
		if(rz->z_eof || rz->z_err) break;
	}
	rz->out += ori_size - size;
	return ori_size - size;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r14d
testl %esi, %esi
jle 0x134f3
movl 0x84(%rbx), %eax
movl %ebp, %ecx
testl %eax, %eax
je 0x134d1
movl %ecx, %r14d
subl %eax, %r14d
jl 0x134dc
movq $0x0, 0x80(%rbx)
cmpl $0x0, 0x40(%rbx)
je 0x134a3
movq 0x58(%rbx), %rax
movq %rax, 0x48(%rbx)
movq $0x0, 0x50(%rbx)
movl $0x0, 0x40(%rbx)
movq 0x68(%rbx), %rsi
movq %rbx, %rdi
callq 0x132f3
movl %eax, 0x84(%rbx)
cmpl $0x0, 0x8c(%rbx)
jne 0x134f3
cmpl $0x0, 0x88(%rbx)
jne 0x134f3
movl %r14d, %ecx
testl %r14d, %r14d
jg 0x1346f
jmp 0x134f3
cmpl $0x0, 0x40(%rbx)
movl %ecx, %r14d
jne 0x1348c
jmp 0x134a3
addl %ecx, 0x80(%rbx)
subl %ecx, %eax
movl %eax, 0x84(%rbx)
movl %ecx, %eax
addq %rax, 0x50(%rbx)
xorl %r14d, %r14d
subl %r14d, %ebp
movslq %ebp, %rax
addq %rax, 0x28(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_jump
int64_t razf_jump(RAZF *rz, int64_t block_start, int block_offset){
	int64_t pos;
	rz->z_eof = 0;
	if(rz->file_type == FILE_TYPE_PLAIN){
		rz->buf_off = rz->buf_len = 0;
		pos = block_start + block_offset;
#ifdef _USE_KNETFILE
		knet_seek(rz->x.fpr, pos, SEEK_SET);
        pos = knet_tell(rz->x.fpr);
#else
		pos = lseek(rz->filedes, pos, SEEK_SET);
#endif
		rz->out = rz->in = pos;
		return pos;
	}
	if(block_start == rz->block_pos && block_offset >= rz->block_off) {
		block_offset -= rz->block_off;
		goto SKIP; // Needn't reset inflate
	}
	if(block_start  == 0) block_start = rz->header_size; // Automaticly revist wrong block_start
	_razf_reset_read(rz, block_start, 0);
	SKIP:
	if(block_offset) razf_skip(rz, block_offset);
	return rz->block_off;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movl $0x0, 0x8c(%rdi)
cmpl $0x2, 0x4(%rdi)
jne 0x1354b
movq $0x0, 0x80(%rbx)
movslq %ebp, %rax
addq %rsi, %rax
movq 0x8(%rbx), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x15ed4
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rbx)
jmp 0x13586
cmpq %rsi, 0x48(%rbx)
jne 0x1355d
movslq %ebp, %rcx
movq 0x50(%rbx), %rax
cmpq %rcx, %rax
jle 0x13572
testq %rsi, %rsi
jne 0x13566
movslq 0x70(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1358d
jmp 0x13574
subl %eax, %ebp
testl %ebp, %ebp
je 0x13582
movq %rbx, %rdi
movl %ebp, %esi
callq 0x13453
movq 0x50(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_seek
int64_t razf_seek(RAZF* rz, int64_t pos, int where){
	int64_t idx;
	int64_t seek_pos, new_out;
	rz->z_eof = 0;
	if (where == SEEK_CUR) pos += rz->out;
	else if (where == SEEK_END) pos += rz->src_end;
	if(rz->file_type == FILE_TYPE_PLAIN){
#ifdef _USE_KNETFILE
		knet_seek(rz->x.fpr, pos, SEEK_SET);
        seek_pos = knet_tell(rz->x.fpr);
#else
		seek_pos = lseek(rz->filedes, pos, SEEK_SET);
#endif
		rz->buf_off = rz->buf_len = 0;
		rz->out = rz->in = seek_pos;
		return seek_pos;
	} else if(rz->file_type == FILE_TYPE_GZ){
		if(pos >= rz->out) goto SKIP;
		return rz->out;
	}
	if(pos == rz->out) return pos;
	if(pos > rz->src_end) return rz->out;
	if(!rz->seekable || !rz->load_index){
		if(pos >= rz->out) goto SKIP;
	}
	idx = pos / RZ_BLOCK_SIZE - 1;
	seek_pos = (idx < 0)? rz->header_size:(rz->index->cell_offsets[idx] + rz->index->bin_offsets[idx / RZ_BIN_SIZE]);
	new_out  = (idx + 1) * RZ_BLOCK_SIZE;
	if(pos > rz->out && new_out <= rz->out) goto SKIP;
	_razf_reset_read(rz, seek_pos, new_out);
	SKIP:
	razf_skip(rz, (int)(pos - rz->out));
	return rz->out;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x0, 0x8c(%rdi)
cmpl $0x1, %edx
je 0x13614
cmpl $0x2, %edx
jne 0x1361d
movl $0x38, %eax
jmp 0x13619
movl $0x28, %eax
addq (%rbx,%rax), %r14
movl 0x4(%rbx), %eax
cmpl $0x3, %eax
je 0x13655
cmpl $0x2, %eax
jne 0x13672
movq 0x8(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x15ed4
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x80(%rbx)
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rbx)
jmp 0x13686
movq 0x28(%rbx), %rax
cmpq %rax, %r14
jl 0x13686
subl %eax, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x13453
movq 0x28(%rbx), %rax
jmp 0x13686
movq 0x28(%rbx), %rax
cmpq %rax, %r14
jne 0x13680
movq %r14, %rax
jmp 0x13686
cmpq 0x38(%rbx), %r14
jle 0x1368e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x0, 0x90(%rbx)
je 0x136a0
cmpl $0x0, 0x94(%rbx)
jne 0x136a5
cmpq %rax, %r14
jge 0x1365e
movl $0x7fff, %ecx           # imm = 0x7FFF
leaq (%r14,%rcx), %rdx
testq %r14, %r14
cmovnsq %r14, %rdx
sarq $0xf, %rdx
cmpq %rcx, %r14
jg 0x136c4
movslq 0x70(%rbx), %rsi
jmp 0x136df
leaq -0x1(%rdx), %rcx
movq 0x18(%rbx), %rsi
movq (%rsi), %rdi
movq 0x8(%rsi), %r8
movl -0x4(%rdi,%rdx,4), %esi
shrq $0x11, %rcx
addq (%r8,%rcx,8), %rsi
shlq $0xf, %rdx
cmpq %rax, %r14
setle %cl
cmpq %rax, %rdx
setg %dil
orb %cl, %dil
cmpb $0x1, %dil
jne 0x1365e
movq %rbx, %rdi
callq 0x1358d
movq 0x28(%rbx), %rax
jmp 0x1365e
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: razf_write
static void _razf_write(RAZF* rz, const void *data, int size){
	int tout;
	rz->stream->avail_in = size;
	rz->stream->next_in  = (void*)data;
	while(1){
		tout = rz->stream->avail_out;
		deflate(rz->stream, Z_NO_FLUSH);
		rz->out += tout - rz->stream->avail_out;
		if(rz->stream->avail_out) break;
#ifdef _USE_KNETFILE
		write(rz->x.fpw, rz->outbuf, RZ_BUFFER_SIZE - rz->stream->avail_out);
#else
		write(rz->filedes, rz->outbuf, RZ_BUFFER_SIZE - rz->stream->avail_out);
#endif
		rz->stream->avail_out = RZ_BUFFER_SIZE;
		rz->stream->next_out  = rz->outbuf;
		if(rz->stream->avail_in == 0) break;
	};
	rz->in += size - rz->stream->avail_in;
	rz->block_off += size - rz->stream->avail_in;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, 0x8(%rdi)
movq %rsi, (%rdi)
movl 0x20(%rdi), %r15d
xorl %esi, %esi
callq 0x3250
movq 0x10(%r14), %rax
movl 0x20(%rax), %ecx
subl %ecx, %r15d
addq %r15, 0x28(%r14)
testl %ecx, %ecx
jne 0x139de
movl 0x8(%r14), %edi
movq 0x68(%r14), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x3190
movq 0x10(%r14), %rdi
movl $0x1000, 0x20(%rdi)     # imm = 0x1000
movq 0x68(%r14), %rax
movq %rax, 0x18(%rdi)
movl $0x1000, %r15d          # imm = 0x1000
cmpl $0x0, 0x8(%rdi)
jne 0x13990
xorl %eax, %eax
jmp 0x139e1
movl 0x8(%rax), %eax
subl %eax, %ebx
addq %rbx, 0x20(%r14)
addq %rbx, 0x50(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/razf.c
// Function: load_zindex
static void load_zindex(RAZF *rz, int fd){
#endif
	int32_t i, v32;
	int is_be;
	if(!rz->load_index) return;
	if(rz->index == NULL) rz->index = malloc(sizeof(ZBlockIndex));
	is_be = is_big_endian();
#ifdef _USE_KNETFILE
	knet_read(fp, &rz->index->size, sizeof(int));
#else
	read(fd, &rz->index->size, sizeof(int));
#endif
	if(!is_be) rz->index->size = byte_swap_4((uint32_t)rz->index->size);
	rz->index->cap = rz->index->size;
	v32 = rz->index->size / RZ_BIN_SIZE + 1;
	rz->index->bin_offsets  = malloc(sizeof(int64_t) * v32);
#ifdef _USE_KNETFILE
	knet_read(fp, rz->index->bin_offsets, sizeof(int64_t) * v32);
#else
	read(fd, rz->index->bin_offsets, sizeof(int64_t) * v32);
#endif
	rz->index->cell_offsets = malloc(sizeof(int) * rz->index->size);
#ifdef _USE_KNETFILE
	knet_read(fp, rz->index->cell_offsets, sizeof(int) * rz->index->size);
#else
	read(fd, rz->index->cell_offsets, sizeof(int) * rz->index->size);
#endif
	if(!is_be){
		for(i=0;i<v32;i++) rz->index->bin_offsets[i] = byte_swap_8((uint64_t)rz->index->bin_offsets[i]);
		for(i=0;i<rz->index->size;i++) rz->index->cell_offsets[i] = byte_swap_4((uint32_t)rz->index->cell_offsets[i]);
	}
}

// Assembly:
cmpl $0x0, 0x94(%rdi)
je 0x13ae8
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rsi
testq %rsi, %rsi
jne 0x13a26
movl $0x18, %edi
callq 0x33e0
movq %rax, %rsi
movq %rax, 0x18(%rbx)
addq $0x10, %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x15e14
movq 0x18(%rbx), %r12
movl 0x10(%r12), %ebp
bswapl %ebp
movl %ebp, 0x10(%r12)
movl %ebp, 0x14(%r12)
sarl $0x11, %ebp
movslq %ebp, %rax
leaq 0x8(,%rax,8), %r15
movq %r15, %rdi
callq 0x33e0
movq %rax, 0x8(%r12)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x15e14
movq 0x18(%rbx), %r12
movslq 0x10(%r12), %r15
shlq $0x2, %r15
movq %r15, %rdi
callq 0x33e0
movq %rax, (%r12)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x15e14
movq 0x18(%rbx), %rax
testl %ebp, %ebp
js 0x13ac1
incl %ebp
movq 0x8(%rax), %rcx
movl %ebp, %edx
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
bswapq %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x13aae
cmpl $0x0, 0x10(%rax)
jle 0x13ae0
movq (%rax), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
bswapl %esi
movl %esi, (%rcx,%rdx,4)
incq %rdx
movslq 0x10(%rax), %rsi
cmpq %rsi, %rdx
jl 0x13acc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/faidx.c
// Function: fai_destroy
void fai_destroy(faidx_t *fai)
{
	int i;
	for (i = 0; i < fai->n; ++i) free(fai->name[i]);
	free(fai->name);
	kh_destroy(s, fai->hash);
	if (fai->rz) razf_close(fai->rz);
	free(fai);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x14379
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3060
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x14360
movq 0x10(%rbx), %rdi
callq 0x3060
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x143ae
movq 0x18(%r14), %rdi
callq 0x3060
movq 0x10(%r14), %rdi
callq 0x3060
movq 0x20(%r14), %rdi
callq 0x3060
movq %r14, %rdi
callq 0x3060
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x143bb
callq 0x1373c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/faidx.c
// Function: fai_save
void fai_save(const faidx_t *fai, FILE *fp)
{
	khint_t k;
	int i;
	for (i = 0; i < fai->n; ++i) {
		faidx1_t x;
		k = kh_get(s, fai->hash, fai->name[i]);
		x = kh_value(fai->hash, k);
#ifdef _WIN32
		fprintf(fp, "%s\t%d\t%ld\t%d\t%d\n", fai->name[i], (int)x.len, (long)x.offset, (int)x.line_blen, (int)x.line_len);
#else
		fprintf(fp, "%s\t%d\t%lld\t%d\t%d\n", fai->name[i], (int)x.len, (long long)x.offset, (int)x.line_blen, (int)x.line_len);
#endif
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x28(%rsp)
cmpl $0x0, 0x8(%rdi)
jle 0x1453d
movq %rdi, %rbx
xorl %r15d, %r15d
movq %rdi, 0x18(%rsp)
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movq (%rax,%r15,8), %r10
movq %rcx, 0x8(%rsp)
movl (%rcx), %r13d
movl $0x0, %eax
testl %r13d, %r13d
je 0x144f4
movsbl (%r10), %ecx
testl %ecx, %ecx
movq %r15, 0x20(%rsp)
je 0x14444
movb 0x1(%r10), %al
testb %al, %al
je 0x14446
leaq 0x2(%r10), %rdx
movl %ecx, %esi
shll $0x5, %esi
subl %ecx, %esi
movsbl %al, %ecx
addl %esi, %ecx
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x1442d
jmp 0x14446
xorl %ecx, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r13d
movl %edx, %edi
leal -0x1(%r13), %esi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
movl %edx, %r14d
incl %r14d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
movl %edi, %r12d
movl %edi, 0x14(%rsp)
movq %rsi, 0x30(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %ebp
leal (%r12,%r12), %r15d
andl $0x1e, %r15d
movl %ebp, %eax
movl %r15d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x144da
testb $0x1, %al
jne 0x144bf
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r10, %rsi
movq %r10, %rbx
callq 0x3300
movq 0x30(%rsp), %rsi
movl 0x14(%rsp), %edi
movq %rbx, %r10
testl %eax, %eax
je 0x144da
addl %r14d, %r12d
cmpl %r13d, %r12d
movl %r13d, %eax
movl $0x0, %ecx
cmovbl %ecx, %eax
subl %eax, %r12d
cmpl %edi, %r12d
jne 0x14474
jmp 0x144e7
movl %r15d, %ecx
shrl %cl, %ebp
testb $0x3, %bpl
cmovel %r12d, %r13d
movl %r13d, %eax
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r15
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rdx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movl (%rdx,%rax,8), %esi
movl 0x4(%rdx,%rax,8), %r9d
movl 0x8(%rdx,%rax,8), %ecx
movq 0x10(%rdx,%rax,8), %r8
movl %esi, (%rsp)
movq 0x28(%rsp), %rdi
leaq 0x84eb(%rip), %rsi      # 0x1ca0e
movq %r10, %rdx
xorl %eax, %eax
callq 0x3320
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x143f2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq