// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rdi, -0x38(%rbp)
movq 0x10130(%rdi), %rax
shlq $0x6, %rbx
movq %rax, %r12
movq (%rax,%rbx), %rax
shrq $0x3c, %rax
cmpl $0x7, %eax
jb 0xf2b7
callq 0x7e33
testw $0xf80, %ax             # imm = 0xF80
jne 0xf443
movq %r15, %rax
xorl %edx, %edx
movq -0x38(%rbp), %rcx
divq 0x10138(%rcx)
movq %rdx, %rdi
shlq $0x4, %rdi
addq 0x10148(%rcx), %rdi
movq %r14, %rax
shrq $0x20, %rax
xorl %r14d, %eax
movl %eax, %ecx
shrl $0x10, %ecx
xorl %eax, %ecx
movzwl %cx, %esi
callq 0xf477
testq %rax, %rax
je 0xf443
movabsq $0x7000000000000000, %rcx # imm = 0x7000000000000000
movq %r12, %r15
addq %rbx, %r15
movabsq $0xfffffffffffffff, %r8 # imm = 0xFFFFFFFFFFFFFFF
cmpq %rcx, (%r15)
jae 0xf343
leaq 0x8(%r15), %rsi
pushq $0x7
popq %rdx
xorl %ecx, %ecx
subq $0x1, %rdx
jb 0xf338
cmpq $0x10000, (%rsi,%rcx,8) # imm = 0x10000
jb 0xf414
incq %rcx
jmp 0xf31f
movq %rax, %rbx
callq 0x6e43
movq %rbx, %rax
movq %rax, -0x48(%rbp)
pushq $0x7
popq %r12
callq 0x7e33
movq %rax, %r13
xorl %r14d, %r14d
xorl %edx, %edx
divq %r12
movq %rdx, %rbx
movq %rax, -0x40(%rbp)
movq %r15, %rdi
movq %rdx, %rsi
callq 0x10f3c
movabsq $0xfffffffffffffff, %r10 # imm = 0xFFFFFFFFFFFFFFF
movq -0x48(%rbp), %r9
movq %r15, %r8
andq (%r15), %r10
movq -0x40(%rbp), %rax
imulq $0x7, %rax, %r15
notq %r15
addq %r13, %r15
shlq $0x2, %r13
imulq $0x1c, %rax, %rax
subq %rax, %r13
movq %r12, %rdi
movq %rbx, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r12
subq $0x1, %rdi
jb 0xf443
movq %rax, %rsi
leaq (%r14,%rbx), %rax
xorl %edx, %edx
divq %r12
imulq $0x1c, %rsi, %rax
movq %r13, %rsi
subq %rax, %rsi
shrxq %rsi, %r10, %rax
andl $0xf, %eax
incq %r14
incq %r15
addq $0x4, %r13
incq %rcx
cmpq %r9, %rax
jae 0xf3a0
movq %r8, %rbx
leaq (%r8,%rdx,8), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rsi
movq %r9, %r14
callq 0xfc55
pushq $0x7
popq %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
movq %rbx, %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x10f93
jmp 0xf443
leaq (%rsi,%rcx,8), %rdi
movq -0x30(%rbp), %rsi
movq %r8, %rbx
callq 0xfc55
movq (%r15), %rax
movabsq $-0x1000000000000000, %rcx # imm = 0xF000000000000000
andq %rax, %rcx
orq %rbx, %rcx
andq %rbx, %rax
addq %rcx, %rax
incq %rax
movq %rax, (%r15)
movq -0x38(%rbp), %rcx
movq 0x70(%rcx), %rax
testq %rax, %rax
je 0xf468
movq 0x78(%rcx), %rsi
movq -0x30(%rbp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq