// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/hfile_libcurl.c
// Function: parse_va_list
static int parse_va_list(http_headers *headers, va_list args)
{
    const char *argtype;

    while ((argtype = va_arg(args, const char *)) != NULL)
        if (strcmp(argtype, "httphdr:v") == 0) {
            const char **hdr;
            for (hdr = va_arg(args, const char **); *hdr; hdr++) {
                if (append_header(&headers->fixed, *hdr, 1) < 0)
                    return -1;
                if (is_authorization(*hdr))
                    headers->auth_hdr_num = -1;
            }
        }
        else if (strcmp(argtype, "httphdr:l") == 0) {
            const char *hdr;
            while ((hdr = va_arg(args, const char *)) != NULL) {
                if (append_header(&headers->fixed, hdr, 1) < 0)
                    return -1;
                if (is_authorization(hdr))
                    headers->auth_hdr_num = -1;
            }
        }
        else if (strcmp(argtype, "httphdr") == 0) {
            const char *hdr = va_arg(args, const char *);
            if (hdr) {
                if (append_header(&headers->fixed, hdr, 1) < 0)
                    return -1;
                if (is_authorization(hdr))
                    headers->auth_hdr_num = -1;
            }
        }
        else if (strcmp(argtype, "httphdr_callback") == 0) {
            headers->callback = va_arg(args, const hts_httphdr_callback);
        }
        else if (strcmp(argtype, "httphdr_callback_data") == 0) {
            headers->callback_data = va_arg(args, void *);
        }
        else if (strcmp(argtype, "va_list") == 0) {
            va_list *args2 = va_arg(args, va_list *);
            if (args2) {
                if (parse_va_list(headers, *args2) < 0) return -1;
            }
        }
        else if (strcmp(argtype, "auth_token_enabled") == 0) {
            const char *flag = va_arg(args, const char *);
            if (strcmp(flag, "false") == 0)
                headers->auth_hdr_num = -3;
        }
        else if (strcmp(argtype, "redirect_callback") == 0) {
            headers->redirect = va_arg(args, const redirect_callback);
        }
        else if (strcmp(argtype, "redirect_callback_data") == 0) {
            headers->redirect_data = va_arg(args, void *);
        }
        else if (strcmp(argtype, "http_response_ptr") == 0) {
            headers->http_response_ptr = va_arg(args, long *);
        }
        else if (strcmp(argtype, "fail_on_error") == 0) {
            headers->fail_on_error = va_arg(args, int);
        }
        else { errno = EINVAL; return -1; }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rbp
movl (%r14), %ebx
cmpq $0x28, %rbx
ja 0x66aef
movq %rbx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66afb
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %r13
testq %r13, %r13
je 0x66e99
movq %r13, %rdi
leaq 0x12393(%rip), %rsi     # 0x78ea4
callq 0x46c0
movl %ebx, %r12d
testl %eax, %eax
je 0x66c74
movq %r13, %rdi
leaq 0x1c202(%rip), %rsi     # 0x82d2d
callq 0x46c0
testl %eax, %eax
je 0x66c48
movq %r13, %rdi
leaq 0x1c1f5(%rip), %rsi     # 0x82d37
callq 0x46c0
testl %eax, %eax
je 0x66ccb
movq %r13, %rdi
leaq 0x1c1e6(%rip), %rsi     # 0x82d3f
callq 0x46c0
testl %eax, %eax
je 0x66cdc
movq %r13, %rdi
leaq 0x1c1e0(%rip), %rsi     # 0x82d50
callq 0x46c0
testl %eax, %eax
je 0x66d36
movq %r13, %rdi
leaq 0x1c1df(%rip), %rsi     # 0x82d66
callq 0x46c0
testl %eax, %eax
je 0x66d61
movq %r13, %rdi
leaq 0x12310(%rip), %rsi     # 0x78eae
callq 0x46c0
testl %eax, %eax
je 0x66d8c
movq %r13, %rdi
leaq 0x1c1b9(%rip), %rsi     # 0x82d6e
callq 0x46c0
testl %eax, %eax
je 0x66dcc
movq %r13, %rdi
leaq 0x1c1b4(%rip), %rsi     # 0x82d80
callq 0x46c0
testl %eax, %eax
je 0x66e0f
movq %r13, %rdi
leaq 0x1c1b4(%rip), %rsi     # 0x82d97
callq 0x46c0
testl %eax, %eax
je 0x66e3a
movq %r13, %rdi
leaq 0x1c1af(%rip), %rsi     # 0x82da9
callq 0x46c0
testl %eax, %eax
jne 0x66e9d
cmpl $0x28, %ebx
ja 0x66e4b
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66e58
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x653be
testl %eax, %eax
js 0x66ea8
movq %r13, %rdi
callq 0x65afc
testl %eax, %eax
je 0x66c45
orl $-0x1, 0x38(%r15)
movl (%r14), %ebx
cmpl $0x28, %ebx
ja 0x66c5b
movl %ebx, %eax
addq 0x10(%r14), %rax
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66c67
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %r13
testq %r13, %r13
jne 0x66c1f
jmp 0x66ad7
cmpl $0x28, %ebx
ja 0x66c85
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66c92
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rbx
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x66ad7
movq %r15, %rdi
movl %ebp, %edx
callq 0x653be
testl %eax, %eax
js 0x66ea8
movq (%rbx), %rdi
callq 0x65afc
testl %eax, %eax
je 0x66cc5
orl $-0x1, 0x38(%r15)
addq $0x8, %rbx
jmp 0x66c96
cmpl $0x28, %ebx
ja 0x66ced
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66cfa
cmpl $0x28, %ebx
ja 0x66d47
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66d54
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %r13
testq %r13, %r13
je 0x66ad7
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x653be
testl %eax, %eax
js 0x66ea8
movq %r13, %rdi
callq 0x65afc
testl %eax, %eax
je 0x66ad7
orl $-0x1, 0x38(%r15)
jmp 0x66ad7
cmpl $0x28, %ebx
ja 0x66d72
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66d7f
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rax
movq %rax, 0x20(%r15)
jmp 0x66ad7
cmpl $0x28, %ebx
ja 0x66d9d
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66daa
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rax
movq %rax, 0x28(%r15)
jmp 0x66ad7
cmpl $0x28, %ebx
ja 0x66ddd
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66dea
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rsi
testq %rsi, %rsi
je 0x66ad7
movq %r15, %rdi
callq 0x66ac3
testl %eax, %eax
jns 0x66ad7
jmp 0x66ea8
cmpl $0x28, %ebx
ja 0x66e20
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66e2d
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rdi
leaq 0x120cc(%rip), %rsi     # 0x78ec1
callq 0x46c0
testl %eax, %eax
jne 0x66ad7
movl $0xfffffffd, 0x38(%r15) # imm = 0xFFFFFFFD
jmp 0x66ad7
cmpl $0x28, %ebx
ja 0x66e65
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66e72
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rax
movq %rax, 0x40(%r15)
jmp 0x66ad7
cmpl $0x28, %ebx
ja 0x66e7f
addq 0x10(%r14), %r12
addl $0x8, %ebx
movl %ebx, (%r14)
jmp 0x66e8c
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movl (%r12), %eax
movl %eax, 0x58(%r15)
jmp 0x66ad7
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rax
movq %rax, 0x48(%r15)
jmp 0x66ad7
movq 0x8(%r14), %r12
leaq 0x8(%r12), %rax
movq %rax, 0x8(%r14)
movq (%r12), %rax
movq %rax, 0x50(%r15)
jmp 0x66ad7
xorl %eax, %eax
jmp 0x66eab
callq 0x4050
movl $0x16, (%rax)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop