// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_khash.c
// Function: check_str2int_entry
static int check_str2int_entry(khash_t(str2int) *h, char *key, khint_t val,
                               uint8_t is_deleted) {
    khint_t k = kh_get(str2int, h, key);
    if (is_deleted) {
        if (k < kh_end(h)) {
            fprintf(stderr, "Found deleted entry %s in hash table\n", key);
            return -1;
        } else {
            return 0;
        }
    }

    if (k >= kh_end(h)) {
        fprintf(stderr, "Couldn't find %s in hash table\n", key);
        return -1;
    }
    if (strcmp(kh_key(h, k), key) != 0) {
        fprintf(stderr, "Wrong key in hash table, expected %s got %s\n",
                key, kh_key(h, k));
        return -1;
    }
    if (kh_val(h, k) != val) {
        fprintf(stderr, "Wrong value in hash table, expected %u got %u\n",
                val, kh_val(h, k));
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %rdx
movl (%rdi), %eax
testl %eax, %eax
je 0x2287
movl %ecx, 0x4(%rsp)
movl %ebp, 0x8(%rsp)
movq %rax, 0x10(%rsp)
leal -0x1(%rax), %esi
movb (%rdx), %cl
testb %cl, %cl
je 0x2297
leaq 0x1(%rdx), %rax
movl $0x811c9dc5, %ebp       # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %ebp, %ecx
imull $0x1000193, %ecx, %ebp  # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x2271
jmp 0x229c
xorl %r12d, %r12d
testb %cl, %cl
jne 0x2382
jmp 0x234e
movl $0x811c9dc5, %ebp       # imm = 0x811C9DC5
andl %esi, %ebp
movq 0x10(%rdi), %rbx
movl $0x1, %r14d
movl %ebp, %r12d
movq %rdi, 0x20(%rsp)
movl %esi, 0xc(%rsp)
movq %rdx, 0x18(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%rbx,%rax,4), %r15d
leal (%r12,%r12), %r13d
andl $0x1e, %r13d
movl %r15d, %eax
movl %r13d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2318
testb $0x1, %al
jne 0x2300
movq 0x18(%rdi), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rdx, %rsi
callq 0x1100
movl 0xc(%rsp), %esi
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
testl %eax, %eax
je 0x2318
addl %r14d, %r12d
andl %esi, %r12d
incl %r14d
cmpl %ebp, %r12d
jne 0x22b9
movq 0x10(%rsp), %rax
movl %eax, %r12d
jmp 0x232b
movl %r13d, %ecx
shrl %cl, %r15d
testb $0x3, %r15b
movq 0x10(%rsp), %rax
cmovnel %eax, %r12d
cmpb $0x0, 0x4(%rsp)
movl 0x8(%rsp), %ebp
je 0x234e
cmpl %eax, %r12d
jae 0x237f
movq 0x2c9e(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0xed1(%rip), %rsi       # 0x321d
jmp 0x23a5
cmpl %eax, %r12d
jae 0x2394
movq 0x18(%rdi), %rax
movl %r12d, %ebx
movq (%rax,%rbx,8), %r15
movq %rdi, %r12
movq %r15, %rdi
movq %rdx, %rsi
movq %rdx, %r14
callq 0x1100
testl %eax, %eax
jne 0x23ae
movq 0x20(%r12), %rax
movl (%rax,%rbx,4), %ecx
cmpl %ebp, %ecx
jne 0x23ce
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2c45(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0xe9e(%rip), %rsi       # 0x3243
xorl %eax, %eax
callq 0x1110
jmp 0x23e8
movq 0x2c2b(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0xea4(%rip), %rsi       # 0x3263
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1110
jmp 0x23e8
movq 0x2c0b(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0xeb1(%rip), %rsi       # 0x3290
movl %ebp, %edx
xorl %eax, %eax
callq 0x1110
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x2382