// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/htslib/hfile.c
// Function: find_scheme_handler
static const struct hFILE_scheme_handler *find_scheme_handler(const char *s)
{
    static const struct hFILE_scheme_handler unknown_scheme =
        { hopen_unknown_scheme, hfile_always_local, "built-in", 0 };

    char scheme[12];
    int i;

    for (i = 0; i < sizeof scheme; i++)
        if (isalnum_c(s[i]) || s[i] == '+' || s[i] == '-' || s[i] == '.')
            scheme[i] = tolower_c(s[i]);
        else if (s[i] == ':') break;
        else return NULL;

    if (i == 0 || i >= sizeof scheme) return NULL;
    scheme[i] = '\0';

    pthread_mutex_lock(&plugins_lock);
    if (! schemes) load_hfile_plugins();
    pthread_mutex_unlock(&plugins_lock);

    khint_t k = kh_get(scheme_string, schemes, scheme);
    return (k != kh_end(schemes))? kh_value(schemes, k) : &unknown_scheme;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
callq 0x3410
movq (%rax), %r12
xorl %ebx, %ebx
xorl %r15d, %r15d
movzbl (%r14,%r15), %r13d
testb $0x8, (%r12,%r13,2)
jne 0x2c000
leal -0x2d(%r13), %eax
cmpl $0x2, %eax
jb 0x2c000
cmpl $0x2b, %r13d
jne 0x2c02c
callq 0x3690
movq (%rax), %rax
movb (%rax,%r13,4), %al
movb %al, 0x14(%rsp,%r15)
incq %r15
cmpq $0xc, %r15
jne 0x2bfe5
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3a, %r13d
jne 0x2c01a
testq %r15, %r15
je 0x2c0f3
movb $0x0, 0x14(%rsp,%r15)
leaq 0x33530(%rip), %rdi     # 0x5f578
callq 0x37a0
cmpq $0x0, 0x3351b(%rip)     # 0x5f570
jne 0x2c121
movl $0x1, %edi
movl $0x28, %esi
callq 0x36a0
movq %rax, 0x334ff(%rip)     # 0x5f570
testq %rax, %rax
je 0x2c258
leaq 0x22387(%rip), %rdi     # 0x4e408
leaq 0x32b60(%rip), %rsi     # 0x5ebe8
callq 0x2bd31
leaq 0x2335a(%rip), %rdi     # 0x4f3ee
leaq 0x32b6d(%rip), %rsi     # 0x5ec08
callq 0x2bd31
movl $0x28, %edi
callq 0x3240
testq %rax, %rax
je 0x2c258
movq %rax, %rbx
movl $0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq %rax, %rdi
callq 0x2c99e
leaq 0x333ae(%rip), %rcx     # 0x5f488
movl (%rcx), %ecx
testl %eax, %eax
je 0x2c0fa
cmpl $0x4, %ecx
jge 0x2c228
movq %rbx, %rdi
callq 0x3370
jmp 0x2c115
xorl %ebx, %ebx
jmp 0x2c01a
cmpl $0x5, %ecx
jge 0x2c24e
movq 0x33496(%rip), %rax     # 0x5f5a0
movq %rax, 0x20(%rbx)
movq %rbx, 0x3348b(%rip)     # 0x5f5a0
leaq 0x77b(%rip), %rdi       # 0x2c897
callq 0x4c220
leaq 0x33450(%rip), %rdi     # 0x5f578
callq 0x3840
movq 0x3343c(%rip), %rax     # 0x5f570
movq %rax, 0x8(%rsp)
movl (%rax), %ecx
testl %ecx, %ecx
je 0x2c17a
leal -0x1(%rcx), %esi
movsbl 0x14(%rsp), %r12d
testl %r12d, %r12d
movq %rcx, 0x20(%rsp)
je 0x2c182
movb 0x15(%rsp), %al
testb %al, %al
je 0x2c185
leaq 0x16(%rsp), %rcx
movl %r12d, %edx
shll $0x5, %edx
subl %r12d, %edx
movsbl %al, %r12d
addl %edx, %r12d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x2c15f
jmp 0x2c185
xorl %r14d, %r14d
jmp 0x2c202
xorl %r12d, %r12d
andl %esi, %r12d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rbx
movl $0x1, %r13d
movl %r12d, %r14d
movl %esi, 0x10(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
movl (%rbx,%rax,4), %r15d
leal (%r14,%r14), %ebp
andl $0x1e, %ebp
movl %r15d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2c1f0
testb $0x1, %al
jne 0x2c1e0
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x14(%rsp), %rsi
callq 0x3620
movl 0x10(%rsp), %esi
testl %eax, %eax
je 0x2c1f0
addl %r13d, %r14d
andl %esi, %r14d
incl %r13d
cmpl %r12d, %r14d
jne 0x2c19e
jmp 0x2c207
movl %ebp, %ecx
shrl %cl, %r15d
testb $0x3, %r15b
movq 0x20(%rsp), %rcx
cmovnel %ecx, %r14d
cmpl %ecx, %r14d
jne 0x2c213
leaq 0x329ba(%rip), %rbx     # 0x5ebc8
jmp 0x2c01a
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rbx
jmp 0x2c01a
movq 0x32db9(%rip), %rcx     # 0x5efe8
movq (%rcx), %rdi
leaq 0x2471d(%rip), %rsi     # 0x50956
leaq 0x246ec(%rip), %rdx     # 0x5092c
movl %eax, %ecx
xorl %eax, %eax
callq 0x37e0
jmp 0x2c0e9
callq 0x4ca8
jmp 0x2c103
callq 0x3100