// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/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 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 tbi:   kputs("Tabix", &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 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;
    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 sam:
        case crai:
        case vcf:
        case bed:
            kputs(" text", &str);
            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 $0x9, %eax
ja 0xc3aa
leaq 0x37680(%rip), %rcx     # 0x439c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x378c0(%rip), %rdi     # 0x43c10
jmp 0xc3b1
leaq 0x378ca(%rip), %rdi     # 0x43c23
jmp 0xc3b1
leaq 0x378a2(%rip), %rdi     # 0x43c04
jmp 0xc3b1
leaq 0x378a9(%rip), %rdi     # 0x43c14
jmp 0xc3b1
cmpw $0x1, 0x8(%rbx)
leaq 0x3789f(%rip), %rax     # 0x43c18
leaq 0x3789f(%rip), %rdi     # 0x43c1f
cmoveq %rax, %rdi
jmp 0xc3b1
leaq 0x3789f(%rip), %rdi     # 0x43c2c
jmp 0xc3b1
leaq 0x3784d(%rip), %rdi     # 0x43be3
jmp 0xc3b1
leaq 0x37888(%rip), %rdi     # 0x43c27
jmp 0xc3b1
leaq 0x37888(%rip), %rdi     # 0x43c30
jmp 0xc3b1
leaq 0x3aa50(%rip), %rdi     # 0x46e01
movq %rsp, %rsi
callq 0xc4c9
cmpw $0x0, 0x8(%rbx)
js 0xc41b
leaq 0x3786f(%rip), %rdi     # 0x43c36
movq %rsp, %r14
movq %r14, %rsi
callq 0xc4c9
movswl 0x8(%rbx), %edi
movq %r14, %rsi
callq 0xc51a
cmpw $0x0, 0xa(%rbx)
js 0xc41b
movq %rsp, %rdi
movq (%rdi), %rsi
addq $0x2, %rsi
callq 0x1042a
testl %eax, %eax
js 0xc40f
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 0xc51a
movl 0xc(%rbx), %eax
cmpl $0x3, %eax
je 0xc453
cmpl $0x2, %eax
je 0xc436
cmpl $0x1, %eax
jne 0xc46b
leaq 0x37818(%rip), %rdi     # 0x43c4c
jmp 0xc463
movl 0x4(%rbx), %eax
addl $-0x4, %eax
cmpl $0x8, %eax
ja 0xc45c
movl %eax, %eax
leaq 0x37726(%rip), %rcx     # 0x43b70
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0xc463
leaq 0x377e6(%rip), %rdi     # 0x43c40
jmp 0xc463
leaq 0x377fa(%rip), %rdi     # 0x43c5d
movq %rsp, %rsi
callq 0xc4c9
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0xc48c
movl %eax, %eax
leaq 0x37717(%rip), %rcx     # 0x43b94
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
movq %rsp, %rsi
callq 0xc4c9
leaq 0x37813(%rip), %rdi     # 0x43ca6
cmpl $0x0, 0xc(%rbx)
jne 0xc4b2
movl 0x4(%rbx), %eax
cmpl $0xd, %eax
ja 0xc4b2
movl $0x2188, %ecx           # imm = 0x2188
btl %eax, %ecx
jae 0xc4b2
leaq 0x377ee(%rip), %rdi     # 0x43ca0
movq %rsp, %rbx
movq %rbx, %rsi
callq 0xc4c9
movq 0x10(%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq