// File: /workspace/github_c_makefile_star2_O3/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 0x8b22d(%rip), %rdx     # 0x92591
leaq 0xad195(%rip), %rcx     # 0xb4500
movl %ebp, %edi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x4870
testl %eax, %eax
js 0x73c9
leaq 0x8b20e(%rip), %r15     # 0x92591
leaq 0xad176(%rip), %r12     # 0xb4500
movq 0xacc2f(%rip), %r13     # 0xb3fc0
cmpl $0x76, %eax
je 0x73ac
cmpl $0x73, %eax
jne 0x74c9
movq (%r13), %rdi
callq 0x47f0
movl %eax, %ebx
jmp 0x73b2
incl 0xad1f2(%rip)           # 0xb45a4
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x4870
testl %eax, %eax
jns 0x7391
leaq 0x8b1c6(%rip), %rdi     # 0x92596
xorl %eax, %eax
callq 0x74ce
callq 0x5fa8
leaq 0x8b1ce(%rip), %rdi     # 0x925b1
xorl %eax, %eax
callq 0x74ce
leaq -0x6a5(%rip), %rdi      # 0x6d4c
leaq 0x1c20(%rip), %rsi      # 0x9018
callq 0x6d7a
leaq 0x8b1ba(%rip), %rdi     # 0x925be
xorl %eax, %eax
callq 0x74ce
leaq -0x6af(%rip), %rdi      # 0x6d63
leaq 0x2854(%rip), %rsi      # 0x9c6d
callq 0x6d7a
leaq 0x8b1a6(%rip), %rdi     # 0x925cb
xorl %eax, %eax
callq 0x74ce
leaq -0x702(%rip), %rdi      # 0x6d31
leaq 0x2105(%rip), %rsi      # 0x953f
callq 0x6d7a
leaq 0x8b192(%rip), %rdi     # 0x925d8
xorl %eax, %eax
callq 0x74ce
callq 0x628a
leaq 0x8b197(%rip), %rdi     # 0x925f0
xorl %eax, %eax
callq 0x74ce
leaq 0x8b1ac(%rip), %rdi     # 0x92613
leaq 0x8b1b8(%rip), %rsi     # 0x92626
leaq 0x8dc32(%rip), %rdx     # 0x950a7
callq 0x69e3
movl %ebx, %edi
callq 0x4490
leaq 0x8b1b1(%rip), %rdi     # 0x92639
movl $0x3e8, %ebp            # imm = 0x3E8
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x32, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x74ce
movl $0x32, %edi
movl $0x1, %esi
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x6653
decl %ebp
jne 0x74a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x49e0