// File: /workspace/github_c_makefile_star2_O2/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 0x6d7f0(%rip), %r15     # 0x74591
leaq 0x94758(%rip), %r12     # 0x9b500
movq 0x94211(%rip), %r13     # 0x9afc0
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x4870
testl %eax, %eax
js 0x6de9
cmpl $0x76, %eax
jne 0x6dd3
incl 0x947d3(%rip)           # 0x9b5a4
jmp 0x6daf
cmpl $0x73, %eax
jne 0x6eeb
movq (%r13), %rdi
callq 0x47f0
movl %eax, %ebx
jmp 0x6daf
leaq 0x6d7a6(%rip), %rdi     # 0x74596
xorl %eax, %eax
callq 0x6f66
callq 0x5bbb
leaq 0x6d7ae(%rip), %rdi     # 0x745b1
xorl %eax, %eax
callq 0x6f66
leaq -0x646(%rip), %rdi      # 0x67cb
leaq 0x17f6(%rip), %rsi      # 0x860e
callq 0x67f9
leaq 0x6d79a(%rip), %rdi     # 0x745be
xorl %eax, %eax
callq 0x6f66
leaq -0x650(%rip), %rdi      # 0x67e2
leaq 0x21ea(%rip), %rsi      # 0x9023
callq 0x67f9
leaq 0x6d786(%rip), %rdi     # 0x745cb
xorl %eax, %eax
callq 0x6f66
leaq -0x6a3(%rip), %rdi      # 0x67b0
leaq 0x1ca8(%rip), %rsi      # 0x8b02
callq 0x67f9
leaq 0x6d772(%rip), %rdi     # 0x745d8
xorl %eax, %eax
callq 0x6f66
callq 0x5e88
leaq 0x6d777(%rip), %rdi     # 0x745f0
xorl %eax, %eax
callq 0x6f66
leaq 0x6d78c(%rip), %rdi     # 0x74613
leaq 0x6d798(%rip), %rsi     # 0x74626
leaq 0x7018d(%rip), %rdx     # 0x77022
callq 0x64f8
movl %ebx, %edi
callq 0x4490
leaq 0x6d791(%rip), %rdi     # 0x74639
movl $0x3e8, %r14d           # imm = 0x3E8
pushq $0x32
popq %rbp
movl $0x3e8, %esi            # imm = 0x3E8
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x6f66
pushq $0x1
popq %rbx
subl $0x1, %r14d
jb 0x6eda
movl %ebp, %edi
movl %ebx, %esi
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x6230
jmp 0x6ec4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x940e6(%rip), %r14     # 0x9afd8
movq (%r14), %rcx
leaq 0x6d77a(%rip), %rdi     # 0x74676
pushq $0x1d
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x49b0
movq (%r14), %rcx
leaq 0x6d780(%rip), %rdi     # 0x74694
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x49b0
movq (%r14), %rcx
leaq 0x6d775(%rip), %rdi     # 0x7469e
pushq $0x29
popq %rsi
movq %rbx, %rdx
callq 0x49b0
movq (%r14), %rcx
leaq 0x6d78a(%rip), %rdi     # 0x746c8
pushq $0x23
popq %rsi
movq %rbx, %rdx
callq 0x49b0
movq (%r14), %rcx
leaq 0x6d799(%rip), %rdi     # 0x746ec
pushq $0x43
popq %rsi
movq %rbx, %rdx
callq 0x49b0
pushq $0x1
popq %rdi
callq 0x45f0