// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/atomic.c
// Function: bcf_add_atom
static void bcf_add_atom(bcf_atom_v *a, int rid, int pos, int rlen, int anum, int l_ref, const char *ref, int l_alt, const char *alt)
{
	bcf_atom_t *p;
	if (a->n == a->m) {
		int oldm = a->m;
		a->m = a->m? a->m<<1 : 4;
		a->a = (bcf_atom_t*)realloc(a->a, a->m * sizeof(bcf_atom_t));
		memset(a->a + oldm, 0, (a->m - oldm) * sizeof(bcf_atom_t));
	}
	p = &a->a[a->n++];
	p->rid = rid, p->pos = pos, p->rlen = rlen, p->anum = anum;
	p->ref.l = 0;
	p->from_new = 1;
	if (l_ref < 0) l_ref = strlen(ref);
	if (l_alt < 0) l_alt = strlen(alt);
	kputsn(ref, l_ref, &p->ref); kputc('\0', &p->ref);
	kputsn(alt, l_alt, &p->ref);
	p->alt = p->ref.s + l_ref + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x16f80
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x16f1d
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
shll %eax
movl %eax, -0x30(%rbp)
jmp 0x16f27
movl $0x4, %eax
movl %eax, -0x30(%rbp)
jmp 0x16f27
movl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rsi
shlq $0x6, %rsi
callq 0x2340
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
subl -0x2c(%rbp), %eax
movslq %eax, %rdx
shlq $0x6, %rdx
xorl %esi, %esi
callq 0x21e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movl (%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, (%rdx)
movslq %ecx, %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x10(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
andl $0x1fffffff, %edx       # imm = 0x1FFFFFFF
andl $0xe0000000, %ecx       # imm = 0xE0000000
orl %edx, %ecx
movl %ecx, 0x30(%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0x30(%rax)
cmpl $0x0, -0x1c(%rbp)
jge 0x1700f
movq 0x10(%rbp), %rdi
callq 0x2170
movl %eax, -0x1c(%rbp)
cmpl $0x0, 0x18(%rbp)
jge 0x17021
movq 0x20(%rbp), %rdi
callq 0x2170
movl %eax, 0x18(%rbp)
movq 0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x17070
movq -0x28(%rbp), %rsi
xorl %edi, %edi
callq 0x173b0
movq 0x20(%rbp), %rdi
movl 0x18(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x17070
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movslq -0x1c(%rbp), %rax
addq %rax, %rcx
addq $0x1, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)