// File: /workspace/github_c_makefile_star2_O0/lh3[P]minimap2/align.c
// Function: mm_enlarge_cigar
void mm_enlarge_cigar(mm_reg1_t *r, uint32_t n_cigar) // TODO: this calls the libc realloc()
{
	if (n_cigar == 0) return;
	if (r->p == 0) {
		uint32_t capacity = n_cigar + sizeof(mm_extra_t)/4;
		kroundup32(capacity);
		r->p = (mm_extra_t*)calloc(capacity, 4);
		r->p->capacity = capacity;
	} else if (r->p->n_cigar + n_cigar + sizeof(mm_extra_t)/4 > r->p->capacity) {
		r->p->capacity = r->p->n_cigar + n_cigar + sizeof(mm_extra_t)/4;
		kroundup32(r->p->capacity);
		r->p = (mm_extra_t*)realloc(r->p, r->p->capacity * 4);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2257a
jmp 0x22718
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2260c
movl -0xc(%rbp), %eax
addq $0x7, %rax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl $0x2, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl $0x4, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl $0x10, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x2220
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl %ecx, (%rax)
jmp 0x22718
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl 0x18(%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, %eax
addq $0x7, %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jbe 0x22716
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl 0x18(%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, %eax
addq $0x7, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
shrl %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
shrl $0x2, %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
shrl $0x4, %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
shrl $0x8, %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
shrl $0x10, %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x2310
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0x22718
addq $0x10, %rsp
popq %rbp
retq
nop