// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_fmt_array
int bcf_fmt_array(kstring_t *s, int n, int type, void *data)
{
    int j = 0;
    uint32_t e = 0;
    if (n == 0) {
        return kputc_('.', s) >= 0 ? 0 : -1;
    }

    if (type == BCF_BT_CHAR)
    {
        char *p = (char *)data;

        // Note bcf_str_missing is already accounted for in n==0 above.
        if (n >= 8) {
            char *p_end = memchr(p, 0, n);
            e |= kputsn(p, p_end ? p_end-p : n, s) < 0;
        } else {
            for (j = 0; j < n && *p; ++j, ++p)
               e |= kputc(*p, s) < 0;
        }
    }
    else
    {
        #define BRANCH(type_t, convert, is_missing, is_vector_end, kprint) { \
            uint8_t *p = (uint8_t *) data; \
            for (j=0; j<n; j++, p += sizeof(type_t))    \
            { \
                type_t v = convert(p); \
                if ( is_vector_end ) break; \
                if ( j ) e |= kputc_(',', s) < 0; \
                e |= (is_missing ? kputc('.', s) : kprint) < 0; \
            } \
        }
        switch (type) {
            case BCF_BT_INT8:  BRANCH(int8_t,  le_to_i8, v==bcf_int8_missing,  v==bcf_int8_vector_end,  kputw(v, s)); break;
            case BCF_BT_INT16: BRANCH(int16_t, le_to_i16, v==bcf_int16_missing, v==bcf_int16_vector_end, kputw(v, s)); break;
            case BCF_BT_INT32: BRANCH(int32_t, le_to_i32, v==bcf_int32_missing, v==bcf_int32_vector_end, kputw(v, s)); break;
            case BCF_BT_FLOAT: BRANCH(uint32_t, le_to_u32, v==bcf_float_missing, v==bcf_float_vector_end, kputd(le_to_float(p), s)); break;
            default: hts_log_error("Unexpected type %d", type); exit(1); break;
        }
        #undef BRANCH
    }
    return e == 0 ? 0 : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x33b91
