// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/test-vcf-api.c
// Function: test_update_alleles
static void test_update_alleles(bcf_hdr_t *hdr, bcf1_t *rec)
{
    // Exercise bcf_update_alleles() a bit
    const char *alleles1[2] = { "G", "A" };
    const char *alleles2[3] = { "C", "TGCA", "CATG" };
#define rep10(x) x x x x x x x x x x
    const char *alleles3[3] = { rep10("ATTCTAGATC"), "TGCA",
                                rep10("CTATTATCTCTAATGACATG") };
#undef rep10
    const char *alleles4[3] = { alleles3[2], NULL, alleles3[0] };
    // Add some alleles
    check0(bcf_update_alleles(hdr, rec, alleles1, 2));
    check0(check_alleles(rec, alleles1, 2));
    // Erase them
    check0(bcf_update_alleles(hdr, rec, NULL, 0));
    check0(check_alleles(rec, NULL, 0));
    // Expand to three
    check0(bcf_update_alleles(hdr, rec, alleles2, 3));
    check0(check_alleles(rec, alleles2, 3));
    // Now try some bigger ones (should force a realloc)
    check0(bcf_update_alleles(hdr, rec, alleles3, 3));
    check0(check_alleles(rec, alleles3, 3));
    // Ensure it works even if one of the alleles points into the
    // existing structure
    alleles4[1] = rec->d.allele[1];
    check0(bcf_update_alleles(hdr, rec, alleles4, 3));
    alleles4[1] = alleles3[1]; // Will have been clobbered by the update
    check0(check_alleles(rec, alleles4, 3));
    // Ensure it works when the alleles point into the existing data,
    // rec->d.allele is used to define the input array and the
    // order of the entries is changed.  The result of this should
    // be the same as alleles2.
    char *tmp = rec->d.allele[0] + strlen(rec->d.allele[0]) - 4;
    rec->d.allele[0] = rec->d.allele[2] + strlen(rec->d.allele[2]) - 1;
    rec->d.allele[2] = tmp;
    check0(bcf_update_alleles(hdr, rec, (const char **) rec->d.allele, 3));
    check0(check_alleles(rec, alleles2, 3));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x123c76(%rip), %rax    # 0x12aad0
movq %rax, -0x20(%rbp)
movq 0x123c73(%rip), %rax    # 0x12aad8
movq %rax, -0x18(%rbp)
movq 0x123c70(%rip), %rax    # 0x12aae0
movq %rax, -0x40(%rbp)
movq 0x123c6d(%rip), %rax    # 0x12aae8
movq %rax, -0x38(%rbp)
movq 0x123c6a(%rip), %rax    # 0x12aaf0
movq %rax, -0x30(%rbp)
movq 0x123c6f(%rip), %rax    # 0x12ab00
movq %rax, -0x60(%rbp)
movq 0x123c6c(%rip), %rax    # 0x12ab08
movq %rax, -0x58(%rbp)
movq 0x123c69(%rip), %rax    # 0x12ab10
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
movl $0x2, %ecx
callq 0x52590
cmpl $0x0, %eax
jne 0x6ee0
jmp 0x6ef5
leaq 0xff172(%rip), %rdi     # 0x106059
leaq 0x101494(%rip), %rsi    # 0x108382
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x2, %edx
callq 0x71d0
cmpl $0x0, %eax
jne 0x6f0e
jmp 0x6f23
leaq 0xff144(%rip), %rdi     # 0x106059
leaq 0x101490(%rip), %rsi    # 0x1083ac
movb $0x0, %al
callq 0x5ae0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x52590
cmpl $0x0, %eax
jne 0x6f3d
jmp 0x6f52
leaq 0xff115(%rip), %rdi     # 0x106059
leaq 0xff119(%rip), %rsi     # 0x106064
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x71d0
cmpl $0x0, %eax
jne 0x6f68
jmp 0x6f7d
leaq 0xff0ea(%rip), %rdi     # 0x106059
leaq 0x101456(%rip), %rsi    # 0x1083cc
movb $0x0, %al
callq 0x5ae0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl $0x3, %ecx
callq 0x52590
cmpl $0x0, %eax
jne 0x6f9a
jmp 0x6faf
leaq 0xff0b8(%rip), %rdi     # 0x106059
leaq 0x101446(%rip), %rsi    # 0x1083ee
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x3, %edx
callq 0x71d0
cmpl $0x0, %eax
jne 0x6fc8
jmp 0x6fdd
leaq 0xff08a(%rip), %rdi     # 0x106059
leaq 0x101442(%rip), %rsi    # 0x108418
movb $0x0, %al
callq 0x5ae0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movl $0x3, %ecx
callq 0x52590
cmpl $0x0, %eax
jne 0x6ffa
jmp 0x700f
leaq 0xff058(%rip), %rdi     # 0x106059
leaq 0x101430(%rip), %rsi    # 0x108438
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x3, %edx
callq 0x71d0
cmpl $0x0, %eax
jne 0x7028
jmp 0x703d
leaq 0xff02a(%rip), %rdi     # 0x106059
leaq 0x10142c(%rip), %rsi    # 0x108462
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x80(%rbp), %rdx
movl $0x3, %ecx
callq 0x52590
cmpl $0x0, %eax
jne 0x706d
jmp 0x7082
leaq 0xfefe5(%rip), %rdi     # 0x106059
leaq 0x101407(%rip), %rsi    # 0x108482
movb $0x0, %al
callq 0x5ae0
movq -0x58(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x3, %edx
callq 0x71d0
cmpl $0x0, %eax
jne 0x70a3
jmp 0x70b8
leaq 0xfefaf(%rip), %rdi     # 0x106059
leaq 0x1013fb(%rip), %rsi    # 0x1084ac
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq (%rax), %rdi
callq 0x41a0
movq %rax, %rcx
movq -0x98(%rbp), %rax
addq %rcx, %rax
addq $-0x4, %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x41a0
movq -0x90(%rbp), %rcx
addq %rax, %rcx
addq $-0x1, %rcx
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, (%rax)
movq -0x88(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdx
movl $0x3, %ecx
callq 0x52590
cmpl $0x0, %eax
jne 0x7178
jmp 0x718d
leaq 0xfeeda(%rip), %rdi     # 0x106059
leaq 0x101346(%rip), %rsi    # 0x1084cc
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x3, %edx
callq 0x71d0
cmpl $0x0, %eax
jne 0x71a6
jmp 0x71bb
leaq 0xfeeac(%rip), %rdi     # 0x106059
leaq 0x101264(%rip), %rsi    # 0x108418
movb $0x0, %al
callq 0x5ae0
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)