// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test-bcf_set_variant_type.c
// Function: main
static void test_bcf_set_variant_type(void)
{
    // Test SNVs
    bcf_variant_t var1;
    bcf_set_variant_type("A", "T", &var1);
    if ( var1.type != VCF_SNP)
    {
        error("A -> T was not detected as a SNP");
    }

    // Test INDEL
    bcf_variant_t var2a;
    bcf_set_variant_type("A", "AA", &var2a);
    if ( var2a.type != (VCF_INDEL|VCF_INS) )
    {
        error("A -> AA was not detected as an INDEL");
    }
    bcf_variant_t var2b;
    bcf_set_variant_type("AA", "A", &var2b);
    if ( var2b.type != (VCF_INDEL|VCF_DEL) )
    {
        error("AA -> A was not detected as a INDEL");
    }

    // Test breakends
    bcf_variant_t var3a;
    bcf_set_variant_type("N", "N]16:33625444]", &var3a);
    if ( var3a.type != VCF_BND)
    {
        error("N]16:33625444] was not detected as a breakend");
    }

    bcf_variant_t var3b;
    bcf_set_variant_type("N", "N[16:33625444[", &var3b);
    if (var3b.type != VCF_BND)
    {
        error("N[16:33625444[ was not detected as a breakend");
    }

    bcf_variant_t var3c;
    bcf_set_variant_type("N", "]16:33625444]N", &var3c);
    if ( var3c.type != VCF_BND)
    {
        error("]16:33625444]N was not detected as a breakend");
    }

    bcf_variant_t var3d;
    bcf_set_variant_type("N", "[16:33625444[N", &var3d);
    if ( var3d.type != VCF_BND)
    {
        error("[16:33625444[N was not detected as a breakend");
    }

    bcf_set_variant_type("T", "]chrB:123]AGTNNNNNCAT", &var3d);
    if ( var3d.type != VCF_BND)
    {
        error("]chrB:123]AGTNNNNNCAT was not detected as a breakend");
    }
    bcf_set_variant_type("C", "CAGTNNNNNCA[chrA:321[", &var3d);
    if ( var3d.type != VCF_BND)
    {
        error("CAGTNNNNNCA[chrA:321[ was not detected as a breakend");
    }


    // Test special reference alleles
    bcf_variant_t var4a;
    bcf_set_variant_type("A", "<NON_REF>", &var4a);
    if ( var4a.type != VCF_REF)
    {
        error("<NON_REF> was not detected as a special reference allele");
    }
    bcf_variant_t var4b;
    bcf_set_variant_type("A", "<*>", &var4b);
    if ( var4b.type != VCF_REF)
    {
        error("<*> was not detected as a special reference allele");
    }
    // Test MNP
    bcf_variant_t var5;
    bcf_set_variant_type("AA", "TT", &var5);
    if ( var5.type != VCF_MNP)
    {
        error("AA->TT was not detected as a MNP");
    }
    // Test Overlapping allele
    bcf_variant_t var6;
    bcf_set_variant_type("A", "*", &var6);
    if ( var6.type != VCF_OVERLAP)
    {
        error("A->* was not detected as an overlap");
    }
    // Test .
    bcf_variant_t var7;
    bcf_set_variant_type("A", ".", &var7);
    if ( var7.type != VCF_REF)
    {
        error("A->. was not detected as a special reference allele");
    }
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
leaq 0x8d263(%rip), %rdi     # 0xa958b
leaq 0x8d3af(%rip), %rsi     # 0xa96de
leaq 0x58(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x1, (%rbx)
jne 0x1c51a
leaq 0x8d23f(%rip), %rdi     # 0xa958b
leaq 0x8d237(%rip), %rsi     # 0xa958a
leaq 0x50(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x44, (%rbx)
jne 0x1c523
leaq 0x8d21a(%rip), %rdi     # 0xa958a
leaq 0x8d214(%rip), %rsi     # 0xa958b
leaq 0x48(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x84, (%rbx)
jne 0x1c52c
leaq 0x91615(%rip), %rdi     # 0xad9ac
leaq 0x8d238(%rip), %rsi     # 0xa95d6
leaq 0x40(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x10, (%rbx)
jne 0x1c535
leaq 0x915f1(%rip), %rdi     # 0xad9ac
leaq 0x8d251(%rip), %rsi     # 0xa9613
leaq 0x38(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x10, (%rbx)
jne 0x1c53e
leaq 0x915cd(%rip), %rdi     # 0xad9ac
leaq 0x8d26a(%rip), %rsi     # 0xa9650
leaq 0x30(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x10, (%rbx)
jne 0x1c547
leaq 0x915a9(%rip), %rdi     # 0xad9ac
leaq 0x8d283(%rip), %rsi     # 0xa968d
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x10, (%rbx)
jne 0x1c550
leaq 0x8d2b9(%rip), %rdi     # 0xa96de
leaq 0x8d29e(%rip), %rsi     # 0xa96ca
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x10, (%rbx)
jne 0x1c559
leaq 0x91429(%rip), %rdi     # 0xad870
leaq 0x8d2c7(%rip), %rsi     # 0xa9715
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x10, (%rbx)
jne 0x1c562
leaq 0x8d122(%rip), %rdi     # 0xa958b
leaq 0x8d0ef(%rip), %rsi     # 0xa955f
leaq 0x28(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x0, (%rbx)
jne 0x1c56b
leaq 0x8d0fe(%rip), %rdi     # 0xa958b
leaq 0x8d0c7(%rip), %rsi     # 0xa955b
leaq 0x20(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x0, (%rbx)
jne 0x1c574
leaq 0x8d0d9(%rip), %rdi     # 0xa958a
leaq 0x8d314(%rip), %rsi     # 0xa97cc
leaq 0x18(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x2, (%rbx)
jne 0x1c57d
leaq 0x8d0b6(%rip), %rdi     # 0xa958b
leaq 0x91141(%rip), %rsi     # 0xad61d
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x20, (%rbx)
jne 0x1c586
leaq 0x8d092(%rip), %rdi     # 0xa958b
leaq 0x8dc49(%rip), %rsi     # 0xaa149
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d2e1
cmpl $0x0, (%rbx)
jne 0x1c58f
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq
leaq 0x8d048(%rip), %rdi     # 0xa9569
jmp 0x1c596
leaq 0x8d063(%rip), %rdi     # 0xa958d
jmp 0x1c596
leaq 0x8d07f(%rip), %rdi     # 0xa95b2
jmp 0x1c596
leaq 0x8d0a9(%rip), %rdi     # 0xa95e5
jmp 0x1c596
leaq 0x8d0dd(%rip), %rdi     # 0xa9622
jmp 0x1c596
leaq 0x8d111(%rip), %rdi     # 0xa965f
jmp 0x1c596
leaq 0x8d145(%rip), %rdi     # 0xa969c
jmp 0x1c596
leaq 0x8d180(%rip), %rdi     # 0xa96e0
jmp 0x1c596
leaq 0x8d1c2(%rip), %rdi     # 0xa972b
jmp 0x1c596
leaq 0x8d1ee(%rip), %rdi     # 0xa9760
jmp 0x1c596
leaq 0x8d21e(%rip), %rdi     # 0xa9799
jmp 0x1c596
leaq 0x8d24b(%rip), %rdi     # 0xa97cf
jmp 0x1c596
leaq 0x8d263(%rip), %rdi     # 0xa97f0
jmp 0x1c596
leaq 0x8d27e(%rip), %rdi     # 0xa9814
xorl %eax, %eax
callq 0x1c260