movq %rcx, %r12
movl %edx, %ecx
leal -0x1(%rcx), %eax
cmpl $0x6, %eax
ja 0x3423d
movl %esi, %ebp
leaq 0x7a2e4(%rip), %rdx     # 0xadcb4
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movq %r12, 0x8(%rsp)
movl %esi, 0x14(%rsp)
jmpq *%rax
testl %ebp, %ebp
jle 0x34211
xorl %r13d, %r13d
xorl %r15d, %r15d
movsbl (%r12,%r13), %r14d
cmpl $-0x7f, %r14d
je 0x33b67
testl %r13d, %r13d
je 0x33a69
movq (%rbx), %rax
incq %rax
cmpq %rax, 0x8(%rbx)
jae 0x33a52
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33b82
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
xorl %eax, %eax
orl %eax, %r15d
movl %r14d, %eax
negb %al
jno 0x33ae3
movq (%rbx), %rax
addq $0x2, %rax
cmpq %rax, 0x8(%rbx)
jae 0x33abf
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33b5a
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x33b64
movl %r14d, %edi
testb %r14b, %r14b
jns 0x33b4d
movq (%rbx), %rax
addq $0x3, %rax
cmpq %rax, 0x8(%rbx)
jae 0x33b36
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33b5a
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movl %r14d, %edi
negl %edi
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2d, (%rcx,%rax)
movq %rbx, %rsi
callq 0x41f37
shrl $0x1f, %eax
jmp 0x33b64
movl $0x1, %eax
movq 0x8(%rsp), %r12
orl %eax, %r15d
cmpb $-0x7f, %r14b
je 0x34214
incq %r13
cmpl %ebp, %r13d
jl 0x339f0
jmp 0x34214
movl $0x1, %eax
movq 0x8(%rsp), %r12
jmp 0x33a66
movq (%rbx), %rax
incq %rax
cmpq %rax, 0x8(%rbx)
jae 0x33bd4
movq %rax, %rcx
shrq $0x3e, %rcx
movq %rax, %rdx
shrq %rdx
xorl %r14d, %r14d
testq %rcx, %rcx
cmoveq %rdx, %r14
addq %rax, %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4860
testq %rax, %rax
je 0x3415e
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rcx,%rax)
xorl %eax, %eax
jmp 0x3421b
cmpl $0x7, %ebp
jle 0x34168
movl %ebp, %r12d
movq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x4550
movq %rax, %r15
subq %r14, %r15
testq %rax, %rax
cmoveq %r12, %r15
movq (%rbx), %rcx
leaq (%rcx,%r15), %rax
addq $0x2, %rax
cmpq %rcx, %rax
jbe 0x3422a
cmpq %rax, 0x8(%rbx)
jae 0x33c69
movq %rax, %rcx
shrq $0x3e, %rcx
movq %rax, %rdx
shrq %rdx
xorl %r12d, %r12d
testq %rcx, %rcx
cmoveq %rdx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x34235
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x10(%rbx), %rdi
addq (%rbx), %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x43c0
movq (%rbx), %rax
addq %r15, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
shrl $0x1f, %r15d
jmp 0x34214
testl %ebp, %ebp
jle 0x34211
xorl %r13d, %r13d
xorl %r15d, %r15d
movl (%r12,%r13,4), %r14d
cmpl $0x80000001, %r14d      # imm = 0x80000001
je 0x33e14
testl %r13d, %r13d
je 0x33d20
movq (%rbx), %rax
incq %rax
cmpq %rax, 0x8(%rbx)
jae 0x33d09
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33e32
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
xorl %eax, %eax
orl %eax, %r15d
movl %r14d, %ebp
negl %ebp
jno 0x33d9b
movq (%rbx), %rax
addq $0x2, %rax
cmpq %rax, 0x8(%rbx)
movl 0x14(%rsp), %ebp
jae 0x33d7a
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33e41
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x33e11
movl %r14d, %edi
testl %r14d, %r14d
jns 0x33e02
movq (%rbx), %rax
addq $0x3, %rax
cmpq %rax, 0x8(%rbx)
jae 0x33dee
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33e4d
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2d, (%rcx,%rax)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x41f37
shrl $0x1f, %eax
movl 0x14(%rsp), %ebp
orl %eax, %r15d
cmpl $0x80000001, %r14d      # imm = 0x80000001
je 0x34214
incq %r13
cmpl %ebp, %r13d
jl 0x33ca5
jmp 0x34214
movl $0x1, %eax
movq 0x8(%rsp), %r12
jmp 0x33d1d
movl $0x1, %eax
movq 0x8(%rsp), %r12
jmp 0x33e11
movl $0x1, %eax
movq 0x8(%rsp), %r12
jmp 0x33e0d
testl %ebp, %ebp
jle 0x34211
xorl %r14d, %r14d
xorl %r15d, %r15d
movl (%r12,%r14,4), %r13d
movl 0x9b6a3(%rip), %ebp     # 0xcf514
cmpl %ebp, %r13d
je 0x33f70
testl %r14d, %r14d
je 0x33ee4
movq (%rbx), %rax
incq %rax
cmpq %rax, 0x8(%rbx)
jae 0x33ecd
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33f8c
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
xorl %eax, %eax
orl %eax, %r15d
cmpl 0x9b625(%rip), %r13d    # 0xcf510
jne 0x33f59
movq (%rbx), %rax
addq $0x2, %rax
cmpq %rax, 0x8(%rbx)
jae 0x33f38
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33f9b
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x33f6d
xorps %xmm0, %xmm0
cvtss2sd (%r12,%r14,4), %xmm0
movq %rbx, %rdi
callq 0x8aea4
shrl $0x1f, %eax
orl %eax, %r15d
cmpl %ebp, %r13d
je 0x34214
incq %r14
cmpl 0x14(%rsp), %r14d
jl 0x33e67
jmp 0x34214
movl $0x1, %eax
movq 0x8(%rsp), %r12
jmp 0x33ee1
movl $0x1, %eax
movq 0x8(%rsp), %r12
jmp 0x33f6d
testl %ebp, %ebp
jle 0x34211
xorl %r13d, %r13d
xorl %r15d, %r15d
movswl (%r12,%r13,2), %r14d
cmpl $0xffff8001, %r14d      # imm = 0xFFFF8001
je 0x34131
testl %r13d, %r13d
je 0x34031
movq (%rbx), %rax
incq %rax
cmpq %rax, 0x8(%rbx)
jae 0x3401a
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x3414f
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
xorl %eax, %eax
orl %eax, %r15d
movl %r14d, %eax
negw %ax
jno 0x340ac
movq (%rbx), %rax
addq $0x2, %rax
cmpq %rax, 0x8(%rbx)
jae 0x34088
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x34124
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x3412e
movl %r14d, %edi
testw %r14w, %r14w
jns 0x34117
movq (%rbx), %rax
addq $0x3, %rax
cmpq %rax, 0x8(%rbx)
jae 0x34100
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x34124
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %r12
movl %r14d, %edi
negl %edi
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2d, (%rcx,%rax)
movq %rbx, %rsi
callq 0x41f37
shrl $0x1f, %eax
jmp 0x3412e
movl $0x1, %eax
movq 0x8(%rsp), %r12
orl %eax, %r15d
cmpl $0xffff8001, %r14d      # imm = 0xFFFF8001
je 0x34214
incq %r13
cmpl %ebp, %r13d
jl 0x33fb5
jmp 0x34214
movl $0x1, %eax
movq 0x8(%rsp), %r12
jmp 0x3402e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3421b
testl %ebp, %ebp
jle 0x34211
movl %ebp, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x8(%rsp), %rsi
movb (%rsi,%rbp), %r14b
testb %r14b, %r14b
je 0x34214
movq (%rbx), %rax
addq $0x2, %rax
cmpq %rax, 0x8(%rbx)
jae 0x341d5
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x34205
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %rsi
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb %r14b, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
orl %eax, %r15d
incq %rbp
cmpl %ebp, %r13d
jne 0x3417d
jmp 0x34214
movl $0x1, %eax
movq 0x8(%rsp), %rsi
jmp 0x341f4
xorl %r15d, %r15d
xorl %eax, %eax
negl %r15d
sbbl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4050
movl $0x4b, (%rax)
movl $0x1, %r15d
jmp 0x34214
leaq 0x7aa41(%rip), %rsi     # 0xaec85
leaq 0x7aa48(%rip), %rdx     # 0xaec93
movl $0x1, %edi
xorl %eax, %eax
callq 0x9774
movl $0x1, %edi
callq 0x45f0