// File: /workspace/github_c_makefile_star2_O1/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, %r13
cmpq $0x0, (%rsi)
je 0xf9d7
movq %rsi, %r15
cmpq $0x0, 0x8(%rsi)
je 0xf9d7
movq 0xa9e3e(%rip), %rbp     # 0xb97f8
testq %rbp, %rbp
je 0xfa02
movl 0x8(%rbp), %eax
cmpl 0xc(%rbp), %eax
jb 0xfa24
movl (%rbp), %esi
movl 0x4(%rbp), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0xfa12
decl %esi
jmp 0xfa14
leaq 0x88a67(%rip), %rsi     # 0x98445
leaq 0x88a79(%rip), %rdx     # 0x9845e
movl $0x3, %edi
movq %r13, %rcx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x14378
leaq 0x88a3c(%rip), %rsi     # 0x98445
leaq 0x88a86(%rip), %rdx     # 0x98496
jmp 0xf9e5
incl %esi
movq %rbp, %rdi
callq 0x108f2
testl %eax, %eax
js 0xfafc
movl (%rbp), %edx
leal -0x1(%rdx), %edi
movb (%r13), %cl
testb %cl, %cl
je 0xfa51
leaq 0x1(%r13), %rax
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %ebx, %ecx
imull $0x1000193, %ecx, %ebx  # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0xfa3b
jmp 0xfa56
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
andl %edi, %ebx
movq 0x10(%rbp), %rsi
movl %ebx, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %eax
leal (%rbx,%rbx), %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0xfb44
movq %rbp, 0x18(%rsp)
movq %r13, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movl $0x1, %r13d
movl %ebx, %r12d
movq %rdx, 0x8(%rsp)
movl %edx, %r14d
movq %rsi, 0x30(%rsp)
movl %edi, 0x14(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %r15d
leal (%r12,%r12), %ebp
andl $0x1e, %ebp
movl %r15d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0xfb06
testb $0x1, %al
jne 0xfae1
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x20(%rsp), %rsi
callq 0x46c0
movl 0x14(%rsp), %edi
movq 0x30(%rsp), %rsi
testl %eax, %eax
je 0xfb06
btl %ebp, %r15d
cmovbl %r12d, %r14d
addl %r13d, %r12d
andl %edi, %r12d
incl %r13d
movl %r14d, %eax
cmpl %ebx, %r12d
jne 0xfa9a
jmp 0xfb0b
movl (%rbp), %ebx
movb $0x1, %al
jmp 0xfba5
movq 0x8(%rsp), %rax
movl %eax, %ebx
movq 0x8(%rsp), %rdx
cmpl %edx, %eax
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %r13
movq 0x18(%rsp), %rbp
jne 0xfb44
movl %r12d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %eax
leal (%r12,%r12), %ecx
shrl %cl, %eax
cmpl %edx, %r14d
cmovel %r12d, %r14d
testb $0x2, %al
cmovel %r12d, %r14d
movl %r14d, %ebx
movl %ebx, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %edx
leal (%rbx,%rbx), %ecx
andl $0x1e, %ecx
shrl %cl, %edx
testb $0x2, %dl
jne 0xfb64
testb $0x1, %dl
jne 0xfb86
movb $0x1, %cl
xorl %eax, %eax
jmp 0xfba7
movq 0x18(%rbp), %rdx
movl %ebx, %esi
movq %r13, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rbp), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rbp)
incl 0x8(%rbp)
jmp 0xfba3
movq 0x18(%rbp), %rdx
movl %ebx, %esi
movq %r13, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rbp), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rbp)
xorl %eax, %eax
xorl %ecx, %ecx
testb %al, %al
je 0xfbe5
callq 0x4050
movl (%rax), %edi
callq 0x4150
leaq 0x88887(%rip), %rsi     # 0x98445
leaq 0x888f9(%rip), %rdx     # 0x984be
movl $0x3, %edi
movq %r13, %rcx
movq %rax, %r8
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x14378
movl %ebx, %eax
testb %cl, %cl
je 0xfc3e
movslq 0x18(%r15), %rcx
imulq $0x10624dd3, %rcx, %rdx # imm = 0x10624DD3
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x26, %rdx
addl %esi, %edx
imull $0x3e8, %edx, %edx      # imm = 0x3E8
subl %edx, %ecx
movq 0xa9be6(%rip), %rdx     # 0xb97f8
movq 0x20(%rdx), %rdx
movq (%rdx,%rax,8), %rdx
movslq 0x18(%rdx), %rdx
imulq $0x10624dd3, %rdx, %rsi # imm = 0x10624DD3
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x26, %rsi
addl %edi, %esi
imull $0x3e8, %esi, %esi      # imm = 0x3E8
subl %esi, %edx
cmpl %edx, %ecx
jle 0xfc4d
movq 0xa9bb3(%rip), %rcx     # 0xb97f8
movq 0x20(%rcx), %rcx
movq %r15, (%rcx,%rax,8)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq