// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: vcf_parse_format_gt6
static int vcf_parse_format_gt6(kstring_t *s, const bcf_hdr_t *h, bcf1_t *v,
                                const char *p, const char *q, fmt_aux_t *fmt) {
    kstring_t *str = &v->indiv;
    int i, need_downsize = 0;
    if (v->n_sample > 0) {
        for (i = 0; i < v->n_fmt; ++i) {
            fmt_aux_t *z = &fmt[i];
            if ( z->size==-1 ) {
                need_downsize = 1;
                continue;
            }
            bcf_enc_int1(str, z->key);
            if ((z->y>>4&0xf) == BCF_HT_STR && !z->is_gt) {
                bcf_enc_size(str, z->size, BCF_BT_CHAR);
                kputsn((char*)z->buf, z->size * (size_t)v->n_sample, str);
            } else if ((z->y>>4&0xf) == BCF_HT_INT || z->is_gt) {
                bcf_enc_vint(str, (z->size>>2) * v->n_sample, (int32_t*)z->buf, z->size>>2);
            } else {
                bcf_enc_size(str, z->size>>2, BCF_BT_FLOAT);
                if (serialize_float_array(str, (z->size>>2) * (size_t)v->n_sample,
                                          (float *) z->buf) != 0) {
                    v->errcode |= BCF_ERR_LIMITS;
                    hts_log_error("Out of memory at %s:%"PRIhts_pos, bcf_seqname_safe(h,v), v->pos+1);
                    return -1;
                }
            }
        }

    }
    if ( need_downsize ) {
        i = 0;
        while ( i < v->n_fmt ) {
            if ( fmt[i].size==-1 )
            {
                v->n_fmt--;
                if ( i < v->n_fmt ) memmove(&fmt[i],&fmt[i+1],sizeof(*fmt)*(v->n_fmt-i));
            }
            else
                i++;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x28, %rax
cmpl $0x0, %eax
jle 0x54bcc
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
andq $0xff, %rcx
cmpl %ecx, %eax
jge 0x54bca
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x54a46
movl $0x1, -0x48(%rbp)
jmp 0x54bbc
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rax
movl (%rax), %esi
callq 0x44a50
movq -0x50(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x3, %eax
jne 0x54abb
movq -0x50(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x54abb
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %esi
movl $0x7, %edx
callq 0x448b0
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x50(%rbp), %rax
movslq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x28, %rax
movl %eax, %eax
imulq %rax, %rsi
movq -0x40(%rbp), %rdx
callq 0x43970
jmp 0x54bba
movq -0x50(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
je 0x54adc
movq -0x50(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x54b15
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %esi
sarl $0x2, %esi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x28, %rax
imull %eax, %esi
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x50(%rbp), %rax
movl 0x8(%rax), %ecx
sarl $0x2, %ecx
callq 0x442f0
jmp 0x54bb8
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %esi
sarl $0x2, %esi
movl $0x5, %edx
callq 0x448b0
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %eax
sarl $0x2, %eax
movslq %eax, %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x28, %rax
movl %eax, %eax
imulq %rax, %rsi
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rdx
callq 0x44ce0
cmpl $0x0, %eax
je 0x54bb6
movq -0x20(%rbp), %rax
movl 0xcc(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0xcc(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x43520
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %r8
addq $0x1, %r8
movl $0x1, %edi
leaq 0xb4468(%rip), %rsi     # 0x109004
leaq 0xb4476(%rip), %rdx     # 0x109019
movb $0x0, %al
callq 0x9d90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x54cc6
jmp 0x54bb8
jmp 0x54bba
jmp 0x54bbc
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x549ff
jmp 0x54bcc
cmpl $0x0, -0x48(%rbp)
je 0x54cbf
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
andq $0xff, %rcx
cmpl %ecx, %eax
jge 0x54cbd
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x8(%rax)
jne 0x54caf
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
shrq $0x20, %rcx
andq $0xff, %rcx
addl $-0x1, %ecx
movl %ecx, %ecx
movl %ecx, %edx
movq 0x18(%rax), %rcx
andq $0xff, %rdx
shlq $0x20, %rdx
movabsq $-0xff00000001, %rsi    # imm = 0xFFFFFF00FFFFFFFF
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, 0x18(%rax)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
andq $0xff, %rcx
cmpl %ecx, %eax
jge 0x54cad
movq -0x38(%rbp), %rdi
movslq -0x44(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movl -0x44(%rbp), %eax
addl $0x1, %eax
cltq
imulq $0x28, %rax, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
andq $0xff, %rax
subl -0x44(%rbp), %eax
cltq
imulq $0x28, %rax, %rdx
callq 0x4830
jmp 0x54cb8
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x54bdd
jmp 0x54cbf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop