// File: /workspace/github_c_makefile_star2_O1/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, %rbx
callq 0x3410
movq (%rax), %r15
xorl %r14d, %r14d
movzbl (%rbx,%r14), %r12d
testb $0x8, (%r15,%r12,2)
jne 0x2c257
leal -0x2d(%r12), %eax
cmpl $0x2, %eax
jb 0x2c257
cmpl $0x2b, %r12d
jne 0x2c340
callq 0x3690
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, 0x14(%rsp,%r14)
incq %r14
cmpq $0xc, %r14
jne 0x2c237
movl $0xc, %r14d
movl $0xc, %eax
addl $-0xc, %eax
cmpl $-0xb, %eax
jb 0x2c34e
movb $0x0, 0x14(%rsp,%r14)
leaq 0x322e3(%rip), %rdi     # 0x5e578
callq 0x37a0
cmpq $0x0, 0x322ce(%rip)     # 0x5e570
jne 0x2c37c
movl $0x1, %edi
movl $0x28, %esi
callq 0x36a0
movq %rax, 0x322b2(%rip)     # 0x5e570
testq %rax, %rax
je 0x2c4c2
leaq 0x220c6(%rip), %rdi     # 0x4e394
leaq 0x31913(%rip), %rsi     # 0x5dbe8
callq 0x2bf90
leaq 0x22f52(%rip), %rdi     # 0x4f233
leaq 0x31920(%rip), %rsi     # 0x5dc08
callq 0x2bf90
movl $0x28, %edi
callq 0x3240
testq %rax, %rax
je 0x2c4c2
movq %rax, %rbx
movl $0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq %rax, %rdi
callq 0x2cc4a
leaq 0x32161(%rip), %rcx     # 0x5e488
movl (%rcx), %ecx
testl %eax, %eax
je 0x2c355
cmpl $0x4, %ecx
jge 0x2c492
movq %rbx, %rdi
callq 0x3370
jmp 0x2c370
cmpl $0x3a, %r12d
jne 0x2c34e
movl %r14d, %eax
jmp 0x2c27c
xorl %eax, %eax
jmp 0x2c483
cmpl $0x5, %ecx
jge 0x2c4b8
movq 0x3223b(%rip), %rax     # 0x5e5a0
movq %rax, 0x20(%rbx)
movq %rbx, 0x32230(%rip)     # 0x5e5a0
leaq 0x7ce(%rip), %rdi       # 0x2cb45
callq 0x4cd30
leaq 0x321f5(%rip), %rdi     # 0x5e578
callq 0x3840
movq 0x321e1(%rip), %rax     # 0x5e570
movq %rax, 0x8(%rsp)
movl (%rax), %ecx
testl %ecx, %ecx
je 0x2c3d5
leal -0x1(%rcx), %esi
movsbl 0x14(%rsp), %r13d
testl %r13d, %r13d
movq %rcx, 0x20(%rsp)
je 0x2c3dd
movb 0x15(%rsp), %al
testb %al, %al
je 0x2c3e0
leaq 0x16(%rsp), %rcx
movl %r13d, %edx
shll $0x5, %edx
subl %r13d, %edx
movsbl %al, %r13d
addl %edx, %r13d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x2c3ba
jmp 0x2c3e0
xorl %r15d, %r15d
jmp 0x2c465
xorl %r13d, %r13d
andl %esi, %r13d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rbx
movl $0x1, %r14d
movl %r13d, %r15d
movl %esi, 0x10(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rbx,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2c453
testb $0x1, %al
jne 0x2c43b
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x14(%rsp), %rsi
callq 0x3620
movl 0x10(%rsp), %esi
testl %eax, %eax
je 0x2c453
addl %r14d, %r15d
andl %esi, %r15d
incl %r14d
cmpl %r13d, %r15d
jne 0x2c3f9
movq 0x20(%rsp), %rcx
movl %ecx, %r15d
jmp 0x2c465
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x20(%rsp), %rcx
cmovnel %ecx, %r15d
cmpl %ecx, %r15d
jne 0x2c473
leaq 0x31757(%rip), %rax     # 0x5dbc8
jmp 0x2c483
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x31b4f(%rip), %rcx     # 0x5dfe8
movq (%rcx), %rdi
leaq 0x242e3(%rip), %rsi     # 0x50786
leaq 0x242b2(%rip), %rdx     # 0x5075c
movl %eax, %ecx
xorl %eax, %eax
callq 0x37e0
jmp 0x2c336
callq 0x4d62
jmp 0x2c35e
callq 0x3100