// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/vcf.c
// Function: bcf_hdr_append
int bcf_hdr_append(bcf_hdr_t *h, const char *line)
{
	int len, i;
	len = strlen(line);
	if (line[len - 1] == '\n') --len;
	if (h->m_text < h->l_text + len + 1) {
		h->m_text = h->l_text + len + 1;
		kroundup32(h->m_text);
		h->text = (char*)realloc(h->text, h->m_text);
	}
	for (i = h->l_text - 1; i >= 0; --i)
		if (h->text[i] == '#' && (i == 0 || h->text[i-1] == '\n'))
			break;
	if (i < 0) return -1; // no #CHROM line
	memmove(&h->text[i+len+1], &h->text[i], h->l_text - i);
	memcpy(&h->text[i], line, len);
	h->text[i+len] = '\n';
	h->l_text += len;
	bcf_hdr_parse1(h, line);
	bcf_hdr_sync(h);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2170
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0xfc0b
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addl -0x1c(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0xfcd6
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x2, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x4, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x8, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x10, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rsi
callq 0x2340
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0xfd2c
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x23, %eax
jne 0xfd1f
cmpl $0x0, -0x20(%rbp)
je 0xfd1d
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0xfd1f
jmp 0xfd2c
jmp 0xfd21
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xfce2
cmpl $0x0, -0x20(%rbp)
jge 0xfd3e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfdcd
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movl -0x20(%rbp), %eax
addl -0x1c(%rbp), %eax
addl $0x1, %eax
cltq
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movslq -0x20(%rbp), %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl -0x20(%rbp), %eax
movslq %eax, %rdx
callq 0x2370
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x2290
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x20(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movb $0xa, (%rax,%rcx)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf2d0
movq -0x10(%rbp), %rdi
callq 0xf9b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)