// File: /workspace/github_c_makefile_star2_O3/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 0xd626
decl %edx
cmpl $0x6, %edx
ja 0xd626
movq %rcx, %r14
leaq 0x120ea(%rip), %rax     # 0x1f1b4
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testl %esi, %esi
jle 0xd626
movl %esi, %r12d
xorl %r15d, %r15d
movb (%r14,%r15), %al
cmpb $-0x7f, %al
je 0xd621
testl %r15d, %r15d
je 0xd167
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd105
movq 0x10(%rbx), %rax
jmp 0xd151
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movb (%r14,%r15), %al
movl %eax, %ecx
negb %cl
jno 0xd180
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd18d
movq 0x10(%rbx), %rax
jmp 0xd1d9
movsbl %al, %edi
movq %rbx, %rsi
callq 0xc33d
jmp 0xd1eb
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2e, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %r15
cmpl %r15d, %r12d
jne 0xd0e1
jmp 0xd699
testl %esi, %esi
jle 0xd626
movl %esi, %r12d
xorl %r15d, %r15d
movl (%r14,%r15,4), %edi
cmpl $0x80000001, %edi       # imm = 0x80000001
je 0xd621
testl %r15d, %r15d
je 0xd294
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd232
movq 0x10(%rbx), %rax
jmp 0xd27e
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl (%r14,%r15,4), %edi
movl %edi, %eax
negl %eax
jno 0xd2ad
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd2b7
movq 0x10(%rbx), %rax
jmp 0xd303
movq %rbx, %rsi
callq 0xc33d
jmp 0xd315
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2e, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %r15
cmpl %r15d, %r12d
jne 0xd20a
jmp 0xd699
testl %esi, %esi
jle 0xd626
movl %esi, %r12d
xorl %r15d, %r15d
movzwl (%r14,%r15,2), %eax
cmpl $0x8001, %eax           # imm = 0x8001
je 0xd621
testl %r15d, %r15d
je 0xd3bf
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd35c
movq 0x10(%rbx), %rax
jmp 0xd3a8
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movzwl (%r14,%r15,2), %eax
movl %eax, %ecx
negw %cx
jno 0xd3d9
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd3e6
movq 0x10(%rbx), %rax
jmp 0xd432
movswl %ax, %edi
movq %rbx, %rsi
callq 0xc33d
jmp 0xd444
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2e, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %r15
cmpl %r15d, %r12d
jne 0xd334
jmp 0xd699
testl %esi, %esi
jle 0xd626
movl %esi, %r12d
xorl %r15d, %r15d
movl (%r14,%r15,4), %eax
cmpl 0x18f17(%rip), %eax     # 0x26384
je 0xd621
testl %r15d, %r15d
je 0xd4ed
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd48b
movq 0x10(%rbx), %rax
jmp 0xd4d7
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2c, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl (%r14,%r15,4), %eax
cmpl 0x18e8d(%rip), %eax     # 0x26380
jne 0xd508
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd51c
movq 0x10(%rbx), %rax
jmp 0xd568
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0xd6a2
jmp 0xd57a
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x2e, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %r15
cmpl %r15d, %r12d
jne 0xd463
jmp 0xd699
testl %esi, %esi
jle 0xd626
movl %esi, %r12d
xorl %r15d, %r15d
movb (%r14,%r15), %bpl
testb %bpl, %bpl
je 0xd621
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0xd5b5
movq 0x10(%rbx), %rax
jmp 0xd601
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb %bpl, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %r15
cmpl %r15d, %r12d
jne 0xd599
jmp 0xd699
testl %r15d, %r15d
jne 0xd699
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rbx), %rdx
jae 0xd639
movq 0x10(%rbx), %rax
jmp 0xd685
movq %rdx, %rax
shrq %rax
orq %rdx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
addq %rax, %rcx
movq %rdx, (%rbx)
movb $0x2e, (%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq