// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/hfile.c
// Function: hfile_add_scheme_handler
HTSLIB_EXPORT
void hfile_add_scheme_handler(const char *scheme,
                              const struct hFILE_scheme_handler *handler)
{
    int absent;
    if (handler->open == NULL || handler->isremote == NULL) {
        hts_log_warning("Couldn't register scheme handler for %s: missing method", scheme);
        return;
    }
    if (!schemes) {
        if (try_exe_add_scheme_handler(scheme, handler) != 0) {
            hts_log_warning("Couldn't register scheme handler for %s", scheme);
        }
        return;
    }
    khint_t k = kh_put(scheme_string, schemes, scheme, &absent);
    if (absent < 0) {
        hts_log_warning("Couldn't register scheme handler for %s : %s",
                        scheme, strerror(errno));
        return;
    }
    if (absent || priority(handler) > priority(kh_value(schemes, k))) {
        kh_value(schemes, k) = handler;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r15
cmpq $0x0, (%rsi)
je 0xdbc0
movq %rsi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0xdbc0
movq 0x90c5c(%rip), %r12     # 0x9e7f8
testq %r12, %r12
je 0xdbe9
movl 0x8(%r12), %eax
cmpl 0xc(%r12), %eax
jb 0xdc0b
movl (%r12), %esi
movl 0x4(%r12), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0xdbf9
decl %esi
jmp 0xdbfb
leaq 0x6986e(%rip), %rsi     # 0x77435
leaq 0x69880(%rip), %rdx     # 0x7744e
pushq $0x3
popq %rdi
movq %r15, %rcx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x110c6
leaq 0x69845(%rip), %rsi     # 0x77435
leaq 0x6988f(%rip), %rdx     # 0x77486
jmp 0xdbce
incl %esi
movq %r12, %rdi
callq 0xe96b
testl %eax, %eax
js 0xdce8
movl (%r12), %r13d
leal -0x1(%r13), %r14d
movq %r15, %rdi
callq 0xebf5
movl %eax, %edi
andl %r14d, %edi
movq 0x10(%r12), %rdx
movl %edi, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %eax
leal (%rdi,%rdi), %ecx
shrl %cl, %eax
testb $0x2, %al
je 0xdc3e
movl %edi, %r13d
jmp 0xdd53
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %rbx, 0x28(%rsp)
pushq $0x1
popq %rbx
movl %edi, %r12d
movq %r13, 0x20(%rsp)
movq %rdi, 0x30(%rsp)
movl %r14d, 0x1c(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %r15d
leal (%r12,%r12), %ebp
andl $0x1e, %ebp
movl %r15d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0xdd20
testb $0x1, %al
jne 0xdcb4
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x10(%rsp), %rsi
movq %rdx, %r14
callq 0x46c0
movq 0x30(%rsp), %rdi
movq %r14, %rdx
movl 0x1c(%rsp), %r14d
testl %eax, %eax
je 0xdd20
btl %ebp, %r15d
cmovbl %r12d, %r13d
addl %ebx, %r12d
andl %r14d, %r12d
incl %ebx
cmpl %edi, %r12d
jne 0xdc62
movb $0x1, %al
movq 0x20(%rsp), %rsi
movl %esi, %ecx
cmpl %esi, %r13d
movq 0x28(%rsp), %rbx
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r12
je 0xdd46
jmp 0xdd53
callq 0x4050
movl (%rax), %edi
callq 0x4150
leaq 0x6973a(%rip), %rsi     # 0x77435
leaq 0x697ac(%rip), %rdx     # 0x774ae
pushq $0x3
popq %rdi
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x110c6
movl %ebp, %ecx
shrl %cl, %r15d
testb $0x2, %r15b
sete %al
movl %r13d, %ecx
movl %r12d, %edi
movq 0x28(%rsp), %rbx
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r12
movq 0x20(%rsp), %rsi
cmpl %esi, %ecx
cmovel %edi, %ecx
testb %al, %al
cmovnel %edi, %ecx
movl %ecx, %r13d
movl %r13d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %edx
leal (,%r13,2), %ecx
andl $0x1e, %ecx
shrl %cl, %edx
testb $0x2, %dl
jne 0xdd9e
testb $0x1, %dl
jne 0xddd1
movl 0x18(%rbx), %eax
movl $0x3e8, %edi            # imm = 0x3E8
cltd
idivl %edi
movl %edx, %ecx
movq 0x90a71(%rip), %rax     # 0x9e7f8
movq 0x20(%rax), %rax
movl %r13d, %esi
movq (%rax,%rsi,8), %rax
movl 0x18(%rax), %eax
cltd
idivl %edi
cmpl %edx, %ecx
jg 0xddf1
jmp 0xde00
movq 0x18(%r12), %rdx
movl %r13d, %esi
movq %r15, (%rdx,%rsi,8)
pushq $0x3
popq %rdx
shll %cl, %edx
notl %edx
movq 0x10(%r12), %rcx
andl %edx, (%rcx,%rax,4)
movq 0x4(%r12), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x4(%r12)
jmp 0xddf1
movq 0x18(%r12), %rdx
movl %r13d, %esi
movq %r15, (%rdx,%rsi,8)
pushq $0x3
popq %rdx
shll %cl, %edx
notl %edx
movq 0x10(%r12), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%r12)
movq 0x90a00(%rip), %rax     # 0x9e7f8
movq 0x20(%rax), %rax
movq %rbx, (%rax,%rsi,8)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq