// File: /workspace/github_c_makefile_star2_O1/lh3[P]bgt/vcf.c
// Function: bcf_fmt_array
void bcf_fmt_array(kstring_t *s, int n, int type, void *data)
{
	int j = 0;
	if (n == 0) {
		kputc('.', s);
		return;
	}
	if (type == BCF_BT_INT8) {
		bcf_fmt_array_aux(int8_t, s, n, data, bcf_int8_missing, bcf_int8_end, &j);
	} else if (type == BCF_BT_CHAR) { // TODO: htslib has bcf_str_missing, but I don't know how to use that
		char *p = (char*)data;
		for (j = 0; j < n && *p; ++j, ++p) kputc(*p, s);
	} else if (type == BCF_BT_INT32) {
		bcf_fmt_array_aux(int32_t, s, n, data, bcf_int32_missing, bcf_int32_end, &j);
	} else if (type == BCF_BT_FLOAT) {
		float *p = (float*)data;
		for (j = 0; j < n && *(uint32_t*)p != bcf_float_end; ++j, ++p) {
			if (j) kputc(',', s);
			if (*(uint32_t*)p == bcf_float_missing) kputc('.', s);
			else ksprintf(s, "%g", *p);
		}
	} else if (type == BCF_BT_INT16) {
		bcf_fmt_array_aux(int16_t, s, n, data, bcf_int16_missing, bcf_int16_end, &j);
	}
	if (n && j == 0) kputc('.', s); // no actual value; write an empty array "."
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0xd40e
xorl %r15d, %r15d
decl %edx
cmpl $0x6, %edx
ja 0xd409
movq %rcx, %r14
leaq 0x122c5(%rip), %rax     # 0x1f19c
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testl %esi, %esi
jle 0xd409
movl %esi, %r12d
xorl %r15d, %r15d
cmpb $-0x7f, (%r14,%r15)
je 0xd409
testl %r15d, %r15d
je 0xcf6c
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xcf4f
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movsbl (%r14,%r15), %edi
cmpl $-0x80, %edi
jne 0xcfe6
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xcfc7
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
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)
jmp 0xcfee
movq %rbx, %rsi
callq 0xc19d
incq %r15
cmpl %r15d, %r12d
jne 0xceee
jmp 0xd403
testl %esi, %esi
jle 0xd409
movl %esi, %r12d
xorl %r15d, %r15d
cmpl $0x80000001, (%r14,%r15,4) # imm = 0x80000001
je 0xd409
testl %r15d, %r15d
je 0xd08e
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd071
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl (%r14,%r15,4), %edi
movl %edi, %eax
negl %eax
jno 0xd108
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd0e9
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
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)
jmp 0xd110
movq %rbx, %rsi
callq 0xc19d
incq %r15
cmpl %r15d, %r12d
jne 0xd00d
jmp 0xd403
testl %esi, %esi
jle 0xd409
movl %esi, %r12d
xorl %r15d, %r15d
cmpw $0x8001, (%r14,%r15,2)  # imm = 0x8001
je 0xd409
testl %r15d, %r15d
je 0xd1af
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd192
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movswl (%r14,%r15,2), %edi
cmpl $0xffff8000, %edi       # imm = 0xFFFF8000
jne 0xd22c
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd20d
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
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)
jmp 0xd234
movq %rbx, %rsi
callq 0xc19d
incq %r15
cmpl %r15d, %r12d
jne 0xd12f
jmp 0xd403
testl %esi, %esi
jle 0xd409
movl %esi, %r12d
xorl %r15d, %r15d
movl (%r14,%r15,4), %eax
cmpl 0x19127(%rip), %eax     # 0x26384
je 0xd409
testl %r15d, %r15d
je 0xd2d6
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd2b9
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x2c, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl (%r14,%r15,4), %eax
cmpl 0x190a0(%rip), %eax     # 0x26380
jne 0xd352
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd333
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
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)
jmp 0xd365
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r15,4), %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0xd485
incq %r15
cmpl %r15d, %r12d
jne 0xd253
jmp 0xd403
testl %esi, %esi
jle 0xd409
movl %esi, %r12d
xorl %r15d, %r15d
movb (%r14,%r15), %bpl
testb %bpl, %bpl
je 0xd409
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd3de
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb %bpl, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %r15
cmpl %r15d, %r12d
jne 0xd384
movl $0x1, %r15d
testl %r15d, %r15d
jne 0xd47c
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xd45f
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
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)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq