// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf1_sync_info
static inline int bcf1_sync_info(bcf1_t *line, kstring_t *str)
{
    // pairs of typed vectors
    int i, irm = -1, e = 0;
    for (i=0; i<line->n_info; i++)
    {
        bcf_info_t *info = &line->d.info[i];
        if ( !info->vptr )
        {
            // marked for removal
            if ( irm < 0 ) irm = i;
            continue;
        }
        e |= kputsn_(info->vptr - info->vptr_off, info->vptr_len + info->vptr_off, str) < 0;
        if ( irm >=0 )
        {
            bcf_info_t tmp = line->d.info[irm]; line->d.info[irm] = line->d.info[i]; line->d.info[i] = tmp;
            while ( irm<=i && line->d.info[irm].vptr ) irm++;
        }
    }
    if ( irm>=0 ) line->n_info = irm;
    return e == 0 ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x52524
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x523f5
cmpl $0x0, -0x18(%rbp)
jge 0x523f0
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x52516
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x28(%rbp), %rcx
movl 0x1c(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addl %ecx, %eax
movl %eax, %eax
movl %eax, %esi
movq -0x10(%rbp), %rdx
callq 0x52570
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x52514
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rsi
movslq -0x18(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
leaq -0x50(%rbp), %rdi
movl $0x28, %edx
callq 0x43b0
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
movslq -0x18(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rsi
movslq -0x14(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
movl $0x28, %edx
callq 0x43b0
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
movslq -0x14(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq -0x50(%rbp), %rsi
movl $0x28, %edx
callq 0x43b0
movl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x51(%rbp)
jg 0x524fe
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x52507
jmp 0x52512
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x524d0
jmp 0x52514
jmp 0x52516
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x523a5
cmpl $0x0, -0x18(%rbp)
jl 0x5254e
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq 0x18(%rax), %rcx
andq $0xffff, %rdx           # imm = 0xFFFF
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq %rdx, %rcx
movq %rcx, 0x18(%rax)
movl -0x1c(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)