// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/test-vcf-api.c
// Function: test_get_info_values
void test_get_info_values(const char *fname)
{
    htsFile *fp = hts_open(fname, "r");
    if (!fp) error("Failed to open \"%s\" : %s", fname, strerror(errno));
    bcf_hdr_t *hdr = bcf_hdr_read(fp);
    if (!hdr) error("bcf_hdr_read : %s", strerror(errno));
    bcf1_t *line = bcf_init();
    if (!line) error("bcf_init : %s", strerror(errno));
    int r;
    while ((r = bcf_read(fp, hdr, line)) == 0)
    {
        float *afs = 0;
        int32_t *negs = NULL;
        int count = 0;
        int ret = bcf_get_info_float(hdr, line, "AF", &afs, &count);

        if (line->pos == 14369)
        {
            if (ret != 1 || afs[0] != 0.5f)
            {
                fprintf(stderr, "AF on position 14370 should be 0.5\n");
                exit(-1);
            }
        }
        else
        {
            if (ret != 2 || afs[0] != 0.333f || !bcf_float_is_missing(afs[1]))
            {
                fprintf(stderr, "AF on position 1110696 should be 0.333, missing\n");
                exit(-1);
            }
        }

        free(afs);

        int32_t expected = (line->pos == 14369)? -127 : -128;
        count = 0;
        ret = bcf_get_info_int32(hdr, line, "NEG", &negs, &count);
        if (ret != 1 || negs[0] != expected)
        {
            if (ret < 0)
                fprintf(stderr, "NEG should be %d, got error ret=%d\n", expected, ret);
            else if (ret == 0)
                fprintf(stderr, "NEG should be %d, got no entries\n", expected);
            else
                fprintf(stderr, "NEG should be %d, got %d entries (first is %d)\n", expected, ret, negs[0]);
            exit(1);
        }
        free(negs);
    }
    if (r < -1) error("bcf_read");

    bcf_destroy(line);
    bcf_hdr_destroy(hdr);
    hts_close(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x103a43(%rip), %rsi    # 0x10b79a
callq 0xcf30
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x7d90
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq -0x50(%rbp), %rsi
movq %rax, %rdx
leaq 0xfe296(%rip), %rdi     # 0x10601f
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rdi
callq 0x43030
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7dc1
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq %rax, %rsi
leaq 0xff914(%rip), %rdi     # 0x1076ce
movb $0x0, %al
callq 0x5ae0
callq 0x43c30
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7dee
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq %rax, %rsi
leaq 0xffc94(%rip), %rdi     # 0x107a7b
movb $0x0, %al
callq 0x5ae0
jmp 0x7df0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x44620
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x7fd9
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0x10c80c(%rip), %rdx    # 0x11463f
leaq -0x30(%rbp), %rcx
leaq -0x3c(%rbp), %r8
movl $0x2, %r9d
callq 0x53060
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x3821, (%rax)         # imm = 0x3821
jne 0x7e99
cmpl $0x1, -0x40(%rbp)
jne 0x7e75
movq -0x30(%rbp), %rax
movss (%rax), %xmm0
movss 0xfe19c(%rip), %xmm1    # 0x106008
ucomiss %xmm1, %xmm0
jne 0x7e75
jp 0x7e75
jmp 0x7e97
movq 0x12315c(%rip), %rax    # 0x12afd8
movq (%rax), %rdi
leaq 0xffc03(%rip), %rsi     # 0x107a89
movb $0x0, %al
callq 0x4700
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x45d0
jmp 0x7eed
cmpl $0x2, -0x40(%rbp)
jne 0x7ec9
movq -0x30(%rbp), %rax
movss (%rax), %xmm0
movss 0xfe161(%rip), %xmm1    # 0x106010
ucomiss %xmm1, %xmm0
jne 0x7ec9
jp 0x7ec9
movq -0x30(%rbp), %rax
movss 0x4(%rax), %xmm0
callq 0x8010
cmpl $0x0, %eax
jne 0x7eeb
movq 0x123108(%rip), %rax    # 0x12afd8
movq (%rax), %rdi
leaq 0xffbd3(%rip), %rsi     # 0x107aad
movb $0x0, %al
callq 0x4700
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x45d0
jmp 0x7eed
movq -0x30(%rbp), %rdi
callq 0x45a0
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movl $0xffffff80, %eax       # imm = 0xFFFFFF80
movl $0xffffff81, %ecx       # imm = 0xFFFFFF81
cmpq $0x3821, %rdx           # imm = 0x3821
cmovel %ecx, %eax
movl %eax, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0xff0e3(%rip), %rdx     # 0x10700d
leaq -0x38(%rbp), %rcx
leaq -0x3c(%rbp), %r8
movl $0x1, %r9d
callq 0x53060
movl %eax, -0x40(%rbp)
cmpl $0x1, -0x40(%rbp)
jne 0x7f51
movq -0x38(%rbp), %rax
movl (%rax), %eax
cmpl -0x44(%rbp), %eax
je 0x7fcb
cmpl $0x0, -0x40(%rbp)
jge 0x7f77
movq 0x12307a(%rip), %rax    # 0x12afd8
movq (%rax), %rdi
movl -0x44(%rbp), %edx
movl -0x40(%rbp), %ecx
leaq 0xffb70(%rip), %rsi     # 0x107ade
movb $0x0, %al
callq 0x4700
jmp 0x7fc1
cmpl $0x0, -0x40(%rbp)
jne 0x7f9a
movq 0x123054(%rip), %rax    # 0x12afd8
movq (%rax), %rdi
movl -0x44(%rbp), %edx
leaq 0xffb71(%rip), %rsi     # 0x107b02
movb $0x0, %al
callq 0x4700
jmp 0x7fbf
movq 0x123037(%rip), %rax    # 0x12afd8
movq (%rax), %rdi
movl -0x44(%rbp), %edx
movl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rax
movl (%rax), %r8d
leaq 0xffb6c(%rip), %rsi     # 0x107b24
movb $0x0, %al
callq 0x4700
jmp 0x7fc1
movl $0x1, %edi
callq 0x45d0
movq -0x38(%rbp), %rdi
callq 0x45a0
jmp 0x7df0
cmpl $-0x1, -0x24(%rbp)
jge 0x7fed
leaq 0xffb6e(%rip), %rdi     # 0x107b54
movb $0x0, %al
callq 0x5ae0
movq -0x20(%rbp), %rdi
callq 0x44020
movq -0x18(%rbp), %rdi
callq 0x42dd0
movq -0x10(%rbp), %rdi
callq 0xf050
addq $0x50, %rsp
popq %rbp
retq
nop