LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: sam_parse_Bc_vals
HTS_ALIGN32
static char *sam_parse_Bc_vals(bam1_t *b, char *q, uint32_t *nused,
                               uint32_t *nalloc, int *overflow) {
    while (*q == ',') {
        if ((*nused)++ >= (*nalloc)) {
            if (grow_B_array(b, nalloc, 1) < 0)
                return NULL;
        }
        *(b->data + b->l_data) = hts_str2int(q + 1, &q, 8, overflow);
        b->l_data++;
    }
    return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x2c, (%rsi)
jne 0x32450
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movl (%r12), %ecx
leal 0x1(%rcx), %eax
movl %eax, (%r12)
movl (%r15), %eax
cmpl %eax, %ecx
jb 0x32306
cmpl $0x553f7ced, %eax       # imm = 0x553F7CED
jae 0x3241a
movl %eax, %ecx
shrl %ecx
movslq 0x40(%r13), %rsi
addq %rcx, %rsi
setb %dl
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
ja 0x32429
testb %dl, %dl
jne 0x32429
movl 0x44(%r13), %edx
cmpq %rdx, %rsi
jbe 0x32301
movq %r13, %rdi
callq 0x22a64
testl %eax, %eax
js 0x32434
movl (%r15), %eax
movl %eax, %ecx
shrl %ecx
addl %eax, %ecx
movl %ecx, (%r15)
movzbl 0x1(%rbx), %eax
cmpl $0x2b, %eax
je 0x3234e
cmpl $0x2d, %eax
jne 0x32354
leaq 0x2(%rbx), %rcx
addq $0x4, %rbx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rcx,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
jae 0x323f7
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,2), %rax
addq $-0x30, %rax
incq %rdx
cmpl $0x2, %edx
jne 0x32320
movl $0x80, %edx
xorl %ecx, %ecx
jmp 0x3238e
addq $0x2, %rbx
jmp 0x32357
incq %rbx
movq %rbx, %rcx
addq $0x2, %rbx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rcx,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x323fa
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,2), %rax
addq $-0x30, %rax
incq %rdx
cmpl $0x2, %edx
jne 0x32362
movl $0x7f, %edx
movb $0x1, %cl
movzbl (%rbx), %edi
cmpl $0x30, %edi
jb 0x323cc
addl $-0x30, %edi
cmpl $0x9, %edi
ja 0x323cc
leaq -0x78(%rdx), %rsi
movl %edi, %edi
cmpq $0xb, %rax
jbe 0x323b5
cmpq $0xc, %rax
jne 0x323d5
cmpq %rdi, %rsi
jb 0x323d5
leaq (%rax,%rax,4), %rax
leaq (%rdi,%rax,2), %rax
movzbl 0x1(%rbx), %edi
incq %rbx
addl $-0x30, %edi
cmpl $0xa, %edi
jb 0x323a2
testb %cl, %cl
jne 0x32400
negq %rax
jmp 0x32400
movzbl 0x1(%rbx), %eax
incq %rbx
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x323d5
movl $0x1, (%r14)
testb %cl, %cl
jne 0x323f2
negq %rdx
movq %rdx, %rax
jmp 0x32400
negq %rax
addq %rdx, %rcx
movq %rcx, %rbx
movq 0x38(%r13), %rcx
movslq 0x40(%r13), %rdx
movb %al, (%rcx,%rdx)
incl 0x40(%r13)
cmpb $0x2c, (%rbx)
je 0x322a1
jmp 0x32450
callq 0x4050
movl $0xc, (%rax)
xorl %ebx, %ebx
jmp 0x32450
callq 0x4050
movl $0xc, (%rax)
leaq 0x66203(%rip), %rsi     # 0x9863e
leaq 0x65253(%rip), %rdx     # 0x97695
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: sam_parse_BC_vals
HTS_ALIGN32
static char *sam_parse_BC_vals(bam1_t *b, char *q, uint32_t *nused,
                               uint32_t *nalloc, int *overflow) {
    while (*q == ',') {
        if ((*nused)++ >= (*nalloc)) {
            if (grow_B_array(b, nalloc, 1) < 0)
                return NULL;
        }
        if (q[1] != '-') {
            *(b->data + b->l_data) = hts_str2uint(q + 1, &q, 8, overflow);
            b->l_data++;
        } else {
            *overflow = 1;
            q++;
            skip_to_comma_(q);
        }
    }
    return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x2c, (%rsi)
jne 0x325ef
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movl (%r12), %ecx
leal 0x1(%rcx), %eax
movl %eax, (%r12)
movl (%r15), %eax
cmpl %eax, %ecx
jb 0x324e6
cmpl $0x553f7ced, %eax       # imm = 0x553F7CED
jae 0x325b9
movl %eax, %ecx
shrl %ecx
movslq 0x40(%r13), %rsi
addq %rcx, %rsi
setb %dl
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
ja 0x325c8
testb %dl, %dl
jne 0x325c8
movl 0x44(%r13), %edx
cmpq %rdx, %rsi
jbe 0x324e1
movq %r13, %rdi
callq 0x22a64
testl %eax, %eax
js 0x325d3
movl (%r15), %eax
movl %eax, %ecx
shrl %ecx
addl %eax, %ecx
movl %ecx, (%r15)
movb 0x1(%rbx), %al
cmpb $0x2d, %al
jne 0x3250b
movl $0x1, (%r14)
movb 0x1(%rbx), %al
incq %rbx
cmpb $0xa, %al
jl 0x325af
cmpb $0x2c, %al
jne 0x324f4
jmp 0x325af
incq %rbx
xorl %edx, %edx
cmpb $0x2b, %al
sete %dl
leaq (%rbx,%rdx), %rcx
addq %rdx, %rbx
addq $0x2, %rbx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rcx,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x32598
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,2), %rax
addq $-0x30, %rax
incq %rdx
cmpl $0x2, %edx
jne 0x32524
movzbl (%rbx), %ecx
leal -0x3a(%rcx), %edx
cmpl $-0xa, %edx
jb 0x3259e
addl $-0x30, %ecx
cmpq $0x19, %rax
jb 0x32560
jne 0x3257b
cmpl $0x6, %ecx
jae 0x3257b
movl %ecx, %ecx
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,2), %rax
movzbl 0x1(%rbx), %ecx
incq %rbx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x32553
jmp 0x3259e
movzbl 0x1(%rbx), %eax
incq %rbx
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x3257b
movl $0x1, (%r14)
movl $0xff, %eax
jmp 0x3259e
addq %rdx, %rcx
movq %rcx, %rbx
movq 0x38(%r13), %rcx
movslq 0x40(%r13), %rdx
movb %al, (%rcx,%rdx)
incl 0x40(%r13)
movb (%rbx), %al
cmpb $0x2c, %al
je 0x32481
jmp 0x325ef
callq 0x4050
movl $0xc, (%rax)
xorl %ebx, %ebx
jmp 0x325ef
callq 0x4050
movl $0xc, (%rax)
leaq 0x66064(%rip), %rsi     # 0x9863e
leaq 0x650b4(%rip), %rdx     # 0x97695
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: sam_parse_Bs_vals
HTS_ALIGN32
static char *sam_parse_Bs_vals(bam1_t *b, char *q, uint32_t *nused,
                               uint32_t *nalloc, int *overflow) {
    while (*q == ',') {
        if ((*nused)++ >= (*nalloc)) {
            if (grow_B_array(b, nalloc, 2) < 0)
                return NULL;
        }
        i16_to_le(hts_str2int(q + 1, &q, 16, overflow),
                  b->data + b->l_data);
        b->l_data += 2;
    }
    return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x2c, (%rsi)
jne 0x327df
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movl (%r12), %ecx
leal 0x1(%rcx), %eax
movl %eax, (%r12)
movl (%r15), %eax
cmpl %eax, %ecx
jb 0x3268a
cmpl $0x553f7ced, %eax       # imm = 0x553F7CED
jae 0x327a9
movl %eax, %ecx
andl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
movslq 0x40(%r13), %rsi
addq %rcx, %rsi
setb %cl
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
ja 0x327b8
testb %cl, %cl
jne 0x327b8
movl 0x44(%r13), %ecx
cmpq %rcx, %rsi
jbe 0x32681
movq %r13, %rdi
callq 0x22a64
testl %eax, %eax
js 0x327c3
movl (%r15), %eax
movl %eax, %ecx
shrl %ecx
addl %eax, %ecx
movl %ecx, (%r15)
movzbl 0x1(%rbx), %eax
cmpl $0x2b, %eax
je 0x326d2
cmpl $0x2d, %eax
jne 0x326d8
leaq 0x2(%rbx), %rcx
addq $0x6, %rbx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rcx,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
jae 0x32782
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,2), %rax
addq $-0x30, %rax
incq %rdx
cmpl $0x4, %edx
jne 0x326a4
movl $0x8000, %edx           # imm = 0x8000
xorl %ecx, %ecx
jmp 0x32712
addq $0x2, %rbx
jmp 0x326db
incq %rbx
movq %rbx, %rcx
addq $0x4, %rbx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rcx,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x32785
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,2), %rax
addq $-0x30, %rax
incq %rdx
cmpl $0x4, %edx
jne 0x326e6
movl $0x7fff, %edx           # imm = 0x7FFF
movb $0x1, %cl
movzbl (%rbx), %edi
cmpl $0x30, %edi
jb 0x32757
addl $-0x30, %edi
cmpl $0x9, %edi
ja 0x32757
leaq -0x7ff8(%rdx), %rsi
movl %edi, %edi
cmpq $0xccb, %rax            # imm = 0xCCB
jbe 0x32740
cmpq $0xccc, %rax            # imm = 0xCCC
jne 0x32760
cmpq %rdi, %rsi
jb 0x32760
leaq (%rax,%rax,4), %rax
leaq (%rdi,%rax,2), %rax
movzbl 0x1(%rbx), %edi
incq %rbx
addl $-0x30, %edi
cmpl $0xa, %edi
jb 0x32729
testb %cl, %cl
jne 0x3278b
negq %rax
jmp 0x3278b
movzbl 0x1(%rbx), %eax
incq %rbx
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x32760
movl $0x1, (%r14)
testb %cl, %cl
jne 0x3277d
negq %rdx
movq %rdx, %rax
jmp 0x3278b
negq %rax
addq %rdx, %rcx
movq %rcx, %rbx
movq 0x38(%r13), %rcx
movslq 0x40(%r13), %rdx
movw %ax, (%rcx,%rdx)
leal 0x2(%rdx), %eax
movl %eax, 0x40(%r13)
cmpb $0x2c, (%rbx)
je 0x32621
jmp 0x327df
callq 0x4050
movl $0xc, (%rax)
xorl %ebx, %ebx
jmp 0x327df
callq 0x4050
movl $0xc, (%rax)
leaq 0x65e74(%rip), %rsi     # 0x9863e
leaq 0x64ec4(%rip), %rdx     # 0x97695
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: sam_parse_BS_vals
HTS_ALIGN32
static char *sam_parse_BS_vals(bam1_t *b, char *q, uint32_t *nused,
                               uint32_t *nalloc, int *overflow) {
    while (*q == ',') {
        if ((*nused)++ >= (*nalloc)) {
            if (grow_B_array(b, nalloc, 2) < 0)
                return NULL;
        }
        if (q[1] != '-') {
            u16_to_le(hts_str2uint(q + 1, &q, 16, overflow),
                      b->data + b->l_data);
            b->l_data += 2;
        } else {
            *overflow = 1;
            q++;
            skip_to_comma_(q);
        }
    }
    return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x2c, (%rsi)
jne 0x32999
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movl (%r12), %ecx
leal 0x1(%rcx), %eax
movl %eax, (%r12)
movl (%r15), %eax
cmpl %eax, %ecx
jb 0x3288a
cmpl $0x553f7ced, %eax       # imm = 0x553F7CED
jae 0x32963
movl %eax, %ecx
andl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
movslq 0x40(%r13), %rsi
addq %rcx, %rsi
setb %cl
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
ja 0x32972
testb %cl, %cl
jne 0x32972
movl 0x44(%r13), %ecx
cmpq %rcx, %rsi
jbe 0x32881
movq %r13, %rdi
callq 0x22a64
testl %eax, %eax
js 0x3297d
movl (%r15), %eax
movl %eax, %ecx
shrl %ecx
addl %eax, %ecx
movl %ecx, (%r15)
movb 0x1(%rbx), %al
cmpb $0x2d, %al
jne 0x328af
movl $0x1, (%r14)
movb 0x1(%rbx), %al
incq %rbx
cmpb $0xa, %al
jl 0x32959
cmpb $0x2c, %al
jne 0x32898
jmp 0x32959
incq %rbx
xorl %edx, %edx
cmpb $0x2b, %al
sete %dl
leaq (%rbx,%rdx), %rcx
addq %rdx, %rbx
addq $0x4, %rbx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rcx,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x3293e
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,2), %rax
addq $-0x30, %rax
incq %rdx
cmpl $0x4, %edx
jne 0x328c8
movzbl (%rbx), %ecx
leal -0x3a(%rcx), %edx
cmpl $-0xa, %edx
jb 0x32944
addl $-0x30, %ecx
cmpq $0x1999, %rax           # imm = 0x1999
jb 0x32906
jne 0x32921
cmpl $0x6, %ecx
jae 0x32921
movl %ecx, %ecx
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,2), %rax
movzbl 0x1(%rbx), %ecx
incq %rbx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x328f7
jmp 0x32944
movzbl 0x1(%rbx), %eax
incq %rbx
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x32921
movl $0x1, (%r14)
movl $0xffff, %eax           # imm = 0xFFFF
jmp 0x32944
addq %rdx, %rcx
movq %rcx, %rbx
movq 0x38(%r13), %rcx
movslq 0x40(%r13), %rdx
movw %ax, (%rcx,%rdx)
leal 0x2(%rdx), %eax
movl %eax, 0x40(%r13)
movb (%rbx), %al
cmpb $0x2c, %al
je 0x32821
jmp 0x32999
callq 0x4050
movl $0xc, (%rax)
xorl %ebx, %ebx
jmp 0x32999
callq 0x4050
movl $0xc, (%rax)
leaq 0x65cba(%rip), %rsi     # 0x9863e
leaq 0x64d0a(%rip), %rdx     # 0x97695
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopw %cs:(%rax,%rax)
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: sam_parse_BI_vals
HTS_ALIGN32
static char *sam_parse_BI_vals(bam1_t *b, char *q, uint32_t *nused,
                               uint32_t *nalloc, int *overflow) {
    while (*q == ',') {
        if ((*nused)++ >= (*nalloc)) {
            if (grow_B_array(b, nalloc, 4) < 0)
                return NULL;
        }
        if (q[1] != '-') {
            u32_to_le(hts_str2uint(q + 1, &q, 32, overflow),
                      b->data + b->l_data);
            b->l_data += 4;
        } else {
            *overflow = 1;
            q++;
            skip_to_comma_(q);
        }
    }
    return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r13
cmpb $0x2c, (%rsi)
jne 0x32d8c
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
movl (%r15), %ecx
leal 0x1(%rcx), %eax
movl %eax, (%r15)
movl (%r14), %eax
cmpl %eax, %ecx
jb 0x32c6e
cmpl $0x553f7ced, %eax       # imm = 0x553F7CED
jae 0x32d54
movl %eax, %ecx
shrl %ecx
leaq (,%rcx,4), %rdx
movslq 0x40(%r12), %rsi
addq %rdx, %rsi
setb %dl
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
ja 0x32d64
testb %dl, %dl
jne 0x32d64
movl 0x44(%r12), %edx
cmpq %rdx, %rsi
jbe 0x32c69
movq %r12, %rdi
callq 0x22a64
testl %eax, %eax
js 0x32d6f
movl (%r14), %eax
movl %eax, %ecx
shrl %ecx
addl %eax, %ecx
movl %ecx, (%r14)
movb 0x1(%r13), %al
cmpb $0x2d, %al
jne 0x32c96
movl $0x1, (%rbx)
movb 0x1(%r13), %cl
incq %r13
cmpb $0xa, %cl
jl 0x32d49
cmpb $0x2c, %cl
jne 0x32c7c
jmp 0x32d49
leaq 0x1(%r13), %rcx
xorl %edx, %edx
cmpb $0x2b, %al
sete %dl
leaq (%rcx,%rdx), %rax
addq $0x9, %rax
addq %rdx, %r13
movl $0x1, %edx
xorl %ecx, %ecx
movzbl (%r13,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x32d2b
leaq (%rcx,%rcx,4), %rcx
leaq (%rsi,%rcx,2), %rcx
addq $-0x30, %rcx
incq %rdx
cmpl $0xa, %edx
jne 0x32cb3
movzbl (%rax), %edx
leal -0x3a(%rdx), %esi
cmpl $-0xa, %esi
jb 0x32d31
addl $-0x30, %edx
cmpq $0x19999999, %rcx       # imm = 0x19999999
jb 0x32cf4
jne 0x32d0f
cmpl $0x6, %edx
jae 0x32d0f
movl %edx, %edx
leaq (%rcx,%rcx,4), %rcx
leaq (%rdx,%rcx,2), %rcx
movzbl 0x1(%rax), %edx
incq %rax
addl $-0x30, %edx
cmpl $0xa, %edx
jb 0x32ce4
jmp 0x32d31
movzbl 0x1(%rax), %ecx
incq %rax
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x32d0f
movl $0x1, (%rbx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x32d31
addq %rdx, %r13
movq %r13, %rax
movq 0x38(%r12), %rdx
movslq 0x40(%r12), %rsi
movl %ecx, (%rdx,%rsi)
addl $0x4, 0x40(%r12)
movb (%rax), %cl
movq %rax, %r13
cmpb $0x2c, %cl
je 0x32c01
jmp 0x32d8c
callq 0x4050
movl $0xc, (%rax)
xorl %r13d, %r13d
jmp 0x32d8c
callq 0x4050
movl $0xc, (%rax)
leaq 0x658c8(%rip), %rsi     # 0x9863e
leaq 0x64918(%rip), %rdx     # 0x97695
xorl %r13d, %r13d
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: sam_parse_Bf_vals
HTS_ALIGN32
static char *sam_parse_Bf_vals(bam1_t *b, char *q, uint32_t *nused,
                               uint32_t *nalloc, int *overflow) {
    while (*q == ',') {
        if ((*nused)++ >= (*nalloc)) {
            if (grow_B_array(b, nalloc, 4) < 0)
                return NULL;
        }
        float_to_le(strtod(q + 1, &q), b->data + b->l_data);
        b->l_data += 4;
    }
    return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rsi, 0x8(%rsp)
cmpb $0x2c, (%rsi)
jne 0x32e96
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movl (%r15), %ecx
leal 0x1(%rcx), %eax
movl %eax, (%r15)
movl (%r14), %eax
cmpl %eax, %ecx
jb 0x32e29
cmpl $0x553f7ced, %eax       # imm = 0x553F7CED
jae 0x32e60
movl %eax, %ecx
shrl %ecx
leaq (,%rcx,4), %rdx
movslq 0x40(%r12), %rsi
addq %rdx, %rsi
setb %dl
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
ja 0x32e6f
testb %dl, %dl
jne 0x32e6f
movl 0x44(%r12), %edx
cmpq %rdx, %rsi
jbe 0x32e24
movq %r12, %rdi
callq 0x22a64
testl %eax, %eax
js 0x32e7a
movl (%r14), %eax
movl %eax, %ecx
shrl %ecx
addl %eax, %ecx
movl %ecx, (%r14)
incq %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4350
cvtsd2ss %xmm0, %xmm0
movq 0x38(%r12), %rax
movslq 0x40(%r12), %rcx
movss %xmm0, (%rax,%rcx)
addl $0x4, 0x40(%r12)
movq 0x8(%rsp), %rbx
cmpb $0x2c, (%rbx)
je 0x32dcc
jmp 0x32e96
callq 0x4050
movl $0xc, (%rax)
xorl %ebx, %ebx
jmp 0x32e96
callq 0x4050
movl $0xc, (%rax)
leaq 0x657bd(%rip), %rsi     # 0x9863e
leaq 0x6480d(%rip), %rdx     # 0x97695
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: sam_state_err
static void sam_state_err(SAM_state *fd, int errcode) {
    pthread_mutex_lock(&fd->command_m);
    if (!fd->errcode)
        fd->errcode = errcode;
    pthread_mutex_unlock(&fd->command_m);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x78(%rdi), %rbx
movq %rbx, %rdi
callq 0x4750
cmpl $0x0, 0xd4(%r14)
jne 0x32ecd
movl %ebp, 0xd4(%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4340
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/./htslib/kstring.h
// Function: kputsn_
static inline int kputsn_(const void *p, size_t l, kstring_t *s)
{
	size_t new_sz = s->l + l;
	if (new_sz < s->l) { errno = EOVERFLOW; return EOF; }
	if (ks_resize(s, new_sz ? new_sz : 1) < 0) return EOF;
	memcpy(s->s + s->l, p, l);
	s->l += l;
	return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq (%rdx), %rdi
movq %rdi, %rax
addq %rsi, %rax
jae 0x338df
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x33940
movq %rdx, %r14
movq %rsi, %rbx
cmpq $0x1, %rax
movq %rax, %rcx
adcq $0x0, %rcx
cmpq %rcx, 0x8(%rdx)
jae 0x3392b
shrq $0x3e, %rax
movq %rcx, %rdx
shrq %rdx
xorl %r12d, %r12d
testq %rax, %rax
cmoveq %rdx, %r12
addq %rcx, %r12
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x338d8
movq %rax, 0x10(%r14)
movq %r12, 0x8(%r14)
movq (%r14), %rdi
jmp 0x3392f
movq 0x10(%r14), %rax
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x43c0
addq %rbx, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam_mods.c
// Function: bam_mods_at_qpos
int bam_mods_at_qpos(const bam1_t *b, int qpos, hts_base_mod_state *state,
                    hts_base_mod *mods, int n_mods) {
    // FIXME: for now this is inefficient in implementation.
    int r = 0;
    while (state->seq_pos <= qpos)
        if ((r = bam_mods_at_next_pos(b, state, mods, n_mods)) < 0)
            break;

    return r;
}

// Assembly:
xorl %eax, %eax
cmpl %esi, 0x2d00(%rdx)
jg 0x3497f
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x34290
testl %eax, %eax
js 0x34977
cmpl %ebp, 0x2d00(%r15)
jle 0x3495a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam_mods.c
// Function: bam_mods_query_type
int bam_mods_query_type(hts_base_mod_state *state, int code,
                        int *strand, int *implicit, char *canonical) {
    // Find code entry
    int i;
    for (i = 0; i < state->nmods; i++) {
        if (state->type[i] == code)
            break;
    }
    if (i == state->nmods)
        return -1;

    // Return data
    if (strand)    *strand    = state->strand[i];
    if (implicit)  *implicit  = state->implicit[i];
    if (canonical) *canonical = "?AC?G???T??????N"[state->canonical[i]];

    return 0;
}

// Assembly:
movslq 0x2d04(%rdi), %r10
xorl %r9d, %r9d
testq %r10, %r10
jle 0x349af
cmpl %esi, (%rdi,%r9,4)
je 0x349af
incq %r9
cmpq %r9, %r10
jne 0x3499b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r10d, %r9d
je 0x349ae
movl %r9d, %esi
testq %rdx, %rdx
je 0x349cb
movsbl 0x800(%rdi,%rsi), %eax
movl %eax, (%rdx)
testq %rcx, %rcx
je 0x349d9
movl 0x2900(%rdi,%rsi,4), %eax
movl %eax, (%rcx)
xorl %eax, %eax
testq %r8, %r8
je 0x349ae
movslq 0x400(%rdi,%rsi,4), %rcx
leaq 0x6412e(%rip), %rdx     # 0x98b1d
movb (%rcx,%rdx), %cl
movb %cl, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam_mods.c
// Function: bam_mods_queryi
int bam_mods_queryi(hts_base_mod_state *state, int i,
                    int *strand, int *implicit, char *canonical) {
    if (i < 0 || i >= state->nmods)
        return -1;

    // Return data
    if (strand)    *strand    = state->strand[i];
    if (implicit)  *implicit  = state->implicit[i];
    if (canonical) *canonical = "?AC?G???T??????N"[state->canonical[i]];

    return 0;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %esi, %esi
js 0x34a42
cmpl %esi, 0x2d04(%rdi)
jle 0x34a42
movl %esi, %esi
testq %rdx, %rdx
je 0x34a18
movsbl 0x800(%rdi,%rsi), %eax
movl %eax, (%rdx)
testq %rcx, %rcx
je 0x34a26
movl 0x2900(%rdi,%rsi,4), %eax
movl %eax, (%rcx)
xorl %eax, %eax
testq %r8, %r8
je 0x34a42
movslq 0x400(%rdi,%rsi,4), %rcx
leaq 0x640e1(%rip), %rdx     # 0x98b1d
movb (%rcx,%rdx), %cl
movb %cl, (%r8)
retq
nop
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/textutils.c
// Function: hts_decode_percent
int hts_decode_percent(char *dest, size_t *destlen, const char *s)
{
    char *d = dest;
    int hi, lo;

    while (*s) {
        if (*s == '%' && (hi = dehex(s[1])) >= 0 && (lo = dehex(s[2])) >= 0) {
            *d++ = (hi << 4) | lo;
            s += 3;
        }
        else *d++ = *s++;
    }

    *d = '\0';
    *destlen = d - dest;
    return 0;
}

// Assembly:
xorl %eax, %eax
movzbl (%rdx), %ecx
cmpl $0x25, %ecx
je 0x34b8b
testl %ecx, %ecx
jne 0x34c0c
jmp 0x34c1a
movsbl 0x1(%rdx), %r8d
leal -0x61(%r8), %r9d
cmpb $0x5, %r9b
ja 0x34ba0
addl $-0x57, %r8d
jmp 0x34bbe
leal -0x41(%r8), %r9d
cmpb $0x5, %r9b
ja 0x34bb0
addl $-0x37, %r8d
jmp 0x34bbe
leal -0x30(%r8), %r9d
cmpb $0x9, %r9b
ja 0x34c0c
addl $-0x30, %r8d
testl %r8d, %r8d
js 0x34c0c
movsbl 0x2(%rdx), %r9d
leal -0x61(%r9), %r10d
cmpb $0x5, %r10b
ja 0x34bd8
addl $-0x57, %r9d
jmp 0x34bf6
leal -0x41(%r9), %r10d
cmpb $0x5, %r10b
ja 0x34be8
addl $-0x37, %r9d
jmp 0x34bf6
leal -0x30(%r9), %r10d
cmpb $0x9, %r10b
ja 0x34c0c
addl $-0x30, %r9d
testl %r9d, %r9d
js 0x34c0c
shll $0x4, %r8d
orl %r8d, %r9d
movb %r9b, (%rdi,%rax)
addq $0x3, %rdx
jmp 0x34c12
incq %rdx
movb %cl, (%rdi,%rax)
incq %rax
jmp 0x34b76
movb $0x0, (%rdi,%rax)
movq %rax, (%rsi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/textutils.c
// Function: hts_decode_base64
int hts_decode_base64(char *dest, size_t *destlen, const char *s)
{
    char *d = dest;
    int x0, x1, x2, x3;

    while (1) {
        x0 = debase64(*s++);
        x1 = (x0 >= 0)? debase64(*s++) : -1;
        x2 = (x1 >= 0)? debase64(*s++) : -1;
        x3 = (x2 >= 0)? debase64(*s++) : -1;
        if (x3 < 0) break;

        *d++ = (x0 << 2) | (x1 >> 4);
        *d++ = (x1 << 4) | (x2 >> 2);
        *d++ = (x2 << 6) | x3;
    }

    if (x1 >= 0) *d++ = (x0 << 2) | (x1 >> 4);
    if (x2 >= 0) *d++ = (x1 << 4) | (x2 >> 2);

    *destlen = d - dest;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, (%rsp)
movq %rdi, %rbx
movsbl (%rdx), %edi
callq 0x34d24
movq %rbx, %r14
testl %eax, %eax
js 0x34d09
movl %eax, %r12d
addq $0x4, %r15
movq %rbx, %r14
movsbl -0x3(%r15), %edi
callq 0x34d24
testl %eax, %eax
js 0x34d09
movl %eax, %ebp
movsbl -0x2(%r15), %edi
callq 0x34d24
testl %eax, %eax
js 0x34cd9
movl %eax, %r13d
movsbl -0x1(%r15), %edi
callq 0x34d24
shll $0x2, %r12d
movl %ebp, %ecx
shrl $0x4, %ecx
orl %r12d, %ecx
testl %eax, %eax
js 0x34ced
movb %cl, (%r14)
shll $0x4, %ebp
movl %r13d, %ecx
shrl $0x2, %ecx
orl %ebp, %ecx
movb %cl, 0x1(%r14)
shll $0x6, %r13d
orl %r13d, %eax
movb %al, 0x2(%r14)
addq $0x3, %r14
movsbl (%r15), %edi
callq 0x34d24
movl %eax, %r12d
addq $0x4, %r15
testl %eax, %eax
jns 0x34c63
jmp 0x34d09
shll $0x2, %r12d
shrl $0x4, %ebp
orl %r12d, %ebp
movl $0x1, %ecx
movq %r14, %rax
jmp 0x34d03
leaq 0x1(%r14), %rax
movb %cl, (%r14)
shll $0x4, %ebp
shrl $0x2, %r13d
orl %r13d, %ebp
movl $0x2, %ecx
addq %rcx, %r14
movb %bpl, (%rax)
subq %rbx, %r14
movq (%rsp), %rax
movq %r14, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/textutils.c
// Function: debase64
static int debase64(char c)
{
    if (c >= 'a' && c <= 'z') return c - 'a' + 26;
    else if (c >= 'A' && c <= 'Z') return c - 'A';
    else if (c >= '0' && c <= '9') return c - '0' + 52;
    else if (c == '/') return 63;
    else if (c == '+') return 62;
    else return -1;  // Hence debase64('\0') = -1
}

// Assembly:
movl %edi, %eax
leal -0x61(%rax), %ecx
cmpb $0x19, %cl
ja 0x34d32
addl $-0x47, %eax
retq
leal -0x41(%rax), %ecx
cmpb $0x19, %cl
ja 0x34d3e
addl $-0x41, %eax
retq
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x34d4a
addl $0x4, %eax
retq
xorl %ecx, %ecx
cmpb $0x2b, %al
setne %cl
negl %ecx
orl $0x3e, %ecx
cmpb $0x2f, %al
movl $0x3f, %eax
cmovnel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/textutils.c
// Function: token_type
static char token_type(hts_json_token *token)
{
    const char *s = token->str;

    switch (*s) {
    case 'f':
        return (strcmp(s, "false") == 0)? 'b' : '?';
    case 'n':
        return (strcmp(s, "null") == 0)? '.' : '?';
    case 't':
        return (strcmp(s, "true") == 0)? 'b' : '?';
    case '-':
    case '0': case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9':
        return 'n';
    default:
        return '?';
    }
}

// Assembly:
pushq %rax
movzbl (%rdi), %ecx
movb $0x6e, %al
leal -0x30(%rcx), %edx
cmpl $0xa, %edx
jb 0x350a7
cmpl $0x6d, %ecx
jg 0x35069
cmpl $0x2d, %ecx
je 0x350a7
cmpl $0x66, %ecx
jne 0x35088
leaq 0x61e88(%rip), %rsi     # 0x96eef
jmp 0x3507a
cmpl $0x6e, %ecx
je 0x3508c
cmpl $0x74, %ecx
jne 0x35088
leaq 0x63d8f(%rip), %rsi     # 0x98e09
callq 0x46c0
testl %eax, %eax
movl $0x62, %ecx
jmp 0x3509f
movb $0x3f, %al
jmp 0x350a7
leaq 0x63d71(%rip), %rsi     # 0x98e04
callq 0x46c0
testl %eax, %eax
movl $0x2e, %ecx
movl $0x3f, %eax
cmovel %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/textutils.c
// Function: hts_json_sskip_value
static char skip_value(char type, hts_json_nextfn *next, void *arg1, void *arg2)
{
    hts_json_token token;
    int level;

    switch (type? type : next(arg1, arg2, &token)) {
    case '\0':
        return '\0';

    case '?':
    case '}':
    case ']':
        return '?';

    case '{':
    case '[':
        level = 1;
        break;

    default:
        return 'v';
    }

    while (level > 0)
        switch (next(arg1, arg2, &token)) {
        case '\0':
            return '\0';

        case '?':
            return '?';

        case '{':
        case '[':
            level++;
            break;

        case '}':
        case ']':
            --level;
            break;

        default:
            break;
        }

    return 'v';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %eax
movq %rsi, %rbx
movq %rdi, %r14
testb %al, %al
jne 0x358d2
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34d7d
movzbl %al, %ecx
leal -0x3f(%rcx), %edx
cmpl $0x3e, %edx
ja 0x3594c
movabsq $0x4000000040000001, %rsi # imm = 0x4000000040000001
btq %rdx, %rsi
jae 0x358f1
movb $0x3f, %al
jmp 0x35952
movabsq $0x1000000010000000, %rsi # imm = 0x1000000010000000
btq %rdx, %rsi
jae 0x3594c
movl $0x1, %ebp
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x34d7d
movzbl %al, %eax
cmpl $0x5c, %eax
jg 0x35931
cmpl $0x5b, %eax
je 0x35940
testl %eax, %eax
je 0x35952
cmpl $0x3f, %eax
jne 0x35946
jmp 0x35952
cmpl $0x5d, %eax
je 0x35944
cmpl $0x7d, %eax
je 0x35944
cmpl $0x7b, %eax
jne 0x35946
incl %ebp
jmp 0x35946
decl %ebp
testl %ebp, %ebp
jg 0x3590b
jmp 0x35950
testl %ecx, %ecx
je 0x35952
movb $0x76, %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/textutils.c
// Function: stringify_argv
char *stringify_argv(int argc, char *argv[]) {
    char *str, *cp;
    size_t nbytes = 1;
    int i, j;

    /* Allocate */
    for (i = 0; i < argc; i++) {
        if (i > 0) nbytes += 1;
        nbytes += strlen(argv[i]);
    }
    if (!(str = malloc(nbytes)))
        return NULL;

    /* Copy */
    cp = str;
    for (i = 0; i < argc; i++) {
        if (i > 0) *cp++ = ' ';
        j = 0;
        while (argv[i][j]) {
            if (argv[i][j] == '\t')
                *cp++ = ' ';
            else
                *cp++ = argv[i][j];
            j++;
        }
    }
    *cp++ = 0;

    return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edi, %edi
jle 0x35ace
movq %rsi, %rbx
movl %edi, %ebp
movl %edi, %r14d
movl $0x1, %eax
xorl %r15d, %r15d
cmpq $0x1, %r15
movq %rax, %r12
sbbq $-0x1, %r12
movq (%rbx,%r15,8), %rdi
callq 0x41d0
addq %r12, %rax
incq %r15
cmpq %r15, %r14
jne 0x35a58
movq %rax, %rdi
callq 0x4680
testq %rax, %rax
je 0x35ae0
testl %ebp, %ebp
jle 0x35ae4
xorl %ecx, %ecx
movq %rax, %rdi
testq %rcx, %rcx
je 0x35a98
movb $0x20, (%rdi)
incq %rdi
movq %rdi, %rdx
xorl %esi, %esi
movq (%rbx,%rcx,8), %rdi
movzbl (%rdi,%rsi), %edi
movb $0x20, %r8b
cmpl $0x9, %edi
je 0x35ab4
testl %edi, %edi
je 0x35abd
movl %edi, %r8d
movb %r8b, (%rdx,%rsi)
incq %rsi
jmp 0x35a9d
incq %rcx
leaq (%rdx,%rsi), %rdi
cmpq %r14, %rcx
jne 0x35a8d
addq %rsi, %rdx
jmp 0x35ae7
movl $0x1, %edi
callq 0x4680
movq %rax, %rdx
testq %rax, %rax
jne 0x35ae7
xorl %eax, %eax
jmp 0x35aea
movq %rax, %rdx
movb $0x0, (%rdx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/textutils.c
// Function: encode_utf8
static char *encode_utf8(char *s, unsigned x)
{
    if (x >= 0x10000) {
        *s++ = 0xF0 | (x >> 18);
        *s++ = 0x80 | ((x >> 12) & 0x3F);
        *s++ = 0x80 | ((x >> 6) & 0x3F);
        *s++ = 0x80 | (x & 0x3F);
    }
    else if (x >= 0x800) {
        *s++ = 0xE0 | (x >> 12);
        *s++ = 0x80 | ((x >> 6) & 0x3F);
        *s++ = 0x80 | (x & 0x3F);
    }
    else if (x >= 0x80) {
        *s++ = 0xC0 | (x >> 6);
        *s++ = 0x80 | (x & 0x3F);
    }
    else *s++ = x;

    return s;
}

// Assembly:
movq %rdi, %rax
cmpl $0x10000, %esi          # imm = 0x10000
jb 0x35cd3
movl %esi, %ecx
shrl $0x12, %ecx
orb $-0x10, %cl
movb %cl, (%rax)
movl %esi, %ecx
shrl $0xc, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
movl %esi, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%rax)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x3(%rax)
addq $0x4, %rax
retq
cmpl $0x800, %esi            # imm = 0x800
jb 0x35d04
movl %esi, %ecx
shrl $0xc, %ecx
orb $-0x20, %cl
movb %cl, (%rax)
movl %esi, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x2(%rax)
addq $0x3, %rax
retq
cmpl $0x80, %esi
jb 0x35d27
movl %esi, %ecx
shrl $0x6, %ecx
orb $-0x40, %cl
movb %cl, (%rax)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rax)
addq $0x2, %rax
retq
movb %sil, (%rax)
incq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_worker_id
int hts_tpool_worker_id(hts_tpool *p) {
    if (!p)
        return -1;
    pthread_t s = pthread_self();
    int i;
    for (i = 0; i < p->tsize; i++) {
        if (pthread_equal(s, p->t[i].tid))
            return i;
    }
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x35d82
movq %rdi, %r15
callq 0x4400
movslq 0x18(%r15), %r12
testq %r12, %r12
jle 0x35d82
movq %rax, %r14
movq 0x20(%r15), %r15
addq $0x10, %r15
xorl %r13d, %r13d
movq (%r15), %rsi
movq %r14, %rdi
callq 0x48d0
testl %eax, %eax
jne 0x35d7f
incq %r13
addq $0x48, %r15
cmpq %r13, %r12
jne 0x35d62
jmp 0x35d82
movl %r13d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_next_result
hts_tpool_result *hts_tpool_next_result(hts_tpool_process *q) {
    hts_tpool_result *r;

    DBG_OUT(stderr, "Requesting next result on queue %p\n", q);

    pthread_mutex_lock(&q->p->pool_m);
    r = hts_tpool_next_result_locked(q);
    pthread_mutex_unlock(&q->p->pool_m);

    DBG_OUT(stderr, "(q=%p) Found %p\n", q, r);

    return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x38, %rdi
callq 0x4750
movq %rbx, %rdi
callq 0x35dc3
movq %rax, %r14
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4340
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_next_result_locked
static hts_tpool_result *hts_tpool_next_result_locked(hts_tpool_process *q) {
    hts_tpool_result *r, *last;

    if (q->shutdown)
        return NULL;

    for (last = NULL, r = q->output_head; r; last = r, r = r->next) {
        if (r->serial == q->next_serial)
            break;
    }

    if (r) {
        // Remove r from out linked list
        if (q->output_head == r)
            q->output_head = r->next;
        else
            last->next = r->next;

        if (q->output_tail == r)
            q->output_tail = last;

        if (!q->output_head)
            q->output_tail = NULL;

        q->next_serial++;
        q->n_output--;

        if (q->qsize && q->n_output < q->qsize) {
            // Not technically input full, but can guarantee there is
            // room for the input to go somewhere so we still signal.
            // The waiting code will then check the condition again.
            if (q->n_input < q->qsize)
                pthread_cond_signal(&q->input_not_full_c);
            if (!q->shutdown)
                wake_next_worker(q, 1);
        }
    }

    return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x50(%rdi)
je 0x35dda
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %r14
leaq 0x18(%rdi), %rax
movq %rax, %rbx
xorl %esi, %esi
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x35dcd
movq %rsi, %rdx
movq 0x10(%rbx), %rcx
movq %rbx, %rsi
cmpq 0x30(%r14), %rcx
jne 0x35de6
cmpq %rbx, 0x18(%r14)
movq %rdx, %rsi
cmoveq %rax, %rsi
movq (%rbx), %rdi
movq %rdi, (%rsi)
cmpq %rbx, 0x20(%r14)
jne 0x35e19
movq %rdx, 0x20(%r14)
cmpq $0x0, (%rax)
jne 0x35e27
movq $0x0, 0x20(%r14)
incq %rcx
movq %rcx, 0x30(%r14)
movl 0x28(%r14), %eax
movl 0x48(%r14), %ecx
leal -0x1(%rcx), %edx
movl %edx, 0x48(%r14)
testl %eax, %eax
sete %dl
cmpl %eax, %ecx
setg %cl
orb %dl, %cl
jne 0x35dcf
cmpl %eax, 0x44(%r14)
jge 0x35e68
leaq 0x90(%r14), %rdi
callq 0x4040
cmpl $0x0, 0x50(%r14)
jne 0x35dcf
movq %r14, %rdi
callq 0x36cb8
jmp 0x35dcf
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_next_result_wait
hts_tpool_result *hts_tpool_next_result_wait(hts_tpool_process *q) {
    hts_tpool_result *r;

    pthread_mutex_lock(&q->p->pool_m);
    while (!(r = hts_tpool_next_result_locked(q))) {
        /* Possible race here now avoided via _locked() call, but in case... */
        struct timeval now;
        struct timespec timeout;

        gettimeofday(&now, NULL);
        timeout.tv_sec = now.tv_sec + 10;
        timeout.tv_nsec = now.tv_usec * 1000;

        q->ref_count++;
        if (q->shutdown) {
            int rc = --q->ref_count;
            pthread_mutex_unlock(&q->p->pool_m);
            if (rc == 0)
                hts_tpool_process_destroy(q);
            return NULL;
        }
        pthread_cond_timedwait(&q->output_avail_c, &q->p->pool_m, &timeout);

        q->ref_count--;
    }
    pthread_mutex_unlock(&q->p->pool_m);

    return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x38, %rdi
callq 0x4750
movq %rbx, %rdi
callq 0x35dc3
testq %rax, %rax
jne 0x35f02
leaq 0x60(%rbx), %r14
leaq 0x10(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
xorl %esi, %esi
callq 0x4810
movq 0x10(%rsp), %rax
addq $0xa, %rax
movq %rax, (%rsp)
imulq $0x3e8, 0x18(%rsp), %rax # imm = 0x3E8
movq %rax, 0x8(%rsp)
movl 0x5c(%rbx), %r13d
leal 0x1(%r13), %eax
movl %eax, 0x5c(%rbx)
cmpl $0x0, 0x50(%rbx)
jne 0x35f22
movq (%rbx), %rsi
addq $0x38, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x47a0
decl 0x5c(%rbx)
movq %rbx, %rdi
callq 0x35dc3
testq %rax, %rax
je 0x35eaa
movq %rax, %r13
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4340
movq %r13, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %r13d, 0x5c(%rbx)
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4340
testl %r13d, %r13d
jne 0x35f3f
movq %rbx, %rdi
callq 0x35f44
xorl %r13d, %r13d
jmp 0x35f11
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_process_destroy
void hts_tpool_process_destroy(hts_tpool_process *q) {
    DBG_OUT(stderr, "Destroying results queue %p\n", q);

    if (!q)
        return;

    // Prevent dispatch from queuing up any more jobs.
    // We want to reset (and flush) the queue here, before
    // we set the shutdown flag, but we need to avoid races
    // with queue more input during reset.
    pthread_mutex_lock(&q->p->pool_m);
    q->no_more_input = 1;
    pthread_mutex_unlock(&q->p->pool_m);

    // Ensure it's fully drained before destroying the queue
    hts_tpool_process_reset(q, 0);
    pthread_mutex_lock(&q->p->pool_m);
    hts_tpool_process_detach_locked(q->p, q);
    hts_tpool_process_shutdown_locked(q);

    // Maybe a worker is scanning this queue, so delay destruction
    if (--q->ref_count > 0) {
        pthread_mutex_unlock(&q->p->pool_m);
        return;
    }

    pthread_cond_destroy(&q->output_avail_c);
    pthread_cond_destroy(&q->input_not_full_c);
    pthread_cond_destroy(&q->input_empty_c);
    pthread_cond_destroy(&q->none_processing_c);
    pthread_mutex_unlock(&q->p->pool_m);

    free(q);

    DBG_OUT(stderr, "Destroyed results queue %p\n", q);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x35fb0
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x38, %rdi
callq 0x4750
movl $0x1, 0x40(%rbx)
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4340
movq %rbx, %rdi
xorl %esi, %esi
callq 0x362ef
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4750
movq (%rbx), %rdi
movq %rbx, %rsi
callq 0x36427
movq %rbx, %rdi
callq 0x36119
movl 0x5c(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x5c(%rbx)
cmpl $0x2, %eax
jl 0x35fb2
movq (%rbx), %rdi
addq $0x38, %rdi
popq %rbx
jmp 0x4340
popq %rbx
retq
leaq 0x60(%rbx), %rdi
callq 0x49a0
leaq 0x90(%rbx), %rdi
callq 0x49a0
leaq 0xc0(%rbx), %rdi
callq 0x49a0
leaq 0xf0(%rbx), %rdi
callq 0x49a0
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4340
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_process_empty
int hts_tpool_process_empty(hts_tpool_process *q) {
    int empty;

    pthread_mutex_lock(&q->p->pool_m);
    empty = q->n_input == 0 && q->n_processing == 0 && q->n_output == 0;
    pthread_mutex_unlock(&q->p->pool_m);

    return empty;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x38, %rdi
callq 0x4750
xorl %ebp, %ebp
cmpl $0x0, 0x44(%rbx)
jne 0x3601e
cmpl $0x0, 0x4c(%rbx)
jne 0x3601e
xorl %ebp, %ebp
cmpl $0x0, 0x48(%rbx)
sete %bpl
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4340
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_process_ref_decr
void hts_tpool_process_ref_decr(hts_tpool_process *q) {
    pthread_mutex_lock(&q->p->pool_m);
    if (--q->ref_count <= 0) {
        pthread_mutex_unlock(&q->p->pool_m);
        hts_tpool_process_destroy(q);
        return;
    }

    // maybe also call destroy here if needed?
    pthread_mutex_unlock(&q->p->pool_m);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x38, %rdi
callq 0x4750
movl 0x5c(%rbx), %r14d
leal -0x1(%r14), %eax
movl %eax, 0x5c(%rbx)
movq (%rbx), %rdi
addq $0x38, %rdi
callq 0x4340
cmpl $0x1, %r14d
jg 0x36092
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x35f44
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_delete_result
void hts_tpool_delete_result(hts_tpool_result *r, int free_data) {
    if (!r)
        return;

    if (free_data && r->data)
        free(r->data);

    free(r);
}

// Assembly:
testq %rdi, %rdi
je 0x361a3
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x3619a
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3619a
callq 0x45c0
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_process_attach
void hts_tpool_process_attach(hts_tpool *p, hts_tpool_process *q) {
    pthread_mutex_lock(&p->pool_m);
    if (p->q_head) {
        q->next = p->q_head;
        q->prev = p->q_head->prev;
        p->q_head->prev->next = q;
        p->q_head->prev = q;
    } else {
        q->next = q;
        q->prev = q;
    }
    p->q_head = q;
    assert(p->q_head && p->q_head->prev && p->q_head->next);
    pthread_mutex_unlock(&p->pool_m);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x38(%rdi), %rbx
movq %rbx, %rdi
callq 0x4750
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x362a7
movq %rax, 0x120(%r14)
movq 0x128(%rax), %rcx
movq %rcx, 0x128(%r14)
movq %r14, 0x120(%rcx)
movq %r14, 0x128(%rax)
cmpq $0x0, 0x128(%r14)
movq %r14, 0x10(%r15)
jne 0x362b9
jmp 0x362d0
movq %r14, 0x120(%r14)
movq %r14, 0x128(%r14)
movq %r14, 0x10(%r15)
cmpq $0x0, 0x120(%r14)
je 0x362d0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4340
leaq 0x62b37(%rip), %rdi     # 0x98e0e
leaq 0x62b60(%rip), %rsi     # 0x98e3e
leaq 0x62b67(%rip), %rcx     # 0x98e4c
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x42f0
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_process_detach_locked
static void hts_tpool_process_detach_locked(hts_tpool *p,
                                            hts_tpool_process *q) {
    if (!p->q_head || !q->prev || !q->next)
        return;

    hts_tpool_process *curr = p->q_head, *first = curr;
    do {
        if (curr == q) {
            q->next->prev = q->prev;
            q->prev->next = q->next;
            p->q_head = q->next;
            q->next = q->prev = NULL;

            // Last one
            if (p->q_head == q)
                p->q_head = NULL;
            break;
        }

        curr = curr->next;
    } while (curr != first);
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x36490
movq 0x128(%rsi), %rcx
testq %rcx, %rcx
je 0x36490
movq 0x120(%rsi), %r8
testq %r8, %r8
je 0x36490
leaq 0x120(%rsi), %rdx
movq %rax, %r9
cmpq %rsi, %r9
je 0x36465
movq 0x120(%r9), %r9
cmpq %rax, %r9
jne 0x36452
jmp 0x36490
movq %rcx, 0x128(%r8)
movq 0x128(%rsi), %rax
movq %r8, 0x120(%rax)
movq 0x120(%rsi), %rax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
cmpq %rsi, %rax
je 0x36491
retq
movq $0x0, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_destroy
void hts_tpool_destroy(hts_tpool *p) {
    int i;

    DBG_OUT(stderr, "Destroying pool %p\n", p);

    /* Send shutdown message to worker threads */
    pthread_mutex_lock(&p->pool_m);
    p->shutdown = 1;

    DBG_OUT(stderr, "Sending shutdown request\n");

    for (i = 0; i < p->tsize; i++)
        pthread_cond_signal(&p->t[i].pending_c);

    pthread_mutex_unlock(&p->pool_m);

    DBG_OUT(stderr, "Shutdown complete\n");

    for (i = 0; i < p->tsize; i++)
        pthread_join(p->t[i].tid, NULL);

    pthread_mutex_destroy(&p->pool_m);
    for (i = 0; i < p->tsize; i++)
        pthread_cond_destroy(&p->t[i].pending_c);

    if (p->t_stack)
        free(p->t_stack);

    free(p->t);
    free(p);

    DBG_OUT(stderr, "Destroyed pool %p\n", p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0x4750
movl $0x1, 0x8(%rbx)
cmpl $0x0, 0x18(%rbx)
jle 0x36f44
movl $0x18, %r15d
xorl %r12d, %r12d
movq 0x20(%rbx), %rdi
addq %r15, %rdi
callq 0x4040
incq %r12
movslq 0x18(%rbx), %rax
addq $0x48, %r15
cmpq %rax, %r12
jl 0x36f28
movq %r14, %rdi
callq 0x4340
cmpl $0x0, 0x18(%rbx)
jle 0x36f7a
movl $0x10, %r15d
xorl %r12d, %r12d
movq 0x20(%rbx), %rax
movq (%rax,%r15), %rdi
xorl %esi, %esi
callq 0x4410
incq %r12
movslq 0x18(%rbx), %rax
addq $0x48, %r15
cmpq %rax, %r12
jl 0x36f5b
movq %r14, %rdi
callq 0x4590
cmpl $0x0, 0x18(%rbx)
jle 0x36fad
movl $0x18, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rdi
addq %r14, %rdi
callq 0x49a0
incq %r15
movslq 0x18(%rbx), %rax
addq $0x48, %r14
cmpq %rax, %r15
jl 0x36f91
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x36fbb
callq 0x45c0
movq 0x20(%rbx), %rdi
callq 0x45c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/thread_pool.c
// Function: hts_tpool_kill
void hts_tpool_kill(hts_tpool *p) {
    int i;

    DBG_OUT(stderr, "Destroying pool %p, kill=%d\n", p, kill);

    for (i = 0; i < p->tsize; i++)
        pthread_kill(p->t[i].tid, SIGINT);

    pthread_mutex_destroy(&p->pool_m);
    for (i = 0; i < p->tsize; i++)
        pthread_cond_destroy(&p->t[i].pending_c);

    if (p->t_stack)
        free(p->t_stack);

    free(p->t);
    free(p);

    DBG_OUT(stderr, "Destroyed pool %p\n", p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
jle 0x37010
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
movl $0x2, %esi
callq 0x4660
incq %r15
movslq 0x18(%rbx), %rax
addq $0x48, %r14
cmpq %rax, %r15
jl 0x36fee
leaq 0x38(%rbx), %rdi
callq 0x4590
cmpl $0x0, 0x18(%rbx)
jle 0x37044
movl $0x18, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rdi
addq %r14, %rdi
callq 0x49a0
incq %r15
movslq 0x18(%rbx), %rax
addq $0x48, %r14
cmpq %rax, %r15
jl 0x37028
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x37052
callq 0x45c0
movq 0x20(%rbx), %rdi
callq 0x45c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/cram/cram_io.h
// Function: block_append
static inline int block_append(cram_block *b, const void *s, size_t len) {
    if (block_grow(b, len) < 0)
        return -1;

    if (len) {
        memcpy(BLOCK_END(b), s, len);
        BLOCK_SIZE(b) += len;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x30(%rdi), %r12
addq %rdx, %r12
movq 0x28(%rdi), %rax
cmpq %r12, %rax
ja 0x37331
leaq 0x320(%rax), %rcx
shrq $0x2, %rcx
addq %rcx, %rax
addq $0x320, %rax            # imm = 0x320
cmpq %r12, %rax
cmovaq %rax, %r12
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x37351
movq %r12, 0x28(%r14)
movq %rax, 0x20(%r14)
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x37356
movq 0x20(%r14), %rdi
addq 0x30(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x43c0
addq %rbx, 0x30(%r14)
jmp 0x37356
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/cram/cram_io.h
// Function: block_append_char
static inline int block_append_char(cram_block *b, char c) {
    if (block_grow(b, 1) < 0)
        return -1;

    b->data[b->byte++] = c;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
leaq 0x1(%rcx), %r15
cmpq %r15, %rax
jbe 0x37382
movq 0x20(%r14), %rax
jmp 0x373be
leaq 0x320(%rax), %rcx
shrq $0x2, %rcx
addq %rcx, %rax
addq $0x320, %rax            # imm = 0x320
cmpq %r15, %rax
cmovaq %rax, %r15
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x4840
testq %rax, %rax
je 0x373cd
movq %r15, 0x28(%r14)
movq %rax, 0x20(%r14)
movq 0x30(%r14), %rcx
leaq 0x1(%rcx), %r15
movq %r15, 0x30(%r14)
movb %bl, (%rax,%rcx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x373c7