// File: /workspace/github_c_makefile_star2_O3/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 0x32e4a
movq %rcx, %r14
movl %edx, %ecx
leal -0x1(%rcx), %eax
cmpl $0x6, %eax
ja 0x334b5
leaq 0x77fdb(%rip), %rdx     # 0xaac80
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movq %r14, 0x8(%rsp)
jmpq *%rax
testl %esi, %esi
jle 0x33460
movl %esi, %eax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
movsbl (%r14,%r13), %ebp
cmpl $-0x7f, %ebp
je 0x33463
testl %r13d, %r13d
je 0x32d3e
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x32d2e
movq %rcx, %rax
shrq %rax
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rcx
movl $0x0, %r12d
cmovbeq %rax, %r12
addq %rcx, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x32e0c
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x32d32
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %r15d
movl %ebp, %eax
negb %al
jno 0x32d93
movq (%rbx), %rcx
leaq 0x2(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x32de7
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 0x32e05
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x32deb
testb %bpl, %bpl
jns 0x32e27
movq (%rbx), %rcx
leaq 0x3(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x32e16
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 0x32e05
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x32e1a
movq 0x10(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x32e34
movl $0x1, %eax
jmp 0x32e34
movl $0x1, %eax
jmp 0x32d3b
movq 0x10(%rbx), %rax
negl %ebp
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0x2d, (%rax,%rcx)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x41065
shrl $0x1f, %eax
orl %eax, %r15d
incq %r13
cmpl %r13d, 0x8(%rsp)
jne 0x32cc8
jmp 0x33463
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x32e97
movq %rcx, %rax
shrq $0x3e, %rax
movq %rcx, %rdx
shrq %rdx
xorl %r14d, %r14d
testq %rax, %rax
cmoveq %rdx, %r14
addq %rcx, %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4860
testq %rax, %rax
je 0x333b5
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x32e9b
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb $0x2e, (%rax,%rdx)
xorl %eax, %eax
jmp 0x3346a
cmpl $0x7, %esi
jle 0x333bf
movl %esi, %r12d
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), %rdi
leaq (%rdi,%r15), %rax
addq $0x2, %rax
cmpq %rdi, %rax
jbe 0x33479
cmpq %rax, 0x8(%rbx)
jae 0x3348c
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 0x33484
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdi
jmp 0x33490
testl %esi, %esi
jle 0x33460
movl %esi, %eax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
movl (%r14,%r13,4), %ebp
cmpl $0x80000001, %ebp       # imm = 0x80000001
je 0x33463
testl %r13d, %r13d
je 0x32fb9
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x32fa9
movq %rcx, %rax
shrq %rax
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rcx
movl $0x0, %r12d
cmovbeq %rax, %r12
addq %rcx, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x3308f
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x32fad
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %r15d
movl %ebp, %r14d
negl %r14d
jno 0x33019
movq (%rbx), %rcx
leaq 0x2(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x3306c
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
movq 0x8(%rsp), %r14
je 0x33099
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x33075
testl %ebp, %ebp
jns 0x330b2
movq (%rbx), %rcx
leaq 0x3(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x330a0
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 0x330da
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x330a4
movq 0x10(%rbx), %rax
movq 0x8(%rsp), %r14
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x330c4
movl $0x1, %eax
jmp 0x32fb6
movl $0x1, %eax
jmp 0x330c4
movq 0x10(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0x2d, (%rax,%rcx)
movl %r14d, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x41065
shrl $0x1f, %eax
movq 0x8(%rsp), %r14
orl %eax, %r15d
incq %r13
cmpl %r13d, 0x10(%rsp)
jne 0x32f41
jmp 0x33463
movl $0x1, %eax
jmp 0x330bf
testl %esi, %esi
jle 0x33460
movl %esi, %eax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
movl (%r14,%r13,4), %ebp
cmpl 0x9a414(%rip), %ebp     # 0xcd514
je 0x33463
testl %r13d, %r13d
je 0x3316e
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x3315e
movq %rcx, %rax
shrq %rax
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rcx
movl $0x0, %r12d
cmovbeq %rax, %r12
addq %rcx, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33209
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x33162
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %r15d
cmpl 0x9a39c(%rip), %ebp     # 0xcd510
jne 0x331c1
movq (%rbx), %rcx
leaq 0x2(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x331d7
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 0x33213
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x331db
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r13,4), %xmm0
movq %rbx, %rdi
callq 0x88e98
shrl $0x1f, %eax
jmp 0x331f3
movq 0x10(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
orl %eax, %r15d
incq %r13
cmpl %r13d, 0x8(%rsp)
jne 0x330f6
jmp 0x33463
movl $0x1, %eax
jmp 0x3316b
movl $0x1, %eax
jmp 0x331f3
testl %esi, %esi
jle 0x33460
movl %esi, %eax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
movswl (%r14,%r13,2), %ebp
cmpl $0xffff8001, %ebp       # imm = 0xFFFF8001
je 0x33463
testl %r13d, %r13d
je 0x332a8
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x33298
movq %rcx, %rax
shrq %rax
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rcx
movl $0x0, %r12d
cmovbeq %rax, %r12
addq %rcx, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x33377
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x3329c
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %r15d
movl %ebp, %eax
negw %ax
jno 0x332fe
movq (%rbx), %rcx
leaq 0x2(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x33352
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 0x33370
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x33356
testw %bp, %bp
jns 0x33392
movq (%rbx), %rcx
leaq 0x3(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x33381
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 0x33370
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x33385
movq 0x10(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0x2e, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x3339f
movl $0x1, %eax
jmp 0x3339f
movl $0x1, %eax
jmp 0x332a5
movq 0x10(%rbx), %rax
negl %ebp
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0x2d, (%rax,%rcx)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x41065
shrl $0x1f, %eax
orl %eax, %r15d
incq %r13
cmpl %r13d, 0x8(%rsp)
jne 0x3322f
jmp 0x33463
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3346a
testl %esi, %esi
jle 0x33460
movl %esi, %ebp
xorl %r13d, %r13d
xorl %r15d, %r15d
movb (%r14,%r13), %r14b
testb %r14b, %r14b
je 0x33463
movq (%rbx), %rcx
leaq 0x2(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x33427
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 0x33459
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x3342b
movq 0x10(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb %r14b, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
orl %eax, %r15d
incq %r13
cmpl %r13d, %ebp
movq 0x8(%rsp), %r14
jne 0x333cf
jmp 0x33463
movl $0x1, %eax
jmp 0x33443
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 0x33463
movq 0x10(%rbx), %rax
addq %rax, %rdi
movq %r14, %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 0x33463
leaq 0x78779(%rip), %rsi     # 0xabc35
leaq 0x78780(%rip), %rdx     # 0xabc43
movl $0x1, %edi
xorl %eax, %eax
callq 0x942d
movl $0x1, %edi
callq 0x45f0