// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_parse_format
int hts_parse_format(htsFormat *format, const char *str) {
    const char *cp;

    if (!(cp = strchr(str, ',')))
        cp = str+strlen(str);

    format->version.minor = 0; // unknown
    format->version.major = 0; // unknown

    if (strncmp(str, "sam", cp-str) == 0) {
        format->category          = sequence_data;
        format->format            = sam;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strncmp(str, "bam", cp-str) == 0) {
        format->category          = sequence_data;
        format->format            = bam;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else if (strncmp(str, "cram", cp-str) == 0) {
        format->category          = sequence_data;
        format->format            = cram;
        format->compression       = custom;
        format->compression_level = -1;
    } else if (strncmp(str, "vcf", cp-str) == 0) {
        format->category          = variant_data;
        format->format            = vcf;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strncmp(str, "bcf", cp-str) == 0) {
        format->category          = variant_data;
        format->format            = bcf;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else {
        return -1;
    }

    return hts_parse_opt_list(format, cp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2c, %esi
callq 0x6260
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x720a7
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x62c0
movq %rax, %rcx
movq -0x28(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movw $0x0, 0xa(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x8(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
leaq 0x70413(%rip), %rsi     # 0xe24e4
callq 0x6320
cmpl $0x0, %eax
jne 0x7210a
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movl $0x3, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x10(%rax)
jmp 0x72251
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
leaq 0x703c8(%rip), %rsi     # 0xe24e8
callq 0x6320
cmpl $0x0, %eax
jne 0x72159
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movl $0x4, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0xc(%rax)
movq -0x10(%rbp), %rax
movw $0xffff, 0x10(%rax)     # imm = 0xFFFF
jmp 0x7224f
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
leaq 0x7037d(%rip), %rsi     # 0xe24ec
callq 0x6320
cmpl $0x0, %eax
jne 0x721a8
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movl $0x6, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x3, 0xc(%rax)
movq -0x10(%rbp), %rax
movw $0xffff, 0x10(%rax)     # imm = 0xFFFF
jmp 0x7224d
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
leaq 0x70394(%rip), %rsi     # 0xe2552
callq 0x6320
cmpl $0x0, %eax
jne 0x721f4
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x10(%rax)
jmp 0x7224b
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
leaq 0x7034d(%rip), %rsi     # 0xe2557
callq 0x6320
cmpl $0x0, %eax
jne 0x72240
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
movq -0x10(%rbp), %rax
movl $0x9, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0xc(%rax)
movq -0x10(%rbp), %rax
movw $0xffff, 0x10(%rax)     # imm = 0xFFFF
jmp 0x72249
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x72261
jmp 0x7224b
jmp 0x7224d
jmp 0x7224f
jmp 0x72251
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x71ea0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)