LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/sample.c
// Function: kh_put_sm
bam_sample_t *bam_smpl_init(void)
{
	bam_sample_t *s;
	s = calloc(1, sizeof(bam_sample_t));
	s->rg2smid = kh_init(sm);
	s->sm2id = kh_init(sm);
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jb 0x16fde
movl (%rbp), %eax
movl 0x4(%rbp), %ecx
addl %ecx, %ecx
xorl %esi, %esi
cmpl %eax, %ecx
sbbl %esi, %esi
orl $0x1, %esi
addl %eax, %esi
movq %rbp, %rdi
callq 0x1717e
movl (%rbp), %edi
movsbl (%rbx), %esi
testl %esi, %esi
je 0x1700a
movb 0x1(%rbx), %al
testb %al, %al
je 0x1700c
leaq 0x2(%rbx), %rcx
movl %esi, %edx
shll $0x5, %edx
subl %esi, %edx
movsbl %al, %esi
addl %edx, %esi
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x16ff3
jmp 0x1700c
xorl %esi, %esi
xorl %r11d, %r11d
movl %esi, %eax
xorl %edx, %edx
divl %edi
movl %edx, %r15d
movq 0x10(%rbp), %r10
movl %edx, %eax
shrl $0x4, %eax
movl (%r10,%rax,4), %eax
leal (%r15,%r15), %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x170fe
movq %rbp, 0x8(%rsp)
movq %r13, 0x10(%rsp)
leal -0x1(%rdi), %ecx
movl %esi, %eax
xorl %edx, %edx
divl %ecx
incl %edx
movl %r15d, %r12d
movl %edi, %r14d
movq %rdi, 0x20(%rsp)
movq %r10, 0x18(%rsp)
movl %edx, 0x4(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%r10,%rax,4), %ebp
leal (%r12,%r12), %r13d
andl $0x1e, %r13d
movl %ebp, %eax
movl %r13d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x170cb
testb $0x1, %al
jne 0x170aa
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x35a0
movl 0x4(%rsp), %edx
xorl %r11d, %r11d
movq 0x18(%rsp), %r10
movq 0x20(%rsp), %rdi
testl %eax, %eax
je 0x170cb
btl %r13d, %ebp
cmovbl %r12d, %r14d
addl %edx, %r12d
cmpl %edi, %r12d
movl %edi, %eax
cmovbl %r11d, %eax
subl %eax, %r12d
movl %r14d, %eax
cmpl %r15d, %r12d
jne 0x1705c
jmp 0x170cd
movl %edi, %eax
movl %eax, %r15d
cmpl %edi, %eax
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rbp
jne 0x170fe
movl %r12d, %eax
shrl $0x4, %eax
movl (%r10,%rax,4), %eax
leal (%r12,%r12), %ecx
shrl %cl, %eax
cmpl %edi, %r14d
cmovel %r12d, %r14d
testb $0x2, %al
cmovel %r12d, %r14d
movl %r14d, %r15d
movl %r15d, %eax
shrl $0x4, %eax
movl (%r10,%rax,4), %edx
leal (%r15,%r15), %ecx
andl $0x1e, %ecx
shrl %cl, %edx
testb $0x2, %dl
jne 0x17142
xorl %esi, %esi
testb $0x1, %dl
je 0x17168
movq 0x18(%rbp), %rdx
movl %r15d, %esi
movq %rbx, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rbp), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rbp)
movl $0x2, %esi
jmp 0x17168
movq 0x18(%rbp), %rdx
movl %r15d, %esi
movq %rbx, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rbp), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rbp)
incl 0x8(%rbp)
movl $0x1, %esi
movl %esi, (%r13)
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/sample.c
// Function: bam_smpl_destroy
void bam_smpl_destroy(bam_sample_t *sm)
{
	int i;
	khint_t k;
	khash_t(sm) *rg2smid = (khash_t(sm)*)sm->rg2smid;
	if (sm == 0) return;
	for (i = 0; i < sm->n; ++i) free(sm->smpl[i]);
	free(sm->smpl);
	for (k = kh_begin(rg2smid); k != kh_end(rg2smid); ++k)
		if (kh_exist(rg2smid, k)) free((char*)kh_key(rg2smid, k));
	kh_destroy(sm, sm->rg2smid);
	kh_destroy(sm, sm->sm2id);
	free(sm);
}

