// File: /workspace/github_c_makefile_star2_O1/wuxb45[P]SLB/lib1.c
// Function: icache_hint
inline void
icache_hint(struct icache * const cache, const struct kv * const kv)
{
  const u64 hash = kv->hash;
  const u64 idx = (hash >> KVMAP_BASE_LEVEL) % cache->nr_slots;
  struct __icache_slot * const slot = &(cache->table[idx]);
  if ((slot->used < ICACHE_ENTRY_NR) || ((random_u64() & 0xfff) < 0x80)) {
    struct __icache_hist * const hist = &(cache->hists[(hash >> KVMAP_BASE_LEVEL) % cache->nr_hists]);
    const u64 rep = icache_hist_update(hist, kvmap_pkey(hash));
    if (rep) {
      if (icache_update(slot, rep, kv)) {
        // replaced
      }
    }
  }
  if (cache->map_mm.hf) cache->map_mm.hf(kv, cache->map_mm.hp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x30(%rbp)
movq (%rsi), %r14
movq %r14, %r15
shrq $0x6, %r15
movq %r15, %rax
xorl %edx, %edx
divq 0x10120(%rdi)
movq %rdx, %r12
movq %rdi, -0x38(%rbp)
movq 0x10130(%rdi), %r13
shlq $0x6, %r12
movq (%r13,%r12), %rax
shrq $0x3c, %rax
cmpl $0x7, %eax
jb 0x11cac
movq %fs:-0x8, %rax
testq %rax, %rax
jne 0x11c6c
leaq -0x50(%rbp), %rbx
movl $0x4, %edi
movq %rbx, %rsi
callq 0x6110
imulq $0x3b9aca00, (%rbx), %rax # imm = 0x3B9ACA00
addq 0x8(%rbx), %rax
movq %rax, %rcx
shrq $0xc, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shlq $0x19, %rax
xorq %rcx, %rax
movq %rax, %rcx
shrq $0x1b, %rcx
xorq %rax, %rcx
movabsq $0x2545f4914f6cdd1d, %rax # imm = 0x2545F4914F6CDD1D
imulq %rcx, %rax
movq %rax, %fs:-0x8
testl $0xf80, %eax            # imm = 0xF80
jne 0x11ff1
movabsq $0x7000000000000000, %rcx # imm = 0x7000000000000000
addq %r12, %r13
xorl %esi, %esi
movq %r15, %rax
xorl %edx, %edx
movq -0x38(%rbp), %rdi
divq 0x10138(%rdi)
shlq $0x4, %rdx
addq 0x10148(%rdi), %rdx
movq %r14, %rdi
shrq $0x20, %rdi
xorq %r14, %rdi
movq %rdi, %rax
shrq $0x10, %rax
xorq %rdi, %rax
movl $0x7, %edi
xorl %r12d, %r12d
xorl %r8d, %r8d
cmpw %ax, 0x2(%rdx,%rsi,2)
sete %r8b
addq %r8, %r12
incq %rsi
decq %rdi
jne 0x11cf2
movzwl (%rdx), %esi
movw %ax, 0x2(%rdx,%rsi,2)
movl %esi, %eax
incl %eax
imulq $0x24924925, %rax, %rax # imm = 0x24924925
shrq $0x20, %rax
leal (,%rax,8), %edi
subl %edi, %eax
addl %esi, %eax
incl %eax
movw %ax, (%rdx)
testq %r12, %r12
je 0x11ff1
movq (%r13), %rax
cmpq %rcx, %rax
jae 0x11de6
movq 0x8(%r13), %rdi
cmpq $0x10000, %rdi          # imm = 0x10000
jae 0x11d59
xorl %edx, %edx
xorl %esi, %esi
jmp 0x11d87
movq $-0x1, %rdx
xorl %esi, %esi
cmpq $0x5, %rdx
je 0x11de1
incq %rsi
movq 0x8(%r13,%rsi,8), %rdi
incq %rdx
cmpq $0xffff, %rdi           # imm = 0xFFFF
ja 0x11d62
cmpq $0x6, %rdx
setae %sil
incq %rdx
movq -0x30(%rbp), %r9
movq %r9, %r8
shlq $0x10, %r8
orq %r8, %rdi
movq %rdi, 0x8(%r13,%rdx,8)
movq (%r9), %rdi
movq %rdi, %r9
shrq $0x20, %r9
xorl %edi, %r9d
movl %r9d, %edi
shrl $0x10, %edi
xorl %r9d, %edi
movzwl %di, %edi
orq %r8, %rdi
movq %rdi, 0x8(%r13,%rdx,8)
andq %rax, %rcx
movabsq $0xfffffffffffffff, %rdx # imm = 0xFFFFFFFFFFFFFFF
addq %rdx, %rcx
andq %rdx, %rax
addq %rcx, %rax
incq %rax
movq %rax, (%r13)
testb %sil, %sil
je 0x11ff1
callq 0x66ef
movq %fs:-0x8, %rax
testq %rax, %rax
jne 0x11e10
leaq -0x50(%rbp), %rbx
movl $0x4, %edi
movq %rbx, %rsi
callq 0x6110
imulq $0x3b9aca00, (%rbx), %rax # imm = 0x3B9ACA00
addq 0x8(%rbx), %rax
movq %rax, %rcx
shrq $0xc, %rcx
xorq %rax, %rcx
movq %rcx, %rdx
shlq $0x19, %rdx
xorq %rcx, %rdx
movq %rdx, %rax
shrq $0x1b, %rax
xorq %rdx, %rax
movabsq $0x2545f4914f6cdd1d, %rdx # imm = 0x2545F4914F6CDD1D
imulq %rax, %rdx
movq %rdx, %fs:-0x8
movabsq $0x2492492492492493, %rcx # imm = 0x2492492492492493
mulxq %rcx, %rcx, %rcx
movq %rdx, %rsi
subq %rcx, %rsi
shrq %rsi
addq %rcx, %rsi
shrq $0x2, %rsi
leaq (,%rsi,8), %rcx
subq %rcx, %rsi
addq %rdx, %rsi
movq (%r13), %rdi
leal (,%rsi,4), %ecx
shrxq %rcx, %rdi, %r8
testb $0xf, %r8b
je 0x11eb8
movq $-0x1, %r8
shlxq %rcx, %r8, %rcx
addq %rdi, %rcx
movabsq $0xfffffffffffffff, %r8 # imm = 0xFFFFFFFFFFFFFFF
andq %r8, %rcx
movabsq $-0x1000000000000000, %r8 # imm = 0xF000000000000000
andq %rdi, %r8
orq %rcx, %r8
movq %r8, (%r13)
movq -0x30(%rbp), %rdi
shlq $0x10, %rdi
movl %r12d, %r8d
movabsq $0x2492492492492493, %rcx # imm = 0x2492492492492493
mulxq %rcx, %rcx, %rcx
andl $0xf, %r8d
movq %r8, -0x40(%rbp)
subq %rcx, %rdx
shrq %rdx
addq %rcx, %rdx
shrq $0x2, %rdx
imulq $-0x1c, %rdx, %r9
movabsq $0x6ae82dbac24c8b8c, %rcx # imm = 0x6AE82DBAC24C8B8C
imulq %rcx, %rax
subq %rax, %r9
movl $0x6, %r10d
xorl %r11d, %r11d
movq %rsi, %rax
movq %rax, %rdx
movabsq $0x2492492492492493, %r15 # imm = 0x2492492492492493
mulxq %r15, %rcx, %rcx
subq %rcx, %rdx
shrq %rdx
addq %rcx, %rdx
shrq $0x2, %rdx
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rbx
addq %rdx, %rbx
movq %r9, %r14
leaq (%r11,%rsi), %r8
movq %r8, %rdx
mulxq %r15, %rcx, %rcx
subq %rbx, %r14
movq (%r13), %rbx
movq %rbx, %rdx
movabsq $0xfffffffffffffff, %r15 # imm = 0xFFFFFFFFFFFFFFF
andq %r15, %rdx
shrxq %r14, %rdx, %r15
andl $0xf, %r15d
cmpq %r12, %r15
jae 0x11fd3
movq %r8, %rdx
subq %rcx, %rdx
shrq %rdx
addq %rcx, %rdx
shrq $0x2, %rdx
leaq (,%rdx,8), %rcx
subq %rcx, %rdx
addq %r8, %rdx
movzwl 0x8(%r13,%rdx,8), %ecx
orq %rdi, %rcx
movq %rcx, 0x8(%r13,%rdx,8)
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, %r8
shrq $0x20, %r8
xorl %ecx, %r8d
movl %r8d, %ecx
shrl $0x10, %ecx
xorl %r8d, %ecx
movzwl %cx, %ecx
orq %rdi, %rcx
movq %rcx, 0x8(%r13,%rdx,8)
movl $0xf, %ecx
shlxq %r14, %rcx, %rcx
shlxq %r14, -0x40(%rbp), %rdx
andnq %rbx, %rcx, %rcx
orq %rdx, %rcx
movq %rcx, (%r13)
subq $0x1, %r10
setb %cl
cmpq %r12, %r15
jb 0x11ff1
incq %r11
addq $0x4, %r9
incq %rax
testb %cl, %cl
je 0x11f08
movq -0x38(%rbp), %rcx
movq 0x70(%rcx), %rax
testq %rax, %rax
je 0x12008
movq 0x78(%rcx), %rsi
movq -0x30(%rbp), %rdi
callq *%rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq