// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/hts.c
// Function: hts_format_description
char *hts_format_description(const htsFormat *format)
{
    kstring_t str = { 0, 0, NULL };

    switch (format->format) {
    case sam:   kputs("SAM", &str); break;
    case bam:   kputs("BAM", &str); break;
    case cram:  kputs("CRAM", &str); break;
    case fasta_format:  kputs("FASTA", &str); break;
    case fastq_format:  kputs("FASTQ", &str); break;
    case vcf:   kputs("VCF", &str); break;
    case bcf:
        if (format->version.major == 1) kputs("Legacy BCF", &str);
        else kputs("BCF", &str);
        break;
    case bai:   kputs("BAI", &str); break;
    case crai:  kputs("CRAI", &str); break;
    case csi:   kputs("CSI", &str); break;
    case fai_format:    kputs("FASTA-IDX", &str); break;
    case fqi_format:    kputs("FASTQ-IDX", &str); break;
    case gzi:   kputs("GZI", &str); break;
    case tbi:   kputs("Tabix", &str); break;
    case bed:   kputs("BED", &str); break;
    case d4_format:     kputs("D4", &str); break;
    case htsget: kputs("htsget", &str); break;
    case hts_crypt4gh_format: kputs("crypt4gh", &str); break;
    case empty_format:  kputs("empty", &str); break;
    default:    kputs("unknown", &str); break;
    }

    if (format->version.major >= 0) {
        kputs(" version ", &str);
        kputw(format->version.major, &str);
        if (format->version.minor >= 0) {
            kputc('.', &str);
            kputw(format->version.minor, &str);
        }
    }

    switch (format->compression) {
    case bzip2_compression:  kputs(" bzip2-compressed", &str); break;
    case razf_compression:   kputs(" legacy-RAZF-compressed", &str); break;
    case xz_compression:     kputs(" XZ-compressed", &str); break;
    case zstd_compression:   kputs(" Zstandard-compressed", &str); break;
    case custom: kputs(" compressed", &str); break;
    case gzip:   kputs(" gzip-compressed", &str); break;

    case bgzf:
        switch (format->format) {
        case bam:
        case bcf:
        case csi:
        case tbi:
            // These are by definition BGZF, so just use the generic term
            kputs(" compressed", &str);
            break;
        default:
            kputs(" BGZF-compressed", &str);
            break;
        }
        break;

    case no_compression:
        switch (format->format) {
        case bam:
        case bcf:
        case cram:
        case csi:
        case tbi:
            // These are normally compressed, so emphasise that this one isn't
            kputs(" uncompressed", &str);
            break;
        default:
            break;
        }
        break;

    default: break;
    }

    switch (format->category) {
    case sequence_data: kputs(" sequence", &str); break;
    case variant_data:  kputs(" variant calling", &str); break;
    case index_file:    kputs(" index", &str); break;
    case region_list:   kputs(" genomic region", &str); break;
    default: break;
    }

    if (format->compression == no_compression)
        switch (format->format) {
        case text_format:
        case sam:
        case crai:
        case vcf:
        case bed:
        case fai_format:
        case fqi_format:
        case fasta_format:
        case fastq_format:
        case htsget:
            kputs(" text", &str);
            break;

        case empty_format:
            break;

        default:
            kputs(" data", &str);
            break;
        }
    else
        kputs(" data", &str);

    return ks_release(&str);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl 0x4(%rdi), %eax
addl $-0x3, %eax
cmpl $0x12, %eax
ja 0x1052e
leaq 0x6733b(%rip), %rcx     # 0x77790
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x6795e(%rip), %rdi     # 0x77dc3
jmp 0x10535
leaq 0x67988(%rip), %rdi     # 0x77df9
jmp 0x10535
leaq 0x67954(%rip), %rdi     # 0x77dd1
jmp 0x10535
leaq 0x6798b(%rip), %rdi     # 0x77e14
jmp 0x10535
leaq 0x67951(%rip), %rdi     # 0x77de6
jmp 0x10535
leaq 0x6797a(%rip), %rdi     # 0x77e1b
jmp 0x10535
leaq 0x6795a(%rip), %rdi     # 0x77e07
jmp 0x10535
leaq 0x67929(%rip), %rdi     # 0x77de2
jmp 0x10535
leaq 0x6792d(%rip), %rdi     # 0x77def
jmp 0x10535
leaq 0x67882(%rip), %rdi     # 0x77d4d
jmp 0x10535
leaq 0x67917(%rip), %rdi     # 0x77deb
jmp 0x10535
leaq 0x678ea(%rip), %rdi     # 0x77dc7
jmp 0x10535
leaq 0x66f46(%rip), %rdi     # 0x7742c
jmp 0x10535
leaq 0x6787f(%rip), %rdi     # 0x77d6e
jmp 0x10535
leaq 0x678d3(%rip), %rdi     # 0x77dcb
jmp 0x10535
cmpw $0x1, 0x8(%rbx)
leaq 0x678d1(%rip), %rax     # 0x77dd7
leaq 0x678d1(%rip), %rdi     # 0x77dde
cmoveq %rax, %rdi
jmp 0x10535
leaq 0x678f7(%rip), %rdi     # 0x77e11
jmp 0x10535
leaq 0x678ea(%rip), %rdi     # 0x77e0d
jmp 0x10535
leaq 0x678d7(%rip), %rdi     # 0x77e03
jmp 0x10535
leaq 0x66cbf(%rip), %rdi     # 0x771f4
movq %rsp, %rsi
callq 0x1069f
cmpw $0x0, 0x8(%rbx)
js 0x1059f
leaq 0x678d6(%rip), %rdi     # 0x77e21
movq %rsp, %r14
movq %r14, %rsi
callq 0x1069f
movswl 0x8(%rbx), %edi
movq %r14, %rsi
callq 0x106db
cmpw $0x0, 0xa(%rbx)
js 0x1059f
movq %rsp, %rdi
movq (%rdi), %rsi
addq $0x2, %rsi
callq 0x1802e
testl %eax, %eax
js 0x10593
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movw $0x2e, (%rcx,%rax)
movswl 0xa(%rbx), %edi
movq %rsp, %rsi
callq 0x106db
movl 0xc(%rbx), %eax
cmpq $0x7, %rax
ja 0x1063c
leaq 0x67229(%rip), %rcx     # 0x777dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x4(%rbx), %eax
addl $-0x4, %eax
cmpl $0x9, %eax
jae 0x1063c
movl $0x165, %ecx            # imm = 0x165
btl %eax, %ecx
jae 0x1063c
leaq 0x678c4(%rip), %rdi     # 0x77e9c
jmp 0x10634
leaq 0x6784a(%rip), %rdi     # 0x77e2b
jmp 0x10634
movl 0x4(%rbx), %eax
addl $-0x4, %eax
cmpl $0x9, %eax
jae 0x1062d
movl %eax, %eax
leaq 0x675b9(%rip), %rcx     # 0x77bb0
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x10634
leaq 0x6926c(%rip), %rdi     # 0x79873
jmp 0x10634
leaq 0x67854(%rip), %rdi     # 0x77e64
jmp 0x10634
leaq 0x67861(%rip), %rdi     # 0x77e7a
jmp 0x10634
leaq 0x6781b(%rip), %rdi     # 0x77e3d
jmp 0x10634
leaq 0x6782a(%rip), %rdi     # 0x77e55
jmp 0x10634
leaq 0x67857(%rip), %rdi     # 0x77e8b
movq %rsp, %rsi
callq 0x1069f
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0x1065d
movl %eax, %eax
leaq 0x67586(%rip), %rcx     # 0x77bd4
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
movq %rsp, %rsi
callq 0x1069f
leaq 0x6b703(%rip), %rdi     # 0x7bd67
cmpl $0x0, 0xc(%rbx)
jne 0x10683
movl 0x4(%rbx), %eax
cmpl $0x13, %eax
ja 0x10683
movl $0xf618c, %ecx          # imm = 0xF618C
btl %eax, %ecx
jae 0x10698
leaq 0x67848(%rip), %rdi     # 0x77ecb
movq %rsp, %rsi
callq 0x1069f
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
cmpl $0xf, %eax
je 0x1068b
jmp 0x10683