// Assembly:
testq %rdi, %rdi
je 0x1652a
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
cmpl $0x0, (%rdi)
jle 0x16479
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x3350
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0x16461
movq 0x8(%rbx), %rdi
callq 0x3350
cmpl $0x0, (%r14)
je 0x164c0
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movl %r15d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x164b5
movq 0x18(%r14), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
callq 0x3350
incl %r15d
addl $0x2, %ebp
cmpl (%r14), %r15d
jne 0x1648d
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x164ec
movq 0x18(%r14), %rdi
callq 0x3350
movq 0x10(%r14), %rdi
callq 0x3350
movq 0x20(%r14), %rdi
callq 0x3350
movq %r14, %rdi
callq 0x3350
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x16518
movq 0x18(%r14), %rdi
callq 0x3350
movq 0x10(%r14), %rdi
callq 0x3350
movq 0x20(%r14), %rdi
callq 0x3350
movq %r14, %rdi
callq 0x3350
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3350
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/cut_target.c
// Function: read_aln
static int read_aln(void *data, bam1_t *b)
{
	extern int bam_prob_realn_core(bam1_t *b, const char *ref, int flag);
	ct_t *g = (ct_t*)data;
	int ret, len;
	ret = bam_read1(g->fp, b);
	if (ret >= 0 && g->fai && b->core.tid >= 0 && (b->core.flag&4) == 0) {
		if (b->core.tid != g->tid) { // then load the sequence
			free(g->ref);
			g->ref = fai_fetch(g->fai, g->h->target_name[b->core.tid], &len);
			g->tid = b->core.tid;
		}
		bam_prob_realn_core(b, g->ref, 1<<1|1);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
callq 0x23238
movl %eax, %ebp
testl %eax, %eax
js 0x179b0
cmpq $0x0, 0x30(%r14)
je 0x179b0
movl (%rbx), %eax
testl %eax, %eax
js 0x179b0
testb $0x4, 0xc(%rbx)
jne 0x179b0
cmpl 0x4(%r14), %eax
je 0x1799f
movq 0x28(%r14), %rdi
callq 0x3350
movq 0x20(%r14), %rax
movq 0x30(%r14), %rdi
movq 0x8(%rax), %rax
movslq (%rbx), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc(%rsp), %rdx
callq 0x2ef9c
movq %rax, 0x28(%r14)
movl (%rbx), %eax
movl %eax, 0x4(%r14)
movq 0x28(%r14), %rsi
movq %rbx, %rdi
movl $0x3, %edx
callq 0x2d7a9
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/phase.c
// Function: readaln
static int readaln(void *data, bam1_t *b)
{
	phaseg_t *g = (phaseg_t*)data;
	int ret;
	ret = bam_read1(g->fp, b);
	if (ret < 0) return ret;
	if (!(b->core.flag & (BAM_FUNMAP|BAM_FSECONDARY|BAM_FQCFAIL|BAM_FDUP)) && g->pre) {
		if (g->n == g->m) {
			g->m = g->m? g->m<<1 : 16;
			g->b = realloc(g->b, g->m * sizeof(void*));
		}
		g->b[g->n++] = bam_dup1(b);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x23238
movl %eax, %ebp
testl %eax, %eax
js 0x194ee
movzwl 0xc(%r14), %eax
testl $0x704, %eax            # imm = 0x704
jne 0x194ee
cmpq $0x0, 0x20(%rbx)
je 0x194ee
movl 0x44(%rbx), %eax
cmpl %eax, 0x40(%rbx)
jne 0x19481
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, 0x44(%rbx)
movq 0x48(%rbx), %rdi
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x3720
movq %rax, 0x48(%rbx)
movl $0x1, %edi
movl $0x38, %esi
callq 0x3610
movq %rax, %r15
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
movq 0x30(%r14), %rax
movq %rax, 0x30(%r15)
movslq 0x24(%r15), %r12
movl %r12d, 0x28(%r15)
movl $0x1, %esi
movq %r12, %rdi
callq 0x3610
movq %rax, 0x30(%r15)
movq 0x30(%r14), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x37d0
movq 0x48(%rbx), %rax
movslq 0x40(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x40(%rbx)
movq %r15, (%rax,%rcx,8)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/phase.c
// Function: update_vpos
static void update_vpos(int vpos, nseq_t *hash)
{
	khint_t k;
	for (k = 0; k < kh_end(hash); ++k) {
		if (kh_exist(hash, k)) {
			frag_t *f = &kh_val(hash, k);
			if (f->vpos < vpos) kh_del(64, hash, k); // TODO: if frag_t::seq is allocated dynamically, free it
			else f->vpos -= vpos;
		}
	}
}

// Assembly:
movl (%rsi), %r10d
testl %r10d, %r10d
je 0x1a1c6
pushq %rbp
pushq %r14
pushq %rbx
movq 0x10(%rsi), %rax
movl $0x80, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
movl %r9d, %r11d
shrl $0x4, %r11d
movl (%rax,%r11,4), %ebx
movl %r8d, %ecx
andl $0x1e, %ecx
movl %ebx, %ebp
shrl %cl, %ebp
testb $0x3, %bpl
jne 0x1a1ac
movq 0x20(%rsi), %r14
movl (%r14,%rdx,2), %ebp
subl %edi, %ebp
jge 0x1a1a8
movl %r10d, %r10d
cmpq %r10, %r9
je 0x1a1ac
btsl %ecx, %ebx
movl %ebx, (%rax,%r11,4)
decl 0x4(%rsi)
jmp 0x1a1ac
movl %ebp, (%r14,%rdx,2)
incq %r9
movl (%rsi), %r10d
addq $0x8a, %rdx
addl $0x2, %r8d
cmpq %r10, %r9
jb 0x1a16d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam2depth.c
// Function: read_bam
static int read_bam(void *data, bam1_t *b) // read level filters better go here to avoid pileup
{
	aux_t *aux = (aux_t*)data; // data in fact is a pointer to an auxiliary structure
	int ret = aux->iter? bam_iter_read(aux->fp, aux->iter, b) : bam_read1(aux->fp, b);
	if (!(b->core.flag&BAM_FUNMAP)) {
		if ((int)b->core.qual < aux->min_mapQ) b->core.flag |= BAM_FUNMAP;
		else if (aux->min_len && bam_cigar2qlen(&b->core, bam1_cigar(b)) < aux->min_len) b->core.flag |= BAM_FUNMAP;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x1b51d
movq %rbx, %rdx
callq 0x2a30d
jmp 0x1b525
movq %rbx, %rsi
callq 0x23238
movl %eax, %ebp
movq 0x8(%rbx), %rsi
btq $0x22, %rsi
jb 0x1b571
movl %esi, %eax
shrl $0x10, %eax
movzbl %al, %eax
cmpl 0x10(%r14), %eax
jl 0x1b560
cmpl $0x0, 0x14(%r14)
je 0x1b571
shrl $0x18, %esi
addq 0x30(%rbx), %rsi
movq %rbx, %rdi
callq 0x22e22
cmpl 0x14(%r14), %eax
jge 0x1b571
movq 0x8(%rbx), %rsi
movabsq $0x400000000, %rax      # imm = 0x400000000
orq %rsi, %rax
movq %rax, 0x8(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/padding.c
// Function: get_unpadded_len
int get_unpadded_len(faidx_t *fai, char *ref_name, int padded_len)
{
	char base;
	char *fai_ref = 0;
	int fai_ref_len = 0, k;
	int bases=0, gaps=0;

	fai_ref = fai_fetch(fai, ref_name, &fai_ref_len);
	if (fai_ref_len != padded_len) {
		fprintf(stderr, "[depad] ERROR: FASTA sequence '%s' length %i, expected %i\n", ref_name, fai_ref_len, padded_len);
		free(fai_ref);
		return -1;
	}
	for (k = 0; k < padded_len; ++k) {
		//fprintf(stderr, "[depad] checking base %i of %i or %i\n", k+1, ref_len, strlen(fai_ref));
		base = fai_ref[k];
		if (base == '-' || base == '*') {
			gaps += 1;
		} else {
			int i = bam_nt16_table[(int)base];
			if (i == 0 || i==16) { // Equals maps to 0, anything unexpected to 16
				fprintf(stderr, "[depad] ERROR: Invalid character %c (ASCII %i) in FASTA sequence '%s'\n", base, (int)base, ref_name);
				free(fai_ref);
				return -1;
			}
			bases += 1;
		}
	}
	free(fai_ref);
	assert (padded_len == bases + gaps);
	return bases;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r15
leaq 0x14(%rsp), %r12
movl $0x0, (%r12)
movq %r12, %rdx
callq 0x2ef9c
movq %rax, %r14
movl (%r12), %ecx
cmpl %ebx, %ecx
jne 0x1b828
testl %ebx, %ebx
movl %ebx, 0x4(%rsp)
jle 0x1b7f2
movq %r15, 0x8(%rsp)
movl %ebx, %r12d
leaq 0x3466e(%rip), %rdx     # 0x4fde0
movq 0x3386f(%rip), %rsi     # 0x4efe8
leaq 0x25e84(%rip), %r8      # 0x41604
xorl %r15d, %r15d
xorl %r13d, %r13d
xorl %ebp, %ebp
movzbl (%r14,%r15), %eax
cmpl $0x2d, %eax
je 0x1b797
cmpl $0x2a, %eax
jne 0x1b79c
incl %r13d
jmp 0x1b7b5
movsbl %al, %ecx
movslq %ecx, %rax
movb (%rdx,%rax), %bl
testb $-0x11, %bl
je 0x1b7bf
incl %ebp
testb $-0x11, %bl
je 0x1b84e
incq %r15
cmpq %r15, %r12
jne 0x1b788
jmp 0x1b7f7
movq (%rsi), %rdi
movq %r8, %rsi
movl %ecx, %edx
movq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0x3750
movq %r14, %rdi
callq 0x3350
leaq 0x25e22(%rip), %r8      # 0x41604
movq 0x337ff(%rip), %rsi     # 0x4efe8
leaq 0x345f0(%rip), %rdx     # 0x4fde0
jmp 0x1b7ac
xorl %ebp, %ebp
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x3350
addl %ebp, %r13d
cmpl 0x4(%rsp), %r13d
je 0x1b853
leaq 0x25e3b(%rip), %rdi     # 0x4164b
leaq 0x25d6d(%rip), %rsi     # 0x41584
leaq 0x25e48(%rip), %rcx     # 0x41666
movl $0x89, %edx
callq 0x31b0
movq 0x337b9(%rip), %rax     # 0x4efe8
movq (%rax), %rdi
leaq 0x25d90(%rip), %rsi     # 0x415c9
movq %r15, %rdx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x3750
movq %r14, %rdi
callq 0x3350
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/padding.c
// Function: replace_cigar
static void replace_cigar(bam1_t *b, int n, uint32_t *cigar)
{
	if (n != b->core.n_cigar) {
		int o = b->core.l_qname + b->core.n_cigar * 4;
		if (b->data_len + (n - b->core.n_cigar) * 4 > b->m_data) {
			b->m_data = b->data_len + (n - b->core.n_cigar) * 4;
			kroundup32(b->m_data);
			b->data = (uint8_t*)realloc(b->data, b->m_data);
		}
		memmove(b->data + b->core.l_qname + n * 4, b->data + o, b->data_len - o);
		memcpy(b->data + b->core.l_qname, cigar, n * 4);
		b->data_len += (n - b->core.n_cigar) * 4;
		b->core.n_cigar = n;
	} else memcpy(b->data + b->core.l_qname, cigar, n * 4);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq %rdi, %rcx
shrq $0x30, %rcx
movl %esi, %eax
shrl $0x18, %edi
subl %ecx, %eax
jne 0x1c465
addq 0x30(%r14), %rdi
shll $0x2, %ebx
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x37d0
leal (%rdi,%rcx,4), %ebp
shll $0x2, %eax
addl 0x24(%r14), %eax
cmpl 0x28(%r14), %eax
jle 0x1c4af
decl %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x28(%r14)
movq 0x30(%r14), %rdi
movslq %ecx, %rsi
callq 0x3720
movq %rax, 0x30(%r14)
movq 0x30(%r14), %rsi
movzbl 0xb(%r14), %edi
addq %rsi, %rdi
leal (,%rbx,4), %eax
movslq %eax, %r12
addq %r12, %rdi
movl %ebp, %eax
addq %rax, %rsi
movslq 0x24(%r14), %rdx
subq %rax, %rdx
callq 0x34e0
movzbl 0xb(%r14), %edi
addq 0x30(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x37d0
movzwl 0xe(%r14), %eax
movl %ebx, %ecx
subl %eax, %ecx
shll $0x2, %ecx
addl %ecx, 0x24(%r14)
movw %bx, 0xe(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_tview_curses.c
// Function: curses_destroy
static void curses_destroy(tview_t* base)
	{
	curses_tview_t* tv=(curses_tview_t*)base;

	
	delwin(tv->wgoto); delwin(tv->whelp);
	endwin();

	base_tv_destroy(base);
	
	free(tv);
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xc8(%rdi), %rdi
callq 0x3430
movq 0xd0(%rbx), %rdi
callq 0x3430
callq 0x3590
movq %rbx, %rdi
callq 0x6aa8
movq %rbx, %rdi
popq %rbx
jmp 0x3350
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_tview_curses.c
// Function: curses_mvprintw
static void curses_mvprintw(struct AbstractTview* tv,int y ,int x,const char* fmt,...)
	{
	unsigned int size=tv->mcol+2;
	char* str=malloc(size);
	if(str==0) exit(EXIT_FAILURE);
	va_list argptr;
  	va_start(argptr, fmt);
	vsnprintf(str,size, fmt, argptr);
	va_end(argptr);
	mvprintw(y,x,str);
	free(str);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rcx, %r14
movl %edx, %ebx
movl %esi, %ebp
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x1eb9a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl 0x4(%rdi), %r12d
addl $0x2, %r12d
movq %r12, %rdi
callq 0x3240
testq %rax, %rax
je 0x1ec0b
movq %rax, %r15
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rcx)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3520
movl %ebp, %edi
movl %ebx, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x32e0
movq %r15, %rdi
callq 0x3350
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x31a0
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_tview_html.c
// Function: html_tv_init
tview_t* html_tv_init(const char *fn, const char *fn_fa, const char *samples)
	{
	char* colstr=getenv("COLUMNS");
	html_tview_t *tv = (html_tview_t*)calloc(1, sizeof(html_tview_t));
	tview_t* base=(tview_t*)tv;
	if(tv==0)
		{
		fprintf(stderr,"Calloc failed\n");
		return 0;
		}
	tv->row_count=0;
	tv->screen=NULL;
	tv->out=stdout;
	tv->attributes=0;
	base_tv_init(base,fn,fn_fa,samples);
	/* initialize callbacks */
#define SET_CALLBACK(fun) base->my_##fun=html_##fun;
	SET_CALLBACK(destroy);
	SET_CALLBACK(mvprintw);
	SET_CALLBACK(mvaddch);
	SET_CALLBACK(attron);
	SET_CALLBACK(attroff);
	SET_CALLBACK(clear);
	SET_CALLBACK(colorpair);
	SET_CALLBACK(drawaln);
	SET_CALLBACK(loop);
	SET_CALLBACK(underline);
#undef SET_CALLBACK

	
	if(colstr!=0)
		{
		base->mcol=atoi(colstr);
		if(base->mcol<10) base->mcol=80;
		}
	base->mrow=99999;
	
/*
	init_pair(tv,1, "blue", "white");
	init_pair(tv,2, "green", "white");
	init_pair(tv,3, "yellow", "white");
	init_pair(tv,4, "white", "white");
	init_pair(tv,5, "green", "white");
	init_pair(tv,6, "cyan", "white");
	init_pair(tv,7, "yellow", "white");
	init_pair(tv,8, "red", "white");
	init_pair(tv,9, "blue", "white");
	*/
	return base;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x22fa2(%rip), %rdi     # 0x423b3
callq 0x3540
movq %rax, %r14
movl $0x1, %edi
movl $0xe8, %esi
callq 0x3610
testq %rax, %rax
je 0x1f526
movq %rax, %rbx
xorl %eax, %eax
movl %eax, 0xc8(%rbx)
movq $0x0, 0xd0(%rbx)
movq 0x2fbaa(%rip), %rcx     # 0x4eff8
movq (%rcx), %rcx
movq %rcx, 0xd8(%rbx)
movl %eax, 0xe0(%rbx)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x5bec
leaq 0xb9(%rip), %rax        # 0x1f52f
movq %rax, 0x78(%rbx)
leaq 0x10d(%rip), %rax       # 0x1f58e
movq %rax, 0x80(%rbx)
leaq 0x1f8(%rip), %rax       # 0x1f687
movq %rax, 0x88(%rbx)
leaq 0x2bc(%rip), %rax       # 0x1f759
movq %rax, 0x90(%rbx)
leaq 0x2b5(%rip), %rax       # 0x1f760
movq %rax, 0x98(%rbx)
leaq 0x2b0(%rip), %rax       # 0x1f769
movq %rax, 0xa0(%rbx)
leaq 0x30b(%rip), %rax       # 0x1f7d2
movq %rax, 0xa8(%rbx)
leaq 0x307(%rip), %rax       # 0x1f7dc
movq %rax, 0xb0(%rbx)
leaq 0x723(%rip), %rax       # 0x1fc06
movq %rax, 0xb8(%rbx)
leaq 0x718(%rip), %rax       # 0x1fc09
movq %rax, 0xc0(%rbx)
testq %r14, %r14
je 0x1f513
movq %r14, %rdi
callq 0x34c0
cmpl $0xa, %eax
movl $0x50, %ecx
cmovgel %eax, %ecx
movl %ecx, 0x4(%rbx)
movl $0x1869f, (%rbx)        # imm = 0x1869F
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x47a2
xorl %ebx, %ebx
jmp 0x1f519
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_tview_html.c
// Function: html_destroy
static void html_destroy(tview_t* base)
	{
	int i;
	html_tview_t* tv=(html_tview_t*)base;
	if(tv->screen!=NULL)
		{
		for(i=0;i< tv->row_count;++i) free(tv->screen[i]);
		free(tv->screen);
		}
	base_tv_destroy(base);
	free(tv);
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0xd0(%rdi)
je 0x1f577
cmpl $0x0, 0xc8(%rbx)
jle 0x1f56b
xorl %r14d, %r14d
movq 0xd0(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3350
incq %r14
movslq 0xc8(%rbx), %rax
cmpq %rax, %r14
jl 0x1f54c
movq 0xd0(%rbx), %rdi
callq 0x3350
movq %rbx, %rdi
callq 0x6aa8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3350
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_tview_html.c
// Function: html_mvprintw
static void html_mvprintw(struct AbstractTview* tv,int y ,int x,const char* fmt,...)
	{
	int i,nchars=0;
	unsigned int size=tv->mcol+2;
	char* str=malloc(size);
	if(str==0) exit(EXIT_FAILURE);
	va_list argptr;
  	va_start(argptr, fmt);
	nchars=vsnprintf(str,size, fmt, argptr);
	va_end(argptr);
	
	for(i=0;i< nchars;++i)
		{
		tv->my_mvaddch(tv,y,x+i,str[i]);
		}
	free(str);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x1f5ee
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl 0x4(%rdi), %r13d
addl $0x2, %r13d
movq %r13, %rdi
callq 0x3240
testq %rax, %rax
je 0x1f67d
movq %rax, %r15
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rcx)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x3520
testl %eax, %eax
jle 0x1f663
movl %eax, %r12d
movl %ebp, %r13d
xorl %ebp, %ebp
movsbl (%r15,%rbp), %ecx
leal (%r13,%rbp), %edx
movq %r14, %rdi
movl %ebx, %esi
callq *0x88(%r14)
incq %rbp
cmpq %rbp, %r12
jne 0x1f645
movq %r15, %rdi
callq 0x3350
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x31a0
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_tview_html.c
// Function: html_mvaddch
static void html_mvaddch(struct AbstractTview* tv,int y,int x,int ch)
	{
	tixel_t* row=NULL;
	html_tview_t* ptr=FROM_TV(tv);
	if( x >= tv->mcol ) return; //out of screen
	while(ptr->row_count<=y)
		{
		int x;
		row=(tixel_t*)calloc(tv->mcol,sizeof(tixel_t));
		if(row==0)  exit(EXIT_FAILURE);
		for(x=0;x<tv->mcol;++x) {row[x].ch=' ';row[x].attributes=0;}
		ptr->screen=(tixel_t**)realloc(ptr->screen,sizeof(tixel_t*)*(ptr->row_count+1));
		ptr->screen[ptr->row_count++]=row;
		}
	row=ptr->screen[y];
	row[x].ch=ch;
	row[x].attributes=ptr->attributes;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl %edx, 0x4(%rdi)
jle 0x1f740
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
movl %ecx, 0x4(%rsp)
movl 0xc8(%rdi), %ebx
cmpl %esi, %ebx
jg 0x1f71d
movslq 0x4(%r14), %r13
movl $0x8, %esi
movq %r13, %rdi
callq 0x3610
testq %rax, %rax
je 0x1f74f
movq %rax, %r12
testl %r13d, %r13d
jle 0x1f6e5
xorl %eax, %eax
movq $0x20, (%r12,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0x1f6d5
movq 0xd0(%r14), %rdi
movslq %ebx, %rax
leaq 0x8(,%rax,8), %rsi
callq 0x3720
movq %rax, 0xd0(%r14)
movslq 0xc8(%r14), %rcx
leal 0x1(%rcx), %ebx
movl %ebx, 0xc8(%r14)
movq %r12, (%rax,%rcx,8)
cmpl %r15d, %ecx
jl 0x1f6b1
movq 0xd0(%r14), %rax
movslq %r15d, %rcx
movq (%rax,%rcx,8), %rax
movslq %ebp, %rcx
movl 0x4(%rsp), %edx
movl %edx, (%rax,%rcx,8)
movl 0xe0(%r14), %edx
movl %edx, 0x4(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x31a0
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_tview_html.c
// Function: html_clear
static void html_clear(struct AbstractTview* tv)
    {
    html_tview_t* ptr=FROM_TV(tv);
    if(ptr->screen!=NULL)
	{
	int i;
	for(i=0;i< ptr->row_count;++i) free(ptr->screen[i]);
	free(ptr->screen);
	ptr->screen=NULL;
	}
    ptr->row_count=0;
    ptr->attributes=0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0xd0(%rdi)
je 0x1f7bc
cmpl $0x0, 0xc8(%rbx)
jle 0x1f7a5
xorl %r14d, %r14d
movq 0xd0(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3350
incq %r14
movslq 0xc8(%rbx), %rax
cmpq %rax, %r14
jl 0x1f786
movq 0xd0(%rbx), %rdi
callq 0x3350
movq $0x0, 0xd0(%rbx)
xorl %eax, %eax
movl %eax, 0xc8(%rbx)
movl %eax, 0xe0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
callq 0x2b6a7
movq 0x30(%rbx), %r14
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x2c403
movl $0xfffffff, %ebp        # imm = 0xFFFFFFF
movl $0x100, %r15d           # imm = 0x100
movq %rax, %r12
movq 0x20(%rbx), %r13
decl (%r13)
movq $0x0, 0x8(%r14)
movl (%r14), %eax
andl %ebp, %eax
orl $0x20000000, %eax       # imm = 0x20000000
movl %eax, (%r14)
movl 0x8(%r13), %eax
cmpl %eax, 0x4(%r13)
jne 0x2c3e3
leal (%rax,%rax), %ecx
testl %eax, %eax
cmovel %r15d, %ecx
movl %ecx, 0x8(%r13)
movq 0x10(%r13), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x3720
movq %rax, 0x10(%r13)
movq 0x10(%r13), %rax
movslq 0x4(%r13), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r13)
movq %r14, (%rax,%rcx,8)
movq 0x8(%r12), %rax
movq %r12, %r14
testq %rax, %rax
jne 0x2c398
movq 0x38(%rbx), %rax
movq %rax, 0x30(%rbx)
xorl %eax, %eax
movl %eax, 0xc(%rbx)
movq $0x0, 0x4(%rbx)
movl %eax, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x60, %esi
callq 0x3610
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x3610
incl (%rax)
movq %rax, 0x20(%rbx)
movslq 0x4(%rax), %rcx
testq %rcx, %rcx
je 0x2c477
movq 0x10(%rax), %rdx
leaq -0x1(%rcx), %rsi
movl %esi, 0x4(%rax)
movq -0x8(%rdx,%rcx,8), %rax
jmp 0x2c486
movl $0x1, %edi
movl $0x10, %esi
callq 0x3610
movq %rax, 0x38(%rbx)
movq %rax, 0x30(%rbx)
movq %r15, 0x48(%rbx)
movq %r14, 0x50(%rbx)
leaq 0x15(%rip), %rdi        # 0x2c4b2
movq %rbx, %rsi
callq 0x2b5b5
movq %rax, 0x58(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x3350
movq 0x18(%rbx), %rdi
callq 0x3350
movq 0x58(%rbx), %rdi
callq 0x2b692
movq 0x28(%rbx), %rdi
callq 0x3350
movq 0x30(%rbx), %r15
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x2c9c6
movl $0xfffffff, %ebp        # imm = 0xFFFFFFF
movl $0x100, %r12d           # imm = 0x100
movq %rax, %r14
movq 0x20(%rbx), %r13
decl (%r13)
movq $0x0, 0x8(%r15)
movl (%r15), %eax
andl %ebp, %eax
orl $0x20000000, %eax       # imm = 0x20000000
movl %eax, (%r15)
movl 0x8(%r13), %eax
cmpl %eax, 0x4(%r13)
jne 0x2c9a5
leal (%rax,%rax), %ecx
testl %eax, %eax
cmovel %r12d, %ecx
movl %ecx, 0x8(%r13)
movq 0x10(%r13), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x3720
movq %rax, 0x10(%r13)
movq 0x10(%r13), %rax
movslq 0x4(%r13), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r13)
movq %r15, (%rax,%rcx,8)
movq 0x8(%r14), %rax
movq %r14, %r15
testq %rax, %rax
jne 0x2c95a
jmp 0x2c9c9
movq %r15, %r14
movq 0x20(%rbx), %r15
decl (%r15)
movq $0x0, 0x8(%r14)
movl $0xfffffff, %eax        # imm = 0xFFFFFFF
andl (%r14), %eax
orl $0x20000000, %eax       # imm = 0x20000000
movl %eax, (%r14)
movl 0x8(%r15), %eax
cmpl %eax, 0x4(%r15)
jne 0x2ca17
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x100, %eax            # imm = 0x100
cmovnel %ecx, %eax
movl %eax, 0x8(%r15)
movq 0x10(%r15), %rdi
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x3720
movq %rax, 0x10(%r15)
movq 0x10(%r15), %rax
movslq 0x4(%r15), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r15)
movq %r14, (%rax,%rcx,8)
movq 0x20(%rbx), %r14
cmpl $0x0, (%r14)
jne 0x2ca7e
cmpl $0x0, 0x4(%r14)
jle 0x2ca57
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x3350
incq %r15
movslq 0x4(%r14), %rax
cmpq %rax, %r15
jl 0x2ca3e
movq 0x10(%r14), %rdi
callq 0x3350
movq %r14, %rdi
callq 0x3350
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3350
leaq 0x16b13(%rip), %rdi     # 0x43598
leaq 0x16b1d(%rip), %rsi     # 0x435a9
leaq 0x16b24(%rip), %rcx     # 0x435b7
movl $0xbe, %edx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_sort.c
// Function: change_SO
static int change_SO(bam_header_t *h, const char *so)
{
	char *p, *q, *beg = 0, *end = 0, *newtext;
	if (h->l_text > 3) {
		if (strncmp(h->text, "@HD", 3) == 0) {
			if ((p = strchr(h->text, '\n')) == 0) return -1;
			*p = '\0';
			if ((q = strstr(h->text, "\tSO:")) != 0) {
				*p = '\n'; // change back
				if (strncmp(q + 4, so, p - q - 4) != 0) {
					beg = q;
					for (q += 4; *q != '\n' && *q != '\t'; ++q);
					end = q;
				} else return 0; // no need to change
			} else beg = end = p, *p = '\n';
		}
	}
	if (beg == 0) { // no @HD
		h->l_text += strlen(so) + 15;
		newtext = malloc(h->l_text + 1);
		sprintf(newtext, "@HD\tVN:1.3\tSO:%s\n", so);
		strcat(newtext, h->text);
	} else { // has @HD but different or no SO
		h->l_text = (beg - h->text) + (4 + strlen(so)) + (h->text + h->l_text - end);
		newtext = malloc(h->l_text + 1);
		strncpy(newtext, h->text, beg - h->text);
		sprintf(newtext + (beg - h->text), "\tSO:%s", so);
		strcat(newtext, end);
	}
	free(h->text);
	h->text = newtext;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x4, 0x30(%rdi)
jb 0x3595c
movq 0x38(%rbx), %r15
leaq 0xedcb(%rip), %rsi      # 0x44712
movl $0x3, %edx
movq %r15, %rdi
callq 0x3230
testl %eax, %eax
je 0x35a23
xorl %r15d, %r15d
xorl %r12d, %r12d
testq %r15, %r15
je 0x359c5
movq 0x38(%rbx), %rbp
subq %rbp, %r15
movq %r14, %rdi
callq 0x3360
addl %r15d, %eax
movl 0x30(%rbx), %ecx
addl %ebp, %ecx
subl %r12d, %ecx
leal (%rcx,%rax), %edx
addl $0x4, %edx
movl %edx, 0x30(%rbx)
leal (%rcx,%rax), %edi
addl $0x5, %edi
callq 0x3240
movq %rax, %r13
movq %rax, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x3670
addq %r13, %r15
leaq 0xed7d(%rip), %rsi      # 0x4472d
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3400
movq %r13, %rdi
movq %r12, %rsi
jmp 0x35a02
movq %r14, %rdi
callq 0x3360
movl 0x30(%rbx), %ecx
leal (%rax,%rcx), %edx
addl $0xf, %edx
movl %edx, 0x30(%rbx)
leal (%rax,%rcx), %edi
addl $0x10, %edi
callq 0x3240
movq %rax, %r13
leaq 0xed2d(%rip), %rsi      # 0x4471b
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3400
movq 0x38(%rbx), %rsi
movq %r13, %rdi
callq 0x3480
movq 0x38(%rbx), %rdi
callq 0x3350
movq %r13, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl $0xa, %esi
callq 0x34f0
testq %rax, %rax
je 0x35a14
movq %rax, %r15
movb $0x0, (%rax)
movq 0x38(%rbx), %rdi
leaq 0xecd0(%rip), %rsi      # 0x44716
callq 0x3460
movb $0xa, (%r15)
movq %r15, %r12
testq %rax, %rax
je 0x35962
movq %rax, %r13
leaq 0x4(%rax), %rdi
subq %rax, %r15
addq $-0x4, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x3230
testl %eax, %eax
je 0x35a14
movq %r13, %r12
addq $0x3, %r12
movb 0x1(%r12), %al
incq %r12
addb $-0x9, %al
cmpb $0x1, %al
ja 0x35a7f
movq %r13, %r15
jmp 0x35962
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_sort.c
// Function: sort_blocks
static int sort_blocks(int n_files, size_t k, bam1_p *buf, const char *prefix, const bam_header_t *h, int n_threads)
{
	int i;
	size_t rest;
	bam1_p *b;
	pthread_t *tid;
	pthread_attr_t attr;
	worker_t *w;

	if (n_threads < 1) n_threads = 1;
	if (k < n_threads * 64) n_threads = 1; // use a single thread if we only sort a small batch of records
	pthread_attr_init(&attr);
	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
	w = calloc(n_threads, sizeof(worker_t));
	tid = calloc(n_threads, sizeof(pthread_t));
	b = buf; rest = k;
	for (i = 0; i < n_threads; ++i) {
		w[i].buf_len = rest / (n_threads - i);
		w[i].buf = b;
		w[i].prefix = prefix;
		w[i].h = h;
		w[i].index = n_files + i;
		b += w[i].buf_len; rest -= w[i].buf_len;
		pthread_create(&tid[i], &attr, worker, &w[i]);
	}
	for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
	free(tid); free(w);
	return n_files + n_threads;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, %ebx
movq %r8, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movl %edi, %r15d
cmpl $0x2, %r9d
movl $0x1, %eax
cmovll %eax, %ebx
movl %ebx, %ecx
shll $0x6, %ecx
cmpq %rsi, %rcx
cmoval %eax, %ebx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x3680
movq %r14, %rdi
xorl %esi, %esi
callq 0x3810
movl $0x28, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, %rbp
movq %r14, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq %rbx, 0x18(%rsp)
movl %r15d, 0x4(%rsp)
movq %r13, %rax
xorl %edx, %edx
divq %rbx
movq %rax, (%r14)
movq %r12, 0x10(%r14)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%r14)
movq 0x28(%rsp), %rcx
movq %rcx, 0x18(%r14)
movl %r15d, 0x20(%r14)
leaq (%r12,%rax,8), %r12
subq %rax, %r13
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x51e(%rip), %rdx       # 0x36074
movq %r14, %rcx
callq 0x3310
incl %r15d
addq $0x8, %rbp
addq $0x28, %r14
decq %rbx
jne 0x35b1b
xorl %ebx, %ebx
movq 0x18(%rsp), %r14
movq 0x8(%rsp), %r15
movq (%r15,%rbx,8), %rdi
xorl %esi, %esi
callq 0x3040
incq %rbx
cmpq %rbx, %r14
jne 0x35b7a
movq %r15, %rdi
callq 0x3350
movq 0x10(%rsp), %rdi
callq 0x3350
addl 0x4(%rsp), %r14d
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_sort.c
// Function: write_buffer
static void write_buffer(const char *fn, const char *mode, size_t l, bam1_p *buf, const bam_header_t *h, int n_threads)
{
	size_t i;
	bamFile fp;
	fp = strcmp(fn, "-")? bam_open(fn, mode) : bam_dopen(fileno(stdout), mode);
	if (fp == 0) return;
	bam_header_write(fp, h);
	if (n_threads > 1) bgzf_mt(fp, n_threads, 256);
	for (i = 0; i < l; ++i)
		bam_write1_core(fp, &buf[i]->core, buf[i]->data_len, buf[i]->data);
	bam_close(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq 0x927e(%rip), %rsi      # 0x3ee58
callq 0x35a0
testl %eax, %eax
je 0x35bf0
movq %r13, %rdi
movq %r15, %rsi
callq 0x1fdb8
jmp 0x35c09
movq 0x19401(%rip), %rax     # 0x4eff8
movq (%rax), %rdi
callq 0x3030
movl %eax, %edi
movq %r15, %rsi
callq 0x1ff6b
movq %rax, %r15
testq %rax, %rax
je 0x35c69
movq %r15, %rdi
movq %r12, %rsi
callq 0x230c9
cmpl $0x2, %ebp
jl 0x35c30
movq %r15, %rdi
movl %ebp, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x205f8
testq %r14, %r14
je 0x35c53
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rsi
movl 0x24(%rsi), %edx
movq 0x30(%rsi), %rcx
movq %r15, %rdi
callq 0x23ba0
incq %r12
cmpq %r12, %r14
jne 0x35c38
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20aae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_sort.c
// Function: worker
static void *worker(void *data)
{
	worker_t *w = (worker_t*)data;
	char *name;
	ks_mergesort(sort, w->buf_len, w->buf, 0);
	name = (char*)calloc(strlen(w->prefix) + 20, 1);
	sprintf(name, "%s.%.4d.bam", w->prefix, w->index);
	write_buffer(name, "w1", w->buf_len, w->buf, w->h, 0);
	free(name);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x10(%rbx), %rsi
xorl %edx, %edx
callq 0x340f7
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x3360
leaq 0x14(%rax), %rdi
movl $0x1, %esi
callq 0x3610
movq %rax, %r15
movl 0x20(%rbx), %ecx
leaq 0xbf36(%rip), %rsi      # 0x41fe7
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3400
movq (%rbx), %rdx
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
leaq 0xbf23(%rip), %rsi      # 0x41ff3
movq %r15, %rdi
xorl %r9d, %r9d
callq 0x35bb6
movq %r15, %rdi
callq 0x3350
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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->is_write) 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->fp, buf, BUF_SIZE)) > 0)
		fwrite(buf, 1, len, fp->fp);
#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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testb $0x3, 0x2(%rdi)
jne 0x3793b
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
movl $0x10000, %edi          # imm = 0x10000
callq 0x3240
movq %rax, %r14
movq %rbx, %rdi
callq 0x22efa
leaq 0x6986(%rip), %rsi      # 0x3e23a
movl %ebp, %edi
callq 0x1ff6b
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x230c9
movslq 0xc(%rbx), %rax
movl 0x8(%rbx), %ecx
cmpl %eax, %ecx
jle 0x3790b
movq %rax, %rsi
addq 0x18(%rbx), %rsi
subl %eax, %ecx
movslq %ecx, %rdx
movq %r15, %rdi
callq 0x209a1
movq %r15, %rdi
callq 0x207a3
jmp 0x3790b
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x30(%r15), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %rax, %rdx
callq 0x3700
movq 0x30(%rbx), %rdi
movl $0x10000, %edx          # imm = 0x10000
movq %r14, %rsi
callq 0x31cea
testl %eax, %eax
jg 0x378f2
movq %r14, %rdi
callq 0x3350
xorl %r14d, %r14d
movl %r14d, 0xc(%rbx)
movl %r14d, 0xc(%r15)
movq %r15, %rdi
callq 0x20aae
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x3, %edi
jne 0x37a0c
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x27492
movq %rax, %r15
testq %rax, %rax
je 0x37a18
movq %r15, %rdi
callq 0x26091
movq %rax, %r14
movq %r15, %rdi
callq 0x2753d
movl $0x1, %ebp
testq %r15, %r15
je 0x379ff
movq 0x10(%rbx), %r15
leaq 0x74c1(%rip), %rsi      # 0x3ee58
movq %r15, %rdi
callq 0x35a0
testl %eax, %eax
je 0x379b4
leaq 0xd2c5(%rip), %rsi      # 0x44c6f
movq %r15, %rdi
callq 0x1fdb8
jmp 0x379d1
movq 0x17615(%rip), %rax     # 0x4efd0
movq (%rax), %rdi
callq 0x3030
leaq 0xd2a5(%rip), %rsi      # 0x44c6f
movl %eax, %edi
callq 0x1ff6b
movq %rax, %r15
testq %rax, %rax
je 0x37a26
movq 0x17618(%rip), %rax     # 0x4eff8
movq (%rax), %rdi
callq 0x3030
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x37878
movq %r15, %rdi
callq 0x20aae
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x590f
movl $0x1, %ebp
jmp 0x379ff
leaq 0x8(%rbx), %rdi
callq 0x592b
jmp 0x37982
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x5950
jmp 0x379ff
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebx
leaq 0xbe09(%rip), %rdx      # 0x44b1e
callq 0x3210
testl %eax, %eax
js 0x38dad
leaq 0x8(%r14), %rcx
movq %rcx, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x162a5(%rip), %r13     # 0x4efe0
leaq 0xbddc(%rip), %rbp      # 0x44b1e
xorl %r15d, %r15d
cmpl $0x6f, %eax
je 0x38d82
cmpl $0x68, %eax
jne 0x38d8e
movq %r13, %r12
movq (%r13), %rdi
callq 0x27492
movq %rax, %r13
testq %rax, %rax
je 0x38da1
movq %r13, %rdi
callq 0x26091
movq %rax, 0x8(%rsp)
movq %r13, %rdi
callq 0x2753d
testq %r13, %r13
movq %r12, %r13
jne 0x38d8e
jmp 0x38dfb
movq (%r13), %rdi
callq 0x3570
movq %rax, %r15
movl %ebx, %edi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x3210
testl %eax, %eax
jns 0x38d45
jmp 0x38db9
movq 0x10(%rsp), %rdi
callq 0x5a1f
jmp 0x38d78
xorl %r15d, %r15d
movq $0x0, 0x8(%rsp)
movq 0x161f8(%rip), %rax     # 0x4efb8
movslq (%rax), %rax
subl %eax, %ebx
cmpl $0x1, %ebx
jle 0x38df6
leaq (%r14,%rax,8), %rsi
testq %r15, %r15
leaq 0x6080(%rip), %rcx      # 0x3ee58
cmovneq %r15, %rcx
movl %ebx, %edi
movq 0x8(%rsp), %rdx
callq 0x389c4
movl %eax, %ebx
movq %r15, %rdi
callq 0x3350
movl %ebx, %eax
jmp 0x38e00
callq 0x5a44
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcf.c
// Function: bcf_open
bcf_t *bcf_open(const char *fn, const char *mode)
{
	bcf_t *b;
	b = calloc(1, sizeof(bcf_t));
	if (strchr(mode, 'w')) {
		b->fp = strcmp(fn, "-")? bgzf_open(fn, mode) : bgzf_fdopen(fileno(stdout), mode);
	} else {
		b->fp = strcmp(fn, "-")? bgzf_open(fn, mode) : bgzf_fdopen(fileno(stdin), mode);
	}
	return b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x18, %esi
callq 0x3610
movq %rax, %rbx
movq %r14, %rdi
movl $0x77, %esi
callq 0x34f0
movq %rax, %r12
leaq 0x4dc5(%rip), %rsi      # 0x3ee58
movq %r15, %rdi
callq 0x35a0
testq %r12, %r12
je 0x3a0ad
testl %eax, %eax
jne 0x3a0b1
movq 0x14f4d(%rip), %rax     # 0x4eff8
jmp 0x3a0c5
testl %eax, %eax
je 0x3a0be
movq %r15, %rdi
movq %r14, %rsi
callq 0x1fdb8
jmp 0x3a0d7
movq 0x14f0b(%rip), %rax     # 0x4efd0
movq (%rax), %rdi
callq 0x3030
movl %eax, %edi
movq %r14, %rsi
callq 0x1ff6b
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcf.c
// Function: bcf_hdr_write
int bcf_hdr_write(bcf_t *b, const bcf_hdr_t *h)
{
	if (b == 0 || h == 0) return -1;
	bgzf_write(b->fp, "BCF\4", 4);
	bgzf_write(b->fp, &h->l_nm, 4);
	bgzf_write(b->fp, h->name, h->l_nm);
	bgzf_write(b->fp, &h->l_smpl, 4);
	bgzf_write(b->fp, h->sname, h->l_smpl);
	bgzf_write(b->fp, &h->l_txt, 4);
	bgzf_write(b->fp, h->txt, h->l_txt);
	bgzf_flush(b->fp);
	return 16 + h->l_nm + h->l_smpl + h->l_txt;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x3a1d3
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
leaq 0xab64(%rip), %rsi      # 0x44ca6
movl $0x4, %edx
callq 0x209a1
movq 0x10(%r14), %rdi
leaq 0x8(%rbx), %rsi
movl $0x4, %edx
callq 0x209a1
movq 0x10(%r14), %rdi
movq 0x18(%rbx), %rsi
movslq 0x8(%rbx), %rdx
callq 0x209a1
movq 0x10(%r14), %rdi
leaq 0xc(%rbx), %rsi
movl $0x4, %edx
callq 0x209a1
movq 0x10(%r14), %rdi
movq 0x20(%rbx), %rsi
movslq 0xc(%rbx), %rdx
callq 0x209a1
movq 0x10(%r14), %rdi
leaq 0x10(%rbx), %rsi
movl $0x4, %edx
callq 0x209a1
movq 0x10(%r14), %rdi
movq 0x28(%rbx), %rsi
movslq 0x10(%rbx), %rdx
callq 0x209a1
movq 0x10(%r14), %rdi
callq 0x207a3
movl 0x8(%rbx), %eax
movl 0x10(%rbx), %ecx
addl 0xc(%rbx), %eax
addl %ecx, %eax
addl $0x10, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcf.c
// Function: bcf_hdr_read
bcf_hdr_t *bcf_hdr_read(bcf_t *b)
{
	uint8_t magic[4];
	bcf_hdr_t *h;
	if (b == 0) return 0;
	h = calloc(1, sizeof(bcf_hdr_t));
	bgzf_read(b->fp, magic, 4);
	bgzf_read(b->fp, &h->l_nm, 4);
	h->name = malloc(h->l_nm);
	bgzf_read(b->fp, h->name, h->l_nm);
	bgzf_read(b->fp, &h->l_smpl, 4);
	h->sname = malloc(h->l_smpl);
	bgzf_read(b->fp, h->sname, h->l_smpl);
	bgzf_read(b->fp, &h->l_txt, 4);
	h->txt = malloc(h->l_txt);
	bgzf_read(b->fp, h->txt, h->l_txt);
	bcf_hdr_sync(h);
	return h;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x3a2ab
movq %rdi, %r14
movl $0x1, %edi
movl $0x40, %esi
callq 0x3610
movq %rax, %rbx
movq 0x10(%r14), %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x2050e
movq 0x10(%r14), %rdi
leaq 0x8(%rbx), %rsi
movl $0x4, %edx
callq 0x2050e
movslq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x3240
movq %rax, 0x18(%rbx)
movq 0x10(%r14), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x2050e
movq 0x10(%r14), %rdi
leaq 0xc(%rbx), %rsi
movl $0x4, %edx
callq 0x2050e
movslq 0xc(%rbx), %r15
movq %r15, %rdi
callq 0x3240
movq %rax, 0x20(%rbx)
movq 0x10(%r14), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x2050e
movq 0x10(%r14), %rdi
leaq 0x10(%rbx), %rsi
movl $0x4, %edx
callq 0x2050e
movslq 0x10(%rbx), %r15
movq %r15, %rdi
callq 0x3240
movq %rax, 0x28(%rbx)
movq 0x10(%r14), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x2050e
movq %rbx, %rdi
callq 0x3a2ba
jmp 0x3a2ad
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq