// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movq %rdi, %r14
leaq 0x16945(%rip), %r15     # 0x99e24
leaq 0x20682(%rip), %r12     # 0xa3b68
leaq 0x207c0(%rip), %r13     # 0xa3cad
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x83503
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x8350f
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
testq %rbp, %rbp
je 0x838fb
movq %rbp, %rdi
movq %r15, %rsi
callq 0x46c0
testl %eax, %eax
je 0x83690
movq %rbp, %rdi
movq %r13, %rsi
callq 0x46c0
testl %eax, %eax
je 0x83661
movq %rbp, %rdi
leaq 0x2076c(%rip), %rsi     # 0xa3cb7
callq 0x46c0
testl %eax, %eax
je 0x8370a
movq %rbp, %rdi
leaq 0x2075d(%rip), %rsi     # 0xa3cbf
callq 0x46c0
testl %eax, %eax
je 0x83720
movq %rbp, %rdi
leaq 0x20757(%rip), %rsi     # 0xa3cd0
callq 0x46c0
testl %eax, %eax
je 0x8378b
movq %rbp, %rdi
leaq 0x20756(%rip), %rsi     # 0xa3ce6
callq 0x46c0
testl %eax, %eax
je 0x837b9
movq %rbp, %rdi
leaq 0x16887(%rip), %rsi     # 0x99e2e
callq 0x46c0
testl %eax, %eax
je 0x837e7
movq %rbp, %rdi
leaq 0x20730(%rip), %rsi     # 0xa3cee
callq 0x46c0
testl %eax, %eax
je 0x8382a
movq %rbp, %rdi
leaq 0x2072b(%rip), %rsi     # 0xa3d00
callq 0x46c0
testl %eax, %eax
je 0x83870
movq %rbp, %rdi
leaq 0x2072b(%rip), %rsi     # 0xa3d17
callq 0x46c0
testl %eax, %eax
je 0x8389e
movq %rbp, %rdi
leaq 0x20726(%rip), %rsi     # 0xa3d29
callq 0x46c0
testl %eax, %eax
jne 0x838ff
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x838b4
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x838c0
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x81883
testl %eax, %eax
js 0x8390a
movl $0xe, %edx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4650
testl %eax, %eax
jne 0x83661
movl $0xffffffff, 0x38(%r14) # imm = 0xFFFFFFFF
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x83677
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x83683
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
testq %rbp, %rbp
jne 0x8362d
jmp 0x834ed
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x836a6
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x836b2
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
movq (%rbp), %rsi
testq %rsi, %rsi
je 0x834ed
addq $0x8, %rbp
movq %r14, %rdi
movl $0x1, %edx
callq 0x81883
testl %eax, %eax
js 0x8390a
movq -0x8(%rbp), %rsi
movl $0xe, %edx
movq %r12, %rdi
callq 0x4650
testl %eax, %eax
jne 0x836f8
movl $0xffffffff, 0x38(%r14) # imm = 0xFFFFFFFF
movq (%rbp), %rsi
addq $0x8, %rbp
testq %rsi, %rsi
jne 0x836c6
jmp 0x834ed
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x83736
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x83742
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x837a1
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x837ad
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
testq %rbp, %rbp
je 0x834ed
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x81883
testl %eax, %eax
js 0x8390a
movl $0xe, %edx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4650
testl %eax, %eax
jne 0x834ed
movl $0xffffffff, 0x38(%r14) # imm = 0xFFFFFFFF
jmp 0x834ed
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x837cf
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x837db
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x20(%r14)
jmp 0x834ed
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x837fd
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x83809
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x28(%r14)
jmp 0x834ed
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x83840
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x8384c
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rsi
testq %rsi, %rsi
je 0x834ed
movq %r14, %rdi
callq 0x834c7
testl %eax, %eax
jns 0x834ed
jmp 0x8390a
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x83886
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x83892
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
leaq 0x165eb(%rip), %rsi     # 0x99e41
callq 0x46c0
testl %eax, %eax
jne 0x834ed
movl $0xfffffffd, 0x38(%r14) # imm = 0xFFFFFFFD
jmp 0x834ed
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x838cb
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x838d7
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x40(%r14)
jmp 0x834ed
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x838e3
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x838ef
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
movl %eax, 0x58(%r14)
jmp 0x834ed
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x48(%r14)
jmp 0x834ed
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x50(%r14)
jmp 0x834ed
xorl %eax, %eax
jmp 0x8390f
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq