LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcf.c
// Function: bcf_hdr_sync
int bcf_hdr_sync(bcf_hdr_t *b)
{
	if (b == 0) return -1;
	if (b->ns) free(b->ns);
	if (b->sns) free(b->sns);
	if (b->l_nm) b->ns = cnt_null(b->l_nm, b->name, &b->n_ref);
	else b->ns = 0, b->n_ref = 0;
	b->sns = cnt_null(b->l_smpl, b->sname, &b->n_smpl);
	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x3a35c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x3a2dc
callq 0x3350
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3a2ea
callq 0x3350
movslq 0x8(%rbx), %r14
testq %r14, %r14
je 0x3a362
movq 0x18(%rbx), %r15
movl $0x0, (%rbx)
xorl %eax, %eax
testq %r15, %r15
je 0x3a356
leaq (%r15,%r14), %r12
xorl %ecx, %ecx
cmpb $0x1, (%r15,%rcx)
adcl $0x0, %eax
incq %rcx
cmpq %rcx, %r14
jne 0x3a30a
movl %eax, (%rbx)
movl %eax, %edi
movl $0x8, %esi
callq 0x3610
movq %r15, (%rax)
decq %r12
cmpq %r15, %r12
jbe 0x3a356
incq %r15
decq %r14
movl $0x1, %ecx
cmpb $0x0, -0x1(%r15)
jne 0x3a34e
movslq %ecx, %rdx
incl %ecx
movq %r15, (%rax,%rdx,8)
incq %r15
decq %r14
jne 0x3a33e
movq %rax, 0x30(%rbx)
jmp 0x3a370
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movq $0x0, 0x30(%rbx)
movl $0x0, (%rbx)
movslq 0xc(%rbx), %r14
testq %r14, %r14
sete %cl
movq 0x20(%rbx), %r15
movl $0x0, 0x4(%rbx)
testq %r15, %r15
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x3a3e4
leaq (%r15,%r14), %r12
xorl %ecx, %ecx
cmpb $0x1, (%r15,%rcx)
adcl $0x0, %eax
incq %rcx
cmpq %rcx, %r14
jne 0x3a397
movl %eax, 0x4(%rbx)
movl %eax, %edi
movl $0x8, %esi
callq 0x3610
movq %r15, (%rax)
decq %r12
cmpq %r15, %r12
jbe 0x3a3e4
incq %r15
decq %r14
movl $0x1, %ecx
cmpb $0x0, -0x1(%r15)
jne 0x3a3dc
movslq %ecx, %rdx
incl %ecx
movq %r15, (%rax,%rdx,8)
incq %r15
decq %r14
jne 0x3a3cc
movq %rax, 0x38(%rbx)
xorl %eax, %eax
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_write
int bcf_write(bcf_t *bp, const bcf_hdr_t *h, const bcf1_t *b)
{
	int i, l = 0;
	if (b == 0) return -1;
	bgzf_write(bp->fp, &b->tid, 4);
	bgzf_write(bp->fp, &b->pos, 4);
	bgzf_write(bp->fp, &b->qual, 4);
	bgzf_write(bp->fp, &b->l_str, 4);
	bgzf_write(bp->fp, b->str, b->l_str);
	l = 12 + b->l_str;
	for (i = 0; i < b->n_gi; ++i) {
		bgzf_write(bp->fp, b->gi[i].data, b->gi[i].len * h->n_smpl);
		l += b->gi[i].len * h->n_smpl;
	}
	return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x3a7f2
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl $0x4, %r12d
movl $0x4, %edx
movq %rbx, %rsi
callq 0x209a1
movq 0x10(%r15), %rdi
leaq 0x4(%rbx), %rsi
movl $0x4, %edx
callq 0x209a1
movq 0x10(%r15), %rdi
leaq 0x10(%rbx), %rsi
movl $0x4, %edx
callq 0x209a1
movq 0x10(%r15), %rdi
leaq 0x8(%rbx), %rsi
movl $0x4, %edx
callq 0x209a1
movq 0x10(%r15), %rdi
movq 0x18(%rbx), %rsi
movslq 0x8(%rbx), %rdx
callq 0x209a1
movl 0x8(%rbx), %ebp
addl $0xc, %ebp
cmpl $0x0, 0x48(%rbx)
jle 0x3a7f7
xorl %r13d, %r13d
movq 0x10(%r15), %rdi
movq 0x50(%rbx), %rax
movq 0x4(%rax,%r12), %rsi
movslq (%rax,%r12), %rax
movslq 0x4(%r14), %rdx
imulq %rax, %rdx
callq 0x209a1
movq 0x50(%rbx), %rax
movl 0x4(%r14), %ecx
imull (%rax,%r12), %ecx
addl %ecx, %ebp
incq %r13
movslq 0x48(%rbx), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x3a7b3
jmp 0x3a7f7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
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/bcftools/bcf.c
// Function: bcf_read
int bcf_read(bcf_t *bp, const bcf_hdr_t *h, bcf1_t *b)
{
	int i, l = 0;
	if (b == 0) return -1;
	if (bgzf_read(bp->fp, &b->tid, 4) == 0) return -1;
	b->n_smpl = h->n_smpl;
	bgzf_read(bp->fp, &b->pos, 4);
	bgzf_read(bp->fp, &b->qual, 4);
	bgzf_read(bp->fp, &b->l_str, 4);
	if (b->l_str > b->m_str) {
		b->m_str = b->l_str;
		kroundup32(b->m_str);
		b->str = realloc(b->str, b->m_str);
	}
	bgzf_read(bp->fp, b->str, b->l_str);
	l = 12 + b->l_str;
	if (bcf_sync(b) < 0) return -2;
	for (i = 0; i < b->n_gi; ++i) {
		bgzf_read(bp->fp, b->gi[i].data, b->gi[i].len * h->n_smpl);
		l += b->gi[i].len * h->n_smpl;
	}
	return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x3a938
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl $0x4, %edx
movq %rbx, %rsi
callq 0x2050e
testq %rax, %rax
je 0x3a938
movl 0x4(%r14), %eax
movl %eax, 0x5c(%rbx)
movq 0x10(%r15), %rdi
leaq 0x4(%rbx), %rsi
movl $0x4, %edx
callq 0x2050e
movq 0x10(%r15), %rdi
leaq 0x10(%rbx), %rsi
movl $0x4, %edx
callq 0x2050e
movq 0x10(%r15), %rdi
leaq 0x8(%rbx), %rsi
movl $0x4, %edx
callq 0x2050e
movl 0x8(%rbx), %eax
cmpl 0xc(%rbx), %eax
jle 0x3a8c2
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, 0xc(%rbx)
movq 0x18(%rbx), %rdi
movslq %ecx, %rsi
callq 0x3720
movq %rax, 0x18(%rbx)
movq 0x10(%r15), %rdi
movq 0x18(%rbx), %rsi
movslq 0x8(%rbx), %rdx
callq 0x2050e
movl 0x8(%rbx), %ebp
movq %rbx, %rdi
callq 0x3a436
testl %eax, %eax
js 0x3a933
addl $0xc, %ebp
cmpl $0x0, 0x48(%rbx)
jle 0x3a938
movl $0x4, %r12d
xorl %r13d, %r13d
movq 0x10(%r15), %rdi
movq 0x50(%rbx), %rax
movq 0x4(%rax,%r12), %rsi
movslq (%rax,%r12), %rax
movslq 0x4(%r14), %rdx
imulq %rax, %rdx
callq 0x2050e
movq 0x50(%rbx), %rax
movl 0x4(%r14), %ecx
imull (%rax,%r12), %ecx
addl %ecx, %ebp
incq %r13
movslq 0x48(%rbx), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x3a8f4
jmp 0x3a938
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movl %ebp, %eax
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/bcftools/bcf.c
// Function: bcf_destroy
int bcf_destroy(bcf1_t *b)
{
	int i;
	if (b == 0) return -1;
	free(b->str);
	for (i = 0; i < b->m_gi; ++i)
		free(b->gi[i].data);
	free(b->gi);
	free(b);
	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x3a9a4
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x3350
cmpl $0x0, 0x4c(%rbx)
jle 0x3a98b
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x50(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x3350
incq %r15
movslq 0x4c(%rbx), %rax
addq $0x10, %r14
cmpq %rax, %r15
jl 0x3a96e
movq 0x50(%rbx), %rdi
callq 0x3350
movq %rbx, %rdi
callq 0x3350
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcf.c
// Function: bcf_append_info
int bcf_append_info(bcf1_t *b, const char *info, int l)
{
	int shift = b->fmt - b->str;
	int l_fmt = b->l_str - shift;
	char *ori = b->str;
	if (b->l_str + l > b->m_str) { // enlarge if necessary
		b->m_str = b->l_str + l;
		kroundup32(b->m_str);
		b->str = realloc(b->str, b->m_str);
	}
	memmove(b->str + shift + l, b->str + shift, l_fmt); // move the FORMAT field
	memcpy(b->str + shift - 1, info, l); // append to the INFO field
	b->str[shift + l - 1] = '\0';
	b->fmt = b->str + shift + l;
	b->l_str += l;
	if (ori != b->str) bcf_sync(b); // synchronize when realloc changes the pointer
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movq 0x40(%rdi), %r13
movq 0x18(%rdi), %r14
subq %r14, %r13
movl 0x8(%rdi), %eax
movl %eax, %r15d
subl %r13d, %r15d
addl %edx, %eax
cmpl 0xc(%rdi), %eax
jle 0x3b903
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, 0xc(%rbx)
movslq %ecx, %rsi
movq %r14, %rdi
callq 0x3720
movq %rax, 0x18(%rbx)
movq %r14, 0x8(%rsp)
movslq %r13d, %r14
movq 0x18(%rbx), %rsi
addq %r14, %rsi
movslq %ebp, %r12
leaq (%rsi,%r12), %rdi
movslq %r15d, %rdx
callq 0x34e0
movq 0x18(%rbx), %rax
leaq (%rax,%r14), %rdi
decq %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x37d0
movq 0x18(%rbx), %rax
addl %r13d, %ebp
movslq %ebp, %rcx
movb $0x0, -0x1(%rax,%rcx)
movq 0x18(%rbx), %rax
leaq (%rax,%r12), %rcx
addq %r14, %rcx
movq %rcx, 0x40(%rbx)
addl %r12d, 0x8(%rbx)
cmpq %rax, 0x8(%rsp)
je 0x3b96a
movq %rbx, %rdi
callq 0x3a436
xorl %eax, %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/bcftools/bcf.c
// Function: remove_tag
int remove_tag(char *str, const char *tag, char delim)
{
    char *tmp = str, *p;
    int len_diff = 0, ori_len = strlen(str);
    while ( *tmp && (p = strstr(tmp,tag)) )
    {
        if ( p>str )
        {
            if ( *(p-1)!=delim ) { tmp=p+1; continue; } // shared substring
            p--;
        }
        char *q=p+1;
        while ( *q && *q!=delim ) q++;
        if ( p==str && *q ) q++;        // the tag is first, don't move the delim char
        len_diff += q-p;
        if ( ! *q ) { *p = 0; break; }  // the tag was last, no delim follows
        else
            memmove(p,q,ori_len-(int)(p-str)-(int)(q-p));  // *q==delim
    }
    if ( len_diff==ori_len )
        str[0]='.', str[1]=0, len_diff--;

    return len_diff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
callq 0x3360
movq %rax, 0x10(%rsp)
addq %r14, %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movq %r14, %rbx
cmpb $0x0, (%rbx)
je 0x3ba52
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3460
testq %rax, %rax
je 0x3ba52
movq %rax, %r13
cmpq %r14, %rax
jbe 0x3b9e3
cmpb %r15b, -0x1(%r13)
je 0x3b9e9
movq %r13, %rbx
incq %rbx
cmpb $0x0, 0x1(%r13)
jne 0x3b9b2
jmp 0x3ba52
movl %ebp, 0x4(%rsp)
jmp 0x3b9f0
movl %ebp, 0x4(%rsp)
decq %r13
leaq 0x1(%r13), %rbp
movb (%rbp), %al
incq %rbp
testb %al, %al
je 0x3ba03
cmpb %r15b, %al
jne 0x3b9f4
leaq -0x1(%rbp), %rcx
testb %al, %al
cmoveq %rcx, %rbp
cmpq %r14, %r13
cmovneq %rcx, %rbp
movb (%rbp), %cl
testb %cl, %cl
je 0x3ba3a
movq 0x8(%rsp), %rax
subl %ebp, %eax
movslq %eax, %rdx
movq %r13, %rdi
movq %rbp, %rsi
movb %cl, 0x3(%rsp)
callq 0x34e0
movb 0x3(%rsp), %cl
jmp 0x3ba3f
movb $0x0, (%r13)
subl %r13d, %ebp
movl 0x4(%rsp), %eax
addl %ebp, %eax
movl %eax, %ebp
testb %cl, %cl
jne 0x3b9a9
cmpl 0x10(%rsp), %ebp
jne 0x3ba60
movw $0x2e, (%r14)
decl %ebp
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/bcftools/bcf.c
// Function: rm_info
void rm_info(kstring_t *s, const char *key)
{
    char *p = s->s; 
    int n = 0;
    while ( n<4 )
    {
        if ( !*p ) n++;
        p++;
    }
    char *q = p+1; 
    while ( *q && q-s->s<s->l ) q++;

    int nrm = remove_tag(p, key, ';');
    if ( nrm )
        memmove(q-nrm, q, s->s+s->l-q+1);
    s->l -= nrm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
xorl %eax, %eax
xorl %ecx, %ecx
cmpb $0x1, (%r14,%rax)
adcl $0x0, %ecx
incq %rax
cmpl $0x4, %ecx
jb 0x3ba84
leaq (%r14,%rax), %rdi
movq %rax, %r15
cmpb $0x0, 0x1(%r14,%rax)
je 0x3baac
leaq 0x1(%r15), %rax
cmpq (%rbx), %rax
jb 0x3ba98
movl $0x3b, %edx
callq 0x3b97b
movslq %eax, %r12
testl %eax, %eax
je 0x3bae3
leaq (%r14,%r15), %rsi
incq %rsi
movq %r14, %rax
subq %r12, %rax
leaq (%r15,%rax), %rdi
incq %rdi
movq 0x10(%rbx), %rdx
addq (%rbx), %rdx
subq %r14, %rdx
subq %r15, %rdx
callq 0x34e0
subq %r12, (%rbx)
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_cpy
int bcf_cpy(bcf1_t *r, const bcf1_t *b)
{
	char *t1 = r->str;
	bcf_ginfo_t *t2 = r->gi;
	int i, t3 = r->m_str, t4 = r->m_gi;
	*r = *b;
	r->str = t1; r->gi = t2; r->m_str = t3; r->m_gi = t4;
	if (r->m_str < b->m_str) {
		r->m_str = b->m_str;
		r->str = realloc(r->str, r->m_str);
	}
	memcpy(r->str, b->str, r->m_str);
	bcf_sync(r); // calling bcf_sync() is simple but inefficient
	for (i = 0; i < r->n_gi; ++i)
		memcpy(r->gi[i].data, b->gi[i].data, r->n_smpl * r->gi[i].len);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
movq 0x50(%rdi), %rdx
movl 0xc(%rdi), %r8d
movl 0x4c(%rdi), %r9d
movl $0xd, %ecx
rep  movsq (%rsi), %es:(%rdi)
movq %rax, 0x18(%r14)
movq %rdx, 0x50(%r14)
movl %r8d, 0xc(%r14)
movl %r9d, 0x4c(%r14)
movl 0xc(%rbx), %ecx
cmpl %ecx, %r8d
jge 0x3bb43
movslq %ecx, %rsi
movl %ecx, 0xc(%r14)
movq %rax, %rdi
callq 0x3720
movq %rax, 0x18(%r14)
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
movslq 0xc(%r14), %rdx
callq 0x37d0
movq %r14, %rdi
callq 0x3a436
cmpl $0x0, 0x48(%r14)
jle 0x3bb9e
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x50(%r14), %rax
movq (%rax,%r15), %rdi
movq 0x50(%rbx), %rcx
movq (%rcx,%r15), %rsi
movslq 0x5c(%r14), %rcx
movslq -0x4(%rax,%r15), %rdx
imulq %rcx, %rdx
callq 0x37d0
incq %r12
movslq 0x48(%r14), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x3bb6c
xorl %eax, %eax
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/bcfutils.c
// Function: bcf_build_refhash
void *bcf_build_refhash(bcf_hdr_t *h)
{
	khash_t(str2id) *hash;
	int i, ret;
	hash = kh_init(str2id);
	for (i = 0; i < h->n_ref; ++i) {
		khint_t k;
		k = kh_put(str2id, hash, h->ns[i], &ret); // FIXME: check ret
		kh_val(hash, k) = i;
	}
	return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
movl $0x28, %esi
callq 0x3610
movq %rax, %r14
cmpl $0x0, (%rbx)
jle 0x3bc3a
xorl %r12d, %r12d
leaq 0x4(%rsp), %r15
movq 0x30(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x3bc49
movq 0x20(%r14), %rcx
movl %eax, %eax
movl %r12d, (%rcx,%rax,4)
incq %r12
movslq (%rbx), %rax
cmpq %rax, %r12
jl 0x3bc12
movq %r14, %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/bcfutils.c
// Function: bcf_str2id_thorough_destroy
void bcf_str2id_thorough_destroy(void *_hash)
{
	khash_t(str2id) *hash = (khash_t(str2id)*)_hash;
	khint_t k;
	if (hash == 0) return;
	for (k = 0; k < kh_end(hash); ++k)
		if (kh_exist(hash, k)) free((char*)kh_key(hash, k));
	kh_destroy(str2id, hash);
}

// Assembly:
testq %rdi, %rdi
je 0x3bed4
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x3beac
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movl %r15d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %r14d, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x3be9e
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x3350
incq %r15
movl (%rbx), %eax
addl $0x2, %r14d
cmpq %rax, %r15
jb 0x3be78
movq 0x18(%rbx), %rdi
callq 0x3350
movq 0x10(%rbx), %rdi
callq 0x3350
movq 0x20(%rbx), %rdi
callq 0x3350
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3350
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcfutils.c
// Function: bcf_str2id
int bcf_str2id(void *_hash, const char *str)
{
	khash_t(str2id) *hash = (khash_t(str2id)*)_hash;
	khint_t k;
	if (!hash) return -1;
	k = kh_get(str2id, hash, str);
	return k == kh_end(hash)? -1 : kh_val(hash, k);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x3bffc
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl (%rdi), %r14d
testl %r14d, %r14d
je 0x3bf39
movq %rsi, %r12
movsbl (%rsi), %r8d
xorl %r9d, %r9d
movl $0x0, %ecx
testl %r8d, %r8d
je 0x3bf43
movb 0x1(%r12), %al
testb %al, %al
je 0x3bf40
leaq 0x2(%r12), %rdx
movl %r8d, %ecx
movl %ecx, %r8d
shll $0x5, %r8d
subl %ecx, %r8d
movsbl %al, %ecx
addl %r8d, %ecx
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x3bf1e
jmp 0x3bf43
xorl %ebx, %ebx
jmp 0x3bfe0
movl %r8d, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r14d
movl %edx, %r10d
leal -0x1(%r14), %r8d
movl %ecx, %eax
xorl %edx, %edx
divl %r8d
incl %edx
movq 0x10(%rdi), %r15
movl %r10d, %ebx
movq %rdi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %r10d, 0x8(%rsp)
movl %ebx, %eax
shrl $0x4, %eax
movl (%r15,%rax,4), %ebp
leal (%rbx,%rbx), %r13d
andl $0x1e, %r13d
movl %ebp, %eax
movl %r13d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x3bfce
testb $0x1, %al
jne 0x3bfb6
movq 0x18(%rdi), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
movq %r12, %rsi
callq 0x35a0
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %r10d
xorl %r9d, %r9d
movq 0x10(%rsp), %rdi
testl %eax, %eax
je 0x3bfce
addl %edx, %ebx
cmpl %r14d, %ebx
movl %r14d, %eax
cmovbl %r9d, %eax
subl %eax, %ebx
cmpl %r10d, %ebx
jne 0x3bf6f
movl %r14d, %ebx
jmp 0x3bfdb
movl %r13d, %ecx
shrl %cl, %ebp
testb $0x3, %bpl
cmovnel %r14d, %ebx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r14d, %ebx
je 0x3bfee
movq 0x20(%rdi), %rax
movl %ebx, %ecx
movl (%rax,%rcx,4), %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/bcftools/bcfutils.c
// Function: bcf_str2id_add
int bcf_str2id_add(void *_hash, const char *str)
{
	khint_t k;
	int ret;
	khash_t(str2id) *hash = (khash_t(str2id)*)_hash;
	if (!hash) return -1;
	k = kh_put(str2id, hash, str, &ret);
	if (ret == 0) return kh_val(hash, k);
	kh_val(hash, k) = kh_size(hash) - 1;
	return kh_val(hash, k);
}

// Assembly:
testq %rdi, %rdi
je 0x3c02e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movq %r14, %rdx
callq 0x3bc49
movl %eax, %ecx
cmpl $0x0, (%r14)
je 0x3c034
movl 0x4(%rbx), %eax
decl %eax
movq 0x20(%rbx), %rdx
movl %ecx, %ecx
movl %eax, (%rdx,%rcx,4)
jmp 0x3c03d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movq 0x20(%rbx), %rax
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcfutils.c
// Function: bcf_shrink_alt
int bcf_shrink_alt(bcf1_t *b, int n)
{
	char *p;
	int i, j, k, n_smpl = b->n_smpl;
	if (b->n_alleles <= n) return -1;
	// update ALT
	if (n > 1) {
		for (p = b->alt, k = 1; *p; ++p)
			if (*p == ',' && ++k == n) break;
		*p = '\0';
	} else p = b->alt, *p = '\0';
	++p;
	memmove(p, b->flt, b->str + b->l_str - b->flt);
	b->l_str -= b->flt - p;
	// update PL
	for (i = 0; i < b->n_gi; ++i) {
		bcf_ginfo_t *g = b->gi + i;
		if (g->fmt == bcf_str2int("PL", 2)) {
			int l, x = b->n_alleles * (b->n_alleles + 1) / 2;
			uint8_t *d = (uint8_t*)g->data;
			g->len = n * (n + 1) / 2;
			for (l = k = 0; l < n_smpl; ++l) {
				uint8_t *dl = d + l * x;
				for (j = 0; j < g->len; ++j) d[k++] = dl[j];
			}
		} // FIXME: to add GL
	}
	b->n_alleles = n;
	bcf_sync(b);
	return 0;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %esi, 0x58(%rdi)
jle 0x3c514
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x28(%rdi), %r15
cmpl $0x2, %esi
jl 0x3c42b
movl $0x1, %eax
movzbl (%r15), %ecx
cmpl $0x2c, %ecx
je 0x3c41f
testl %ecx, %ecx
jne 0x3c426
jmp 0x3c42b
incl %eax
cmpl %r14d, %eax
je 0x3c42b
incq %r15
jmp 0x3c410
movl 0x5c(%rbx), %r12d
movb $0x0, (%r15)
incq %r15
movq 0x30(%rbx), %rsi
movslq 0x8(%rbx), %rdx
addq 0x18(%rbx), %rdx
subq %rsi, %rdx
movq %r15, %rdi
callq 0x34e0
subl 0x30(%rbx), %r15d
addl %r15d, 0x8(%rbx)
cmpl $0x0, 0x48(%rbx)
jle 0x3c4f8
leal 0x1(%r14), %ecx
imull %r14d, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
xorl %ecx, %ecx
movq 0x50(%rbx), %rdx
movq %rcx, %rsi
shlq $0x4, %rsi
cmpl $0x504c, (%rdx,%rsi)    # imm = 0x504C
jne 0x3c4e8
addq %rsi, %rdx
movl 0x58(%rbx), %edi
movq 0x8(%rdx), %rsi
movl %eax, 0x4(%rdx)
testl %r12d, %r12d
jle 0x3c4e8
leal 0x1(%rdi), %r8d
imull %edi, %r8d
movl %r8d, %edi
shrl $0x1f, %edi
addl %r8d, %edi
sarl %edi
movslq %edi, %rdi
xorl %r8d, %r8d
movq %rsi, %r9
xorl %r10d, %r10d
cmpl $0x0, 0x4(%rdx)
jle 0x3c4dd
movslq %r10d, %r11
addq %rsi, %r11
xorl %r15d, %r15d
movb (%r9,%r15), %bpl
movb %bpl, (%r11,%r15)
incq %r15
movslq 0x4(%rdx), %r13
cmpq %r13, %r15
jl 0x3c4c6
addl %r15d, %r10d
incq %r8
addq %rdi, %r9
cmpq %r12, %r8
jne 0x3c4b7
incq %rcx
movslq 0x48(%rbx), %rdx
cmpq %rdx, %rcx
jl 0x3c472
movl %r14d, 0x58(%rbx)
movq %rbx, %rdi
callq 0x3a436
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_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcfutils.c
// Function: bcf_gl2pl
int bcf_gl2pl(bcf1_t *b)
{
	char *p;
	int i, n_smpl = b->n_smpl;
	bcf_ginfo_t *g;
	float *d0;
	uint8_t *d1;
	if (strstr(b->fmt, "PL")) return -1;
	if ((p = strstr(b->fmt, "GL")) == 0) return -1;
	*p = 'P';
	for (i = 0; i < b->n_gi; ++i)
		if (b->gi[i].fmt == bcf_str2int("GL", 2))
			break;
	g = b->gi + i;
	g->fmt = bcf_str2int("PL", 2);
	g->len /= 4; // 4 == sizeof(float)
	d0 = (float*)g->data; d1 = (uint8_t*)g->data;
	for (i = 0; i < n_smpl * g->len; ++i) {
		int x = (int)(-10. * d0[i] + .499);
		if (x > 255) x = 255;
		if (x < 0) x = 0;
		d1[i] = x;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movslq 0x5c(%rdi), %r12
movq 0x40(%rdi), %r15
leaq 0x8226(%rip), %rsi      # 0x44755
movq %r15, %rdi
callq 0x3460
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x3c54f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x87fe(%rip), %rsi      # 0x44d54
movq %r15, %rdi
callq 0x3460
testq %rax, %rax
je 0x3c541
movb $0x50, (%rax)
movl 0x48(%r14), %eax
xorl %ebx, %ebx
testl %eax, %eax
jle 0x3c590
movq 0x50(%r14), %rdx
xorl %ecx, %ecx
cmpl $0x474c, (%rdx)         # imm = 0x474C
je 0x3c58c
incq %rcx
addq $0x10, %rdx
cmpq %rcx, %rax
jne 0x3c576
movl %eax, %ecx
movl %ecx, %ecx
jmp 0x3c592
xorl %ecx, %ecx
movq 0x50(%r14), %rdx
shlq $0x4, %rcx
movl $0x504c, (%rdx,%rcx)    # imm = 0x504C
movl 0x4(%rdx,%rcx), %eax
leal 0x3(%rax), %esi
testl %eax, %eax
cmovnsl %eax, %esi
sarl $0x2, %esi
movl %esi, 0x4(%rdx,%rcx)
imull %r12d, %esi
testl %esi, %esi
jle 0x3c541
leaq (%rdx,%rcx), %rax
movq 0x8(%rdx,%rcx), %rcx
xorl %edx, %edx
movsd 0x8731(%rip), %xmm0     # 0x44d00
movsd 0x1a49(%rip), %xmm1     # 0x3e020
movl $0xff, %edi
xorps %xmm2, %xmm2
cvtss2sd (%rcx,%rdx,4), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %esi
cmpl %edi, %esi
jl 0x3c5f9
movl $0xff, %esi
xorl %ebx, %ebx
testl %esi, %esi
jg 0x3c601
xorl %esi, %esi
movb %sil, (%rcx,%rdx)
incq %rdx
movslq 0x4(%rax), %rsi
imulq %r12, %rsi
cmpq %rsi, %rdx
jl 0x3c5dc
jmp 0x3c541
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcfutils.c
// Function: bcf_fix_gt
int bcf_fix_gt(bcf1_t *b)
{
	char *s;
	int i;
	uint32_t tmp;
	bcf_ginfo_t gt;
	// check the presence of the GT FMT
	if ((s = strstr(b->fmt, ":GT")) == 0) return 0; // no GT or GT is already the first
	assert(s[3] == '\0' || s[3] == ':'); // :GTX in fact
	tmp = bcf_str2int("GT", 2);
	for (i = 0; i < b->n_gi; ++i)
		if (b->gi[i].fmt == tmp) break;
	if (i == b->n_gi) return 0; // no GT in b->gi; probably a bug...
	gt = b->gi[i];
	// move GT to the first
	for (; i > 0; --i) b->gi[i] = b->gi[i-1];
	b->gi[0] = gt;
    if ( s[3]==0 )
        memmove(b->fmt + 3, b->fmt, s - b->fmt);        // :GT
    else
        memmove(b->fmt + 3, b->fmt, s - b->fmt + 1);    // :GT:
	b->fmt[0] = 'G'; b->fmt[1] = 'T'; b->fmt[2] = ':';
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
leaq 0x872a(%rip), %rsi      # 0x44d57
callq 0x3460
testq %rax, %rax
je 0x3c6ef
movzbl 0x3(%rax), %ecx
testl %ecx, %ecx
je 0x3c64c
cmpl $0x3a, %ecx
jne 0x3c6f7
movl 0x48(%rbx), %edx
testl %edx, %edx
jle 0x3c671
movq 0x50(%rbx), %rsi
xorl %ecx, %ecx
cmpl $0x4754, (%rsi)         # imm = 0x4754
je 0x3c673
incq %rcx
addq $0x10, %rsi
cmpq %rcx, %rdx
jne 0x3c659
movl %edx, %ecx
jmp 0x3c673
xorl %ecx, %ecx
cmpl %edx, %ecx
je 0x3c6ef
movq 0x50(%rbx), %rsi
movl %ecx, %edx
movq %rdx, %rdi
shlq $0x4, %rdi
movups (%rsi,%rdi), %xmm0
movaps %xmm0, (%rsp)
testl %ecx, %ecx
jle 0x3c6b2
leaq 0x1(%rdx), %rcx
shlq $0x4, %rdx
movq 0x50(%rbx), %rsi
movups -0x10(%rsi,%rdx), %xmm0
movups %xmm0, (%rsi,%rdx)
decq %rcx
addq $-0x10, %rdx
cmpq $0x1, %rcx
jg 0x3c698
movq 0x50(%rbx), %rcx
movaps (%rsp), %xmm0
movups %xmm0, (%rcx)
movq 0x40(%rbx), %rsi
cmpb $0x1, 0x3(%rax)
leaq 0x3(%rsi), %rdi
sbbq $-0x1, %rax
subq %rsi, %rax
movq %rax, %rdx
callq 0x34e0
movq 0x40(%rbx), %rax
movb $0x47, (%rax)
movq 0x40(%rbx), %rax
movb $0x54, 0x1(%rax)
movq 0x40(%rbx), %rax
movb $0x3a, 0x2(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x865d(%rip), %rdi      # 0x44d5b
leaq 0x8624(%rip), %rsi      # 0x44d29
leaq 0x866b(%rip), %rcx      # 0x44d77
movl $0xf3, %edx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcfutils.c
// Function: bcf_fix_pl
int bcf_fix_pl(bcf1_t *b)
{
	int i;
	uint32_t tmp;
	uint8_t *PL, *swap;
	bcf_ginfo_t *gi;
	// pinpoint PL
	tmp = bcf_str2int("PL", 2);
	for (i = 0; i < b->n_gi; ++i)
		if (b->gi[i].fmt == tmp) break;
	if (i == b->n_gi) return 0;
	// prepare
	gi = b->gi + i;
	PL = (uint8_t*)gi->data;
	swap = alloca(gi->len);
	// loop through individuals
	for (i = 0; i < b->n_smpl; ++i) {
		int k, l, x;
		uint8_t *PLi = PL + i * gi->len;
		memcpy(swap, PLi, gi->len);
		for (k = x = 0; k < b->n_alleles; ++k)
			for (l = k; l < b->n_alleles; ++l)
				PLi[l*(l+1)/2 + k] = swap[x++];
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x48(%rdi), %eax
testl %eax, %eax
jle 0x3c74c
movq 0x50(%rbx), %rdx
xorl %ecx, %ecx
cmpl $0x504c, (%rdx)         # imm = 0x504C
je 0x3c74e
incq %rcx
addq $0x10, %rdx
cmpq %rcx, %rax
jne 0x3c734
movl %eax, %ecx
jmp 0x3c74e
xorl %ecx, %ecx
cmpl %eax, %ecx
je 0x3c7f4
movq 0x50(%rbx), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
movslq 0x4(%rax,%rcx), %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %r14
subq %rdx, %r14
movq %r14, %rsp
cmpl $0x0, 0x5c(%rbx)
jle 0x3c7f4
leaq (%rax,%rcx), %rdx
movq %rdx, -0x30(%rbp)
movq 0x8(%rax,%rcx), %r13
xorl %r12d, %r12d
movq -0x30(%rbp), %rax
movslq 0x4(%rax), %rdx
movslq %r12d, %r15
imulq %rdx, %r15
addq %r13, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x37d0
cmpl $0x0, 0x58(%rbx)
jle 0x3c7eb
xorl %eax, %eax
xorl %ecx, %ecx
cmpl 0x58(%rbx), %ecx
jge 0x3c7e4
movslq %eax, %rdx
addq %r14, %rdx
movl %ecx, %esi
movl %ecx, %edi
movb (%rdx), %r8b
leal 0x1(%rdi), %r9d
imull %r9d, %edi
shrl %edi
addq %rsi, %rdi
movb %r8b, (%r15,%rdi)
incq %rdx
incl %eax
movl %r9d, %edi
cmpl 0x58(%rbx), %r9d
jl 0x3c7c2
incl %ecx
cmpl 0x58(%rbx), %ecx
jl 0x3c7b3
incl %r12d
cmpl 0x5c(%rbx), %r12d
jl 0x3c78c
xorl %eax, %eax
leaq -0x28(%rbp), %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/bcftools/bcfutils.c
// Function: bcf_smpl_covered
int bcf_smpl_covered(const bcf1_t *b)
{
	int i, j, n = 0;
	uint32_t tmp;
	bcf_ginfo_t *gi;
	// pinpoint PL
	tmp = bcf_str2int("PL", 2);
	for (i = 0; i < b->n_gi; ++i)
		if (b->gi[i].fmt == tmp) break;
	if (i == b->n_gi) return 0;
	// count how many samples having PL!=[0..0]
	gi = b->gi + i;
	for (i = 0; i < b->n_smpl; ++i) {
		uint8_t *PLi = ((uint8_t*)gi->data) + i * gi->len;
		for (j = 0; j < gi->len; ++j)
			if (PLi[j]) break;
		if (j < gi->len) ++n;
	}
	return n;
}

// Assembly:
pushq %rbx
movl 0x48(%rdi), %ecx
xorl %eax, %eax
movl $0x0, %edx
testl %ecx, %ecx
jle 0x3c830
movq 0x50(%rdi), %rsi
xorl %edx, %edx
cmpl $0x504c, (%rsi)         # imm = 0x504C
je 0x3c830
incq %rdx
addq $0x10, %rsi
cmpq %rdx, %rcx
jne 0x3c81a
movl %ecx, %edx
cmpl %ecx, %edx
je 0x3c8ac
movslq 0x5c(%rdi), %rcx
testq %rcx, %rcx
jle 0x3c8ac
movq 0x50(%rdi), %rax
movl %edx, %esi
shlq $0x4, %rsi
movq 0x8(%rax,%rsi), %rdx
movslq 0x4(%rax,%rsi), %rsi
testq %rsi, %rsi
setg %dil
movl %esi, %r8d
xorl %r9d, %r9d
movq %rdx, %r10
xorl %eax, %eax
movl %edi, %r11d
testl %esi, %esi
jle 0x3c89a
movq %r9, %r11
imulq %rsi, %r11
cmpb $0x0, (%rdx,%r11)
movl %edi, %r11d
jne 0x3c89a
movl $0x1, %ebx
movq %rbx, %r11
cmpq %rbx, %r8
je 0x3c893
leaq 0x1(%r11), %rbx
cmpb $0x0, (%r10,%r11)
je 0x3c880
cmpq %rsi, %r11
setl %r11b
movzbl %r11b, %r11d
addl %r11d, %eax
incq %r9
addq %rsi, %r10
cmpq %rcx, %r9
jne 0x3c863
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcfutils.c
// Function: locate_field
static void *locate_field(const bcf1_t *b, const char *fmt, int l)
{
	int i;
	uint32_t tmp;
	tmp = bcf_str2int(fmt, l);
	for (i = 0; i < b->n_gi; ++i)
		if (b->gi[i].fmt == tmp) break;
	return i == b->n_gi? 0 : b->gi[i].data;
}

// Assembly:
xorl %ecx, %ecx
xorl %eax, %eax
movsbl (%rsi,%rcx), %edx
testl %edx, %edx
je 0x3cadd
shll $0x8, %eax
orl %edx, %eax
incq %rcx
cmpq $0x1, %rcx
je 0x3cac7
movl 0x48(%rdi), %ecx
testl %ecx, %ecx
jle 0x3cafe
movq 0x50(%rdi), %rsi
xorl %edx, %edx
cmpl %eax, (%rsi)
je 0x3cb00
incq %rdx
addq $0x10, %rsi
cmpq %rdx, %rcx
jne 0x3caea
movl %ecx, %edx
jmp 0x3cb00
xorl %edx, %edx
cmpl %ecx, %edx
jne 0x3cb07
xorl %eax, %eax
retq
movq 0x50(%rdi), %rax
movl %edx, %ecx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/bcfutils.c
// Function: bcf_shuffle
int bcf_shuffle(bcf1_t *b, int seed)
{
	int i, j, *a;
	if (seed > 0) srand48(seed);
	a = malloc(b->n_smpl * sizeof(int));
	for (i = 0; i < b->n_smpl; ++i) a[i] = i;
	for (i = b->n_smpl; i > 1; --i) {
		int tmp;
		j = (int)(drand48() * i);
		tmp = a[j]; a[j] = a[i-1]; a[i-1] = tmp;
	}
	for (j = 0; j < b->n_gi; ++j) {
		bcf_ginfo_t *gi = b->gi + j;
		uint8_t *swap, *data = (uint8_t*)gi->data;
		swap = malloc(gi->len * b->n_smpl);
		for (i = 0; i < b->n_smpl; ++i)
			memcpy(swap + gi->len * a[i], data + gi->len * i, gi->len);
		free(gi->data);
		gi->data = swap;
	}
	free(a);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testl %esi, %esi
jle 0x3cb33
movl %esi, %edi
callq 0x37e0
movslq 0x5c(%rbx), %r15
leaq (,%r15,4), %rdi
callq 0x3240
movq %rax, %r14
testq %r15, %r15
jle 0x3cb5a
xorl %eax, %eax
movl %eax, (%r14,%rax,4)
incq %rax
cmpq %rax, %r15
jne 0x3cb4e
cmpl $0x2, %r15d
jl 0x3cb96
callq 0x3820
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cltq
movl (%r14,%rax,4), %ecx
movl -0x4(%r14,%r15,4), %edx
movl %edx, (%r14,%rax,4)
movl %ecx, -0x4(%r14,%r15,4)
leaq -0x1(%r15), %rax
cmpq $0x2, %r15
movq %rax, %r15
jg 0x3cb60
cmpl $0x0, 0x48(%rbx)
jle 0x3cc23
xorl %ecx, %ecx
movq %rbx, 0x8(%rsp)
movq 0x50(%rbx), %rax
movq %rcx, 0x10(%rsp)
shlq $0x4, %rcx
leaq (%rax,%rcx), %r13
movq 0x8(%rax,%rcx), %rbp
movslq 0x4(%rax,%rcx), %rdi
movslq 0x5c(%rbx), %rbx
imulq %rbx, %rdi
callq 0x3240
movq %rax, %r15
testq %rbx, %rbx
jle 0x3cc00
xorl %r12d, %r12d
movslq 0x4(%r13), %rdx
movslq (%r14,%r12,4), %rdi
imulq %rdx, %rdi
addq %r15, %rdi
movslq %r12d, %rsi
imulq %rdx, %rsi
addq %rbp, %rsi
callq 0x37d0
incq %r12
cmpq %r12, %rbx
jne 0x3cbda
movq 0x8(%r13), %rdi
callq 0x3350
movq %r15, 0x8(%r13)
movq 0x10(%rsp), %rcx
incq %rcx
movq 0x8(%rsp), %rbx
movslq 0x48(%rbx), %rax
cmpq %rax, %rcx
jl 0x3cba7
movq %r14, %rdi
callq 0x3350
xorl %eax, %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/bcftools/bcfutils.c
// Function: bcf_subsam
int bcf_subsam(int n_smpl, int *list, bcf1_t *b)
{
	int i, j;
	for (j = 0; j < b->n_gi; ++j) {
		bcf_ginfo_t *gi = b->gi + j;
		uint8_t *swap;
		swap = malloc(gi->len * b->n_smpl);
		for (i = 0; i < n_smpl; ++i)
			memcpy(swap + i * gi->len, (uint8_t*)gi->data + list[i] * gi->len, gi->len);
		free(gi->data);
		gi->data = swap;
	}
	b->n_smpl = n_smpl;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, 0xc(%rsp)
cmpl $0x0, 0x48(%rdx)
jle 0x3d079
movq %rsi, %r14
movl 0xc(%rsp), %r12d
xorl %r13d, %r13d
movq %rdx, 0x10(%rsp)
movq 0x50(%rdx), %rax
movq %r13, %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rbp
movslq 0x4(%rax,%rcx), %rax
movslq 0x5c(%rdx), %rdi
imulq %rax, %rdi
callq 0x3240
movq %rax, %r15
cmpl $0x0, 0xc(%rsp)
jle 0x3d05b
xorl %ebx, %ebx
movslq 0x4(%rbp), %rdx
movslq %ebx, %rdi
imulq %rdx, %rdi
addq %r15, %rdi
movslq (%r14,%rbx,4), %rsi
imulq %rdx, %rsi
addq 0x8(%rbp), %rsi
callq 0x37d0
incq %rbx
cmpq %rbx, %r12
jne 0x3d034
movq 0x8(%rbp), %rdi
callq 0x3350
movq %r15, 0x8(%rbp)
incq %r13
movq 0x10(%rsp), %rdx
movslq 0x48(%rdx), %rax
cmpq %rax, %r13
jl 0x3d007
movl 0xc(%rsp), %eax
movl %eax, 0x5c(%rdx)
xorl %eax, %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/bcftools/bcfutils.c
// Function: bcf_gl10_indel
int bcf_gl10_indel(const bcf1_t *b, uint8_t *gl)
{
	int k, l, j, i;
	const bcf_ginfo_t *PL;
	if (b->alt[0] == 0) return -1; // no alternate allele
	for (i = 0; i < b->n_gi; ++i)
		if (b->gi[i].fmt == bcf_str2int("PL", 2)) break;
	if (i == b->n_gi) return -1; // no PL
	PL = b->gi + i;
	for (i = 0; i < b->n_smpl; ++i) {
		const uint8_t *p = PL->data + i * PL->len; // the PL for the i-th individual
		uint8_t *g = gl + 10 * i;
		for (k = j = 0; k < 4; ++k) {
			for (l = k; l < 4; ++l) {
				int t, x = k, y = l;
				if (x > y) t = x, x = y, y = t; // make sure x is the smaller
				x = y * (y+1) / 2 + x;
				g[j++] = x < PL->len? p[x] : 255;
			}
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x28(%rdi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x0, (%rcx)
je 0x3d353
movl 0x48(%rdi), %ecx
testl %ecx, %ecx
jle 0x3d2b4
movq 0x50(%rdi), %r8
xorl %edx, %edx
cmpl $0x504c, (%r8)          # imm = 0x504C
je 0x3d2b6
incq %rdx
addq $0x10, %r8
cmpq %rdx, %rcx
jne 0x3d29b
movl %ecx, %edx
jmp 0x3d2b6
xorl %edx, %edx
cmpl %ecx, %edx
je 0x3d353
cmpl $0x0, 0x5c(%rdi)
jle 0x3d351
movl %edx, %eax
shlq $0x4, %rax
addq 0x50(%rdi), %rax
xorl %ecx, %ecx
movslq 0x4(%rax), %r8
movslq %ecx, %rdx
imulq %r8, %rdx
addq 0x8(%rax), %rdx
movl $0x4, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
movslq %r10d, %r10
leaq (%rsi,%r10), %r11
addl %r8d, %r10d
movl %r9d, %ebx
cmpl %ebx, %r9d
movl %ebx, %r14d
cmovbl %r9d, %r14d
movl %ebx, %r15d
cmoval %r9d, %r15d
leal 0x1(%r15), %r12d
imull %r15d, %r12d
shrl %r12d
addq %r12, %r14
movb $-0x1, %bpl
cmpl 0x4(%rax), %r14d
jge 0x3d328
movb (%rdx,%r14), %bpl
movb %bpl, (%r11)
incl %ebx
incq %r11
cmpl $0x4, %ebx
jne 0x3d2fc
incl %r9d
decl %r8d
cmpl $0x4, %r9d
jne 0x3d2ef
incq %rcx
movslq 0x5c(%rdi), %rdx
addq $0xa, %rsi
cmpq %rdx, %rcx
jl 0x3d2d4
xorl %eax, %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/bcftools/fet.c
// Function: hypergeo_acc
static double hypergeo_acc(int n11, int n1_, int n_1, int n, hgacc_t *aux)
{
	if (n1_ || n_1 || n) {
		aux->n11 = n11; aux->n1_ = n1_; aux->n_1 = n_1; aux->n = n;
	} else { // then only n11 changed; the rest fixed
		if (n11%11 && n11 + aux->n - aux->n1_ - aux->n_1) {
			if (n11 == aux->n11 + 1) { // incremental
				aux->p *= (double)(aux->n1_ - aux->n11) / n11
					* (aux->n_1 - aux->n11) / (n11 + aux->n - aux->n1_ - aux->n_1);
				aux->n11 = n11;
				return aux->p;
			}
			if (n11 == aux->n11 - 1) { // incremental
				aux->p *= (double)aux->n11 / (aux->n1_ - n11)
					* (aux->n11 + aux->n - aux->n1_ - aux->n_1) / (aux->n_1 - n11);
				aux->n11 = n11;
				return aux->p;
			}
		}
		aux->n11 = n11;
	}
	aux->p = hypergeo(aux->n11, aux->n1_, aux->n_1, aux->n);
	return aux->p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %edx, %eax
orl %esi, %eax
orl %ecx, %eax
je 0x3d7d4
movl %edi, (%rbx)
movl %esi, 0x4(%rbx)
movl %edx, 0x8(%rbx)
movl %ecx, 0xc(%rbx)
jmp 0x3d7fe
imull $0xba2e8ba3, %edi, %eax # imm = 0xBA2E8BA3
addl $0xba2e8ba, %eax        # imm = 0xBA2E8BA
cmpl $0x1745d175, %eax       # imm = 0x1745D175
jb 0x3d7fc
movl 0xc(%rbx), %ecx
leal (%rcx,%rdi), %r8d
movl 0x4(%rbx), %esi
movl 0x8(%rbx), %eax
leal (%rax,%rsi), %r9d
subl %r9d, %r8d
jne 0x3d868
movl %edi, (%rbx)
movl (%rbx), %ebp
movl 0x4(%rbx), %r14d
movl 0x8(%rbx), %r15d
movl 0xc(%rbx), %r12d
movl %r14d, %edi
movl %ebp, %esi
callq 0x3d8e1
movsd %xmm0, 0x8(%rsp)
movl %r12d, %edi
subl %r14d, %edi
movl %r15d, %esi
subl %ebp, %esi
callq 0x3d8e1
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl %r12d, %edi
movl %r15d, %esi
callq 0x3d8e1
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x30e0
movsd %xmm0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl (%rbx), %edx
leal 0x1(%rdx), %r10d
cmpl %edi, %r10d
jne 0x3d898
subl %edx, %esi
cvtsi2sd %esi, %xmm1
cvtsi2sd %edi, %xmm0
divsd %xmm0, %xmm1
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r8d, %xmm1
jmp 0x3d8cc
leal -0x1(%rdx), %r8d
cmpl %edi, %r8d
jne 0x3d7fc
cvtsi2sd %edx, %xmm1
subl %edi, %esi
cvtsi2sd %esi, %xmm0
divsd %xmm0, %xmm1
subl %r9d, %ecx
addl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd %xmm1, %xmm0
subl %edi, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
mulsd 0x10(%rbx), %xmm0
movsd %xmm0, 0x10(%rbx)
movl %edi, (%rbx)
jmp 0x3d85b
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_putheader
SOAP_FMAC4 soap_putheader(struct soap *soap)
{
	if (soap->header)
	{	soap->part = SOAP_IN_HEADER;
		if (soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, NULL))
			return soap->error;
		soap->part = SOAP_END_HEADER;
	}
	return SOAP_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x5f30(%rdi), %rcx
testq %rcx, %rcx
je 0x354a
movq %rdi, %r14
movw $0x3, 0x18590(%rdi)
leaq 0x4d65f(%rip), %rsi     # 0x50b90
xorl %ebx, %ebx
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x3562
testl %eax, %eax
je 0x354e
movl 0x19214(%r14), %ebx
jmp 0x3558
xorl %ebx, %ebx
jmp 0x3558
movw $0x4, 0x18590(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_getheader
SOAP_FMAC4 soap_getheader(struct soap *soap)
{
	soap->part = SOAP_IN_HEADER;
	soap->header = soap_in_SOAP_ENV__Header(soap, "SOAP-ENV:Header", NULL, NULL);
	soap->part = SOAP_END_HEADER;
	return soap->header == NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movw $0x3, 0x18590(%rdi)
leaq 0x4d5cc(%rip), %rsi     # 0x50b90
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x35e9
movq %rax, 0x5f30(%rbx)
movw $0x4, 0x18590(%rbx)
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_fault
SOAP_FMAC4 soap_fault(struct soap *soap)
{
	if (!soap->fault)
	{	soap->fault = (struct SOAP_ENV__Fault*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));
		if (!soap->fault)
			return;
		soap_default_SOAP_ENV__Fault(soap, soap->fault);
	}
	if (soap->version == 2 && !soap->fault->SOAP_ENV__Code)
	{	soap->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));
		soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);
	}
	if (soap->version == 2 && !soap->fault->SOAP_ENV__Reason)
	{	soap->fault->SOAP_ENV__Reason = (struct SOAP_ENV__Reason*)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason));
		soap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x5f38(%rdi)
jne 0x374c
movl $0x48, %esi
movq %rbx, %rdi
callq 0x39095
movq %rax, 0x5f38(%rbx)
testq %rax, %rax
je 0x37b3
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x40(%rax)
cmpw $0x2, 0x2(%rbx)
jne 0x377f
movq 0x5f38(%rbx), %rax
cmpq $0x0, 0x20(%rax)
jne 0x377f
movl $0x10, %esi
movq %rbx, %rdi
callq 0x39095
movq 0x5f38(%rbx), %rcx
movq %rax, 0x20(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
cmpw $0x2, 0x2(%rbx)
jne 0x37b3
movq 0x5f38(%rbx), %rax
cmpq $0x0, 0x28(%rax)
jne 0x37b3
movl $0x8, %esi
movq %rbx, %rdi
callq 0x39095
movq 0x5f38(%rbx), %rcx
movq %rax, 0x28(%rcx)
movq $0x0, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_serialize_SOAP_ENV__Fault
SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a)
{
	(void)soap; (void)a; /* appease -Wall -Werror */
	soap_serialize__QName(soap, &a->faultcode);
	soap_serialize_string(soap, &a->faultstring);
	soap_serialize_string(soap, &a->faultactor);
	soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->detail);
	soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Code);
	soap_serialize_PointerToSOAP_ENV__Reason(soap, &a->SOAP_ENV__Reason);
	soap_serialize_string(soap, &a->SOAP_ENV__Node);
	soap_serialize_string(soap, &a->SOAP_ENV__Role);
	soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->SOAP_ENV__Detail);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
movl $0x4, %edx
callq 0x3f0c0
movq 0x8(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0x3f0c0
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0x3f0c0
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x2912c
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x29167
leaq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x291a6
movq 0x30(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0x3f0c0
movq 0x38(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0x3f0c0
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2912c
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_SOAP_ENV__Fault
SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Fault);
	if (soap_out_SOAP_ENV__Fault(soap, tag?tag:"SOAP-ENV:Fault", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movl $0xfe, %r9d
callq 0x3e812
testq %r15, %r15
leaq 0x4d2ce(%rip), %rsi     # 0x50ba0
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x291e3
testl %eax, %eax
je 0x38fc
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ca41
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_faultsubcode
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap)
{
	soap_fault(soap);
	if (soap->version == 2)
	{	if (!soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode)
		{	soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));
			soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode);
		}
		return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;
	}
	return (const char**)&soap->fault->faultcode;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3707
leaq 0x5f38(%rbx), %r14
cmpw $0x2, 0x2(%rbx)
jne 0x39e4
movq (%r14), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x8(%rax)
jne 0x39d9
movl $0x10, %esi
movq %rbx, %rdi
callq 0x39095
movq 0x5f38(%rbx), %rcx
movq 0x20(%rcx), %rcx
movq %rax, 0x8(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq (%r14), %rax
movq 0x20(%rax), %r14
addq $0x8, %r14
movq (%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_faultstring
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap)
{
	soap_fault(soap);
	if (soap->version == 2)
		return (const char**)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text;
	return (const char**)&soap->fault->faultstring;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3707
cmpw $0x2, 0x2(%rbx)
movq 0x5f38(%rbx), %rax
jne 0x3a0c
movq 0x28(%rax), %rax
jmp 0x3a10
addq $0x8, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_faultdetail
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap)
{
	soap_fault(soap);
	if (soap->version == 1)
	{	if (!soap->fault->detail)
		{	soap->fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));
			soap_default_SOAP_ENV__Detail(soap, soap->fault->detail);
		}
		return (const char**)&soap->fault->detail->__any;
	}
	if (!soap->fault->SOAP_ENV__Detail)
	{	soap->fault->SOAP_ENV__Detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));
		soap_default_SOAP_ENV__Detail(soap, soap->fault->SOAP_ENV__Detail);
	}
	return (const char**)&soap->fault->SOAP_ENV__Detail->__any;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3707
cmpw $0x1, 0x2(%rbx)
movq 0x5f38(%rbx), %rax
jne 0x3a3b
movl $0x18, %r14d
cmpq $0x0, 0x18(%rax)
jne 0x3a6d
jmp 0x3a48
movl $0x40, %r14d
cmpq $0x0, 0x40(%rax)
jne 0x3a6d
movl $0x18, %esi
movq %rbx, %rdi
callq 0x39095
movq 0x5f38(%rbx), %rcx
movq %rax, (%rcx,%r14)
movl $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq 0x5f38(%rbx), %rax
movq (%rax,%r14), %rax
addq $0x10, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_getindependent
SOAP_FMAC4 soap_getindependent(struct soap *soap)
{
	int t;
	if (soap->version == 1)
	{	for (;;)
		{	if (!soap_getelement(soap, &t))
				if (soap->error || soap_ignore_element(soap))
					break;
		}
	}
	if (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF)
		soap->error = SOAP_OK;
	return soap->error;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x1, 0x2(%rdi)
jne 0x3aca
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3af2
testq %rax, %rax
jne 0x3aa5
cmpl $0x0, 0x19214(%rbx)
jne 0x3aca
movq %rbx, %rdi
callq 0x6a16
testl %eax, %eax
je 0x3aa5
movl 0x19214(%rbx), %eax
cmpl $0x6, %eax
je 0x3ada
cmpl $-0x1, %eax
jne 0x3ae4
movl $0x0, 0x19214(%rbx)
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq