// File: /workspace/github_c_makefile_star2_O3/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 0x15f02(%rip), %r15     # 0x96ed2
leaq 0x20321(%rip), %r12     # 0xa12f8
movl (%rbx), %r13d
cmpq $0x28, %r13
ja 0x80ff0
movq %r13, %rax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x80ffc
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
testq %rbp, %rbp
je 0x813ef
movq %rbp, %rdi
movq %r15, %rsi
callq 0x46c0
testl %eax, %eax
je 0x81184
movq %rbp, %rdi
leaq 0x20418(%rip), %rsi     # 0xa143d
callq 0x46c0
testl %eax, %eax
je 0x81155
movq %rbp, %rdi
leaq 0x2040b(%rip), %rsi     # 0xa1447
callq 0x46c0
testl %eax, %eax
je 0x811fe
movq %rbp, %rdi
leaq 0x203fc(%rip), %rsi     # 0xa144f
callq 0x46c0
testl %eax, %eax
je 0x81214
movq %rbp, %rdi
leaq 0x203f6(%rip), %rsi     # 0xa1460
callq 0x46c0
testl %eax, %eax
je 0x8127f
movq %rbp, %rdi
leaq 0x203f5(%rip), %rsi     # 0xa1476
callq 0x46c0
testl %eax, %eax
je 0x812ad
movq %rbp, %rdi
leaq 0x15e44(%rip), %rsi     # 0x96edc
callq 0x46c0
testl %eax, %eax
je 0x812db
movq %rbp, %rdi
leaq 0x203cf(%rip), %rsi     # 0xa147e
callq 0x46c0
testl %eax, %eax
je 0x8131e
movq %rbp, %rdi
leaq 0x203ca(%rip), %rsi     # 0xa1490
callq 0x46c0
testl %eax, %eax
je 0x81364
movq %rbp, %rdi
leaq 0x203ca(%rip), %rsi     # 0xa14a7
callq 0x46c0
testl %eax, %eax
je 0x81392
movq %rbp, %rdi
leaq 0x203c5(%rip), %rsi     # 0xa14b9
callq 0x46c0
testl %eax, %eax
jne 0x813f3
cmpl $0x28, %r13d
ja 0x813a8
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x813b4
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x7f2be
testl %eax, %eax
js 0x813fe
movl $0xe, %edx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4650
testl %eax, %eax
jne 0x81152
movl $0xffffffff, 0x38(%r14) # imm = 0xFFFFFFFF
movl (%rbx), %r13d
cmpl $0x28, %r13d
ja 0x8116b
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x81177
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
testq %rbp, %rbp
jne 0x8111e
jmp 0x80fd7
cmpl $0x28, %r13d
ja 0x8119a
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x811a6
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r13
movq (%r13), %rsi
testq %rsi, %rsi
je 0x80fd7
addq $0x8, %r13
movq %r14, %rdi
movl $0x1, %edx
callq 0x7f2be
testl %eax, %eax
js 0x813fe
movq -0x8(%r13), %rsi
movl $0xe, %edx
movq %r12, %rdi
callq 0x4650
testl %eax, %eax
jne 0x811ec
movl $0xffffffff, 0x38(%r14) # imm = 0xFFFFFFFF
movq (%r13), %rsi
addq $0x8, %r13
testq %rsi, %rsi
jne 0x811ba
jmp 0x80fd7
cmpl $0x28, %r13d
ja 0x8122a
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x81236
cmpl $0x28, %r13d
ja 0x81295
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x812a1
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
testq %rbp, %rbp
je 0x80fd7
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x7f2be
testl %eax, %eax
js 0x813fe
movl $0xe, %edx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4650
testl %eax, %eax
jne 0x80fd7
movl $0xffffffff, 0x38(%r14) # imm = 0xFFFFFFFF
jmp 0x80fd7
cmpl $0x28, %r13d
ja 0x812c3
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x812cf
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x20(%r14)
jmp 0x80fd7
cmpl $0x28, %r13d
ja 0x812f1
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x812fd
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x28(%r14)
jmp 0x80fd7
cmpl $0x28, %r13d
ja 0x81334
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x81340
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rsi
testq %rsi, %rsi
je 0x80fd7
movq %r14, %rdi
callq 0x80fb8
testl %eax, %eax
jns 0x80fd7
jmp 0x813fe
cmpl $0x28, %r13d
ja 0x8137a
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x81386
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
leaq 0x15ba5(%rip), %rsi     # 0x96eef
callq 0x46c0
testl %eax, %eax
jne 0x80fd7
movl $0xfffffffd, 0x38(%r14) # imm = 0xFFFFFFFD
jmp 0x80fd7
cmpl $0x28, %r13d
ja 0x813bf
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x813cb
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x40(%r14)
jmp 0x80fd7
cmpl $0x28, %r13d
ja 0x813d7
movl %r13d, %eax
addq 0x10(%rbx), %rax
addl $0x8, %r13d
movl %r13d, (%rbx)
jmp 0x813e3
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
movl %eax, 0x58(%r14)
jmp 0x80fd7
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x48(%r14)
jmp 0x80fd7
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
movq %rax, 0x50(%r14)
jmp 0x80fd7
xorl %eax, %eax
jmp 0x81403
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