// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/test_khash.c
// Function: main
int main(int argc, char **argv) {
    int opt, res = EXIT_SUCCESS;
    char *test = NULL;
    char *input_file = NULL;
    size_t max = 1000;
    double del_frac = 0.25;
    int show_stats = 0;

    while ((opt = getopt(argc, argv, "df:hi:n:t:")) != -1) {
        switch (opt) {
        case 'd':
            show_stats = 1;
            break;
        case 'f':
            del_frac = strtod(optarg, NULL);
            if (del_frac < 0 || del_frac > 1.0) {
                fprintf(stderr, "Error: -d must be between 0.0 and 1.0\n");
                return EXIT_FAILURE;
            }
            break;
        case 'h':
            show_usage(stdout, argv[0]);
            return EXIT_SUCCESS;
        case 'i':
            input_file = optarg;
            break;
        case 'n':
            max = strtoul(optarg, NULL, 0);
            if (max == 0 || max > 99999999) {
                fprintf(stderr, "Error: -n must be between 1 and %u\n",
                        MAX_ENTRIES);
                return EXIT_FAILURE;
            }
            break;
        case 't':
            test = optarg;
            break;
        default:
            show_usage(stderr, argv[0]);
            return EXIT_FAILURE;
        }
    }

    if (!test || strcmp(test, "str2int") == 0) {
        if (test_str2int(max, (size_t) (max * del_frac), show_stats) != 0)
            res = EXIT_FAILURE;
    }

    if (test && strcmp(test, "benchmark") == 0) {
        if (benchmark(input_file) != 0)
            res = EXIT_FAILURE;
    }

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x3e8, -0x30(%rbp)     # imm = 0x3E8
movsd 0x2c7b(%rip), %xmm0     # 0x4008
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x2cf5(%rip), %rdx      # 0x409c
callq 0x1040
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x150c
movl -0x14(%rbp), %eax
addl $-0x64, %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
subl $0x10, %eax
ja 0x14e5
movq -0x48(%rbp), %rax
leaq 0x2c78(%rip), %rcx      # 0x4050
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x3c(%rbp)
jmp 0x1507
movq 0x4bdc(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1080
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x38(%rbp), %xmm0
ja 0x1422
movsd -0x38(%rbp), %xmm0
movsd 0x2bfc(%rip), %xmm1     # 0x4018
ucomisd %xmm1, %xmm0
jbe 0x1446
movq 0x4bb7(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
leaq 0x2c74(%rip), %rsi      # 0x40a7
movb $0x0, %al
callq 0x1110
movl $0x1, -0x4(%rbp)
jmp 0x15d1
jmp 0x1507
movq 0x4b6e(%rip), %rax      # 0x5fc0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x15e0
movl $0x0, -0x4(%rbp)
jmp 0x15d1
movq 0x4b5c(%rip), %rax      # 0x5fd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x1507
movq 0x4b49(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1050
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x14aa
cmpq $0x5f5e0ff, -0x30(%rbp) # imm = 0x5F5E0FF
jbe 0x14d3
movq 0x4b2f(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
leaq 0x2c13(%rip), %rsi      # 0x40ce
movl $0x5f5e0ff, %edx        # imm = 0x5F5E0FF
movb $0x0, %al
callq 0x1110
movl $0x1, -0x4(%rbp)
jmp 0x15d1
jmp 0x1507
movq 0x4af4(%rip), %rax      # 0x5fd0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1507
movq 0x4af4(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x15e0
movl $0x1, -0x4(%rbp)
jmp 0x15d1
jmp 0x1399
cmpq $0x0, -0x20(%rbp)
je 0x1528
movq -0x20(%rbp), %rdi
leaq 0x2bd4(%rip), %rsi      # 0x40f2
callq 0x1100
cmpl $0x0, %eax
jne 0x1598
movq -0x30(%rbp), %rdi
movq %rdi, %xmm0
movaps 0x2af8(%rip), %xmm1     # 0x4030
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x2afc(%rip), %xmm1     # 0x4040
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
movsd 0x2a9d(%rip), %xmm1     # 0x4010
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
andq %rcx, %rax
orq %rax, %rsi
movl -0x3c(%rbp), %edx
callq 0x1690
cmpl $0x0, %eax
je 0x1596
movl $0x1, -0x18(%rbp)
jmp 0x1598
cmpq $0x0, -0x20(%rbp)
je 0x15cb
movq -0x20(%rbp), %rdi
leaq 0x2b50(%rip), %rsi      # 0x40fa
callq 0x1100
cmpl $0x0, %eax
jne 0x15cb
movq -0x28(%rbp), %rdi
callq 0x1ab0
cmpl $0x0, %eax
je 0x15c9
movl $0x1, -0x18(%rbp)
jmp 0x15cb
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)