LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bgzf_check_EOF
int bgzf_check_EOF(BGZF *fp)
{
	static uint8_t magic[28] = "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0";
	uint8_t buf[28];
	off_t offset;
	offset = _bgzf_tell((_bgzf_file_t)fp->fp);
	if (_bgzf_seek(fp->fp, -28, SEEK_END) < 0) return 0;
	_bgzf_read(fp->fp, buf, 28);
	_bgzf_seek(fp->fp, offset, SEEK_SET);
	return (memcmp(magic, buf, 28) == 0)? 1 : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x34e0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq $-0x1c, %rsi
movl $0x2, %edx
callq 0x31d0
cmpl $0x0, %eax
jge 0x6714
movl $0x0, -0x4(%rbp)
jmp 0x6769
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movl $0x1, %esi
movl $0x1c, %edx
callq 0x35e0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x31d0
leaq -0x30(%rbp), %rsi
leaq 0x10f93(%rip), %rdi     # 0x176e0
movl $0x1c, %edx
callq 0x3160
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bgzf_read
ssize_t bgzf_read(BGZF *fp, void *data, ssize_t length)
{
	ssize_t bytes_read = 0;
	uint8_t *output = data;
	if (length <= 0) return 0;
	assert(fp->is_write == 0);
	while (bytes_read < length) {
		int copy_length, available = fp->block_length - fp->block_offset;
		uint8_t *buffer;
		if (available <= 0) {
			if (bgzf_read_block(fp) != 0) return -1;
			available = fp->block_length - fp->block_offset;
			if (available <= 0) break;
		}
		copy_length = length - bytes_read < available? length - bytes_read : available;
		buffer = fp->uncompressed_block;
		memcpy(output, buffer + fp->block_offset, copy_length);
		fp->block_offset += copy_length;
		output += copy_length;
		bytes_read += copy_length;
	}
	if (fp->block_offset == fp->block_length) {
		fp->block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
		fp->block_offset = fp->block_length = 0;
	}
	return bytes_read;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
jg 0x67b8
movq $0x0, -0x8(%rbp)
jmp 0x6915
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll $0xe, %eax
sarl $0x1e, %eax
cmpl $0x0, %eax
jne 0x67cb
jmp 0x67ea
leaq 0xbd39(%rip), %rdi      # 0x1250b
leaq 0xb996(%rip), %rsi      # 0x1216f
movl $0x5a8, %edx            # imm = 0x5A8
leaq 0xbd38(%rip), %rcx      # 0x1251d
callq 0x3200
jmp 0x67ec
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x68cf
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jg 0x684a
movq -0x10(%rbp), %rdi
callq 0x9680
cmpl $0x0, %eax
je 0x682c
movq $-0x1, -0x8(%rbp)
jmp 0x6915
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jg 0x6848
jmp 0x68cf
jmp 0x684a
movq -0x20(%rbp), %rax
subq -0x28(%rbp), %rax
movslq -0x38(%rbp), %rcx
cmpq %rcx, %rax
jge 0x6869
movq -0x20(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x6871
movslq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movslq -0x34(%rbp), %rdx
callq 0x32d0
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movslq -0x34(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x67ec
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x690d
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x34e0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux_append
void bam_aux_append(bam1_t *b, const char tag[2], char type, int len, uint8_t *data)
{
	int ori_len = b->data_len;
	b->data_len += 3 + len;
	b->l_aux += 3 + len;
	if (b->m_data < b->data_len) {
		b->m_data = b->data_len;
		kroundup32(b->m_data);
		b->data = (uint8_t*)realloc(b->data, b->m_data);
	}
	b->data[ori_len] = tag[0]; b->data[ori_len + 1] = tag[1];
	b->data[ori_len + 2] = type;
	memcpy(b->data + ori_len + 3, data, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %ecx
addl $0x3, %ecx
movq -0x8(%rbp), %rax
addl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
movl -0x18(%rbp), %ecx
addl $0x3, %ecx
movq -0x8(%rbp), %rax
addl 0x24(%rax), %ecx
movl %ecx, 0x24(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x7345
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x2, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x4, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x8, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x10, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x2c(%rax), %rsi
callq 0x3650
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movb (%rax), %dl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x24(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movb 0x1(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movb -0x11(%rbp), %dl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movslq -0x24(%rbp), %rax
addq %rax, %rdi
addq $0x3, %rdi
movq -0x20(%rbp), %rsi
movslq -0x18(%rbp), %rdx
callq 0x32d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux_get
uint8_t *bam_aux_get(const bam1_t *b, const char tag[2])
{
	uint8_t *s;
	int y = tag[0]<<8 | tag[1];
	s = bam1_aux(b);
	while (s < b->data + b->data_len) {
		int x = (int)s[0]<<8 | s[1];
		s += 2;
		if (x == y) return s;
		__skip_tag(s);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
shll $0x8, %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x18, %rcx
andq $0xff, %rcx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq -0x10(%rbp), %rdx
movslq 0x28(%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x7570
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x74d0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7578
jmp 0x74d2
movq -0x20(%rbp), %rax
movzbl (%rax), %edi
callq 0x36e0
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
cmpl $0x5a, -0x2c(%rbp)
je 0x74f9
cmpl $0x48, -0x2c(%rbp)
jne 0x7520
jmp 0x74fb
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x7512
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x74fb
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x7569
cmpl $0x42, -0x2c(%rbp)
jne 0x754f
movq -0x20(%rbp), %rax
movzbl (%rax), %edi
callq 0x7590
movl %eax, %ecx
movq -0x20(%rbp), %rax
imull 0x1(%rax), %ecx
addl $0x5, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x7567
movl -0x2c(%rbp), %edi
callq 0x7590
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x7569
jmp 0x756b
jmp 0x7478
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/./bamcat.h
// Function: bam_aux_type2size
static inline int bam_aux_type2size(int x)
{
	if (x == 'C' || x == 'c' || x == 'A') return 1;
	else if (x == 'S' || x == 's') return 2;
	else if (x == 'I' || x == 'i' || x == 'f' || x == 'F') return 4;
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x43, -0x8(%rbp)
je 0x75a9
cmpl $0x63, -0x8(%rbp)
je 0x75a9
cmpl $0x41, -0x8(%rbp)
jne 0x75b2
movl $0x1, -0x4(%rbp)
jmp 0x75ef
cmpl $0x53, -0x8(%rbp)
je 0x75be
cmpl $0x73, -0x8(%rbp)
jne 0x75c7
movl $0x2, -0x4(%rbp)
jmp 0x75ef
cmpl $0x49, -0x8(%rbp)
je 0x75df
cmpl $0x69, -0x8(%rbp)
je 0x75df
cmpl $0x66, -0x8(%rbp)
je 0x75df
cmpl $0x46, -0x8(%rbp)
jne 0x75e8
movl $0x4, -0x4(%rbp)
jmp 0x75ef
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux_del
int bam_aux_del(bam1_t *b, uint8_t *s)
{
	uint8_t *p, *aux;
	aux = bam1_aux(b);
	p = s - 2;
	__skip_tag(s);
	memmove(p, s, b->l_aux - (s - aux));
	b->data_len -= s - p;
	b->l_aux -= s - p;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x18, %rcx
andq $0xff, %rcx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %edi
callq 0x36e0
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
cmpl $0x5a, -0x24(%rbp)
je 0x76a4
cmpl $0x48, -0x24(%rbp)
jne 0x76cb
jmp 0x76a6
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x76bd
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x76a6
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7714
cmpl $0x42, -0x24(%rbp)
jne 0x76fa
movq -0x10(%rbp), %rax
movzbl (%rax), %edi
callq 0x7590
movl %eax, %ecx
movq -0x10(%rbp), %rax
imull 0x1(%rax), %ecx
addl $0x5, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x7712
movl -0x24(%rbp), %edi
callq 0x7590
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x7714
jmp 0x7716
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movslq 0x24(%rax), %rdx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
subq %rax, %rdx
callq 0x3630
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movq -0x8(%rbp), %rax
movslq 0x28(%rax), %rcx
subq %rdx, %rcx
movl %ecx, 0x28(%rax)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movq -0x8(%rbp), %rax
movslq 0x24(%rax), %rcx
subq %rdx, %rcx
movl %ecx, 0x24(%rax)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux_drop_other
int bam_aux_drop_other(bam1_t *b, uint8_t *s)
{
	if (s) {
		uint8_t *p, *aux;
		aux = bam1_aux(b);
		p = s - 2;
		__skip_tag(s);
		memmove(aux, p, s - p);
		b->data_len -= b->l_aux - (s - p);
		b->l_aux = s - p;
	} else {
		b->data_len -= b->l_aux;
		b->l_aux = 0;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x78f3
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x18, %rcx
andq $0xff, %rcx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %edi
callq 0x36e0
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
cmpl $0x5a, -0x24(%rbp)
je 0x782f
cmpl $0x48, -0x24(%rbp)
jne 0x7856
jmp 0x7831
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x7848
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7831
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x789f
cmpl $0x42, -0x24(%rbp)
jne 0x7885
movq -0x10(%rbp), %rax
movzbl (%rax), %edi
callq 0x7590
movl %eax, %ecx
movq -0x10(%rbp), %rax
imull 0x1(%rax), %ecx
addl $0x5, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x789d
movl -0x24(%rbp), %edi
callq 0x7590
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x789f
jmp 0x78a1
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0x3630
movq -0x8(%rbp), %rax
movslq 0x24(%rax), %rdx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
subq %rax, %rdx
movq -0x8(%rbp), %rax
movslq 0x28(%rax), %rcx
subq %rdx, %rcx
movl %ecx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x7911
movq -0x8(%rbp), %rax
movl 0x24(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_init_header_hash
void bam_init_header_hash(bam_header_t *header)
{
	if (header->hash == 0) {
		int ret, i;
		khiter_t iter;
		khash_t(s) *h;
		header->hash = h = kh_init(s);
		for (i = 0; i < header->n_targets; ++i) {
			iter = kh_put(s, h, header->target_name[i], &ret);
			kh_value(h, iter) = i;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x799b
callq 0xc8d0
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x7999
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq -0xc(%rbp), %rdx
callq 0x79b0
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7952
jmp 0x799b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_get_tid
int32_t bam_get_tid(const bam_header_t *header, const char *seq_name)
{
	khint_t k;
	khash_t(s) *h = (khash_t(s)*)header->hash;
	k = kh_get(s, h, seq_name);
	return k == kh_end(h)? -1 : kh_value(h, k);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7dd0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x7db1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x7dc2
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux2i
int32_t bam_aux2i(const uint8_t *s)
{
	int type;
	if (s == 0) return 0;
	type = *s++;
	if (type == 'c') return (int32_t)*(int8_t*)s;
	else if (type == 'C') return (int32_t)*(uint8_t*)s;
	else if (type == 's') return (int32_t)*(int16_t*)s;
	else if (type == 'S') return (int32_t)*(uint16_t*)s;
	else if (type == 'i' || type == 'I') return *(int32_t*)s;
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8338
movl $0x0, -0x4(%rbp)
jmp 0x83b3
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x63, -0x14(%rbp)
jne 0x835f
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x83b3
cmpl $0x43, -0x14(%rbp)
jne 0x8371
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x83b3
cmpl $0x73, -0x14(%rbp)
jne 0x8383
movq -0x10(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x83b3
cmpl $0x53, -0x14(%rbp)
jne 0x8395
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x83b3
cmpl $0x69, -0x14(%rbp)
je 0x83a1
cmpl $0x49, -0x14(%rbp)
jne 0x83ac
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x83b3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux2f
float bam_aux2f(const uint8_t *s)
{
	int type;
	type = *s++;
	if (s == 0) return 0.0;
	if (type == 'f') return *(float*)s;
	else return 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x83ee
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x840b
cmpl $0x66, -0x14(%rbp)
jne 0x8403
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x840b
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux2d
double bam_aux2d(const uint8_t *s)
{
	int type;
	type = *s++;
	if (s == 0) return 0.0;
	if (type == 'd') return *(double*)s;
	else return 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x844e
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x846b
cmpl $0x64, -0x14(%rbp)
jne 0x8463
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x846b
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux2A
char bam_aux2A(const uint8_t *s)
{
	int type;
	type = *s++;
	if (s == 0) return 0;
	if (type == 'A') return *(char*)s;
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x84aa
movb $0x0, -0x1(%rbp)
jmp 0x84bf
cmpl $0x41, -0x14(%rbp)
jne 0x84bb
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x1(%rbp)
jmp 0x84bf
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bam_aux2Z
char *bam_aux2Z(const uint8_t *s)
{
	int type;
	type = *s++;
	if (s == 0) return 0;
	if (type == 'Z' || type == 'H') return (char*)s;
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x84fe
movq $0x0, -0x8(%rbp)
jmp 0x851c
cmpl $0x5a, -0x14(%rbp)
je 0x850a
cmpl $0x48, -0x14(%rbp)
jne 0x8514
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x851c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: _bam_get_lines
char **__bam_get_lines(const char *fn, int *_n) // for bam_plcmd.c only
{
	char **list = 0, *s;
	int n = 0, dret, m = 0;
	gzFile fp = (strcmp(fn, "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(fn, "r");
	kstream_t *ks;
	kstring_t *str;
	str = (kstring_t*)calloc(1, sizeof(kstring_t));
	ks = ks_init(fp);
	while (ks_getuntil(ks, '\n', str, &dret) > 0) {
		if (n == m) {
			m = m? m << 1 : 16;
			list = (char**)realloc(list, m * sizeof(char*));
		}
		if (str->s[str->l-1] == '\r')
			str->s[--str->l] = '\0';
		s = list[n++] = (char*)calloc(str->l + 1, 1);
		strcpy(s, str->s);
	}
	ks_destroy(ks);
	gzclose(fp);
	free(str->s); free(str);
	*_n = n;
	return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x9acf(%rip), %rsi      # 0x12030
callq 0x3570
cmpl $0x0, %eax
jne 0x858e
movq 0xea4e(%rip), %rax      # 0x16fc0
movq (%rax), %rdi
callq 0x3400
movl %eax, %edi
leaq 0x9d34(%rip), %rsi      # 0x122b7
callq 0x36b0
movq %rax, -0x50(%rbp)
jmp 0x85a2
movq -0x8(%rbp), %rdi
leaq 0x9d1e(%rip), %rsi      # 0x122b7
callq 0x35c0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x3210
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rdi
callq 0x86e0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rdx
movl $0xa, %esi
leaq -0x28(%rbp), %rcx
callq 0x8730
cmpl $0x0, %eax
jle 0x86a5
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0x8626
cmpl $0x0, -0x2c(%rbp)
je 0x8601
movl -0x2c(%rbp), %eax
shll %eax
movl %eax, -0x54(%rbp)
jmp 0x860b
movl $0x10, %eax
movl %eax, -0x54(%rbp)
jmp 0x860b
movl -0x54(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x3650
movq %rax, -0x18(%rbp)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x8660
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $-0x1, %rsi
movq %rsi, (%rdx)
movb $0x0, -0x1(%rax,%rcx)
movq -0x48(%rbp), %rax
movq (%rax), %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x3210
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movslq %edx, %rdx
movq %rax, (%rcx,%rdx,8)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x3350
jmp 0x85ca
movq -0x40(%rbp), %rdi
callq 0x8770
movq -0x38(%rbp), %rdi
callq 0x3660
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3490
movq -0x48(%rbp), %rdi
callq 0x3490
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: hash2header
static bam_header_t *hash2header(const kh_ref_t *hash)
{
	bam_header_t *header;
	khiter_t k;
	header = bam_header_init();
	header->n_targets = kh_size(hash);
	header->target_name = (char**)calloc(kh_size(hash), sizeof(char*));
	header->target_len = (uint32_t*)calloc(kh_size(hash), 4);
	for (k = kh_begin(hash); k != kh_end(hash); ++k) {
		if (kh_exist(hash, k)) {
			int i = (int)kh_value(hash, k);
			header->target_name[i] = (char*)kh_key(hash, k);
			header->target_len[i] = kh_value(hash, k)>>32;
		}
	}
	bam_init_header_hash(header);
	return header;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x6630
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movl $0x8, %esi
callq 0x3210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x3210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
je 0x8cae
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x14(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x8c9e
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x8ca0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8c15
movq -0x10(%rbp), %rdi
callq 0x7920
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: sam_header_parse
int sam_header_parse(bam_header_t *h)
{
	char **tmp;
	int i;
	free(h->target_len); free(h->target_name);
	h->n_targets = 0; h->target_len = 0; h->target_name = 0;
	if (h->l_text < 3) return 0;
	if (h->dict == 0) h->dict = sam_header_parse2(h->text);
	tmp = sam_header2list(h->dict, "SQ", "SN", &h->n_targets);
	if (h->n_targets == 0) return 0;
	h->target_name = calloc(h->n_targets, sizeof(void*));
	for (i = 0; i < h->n_targets; ++i)
		h->target_name[i] = strdup(tmp[i]);
	free(tmp);
	tmp = sam_header2list(h->dict, "SQ", "LN", &h->n_targets);
	h->target_len = calloc(h->n_targets, 4);
	for (i = 0; i < h->n_targets; ++i)
		h->target_len[i] = atoi(tmp[i]);
	free(tmp);
	return h->n_targets;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3490
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3490
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpl $0x3, 0x30(%rax)
jae 0x8d7e
movl $0x0, -0x4(%rbp)
jmp 0x8ecf
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x8da1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x8ee0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rcx
leaq 0x948c(%rip), %rsi      # 0x12240
leaq 0x9488(%rip), %rdx      # 0x12243
callq 0x8fe0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x8dd9
movl $0x0, -0x4(%rbp)
jmp 0x8ecf
movq -0x10(%rbp), %rax
movslq (%rax), %rdi
movl $0x8, %esi
callq 0x3210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x8e36
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x36d0
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8dfc
movq -0x18(%rbp), %rdi
callq 0x3490
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rcx
leaq 0x93ee(%rip), %rsi      # 0x12240
leaq 0x93ed(%rip), %rdx      # 0x12246
callq 0x8fe0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq (%rax), %rdi
movl $0x4, %esi
callq 0x3210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x8ebd
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3610
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8e85
movq -0x18(%rbp), %rdi
callq 0x3490
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: sam_header_parse2
void *sam_header_parse2(const char *headerText)
{
    list_t *hlines = NULL;
    HeaderLine *hline;
    const char *text;
    char *buf=NULL;
    size_t nbuf = 0;
	int tovalidate = 0;

    if ( !headerText )
		return 0;

    text = headerText;
    while ( (text=nextline(&buf, &nbuf, text)) )
    {
        hline = sam_header_line_parse(buf);
        if ( hline && (!tovalidate || sam_header_line_validate(hline)) )
            // With too many (~250,000) reference sequences the header parsing was too slow with list_append.
            hlines = list_append_to_end(hlines, hline);
        else
        {
			if (hline) sam_header_line_free(hline);
			sam_header_free(hlines);
            if ( buf ) free(buf);
            return NULL;
        }
    }
    if ( buf ) free(buf);

    return hlines;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8f1f
movq $0x0, -0x8(%rbp)
jmp 0x8fcd
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xaed0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x8fb5
movq -0x30(%rbp), %rdi
callq 0xb080
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8f7d
cmpl $0x0, -0x3c(%rbp)
je 0x8f6a
movq -0x20(%rbp), %rdi
callq 0xb3d0
cmpl $0x0, %eax
je 0x8f7d
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xb5f0
movq %rax, -0x18(%rbp)
jmp 0x8fb0
cmpq $0x0, -0x20(%rbp)
je 0x8f8d
movq -0x20(%rbp), %rdi
callq 0xa9d0
movq -0x18(%rbp), %rdi
callq 0x6650
cmpq $0x0, -0x30(%rbp)
je 0x8fa6
movq -0x30(%rbp), %rdi
callq 0x3490
movq $0x0, -0x8(%rbp)
jmp 0x8fcd
jmp 0x8f27
cmpq $0x0, -0x30(%rbp)
je 0x8fc5
movq -0x30(%rbp), %rdi
callq 0x3490
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: sam_header2list
char **sam_header2list(const void *_dict, char type[2], char key_tag[2], int *_n)
{
	const HeaderDict *dict = (const HeaderDict*)_dict;
    const list_t *l   = dict;
    int max, n;
	char **ret;

	ret = 0; *_n = max = n = 0;
    while (l)
    {
        HeaderLine *hline = l->data;
        if ( hline->type[0]!=type[0] || hline->type[1]!=type[1] ) 
        {
            l = l->next;
            continue;
        }
        
        HeaderTag *key;
        key   = header_line_has_tag(hline,key_tag);
        if ( !key )
        {
            l = l->next;
            continue;
        }

		if (n == max) {
			max = max? max<<1 : 4;
			ret = realloc(ret, max * sizeof(void*));
		}
		ret[n++] = key->value;

        l = l->next;
    }
	*_n = n;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x9105
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x9065
movq -0x48(%rbp), %rax
movsbl 0x1(%rax), %eax
movq -0x10(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
je 0x9073
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x9028
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xb7d0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x9099
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x9028
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x90d6
cmpl $0x0, -0x34(%rbp)
je 0x90b1
movl -0x34(%rbp), %eax
shll %eax
movl %eax, -0x54(%rbp)
jmp 0x90bb
movl $0x4, %eax
movl %eax, -0x54(%rbp)
jmp 0x90bb
movl -0x54(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x34(%rbp), %rsi
shlq $0x3, %rsi
callq 0x3650
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x40(%rbp), %rax
movl -0x38(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x38(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x9028
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: alloc_data
static inline uint8_t *alloc_data(bam1_t *b, int size)
{
	if (b->m_data < size) {
		b->m_data = size;
		kroundup32(b->m_data);
		b->data = (uint8_t*)realloc(b->data, b->m_data);
	}
	return b->data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0x9406
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x2, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x4, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x8, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
sarl $0x10, %ecx
movq -0x8(%rbp), %rax
orl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x2c(%rax), %rsi
callq 0x3650
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/./bamcat.h
// Function: bam_reg2bin
static inline int bam_reg2bin(uint32_t beg, uint32_t end)
{
	--end;
	if (beg>>14 == end>>14) return 4681 + (beg>>14);
	if (beg>>17 == end>>17) return  585 + (beg>>17);
	if (beg>>20 == end>>20) return   73 + (beg>>20);
	if (beg>>23 == end>>23) return    9 + (beg>>23);
	if (beg>>26 == end>>26) return    1 + (beg>>26);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl $0xe, %eax
movl -0xc(%rbp), %ecx
shrl $0xe, %ecx
cmpl %ecx, %eax
jne 0x9496
movl -0x8(%rbp), %eax
shrl $0xe, %eax
addl $0x1249, %eax           # imm = 0x1249
movl %eax, -0x4(%rbp)
jmp 0x9517
movl -0x8(%rbp), %eax
shrl $0x11, %eax
movl -0xc(%rbp), %ecx
shrl $0x11, %ecx
cmpl %ecx, %eax
jne 0x94b6
movl -0x8(%rbp), %eax
shrl $0x11, %eax
addl $0x249, %eax            # imm = 0x249
movl %eax, -0x4(%rbp)
jmp 0x9517
movl -0x8(%rbp), %eax
shrl $0x14, %eax
movl -0xc(%rbp), %ecx
shrl $0x14, %ecx
cmpl %ecx, %eax
jne 0x94d4
movl -0x8(%rbp), %eax
shrl $0x14, %eax
addl $0x49, %eax
movl %eax, -0x4(%rbp)
jmp 0x9517
movl -0x8(%rbp), %eax
shrl $0x17, %eax
movl -0xc(%rbp), %ecx
shrl $0x17, %ecx
cmpl %ecx, %eax
jne 0x94f2
movl -0x8(%rbp), %eax
shrl $0x17, %eax
addl $0x9, %eax
movl %eax, -0x4(%rbp)
jmp 0x9517
movl -0x8(%rbp), %eax
shrl $0x1a, %eax
movl -0xc(%rbp), %ecx
shrl $0x1a, %ecx
cmpl %ecx, %eax
jne 0x9510
movl -0x8(%rbp), %eax
shrl $0x1a, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9517
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bgzf_write_init
static BGZF *bgzf_write_init(int compress_level) // compress_level==-1 for the default level
{
	BGZF *fp;
	fp = calloc(1, sizeof(BGZF));
	fp->is_write = 1;
	fp->uncompressed_block = malloc(BGZF_MAX_BLOCK_SIZE);
	fp->compressed_block = malloc(BGZF_MAX_BLOCK_SIZE);
	fp->compress_level = compress_level < 0? Z_DEFAULT_COMPRESSION : compress_level; // Z_DEFAULT_COMPRESSION==-1
	if (fp->compress_level > 9) fp->compress_level = Z_DEFAULT_COMPRESSION;
	return fp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl $0x1, %edi
movl $0x40, %esi
callq 0x3210
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xfffcffff, %ecx       # imm = 0xFFFCFFFF
orl $0x10000, %ecx          # imm = 0x10000
movl %ecx, (%rax)
movl $0x10000, %edi          # imm = 0x10000
callq 0x3520
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x10000, %edi          # imm = 0x10000
callq 0x3520
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpl $0x0, -0x4(%rbp)
jge 0x958c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x14(%rbp)
jmp 0x9592
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0x3fff, %edx           # imm = 0x3FFF
shll $0x12, %edx
andl $0x3ffff, %ecx          # imm = 0x3FFFF
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
sarl $0x12, %eax
cmpl $0x9, %eax
jle 0x95d0
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0x3ffff, %ecx          # imm = 0x3FFFF
orl $0xfffc0000, %ecx       # imm = 0xFFFC0000
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: mode2level
static int mode2level(const char *__restrict mode)
{
	int i, compress_level = -1;
	for (i = 0; mode[i]; ++i)
		if (mode[i] >= '0' && mode[i] <= '9') break;
	if (mode[i]) compress_level = (int)mode[i] - '0';
	if (strchr(mode, 'u')) compress_level = 0;
	return compress_level;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x9639
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x962c
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jg 0x962c
jmp 0x9639
jmp 0x962e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x95fa
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x9659
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x75, %esi
callq 0x3110
cmpq $0x0, %rax
je 0x9674
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: check_header
static int check_header(const uint8_t *header)
{
	return (header[0] == 31 && header[1] == 139 && header[2] == 8 && (header[3] & 4) != 0
			&& unpackInt16((uint8_t*)&header[10]) == 6
			&& header[12] == 'B' && header[13] == 'C'
			&& unpackInt16((uint8_t*)&header[14]) == 2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x1f, %ecx
movb %al, -0x9(%rbp)
jne 0x9920
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x8b, %ecx
movb %al, -0x9(%rbp)
jne 0x9920
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %ecx
xorl %eax, %eax
cmpl $0x8, %ecx
movb %al, -0x9(%rbp)
jne 0x9920
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %ecx
andl $0x4, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0x9920
movq -0x8(%rbp), %rdi
addq $0xa, %rdi
callq 0x9930
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x6, %ecx
movb %al, -0x9(%rbp)
jne 0x9920
movq -0x8(%rbp), %rax
movzbl 0xc(%rax), %ecx
xorl %eax, %eax
cmpl $0x42, %ecx
movb %al, -0x9(%rbp)
jne 0x9920
movq -0x8(%rbp), %rax
movzbl 0xd(%rax), %ecx
xorl %eax, %eax
cmpl $0x43, %ecx
movb %al, -0x9(%rbp)
jne 0x9920
movq -0x8(%rbp), %rdi
addq $0xe, %rdi
callq 0x9930
cmpl $0x2, %eax
sete %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: inflate_block
static int inflate_block(BGZF* fp, int block_length)
{
	z_stream zs;
	zs.zalloc = NULL;
	zs.zfree = NULL;
	zs.next_in = fp->compressed_block + 18;
	zs.avail_in = block_length - 16;
	zs.next_out = fp->uncompressed_block;
	zs.avail_out = BGZF_MAX_BLOCK_SIZE;

	if (inflateInit2(&zs, -15) != Z_OK) {
		fp->errcode |= BGZF_ERR_ZLIB;
		return -1;
	}
	if (inflate(&zs, Z_FINISH) != Z_STREAM_END) {
		inflateEnd(&zs);
		fp->errcode |= BGZF_ERR_ZLIB;
		return -1;
	}
	if (inflateEnd(&zs) != Z_OK) {
		fp->errcode |= BGZF_ERR_ZLIB;
		return -1;
	}
	return zs.total_out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x12, %rax
movq %rax, -0x88(%rbp)
movl -0x14(%rbp), %eax
subl $0x10, %eax
movl %eax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movl $0x10000, -0x68(%rbp)   # imm = 0x10000
leaq -0x88(%rbp), %rdi
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
leaq 0x8cf0(%rip), %rdx      # 0x126a4
movl $0x70, %ecx
callq 0x3300
cmpl $0x0, %eax
je 0x99f0
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x1, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a7e
leaq -0x88(%rbp), %rdi
movl $0x4, %esi
callq 0x32c0
cmpl $0x1, %eax
je 0x9a3c
leaq -0x88(%rbp), %rdi
callq 0x33f0
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x1, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a7e
leaq -0x88(%rbp), %rdi
callq 0x33f0
cmpl $0x0, %eax
je 0x9a77
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x1, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a7e
movq -0x60(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skoren[P]bacValidation/bamcat.c
// Function: bgzf_flush
int bgzf_flush(BGZF *fp)
{
	if (!fp->is_write) return 0;
	if (fp->mt) return mt_flush(fp);
	while (fp->block_offset > 0) {
		int block_length;
		block_length = deflate_block(fp, fp->block_offset);
		if (block_length < 0) return -1;
		if (fwrite(fp->compressed_block, 1, block_length, fp->fp) != block_length) {
			fp->errcode |= BGZF_ERR_IO; // possibly truncated file
			return -1;
		}
		fp->block_address += block_length;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll $0xe, %eax
sarl $0x1e, %eax
cmpl $0x0, %eax
jne 0x9d59
movl $0x0, -0x4(%rbp)
jmp 0x9e14
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x9d75
movq -0x10(%rbp), %rdi
callq 0x9e20
movl %eax, -0x4(%rbp)
jmp 0x9e14
jmp 0x9d77
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x9e0d
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x9fd0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x9da7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9e14
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movslq -0x14(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movl $0x1, %esi
callq 0x3730
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
je 0x9df8
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x4, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9e14
movslq -0x14(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0x9d77
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)