// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test-regidx.c
// Function: main
int main(int argc, char **argv)
{
    static struct option loptions[] =
    {
        {"help",0,0,'h'},
        {"verbose",0,0,'v'},
        {"seed",1,0,'s'},
        {0,0,0,0}
    };
    int c;
    int seed = (int)time(NULL);
    while ((c = getopt_long(argc, argv, "hvs:",loptions,NULL)) >= 0)
    {
        switch (c)
        {
            case 's': seed = atoi(optarg); break;
            case 'v': verbose++; break;
            default: usage(); break;
        }
    }

    info("Testing sequential access\n");
    test_sequential_access();

    info("Testing TAB\n");
    test(create_line_tab,regidx_parse_tab);

    info("Testing REG\n");
    test(create_line_reg,regidx_parse_reg);

    info("Testing BED\n");
    test(create_line_bed,regidx_parse_bed);

    info("Testing custom payload\n");
    test_custom_payload();

    info("Testing cases encountered in past\n");
    test_explicit("12:2064519-2064763","12:2064488-2067434","1");

    int i, ntest = 1000, nreg = 50;
    srand(seed);
    info("%d randomized tests, %d regions per test. Random seed is %d\n", ntest,nreg,seed);
    for (i=0; i<ntest; i++) test_random(nreg,1,1000);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
xorl %edi, %edi
callq 0x4450
movq %rax, %rbx
leaq 0x8d218(%rip), %rdx     # 0x94591
leaq 0xae180(%rip), %rcx     # 0xb5500
movl %ebp, %edi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x4870
testl %eax, %eax
js 0x73de
leaq 0x8d1f9(%rip), %r15     # 0x94591
leaq 0xae161(%rip), %r12     # 0xb5500
movq 0xadc1a(%rip), %r13     # 0xb4fc0
cmpl $0x76, %eax
je 0x73c1
cmpl $0x73, %eax
jne 0x74de
movq (%r13), %rdi
callq 0x47f0
movl %eax, %ebx
jmp 0x73c7
incl 0xae1dd(%rip)           # 0xb55a4
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x4870
testl %eax, %eax
jns 0x73a6
leaq 0x8d1b1(%rip), %rdi     # 0x94596
xorl %eax, %eax
callq 0x74e3
callq 0x5f9b
leaq 0x8d1b9(%rip), %rdi     # 0x945b1
xorl %eax, %eax
callq 0x74e3
leaq -0x6c5(%rip), %rdi      # 0x6d41
leaq 0x1bc4(%rip), %rsi      # 0x8fd1
callq 0x6d6f
leaq 0x8d1a5(%rip), %rdi     # 0x945be
xorl %eax, %eax
callq 0x74e3
leaq -0x6cf(%rip), %rdi      # 0x6d58
leaq 0x2858(%rip), %rsi      # 0x9c86
callq 0x6d6f
leaq 0x8d191(%rip), %rdi     # 0x945cb
xorl %eax, %eax
callq 0x74e3
leaq -0x722(%rip), %rdi      # 0x6d26
leaq 0x20e1(%rip), %rsi      # 0x9530
callq 0x6d6f
leaq 0x8d17d(%rip), %rdi     # 0x945d8
xorl %eax, %eax
callq 0x74e3
callq 0x6283
leaq 0x8d182(%rip), %rdi     # 0x945f0
xorl %eax, %eax
callq 0x74e3
leaq 0x8d197(%rip), %rdi     # 0x94613
leaq 0x8d1a3(%rip), %rsi     # 0x94626
leaq 0x8fc1a(%rip), %rdx     # 0x970a4
callq 0x69d8
movl %ebx, %edi
callq 0x4490
leaq 0x8d19c(%rip), %rdi     # 0x94639
movl $0x3e8, %ebp            # imm = 0x3E8
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x32, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x74e3
movl $0x32, %edi
movl $0x1, %esi
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x664c
decl %ebp
jne 0x74b5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x49e0