// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/hts.c
// Function: hts_opt_add
int hts_opt_add(hts_opt **opts, const char *c_arg) {
    hts_opt *o, *t;
    char *val;

    if (!c_arg)
        return -1;

    if (!(o =  malloc(sizeof(*o))))
        return -1;

    if (!(o->arg = strdup(c_arg))) {
        free(o);
        return -1;
    }

    if (!(val = strchr(o->arg, '=')))
        val = "1"; // assume boolean
    else
        *val++ = '\0';

    if (strcmp(o->arg, "decode_md") == 0 ||
        strcmp(o->arg, "DECODE_MD") == 0)
        o->opt = CRAM_OPT_DECODE_MD, o->val.i = atoi(val);

    else if (strcmp(o->arg, "verbosity") == 0 ||
             strcmp(o->arg, "VERBOSITY") == 0)
        o->opt = CRAM_OPT_VERBOSITY, o->val.i = atoi(val);

    else if (strcmp(o->arg, "seqs_per_slice") == 0 ||
             strcmp(o->arg, "SEQS_PER_SLICE") == 0)
        o->opt = CRAM_OPT_SEQS_PER_SLICE, o->val.i = atoi(val);

    else if (strcmp(o->arg, "slices_per_container") == 0 ||
             strcmp(o->arg, "SLICES_PER_CONTAINER") == 0)
        o->opt = CRAM_OPT_SLICES_PER_CONTAINER, o->val.i = atoi(val);

    else if (strcmp(o->arg, "embed_ref") == 0 ||
             strcmp(o->arg, "EMBED_REF") == 0)
        o->opt = CRAM_OPT_EMBED_REF, o->val.i = atoi(val);

    else if (strcmp(o->arg, "no_ref") == 0 ||
             strcmp(o->arg, "NO_REF") == 0)
        o->opt = CRAM_OPT_NO_REF, o->val.i = atoi(val);

    else if (strcmp(o->arg, "ignore_md5") == 0 ||
             strcmp(o->arg, "IGNORE_MD5") == 0)
        o->opt = CRAM_OPT_IGNORE_MD5, o->val.i = atoi(val);

    else if (strcmp(o->arg, "use_bzip2") == 0 ||
             strcmp(o->arg, "USE_BZIP2") == 0)
        o->opt = CRAM_OPT_USE_BZIP2, o->val.i = atoi(val);

    else if (strcmp(o->arg, "use_rans") == 0 ||
             strcmp(o->arg, "USE_RANS") == 0)
        o->opt = CRAM_OPT_USE_RANS, o->val.i = atoi(val);

    else if (strcmp(o->arg, "use_lzma") == 0 ||
             strcmp(o->arg, "USE_LZMA") == 0)
        o->opt = CRAM_OPT_USE_LZMA, o->val.i = atoi(val);

    else if (strcmp(o->arg, "reference") == 0 ||
             strcmp(o->arg, "REFERENCE") == 0)
        o->opt = CRAM_OPT_REFERENCE, o->val.s = val;

    else if (strcmp(o->arg, "version") == 0 ||
             strcmp(o->arg, "VERSION") == 0)
        o->opt = CRAM_OPT_VERSION, o->val.s =val;

    else if (strcmp(o->arg, "multi_seq_per_slice") == 0 ||
             strcmp(o->arg, "MULTI_SEQ_PER_SLICE") == 0)
        o->opt = CRAM_OPT_MULTI_SEQ_PER_SLICE, o->val.i = atoi(val);

    else if (strcmp(o->arg, "nthreads") == 0 ||
             strcmp(o->arg, "NTHREADS") == 0)
        o->opt = HTS_OPT_NTHREADS, o->val.i = atoi(val);

    else if (strcmp(o->arg, "required_fields") == 0 ||
             strcmp(o->arg, "REQUIRED_FIELDS") == 0)
        o->opt = CRAM_OPT_REQUIRED_FIELDS, o->val.i = strtol(val, NULL, 0);

    else {
        fprintf(stderr, "Unknown option '%s'\n", o->arg);
        free(o->arg);
        free(o);
        return -1;
    }

    o->next = NULL;

    // Append; assumes small list.
    if (*opts) {
        t = *opts;
        while (t->next)
            t = t->next;
        t->next = o;
    } else {
        *opts = o;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x716d3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71cd0
movl $0x20, %edi
callq 0x69c0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x716f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71cd0
movq -0x18(%rbp), %rdi
callq 0x6dd0
movq -0x20(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x7171e
movq -0x20(%rbp), %rdi
callq 0x6880
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71cd0
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movl $0x3d, %esi
callq 0x6260
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x71746
leaq 0x71774(%rip), %rax     # 0xe2eb4
movq %rax, -0x30(%rbp)
jmp 0x71758
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70c13(%rip), %rsi     # 0xe2379
callq 0x6a40
cmpl $0x0, %eax
je 0x71788
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70c05(%rip), %rsi     # 0xe2383
callq 0x6a40
cmpl $0x0, %eax
jne 0x717aa
movq -0x20(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c76
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70bd5(%rip), %rsi     # 0xe238d
callq 0x6a40
cmpl $0x0, %eax
je 0x717da
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70bc7(%rip), %rsi     # 0xe2397
callq 0x6a40
cmpl $0x0, %eax
jne 0x717fc
movq -0x20(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c74
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70b97(%rip), %rsi     # 0xe23a1
callq 0x6a40
cmpl $0x0, %eax
je 0x7182c
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70b8e(%rip), %rsi     # 0xe23b0
callq 0x6a40
cmpl $0x0, %eax
jne 0x7184e
movq -0x20(%rbp), %rax
movl $0x3, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c72
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70b63(%rip), %rsi     # 0xe23bf
callq 0x6a40
cmpl $0x0, %eax
je 0x7187e
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70b60(%rip), %rsi     # 0xe23d4
callq 0x6a40
cmpl $0x0, %eax
jne 0x718a0
movq -0x20(%rbp), %rax
movl $0x4, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c70
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70b3b(%rip), %rsi     # 0xe23e9
callq 0x6a40
cmpl $0x0, %eax
je 0x718d0
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70b2d(%rip), %rsi     # 0xe23f3
callq 0x6a40
cmpl $0x0, %eax
jne 0x718f2
movq -0x20(%rbp), %rax
movl $0x7, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c6e
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70afd(%rip), %rsi     # 0xe23fd
callq 0x6a40
cmpl $0x0, %eax
je 0x71922
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70aec(%rip), %rsi     # 0xe2404
callq 0x6a40
cmpl $0x0, %eax
jne 0x71944
movq -0x20(%rbp), %rax
movl $0xb, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c6c
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70ab9(%rip), %rsi     # 0xe240b
callq 0x6a40
cmpl $0x0, %eax
je 0x71974
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70aac(%rip), %rsi     # 0xe2416
callq 0x6a40
cmpl $0x0, %eax
jne 0x71996
movq -0x20(%rbp), %rax
movl $0x8, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c6a
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70a7d(%rip), %rsi     # 0xe2421
callq 0x6a40
cmpl $0x0, %eax
je 0x719c6
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70a6f(%rip), %rsi     # 0xe242b
callq 0x6a40
cmpl $0x0, %eax
jne 0x719e8
movq -0x20(%rbp), %rax
movl $0xc, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c68
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70a3f(%rip), %rsi     # 0xe2435
callq 0x6a40
cmpl $0x0, %eax
je 0x71a18
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70a30(%rip), %rsi     # 0xe243e
callq 0x6a40
cmpl $0x0, %eax
jne 0x71a3a
movq -0x20(%rbp), %rax
movl $0x11, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c66
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x709ff(%rip), %rsi     # 0xe2447
callq 0x6a40
cmpl $0x0, %eax
je 0x71a6a
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x709f0(%rip), %rsi     # 0xe2450
callq 0x6a40
cmpl $0x0, %eax
jne 0x71a8c
movq -0x20(%rbp), %rax
movl $0x10, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c64
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x709bf(%rip), %rsi     # 0xe2459
callq 0x6a40
cmpl $0x0, %eax
je 0x71abc
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x709b1(%rip), %rsi     # 0xe2463
callq 0x6a40
cmpl $0x0, %eax
jne 0x71ad8
movq -0x20(%rbp), %rax
movl $0x9, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x71c62
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x6c22a(%rip), %rsi     # 0xddd10
callq 0x6a40
cmpl $0x0, %eax
je 0x71b08
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x7096f(%rip), %rsi     # 0xe246d
callq 0x6a40
cmpl $0x0, %eax
jne 0x71b24
movq -0x20(%rbp), %rax
movl $0x6, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x71c60
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70943(%rip), %rsi     # 0xe2475
callq 0x6a40
cmpl $0x0, %eax
je 0x71b54
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x7093f(%rip), %rsi     # 0xe2489
callq 0x6a40
cmpl $0x0, %eax
jne 0x71b76
movq -0x20(%rbp), %rax
movl $0xa, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c5e
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x70919(%rip), %rsi     # 0xe249d
callq 0x6a40
cmpl $0x0, %eax
je 0x71ba6
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x7090a(%rip), %rsi     # 0xe24a6
callq 0x6a40
cmpl $0x0, %eax
jne 0x71bc8
movq -0x20(%rbp), %rax
movl $0x65, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x6bd0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c5c
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x708d9(%rip), %rsi     # 0xe24af
callq 0x6a40
cmpl $0x0, %eax
je 0x71bf8
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x708d1(%rip), %rsi     # 0xe24bf
callq 0x6a40
cmpl $0x0, %eax
jne 0x71c1d
movq -0x20(%rbp), %rax
movl $0x12, 0x8(%rax)
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x6a50
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x71c5a
movq 0x933ac(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
leaq 0x7089a(%rip), %rsi     # 0xe24cf
movb $0x0, %al
callq 0x6a80
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x6880
movq -0x20(%rbp), %rdi
callq 0x6880
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71cd0
jmp 0x71c5c
jmp 0x71c5e
jmp 0x71c60
jmp 0x71c62
jmp 0x71c64
jmp 0x71c66
jmp 0x71c68
jmp 0x71c6a
jmp 0x71c6c
jmp 0x71c6e
jmp 0x71c70
jmp 0x71c72
jmp 0x71c74
jmp 0x71c76
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x71cbe
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x71cb0
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x71c97
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x71cc9
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)