// File: /workspace/github_c_makefile_star2_O1/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 0x8f408(%rip), %rdi     # 0xab57b
leaq 0x8f554(%rip), %rsi     # 0xab6ce
leaq 0x58(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x1, (%rbx)
jne 0x1c365
leaq 0x8f3e4(%rip), %rdi     # 0xab57b
leaq 0x8f3dc(%rip), %rsi     # 0xab57a
leaq 0x50(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x44, (%rbx)
jne 0x1c36e
leaq 0x8f3bf(%rip), %rdi     # 0xab57a
leaq 0x8f3b9(%rip), %rsi     # 0xab57b
leaq 0x48(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x84, (%rbx)
jne 0x1c377
leaq 0x9381a(%rip), %rdi     # 0xaf9fc
leaq 0x8f3dd(%rip), %rsi     # 0xab5c6
leaq 0x40(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x10, (%rbx)
jne 0x1c380
leaq 0x937f6(%rip), %rdi     # 0xaf9fc
leaq 0x8f3f6(%rip), %rsi     # 0xab603
leaq 0x38(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x10, (%rbx)
jne 0x1c389
leaq 0x937d2(%rip), %rdi     # 0xaf9fc
leaq 0x8f40f(%rip), %rsi     # 0xab640
leaq 0x30(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x10, (%rbx)
jne 0x1c392
leaq 0x937ae(%rip), %rdi     # 0xaf9fc
leaq 0x8f428(%rip), %rsi     # 0xab67d
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x10, (%rbx)
jne 0x1c39b
leaq 0x8f45e(%rip), %rdi     # 0xab6ce
leaq 0x8f443(%rip), %rsi     # 0xab6ba
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x10, (%rbx)
jne 0x1c3a4
leaq 0x9362e(%rip), %rdi     # 0xaf8c0
leaq 0x8f46c(%rip), %rsi     # 0xab705
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x10, (%rbx)
jne 0x1c3ad
leaq 0x8f2c7(%rip), %rdi     # 0xab57b
leaq 0x8f294(%rip), %rsi     # 0xab54f
leaq 0x28(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x0, (%rbx)
jne 0x1c3b6
leaq 0x8f2a3(%rip), %rdi     # 0xab57b
leaq 0x8f26c(%rip), %rsi     # 0xab54b
leaq 0x20(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x0, (%rbx)
jne 0x1c3bf
leaq 0x8f27e(%rip), %rdi     # 0xab57a
leaq 0x8f4b9(%rip), %rsi     # 0xab7bc
leaq 0x18(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x2, (%rbx)
jne 0x1c3c8
leaq 0x8f25b(%rip), %rdi     # 0xab57b
leaq 0x9334b(%rip), %rsi     # 0xaf672
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x20, (%rbx)
jne 0x1c3d1
leaq 0x8f237(%rip), %rdi     # 0xab57b
leaq 0x8fdde(%rip), %rsi     # 0xac129
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0x1d1ba
cmpl $0x0, (%rbx)
jne 0x1c3da
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq
leaq 0x8f1ed(%rip), %rdi     # 0xab559
jmp 0x1c3e1
leaq 0x8f208(%rip), %rdi     # 0xab57d
jmp 0x1c3e1
leaq 0x8f224(%rip), %rdi     # 0xab5a2
jmp 0x1c3e1
leaq 0x8f24e(%rip), %rdi     # 0xab5d5
jmp 0x1c3e1
leaq 0x8f282(%rip), %rdi     # 0xab612
jmp 0x1c3e1
leaq 0x8f2b6(%rip), %rdi     # 0xab64f
jmp 0x1c3e1
leaq 0x8f2ea(%rip), %rdi     # 0xab68c
jmp 0x1c3e1
leaq 0x8f325(%rip), %rdi     # 0xab6d0
jmp 0x1c3e1
leaq 0x8f367(%rip), %rdi     # 0xab71b
jmp 0x1c3e1
leaq 0x8f393(%rip), %rdi     # 0xab750
jmp 0x1c3e1
leaq 0x8f3c3(%rip), %rdi     # 0xab789
jmp 0x1c3e1
leaq 0x8f3f0(%rip), %rdi     # 0xab7bf
jmp 0x1c3e1
leaq 0x8f408(%rip), %rdi     # 0xab7e0
jmp 0x1c3e1
leaq 0x8f423(%rip), %rdi     # 0xab804
xorl %eax, %eax
callq 0x1c0ab