LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap2_get
struct kv *
kvmap2_get(struct kvmap2 * const map2, const struct kv * const key, struct kv * const out)
{
  u64 i = UINT64_MAX;
  u64 j = UINT64_MAX;
  u64 k = UINT64_MAX;
  kvmap1_lock_hash(map2->maps[0], key);
  for (u64 x = 0; x < 2; x++) {
    struct kvmap1 * const map = map2->maps[x];
    if (kvmap1_locate_key(map, key, &i, &j, &k)) {
      struct kv * const curr = __u64_to_ptr(map->levels[i].table[j].e[k].ptr);
      if (map2->mm.hf) map2->mm.hf(curr, map2->mm.hp);
      struct kv * const ret = kv_dup2(curr, out);
      kvmap1_unlock_hash(map2->maps[x], key);
      return ret;
    }
    if (x == 0) {
      kvmap1_lock_hash(map2->maps[1], key);
    }
    kvmap1_unlock_hash(map2->maps[x], key);
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $-0x1, -0x30(%rbp)
movq $-0x1, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf070
movq $0x0, -0x40(%rbp)
cmpq $0x2, -0x40(%rbp)
jae 0xf05c
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0xf0d0
testb $0x1, %al
jne 0xef93
jmp 0xf01d
movq -0x48(%rbp), %rax
addq $0x10128, %rax          # imm = 0x10128
movq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xefec
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xdfb0
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf064
cmpq $0x0, -0x40(%rbp)
jne 0xf035
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf070
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xef55
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap1_locate_key
static bool
kvmap1_locate_key(const struct kvmap1 * const map, const struct kv * const key,
    u64 * const out_level, u64 * const out_index, u64 * const out_entry)
{
  const u64 hash = bits_rotl_u64(key->hash, map->hash_rotate);
  const u64 pkey = kvmap_pkey(hash);
  kvmap1_locate_level(map, hash, out_level, out_index);
  const struct __kvmap_slot * const slot = &(map->levels[*out_level].table[*out_index]);
  u64 used = 0;
  for (u64 k = 0; k < 8; k++) {
    if (slot->e[k].ptr) {
      used++;
      if (slot->e[k].pkey == pkey) {
        const struct kv * const curr = __u64_to_ptr(slot->e[k].ptr);
        if (kv_keymatch(key, curr)) {
          *out_entry = k;
          return true;
        }
      }
    }
  }
  *out_entry = used;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x7b70
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x10c00
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x18510
movq -0x10(%rbp), %rax
addq $0x10128, %rax          # imm = 0x10128
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x8, -0x58(%rbp)
jae 0xf1fc
movq -0x48(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x10, %rax
cmpq $0x0, %rax
je 0xf1e9
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x40(%rbp), %rax
jne 0xf1e7
movq -0x48(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0xe110
testb $0x1, %al
jne 0xf1d4
jmp 0xf1e5
movq -0x58(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xf20b
jmp 0xf1e7
jmp 0xf1e9
jmp 0xf1eb
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0xf163
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap2_probe
bool
kvmap2_probe(struct kvmap2 * const map2, const struct kv * const key)
{
  u64 i = UINT64_MAX;
  u64 j = UINT64_MAX;
  u64 k = UINT64_MAX;
  kvmap1_lock_hash(map2->maps[0], key);
  for (u64 x = 0; x < 2; x++) {
    struct kvmap1 * const map = map2->maps[x];
    if (kvmap1_locate_key(map, key, &i, &j, &k)) {
      struct kv * const curr = __u64_to_ptr(map->levels[i].table[j].e[k].ptr);
      if (map2->mm.hf) map2->mm.hf(curr, map2->mm.hp);
      kvmap1_unlock_hash(map2->maps[x], key);
      return true;
    }
    if (x == 0) {
      kvmap1_lock_hash(map2->maps[1], key);
    }
    kvmap1_unlock_hash(map2->maps[x], key);
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $-0x1, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $-0x1, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf070
movq $0x0, -0x38(%rbp)
cmpq $0x2, -0x38(%rbp)
jae 0xf3c0
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %r8
callq 0xf0d0
testb $0x1, %al
jne 0xf30c
jmp 0xf381
movq -0x40(%rbp), %rax
addq $0x10128, %rax          # imm = 0x10128
movq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xf365
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movb $0x1, -0x1(%rbp)
jmp 0xf3c4
cmpq $0x0, -0x38(%rbp)
jne 0xf399
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf070
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xf2d1
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kv_alloc_dup
static inline struct kv *
kv_alloc_dup(const struct kv * const kv, const struct kvmap_mm * const mm)
{
  const u64 sz = kv_size(kv);
  struct kv * const new = mm->af(sz, mm->ap);
  debug_assert(new);
  memcpy(new, kv, sz);
  return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xdbe0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6320
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap1_put_entry
static inline void
kvmap1_put_entry(struct kvmap1 * const map, struct __kvmap_entry * const e, const struct kv * const kv)
{
  struct kv * const old = __u64_to_ptr(e->ptr);
  if (old && map->mm.rf) {
    map->mm.rf(old, map->mm.rp);
  }
  e->ptr = __ptr_to_u64(kv);
  e->pkey = kv ? kvmap_pkey(bits_rotl_u64(kv->hash, map->hash_rotate)) : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xf920
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xf920
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rsi
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x18610
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
andq %rsi, %rdx
shlq $0x10, %rdx
andq $0xffff, %rcx           # imm = 0xFFFF
orq %rdx, %rcx
movq %rcx, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0xf97a
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x7b70
movq %rax, %rdi
callq 0x10c00
movq %rax, -0x28(%rbp)
jmp 0xf982
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0xf982
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
andq $0xffff, %rdx           # imm = 0xFFFF
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq %rdx, %rcx
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap1_insert
static bool
kvmap1_insert(struct kvmap1 * const map, const struct kv * const kv, const u64 max_level)
{
  u64 i = UINT64_MAX;
  u64 j = UINT64_MAX;
  u64 k = UINT64_MAX;
  if (kvmap1_locate_free_entry(map, kv, &i, &j, &k)) {
    // has free entry, just insert
    struct __kvmap_entry * const e = &(map->levels[i].table[j].e[k]);
    kvmap1_put_entry(map, e, kv);
    //(void)atomic_fetch_add(&(map->nr_kv), 1);
    (void)atomic_fetch_add(&(map->levels[i].nr_kv), 1);
    return true;
  } else if (i < max_level) {
    kvmap1_split(map, i, j);
    return kvmap1_insert(map, kv, max_level);
  } else {
    return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $-0x1, -0x30(%rbp)
movq $-0x1, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x18620
testb $0x1, %al
jne 0xf9fb
jmp 0xfa63
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq $0x5, %rcx
movq 0x10128(%rax,%rcx), %rax
movq -0x30(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xf8d0
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rdx
shlq $0x5, %rdx
movq $0x1, -0x48(%rbp)
movq -0x48(%rbp), %rax
lock
xaddq %rax, 0x10140(%rcx,%rdx)
movq %rax, -0x50(%rbp)
movb $0x1, -0x1(%rbp)
jmp 0xfa9a
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xfa96
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x186f0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xf9b0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xfa9a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap2_cuckoo
static bool
kvmap2_cuckoo(struct kvmap2 * const map2, const u64 x, const struct kv * const kv)
{
  u64 vi = UINT64_MAX;
  u64 vj = UINT64_MAX;
  u64 vk = UINT64_MAX;
  (void)kvmap1_locate_key(map2->maps[x], kv, &vi, &vj, &vk);
  (void)vk;
  struct __kvmap_slot * const slot = &(map2->maps[x]->levels[vi].table[vj]);
  for (u64 k = 0; k < 8; k++) {
    struct __kvmap_entry * const e = &(slot->e[k]);
    if (e->ptr == 0) return true;
    const bool ret = kvmap2_try_cuckoo(map2->maps[1 - x], map2->maps[x], vi, e);
    if (ret) return true;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $-0x1, -0x30(%rbp)
movq $-0x1, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0xf0d0
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rax
addq $0x10128, %rax          # imm = 0x10128
movq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x8, -0x48(%rbp)
jae 0xfbb4
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
shrq $0x10, %rax
cmpq $0x0, %rax
jne 0xfb67
movb $0x1, -0x1(%rbp)
jmp 0xfbb8
movq -0x10(%rbp), %rax
movl $0x1, %ecx
subq -0x18(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rsi
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq 0x18b50
andb $0x1, %al
movb %al, -0x51(%rbp)
testb $0x1, -0x51(%rbp)
je 0xfba4
movb $0x1, -0x1(%rbp)
jmp 0xfbb8
jmp 0xfba6
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xfb36
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap2_del
bool
kvmap2_del(struct kvmap2 * const map2, const struct kv * const key)
{
  u64 i = UINT64_MAX;
  u64 j = UINT64_MAX;
  u64 k = UINT64_MAX;
  kvmap1_lock_hash(map2->maps[0], key);
  for (u64 x = 0; x < 2; x++) {
    struct kvmap1 * const map = map2->maps[x];
    if (kvmap1_locate_key(map, key, &i, &j, &k)) {
      struct __kvmap_entry * const e = &(map->levels[i].table[j].e[k]);
      //(void)atomic_fetch_sub(&(map->nr_kv), 1);
      (void)atomic_fetch_sub(&(map->levels[i].nr_kv), 1);
      kvmap1_put_entry(map, e, NULL);
      kvmap1_unlock_hash(map2->maps[x], key);
      return true;
    }
    if (x == 0) {
      kvmap1_lock_hash(map2->maps[1], key);
    }
    kvmap1_unlock_hash(map2->maps[x], key);
  }
  return false;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $-0x1, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $-0x1, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf070
movq $0x0, -0x38(%rbp)
cmpq $0x2, -0x38(%rbp)
jae 0xfd0f
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %r8
callq 0xf0d0
testb $0x1, %al
jne 0xfc4f
jmp 0xfcd0
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
shlq $0x5, %rcx
movq 0x10128(%rax,%rcx), %rax
movq -0x28(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x30(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rdx
shlq $0x5, %rdx
movq $0x1, -0x50(%rbp)
movq -0x50(%rbp), %rax
negq %rax
lock
xaddq %rax, 0x10140(%rcx,%rdx)
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf8d0
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movb $0x1, -0x1(%rbp)
jmp 0xfd13
cmpq $0x0, -0x38(%rbp)
jne 0xfce8
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf070
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xfc11
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap1_destroy
static void
kvmap1_destroy(struct kvmap1 * const map)
{
  kvmap1_clean(map);
  pages_unmap(map->levels[KVMAP_MIN_LEVEL].table, map->levels[KVMAP_MIN_LEVEL].alloc_size);
  free(map->levels[KVMAP_MIN_LEVEL].bm);
  free(map);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xfd70
movq -0x8(%rbp), %rax
movq 0x10328(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10338(%rax), %rsi
callq 0x8c10
movq -0x8(%rbp), %rax
movq 0x10330(%rax), %rdi
callq 0x6060
movq -0x8(%rbp), %rdi
callq 0x6060
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap2_iter_create
inline struct kvmap2_iter *
kvmap2_iter_create(struct kvmap2 * const map2)
{
  struct kvmap2_iter * const iter2 = (typeof(iter2))malloc(sizeof(*iter2));
  iter2->map2 = map2;
  iter2->map_id = 0;
  for (u64 x = 0; x < 2; x++) {
    iter2->iters[x] = kvmap1_iter_create(map2->maps[x]);
  }
  iter2->iter = iter2->iters[0];
  return iter2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x28, %edi
callq 0x6380
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0x18(%rbp)
cmpq $0x2, -0x18(%rbp)
jae 0x10330
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x58(%rax,%rcx,8), %rdi
callq 0x10350
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rdx, 0x18(%rax,%rcx,8)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x102f9
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap1_iter_create
static struct kvmap1_iter *
kvmap1_iter_create(struct kvmap1 * const map)
{
  struct kvmap1_iter * const iter = (typeof(iter))malloc(sizeof(*iter));
  if (iter == NULL) {
    return NULL;
  }
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_lock(&(map->hlocks[i]));
  }
  spinlock_lock(&(map->split_lock));
  iter->map = map;
  iter->i = map->max_level;
  iter->j = 0;
  iter->k = 0;
  return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x20, %edi
callq 0x6380
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1037e
movq $0x0, -0x8(%rbp)
jmp 0x10404
movq $0x0, -0x20(%rbp)
cmpq $0x400, -0x20(%rbp)     # imm = 0x400
jae 0x103b9
movq -0x10(%rbp), %rdi
addq $0xe8, %rdi
movq -0x20(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x10386
movq -0x10(%rbp), %rdi
addq $0x100e8, %rdi          # imm = 0x100E8
callq 0x6e50
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap2_iter_next
struct kv *
kvmap2_iter_next(struct kvmap2_iter * const iter2, struct kv * const out)
{
  struct kv * const ret = kvmap1_iter_next(iter2->iter, out);
  if (ret == NULL) {
    iter2->iter = NULL;
    iter2->map_id++;
    if (iter2->map_id < 2) {
      iter2->iter = iter2->iters[iter2->map_id];
      return kvmap1_iter_next(iter2->iter, out);
    }
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x104b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x10495
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x2, 0x8(%rax)
jae 0x10493
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x18(%rax,%rcx,8), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x104b0
movq %rax, -0x8(%rbp)
jmp 0x1049d
jmp 0x10495
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap1_iter_destroy
static inline void
kvmap1_iter_destroy(struct kvmap1_iter * const iter)
{
  struct kvmap1 * const map = iter->map;
  spinlock_unlock(&(map->split_lock));
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_unlock(&(map->hlocks[i]));
  }
  free(iter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x100e8, %rdi          # imm = 0x100E8
callq 0x6ed0
movq $0x0, -0x18(%rbp)
cmpq $0x400, -0x18(%rbp)     # imm = 0x400
jae 0x10782
movq -0x10(%rbp), %rdi
addq $0xe8, %rdi
movq -0x18(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1074f
movq -0x8(%rbp), %rdi
callq 0x6060
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap2_api_create
struct kvmap_api *
kvmap2_api_create(struct kvmap2 * const map)
{
  if (map == NULL) return NULL;
  const struct kvmap_api api = {
    .map = map,
    .get = (typeof(api.get))kvmap2_get,
    .probe = (typeof(api.probe))kvmap2_probe,
    .set = (typeof(api.set))kvmap2_set,
    .del = (typeof(api.del))kvmap2_del,
    .clean = (typeof(api.clean))kvmap2_clean,
    .destroy = (typeof(api.destroy))kvmap2_destroy,
    .fprint = (typeof(api.fprint))kvmap2_fprint,
    .iter_create = (typeof(api.iter_create))kvmap2_iter_create,
    .iter_next = (typeof(api.iter_next))kvmap2_iter_next,
    .iter_destroy = (typeof(api.iter_destroy))kvmap2_iter_destroy,
  };
  struct kvmap_api * const papi = malloc(sizeof(*papi));
  *papi = api;
  return papi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x107c0
movq $0x0, -0x8(%rbp)
jmp 0x1085e
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x18bf(%rip), %rax     # 0xef10
movq %rax, -0x60(%rbp)
leaq -0x154a(%rip), %rax     # 0xf290
movq %rax, -0x58(%rbp)
leaq -0x1415(%rip), %rax     # 0xf3d0
movq %rax, -0x50(%rbp)
leaq -0xc20(%rip), %rax      # 0xfbd0
movq %rax, -0x48(%rbp)
leaq -0xadb(%rip), %rax      # 0xfd20
movq %rax, -0x40(%rbp)
leaq -0x8c6(%rip), %rax      # 0xff40
movq %rax, -0x38(%rbp)
leaq -0x831(%rip), %rax      # 0xffe0
movq %rax, -0x30(%rbp)
leaq -0x55c(%rip), %rax      # 0x102c0
movq %rax, -0x28(%rbp)
leaq -0x417(%rip), %rax      # 0x10410
movq %rax, -0x20(%rbp)
leaq -0x162(%rip), %rax      # 0x106d0
movq %rax, -0x18(%rbp)
movl $0x58, %edi
callq 0x6380
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x58, %edx
callq 0x6320
movq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_create
struct cuckoo *
cuckoo_create(const struct kvmap_mm * const mm)
{
  struct cuckoo * const map = xalloc(64, sizeof(*map));
  memset(map, 0, sizeof(*map));

  map->mm = mm ? (*mm) : __kvmap_mm_default;
  for (u64 j = 0; j < KVMAP_HLOCK_NR; j++) {
    spinlock_init(&(map->hlocks[j]));
  }
  mutexlock_init(&(map->expand_lock));

  map->fixed_power = 0;
  if (map->fixed_power == 0) {
    map->bm = bitmap_create(KVMAP_HLOCK_NR);
  }

  cuckoo_init(map);
  return map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x40, %edi
movl $0x10148, %esi          # imm = 0x10148
callq 0x8bc0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10148, %edx          # imm = 0x10148
callq 0x6200
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x108c2
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x50, %edx
callq 0x6320
jmp 0x108d7
movq -0x20(%rbp), %rdi
leaq 0x114bb(%rip), %rsi     # 0x21d88
movl $0x50, %edx
callq 0x6320
movq $0x0, -0x18(%rbp)
cmpq $0x400, -0x18(%rbp)     # imm = 0x400
jae 0x1090f
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
movq -0x18(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e30
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x108df
movq -0x10(%rbp), %rdi
addq $0x10050, %rdi          # imm = 0x10050
callq 0x6ef0
movq -0x10(%rbp), %rax
movq $0x0, 0x100d0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x100d0(%rax)
jne 0x10954
movl $0x400, %edi            # imm = 0x400
callq 0x7c70
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x100d8(%rax)
movq -0x10(%rbp), %rdi
callq 0x10970
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_init
static void
cuckoo_init(struct cuckoo * const map)
{
  const u64 power = map->fixed_power > KVMAP_MIN_LEVEL ? map->fixed_power : KVMAP_MIN_LEVEL;
  map->levels[0].power = power;
  map->levels[0].table = pages_alloc_best(KVMAP_SIZE_OF_LEVEL(power), true, &(map->levels[0].alloc_size));
  if (map->fixed_power == 0) {
    bitmap_set_all0(map->bm);
  }
  debug_assert(map->levels[0].table);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x10, 0x100d0(%rax)
jbe 0x1099b
movq -0x8(%rbp), %rax
movq 0x100d0(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x109a6
movl $0x10, %eax
movq %rax, -0x18(%rbp)
jmp 0x109a6
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10128(%rax)
movq -0x10(%rbp), %rcx
subq $0x6, %rcx
movl $0x1, %edi
shlq %cl, %rdi
shlq $0xc, %rdi
movq -0x8(%rbp), %rdx
addq $0x10118, %rdx          # imm = 0x10118
addq $0x8, %rdx
movl $0x1, %esi
callq 0x8d40
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10118(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x100d0(%rax)
jne 0x10a16
movq -0x8(%rbp), %rax
movq 0x100d8(%rax), %rdi
callq 0x7f20
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10118(%rax)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_get
struct kv *
cuckoo_get(struct cuckoo * const map, const struct kv * const key, struct kv * const out)
{
  const u64 hash2[2] = {cuckoo_hash(key, 0), cuckoo_hash(key, 1), };
  const u64 pkey = kvmap_pkey(key->hash);

  cuckoo_lock_two(map, key);
  for (u64 x = 0; x < 2; x++) {
    struct __kvmap_slot * const slot = cuckoo_hash_slot(map, hash2[x]);
    for (u64 k = 0; k < 8; k++) {
      if (slot->e[k].pkey == pkey) {
        const struct kv * const curr = __u64_to_ptr(slot->e[k].ptr);
        if (kv_keymatch(key, curr)) {
          if (map->mm.hf) map->mm.hf(curr, map->mm.hp);
          struct kv * const ret = kv_dup2(curr, out);
          cuckoo_unlock_two(map, key);
          return ret;
        }
      }
    }
  }
  cuckoo_unlock_two(map, key);
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10bb0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x10bb0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10c00
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10c40
movq $0x0, -0x40(%rbp)
cmpq $0x2, -0x40(%rbp)
jae 0x10b85
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
movq -0x30(%rbp,%rax,8), %rsi
callq 0x10cf0
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
cmpq $0x8, -0x50(%rbp)
jae 0x10b72
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x38(%rbp), %rax
jne 0x10b5f
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xe110
testb $0x1, %al
jne 0x10b14
jmp 0x10b5d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x10b35
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xdfb0
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10dc0
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10b9a
jmp 0x10b5f
jmp 0x10b61
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x10ac5
jmp 0x10b74
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x10a9c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10dc0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_lock_two
static void
cuckoo_lock_two(struct cuckoo * const map, const struct kv * const key)
{
  const u64 hash2[2] = {cuckoo_hash(key, 0), cuckoo_hash(key, 1), };
  const u64 i1 = kvmap_hlocks_index(hash2[0]);
  const u64 i2 = kvmap_hlocks_index(hash2[1]);
  if (i1 < i2) {
    cuckoo_lock(map, i1);
    cuckoo_lock(map, i2);
  } else if (i1 > i2) {
    cuckoo_lock(map, i2);
    cuckoo_lock(map, i1);
  } else { // equal
    cuckoo_lock(map, i1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10bb0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x10bb0
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x12d40
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x12d40
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x10cb3
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18c80
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x18c80
jmp 0x10ce8
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x10cd9
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x18c80
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18c80
jmp 0x10ce6
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18c80
jmp 0x10ce8
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_hash_slot
static inline struct __kvmap_slot *
cuckoo_hash_slot(struct cuckoo * const map, const u64 hash)
{
  const u64 lid = map->bm ? (bitmap_test(map->bm, kvmap_hlocks_index(hash)) ? 1 : 0) : 0;
  struct __cuckoo_level * const level = &(map->levels[lid]);
  const u64 hidx = __cuckoo_hidx(hash, level->power);
  debug_assert(level->table);
  struct __kvmap_slot * const slot = &(level->table[hidx]);
  return slot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x100d8(%rax)
je 0x10d46
movq -0x8(%rbp), %rax
movq 0x100d8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x12d40
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x7cd0
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
jmp 0x10d4d
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x10d4d
movl -0x34(%rbp), %eax
cltq
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x18cb0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_unlock_two
static void
cuckoo_unlock_two(struct cuckoo * const map, const struct kv * const key)
{
  const u64 hash2[2] = {cuckoo_hash(key, 0), cuckoo_hash(key, 1), };
  const u64 i1 = kvmap_hlocks_index(hash2[0]);
  const u64 i2 = kvmap_hlocks_index(hash2[1]);
  if (i1 < i2) {
    cuckoo_unlock(map, i1);
    cuckoo_unlock(map, i2);
  } else if (i1 > i2) {
    cuckoo_unlock(map, i2);
    cuckoo_unlock(map, i1);
  } else { // equal
    cuckoo_unlock(map, i1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10bb0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x10bb0
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x12d40
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x12d40
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x10e33
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18ce0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x18ce0
jmp 0x10e68
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x10e59
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x18ce0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18ce0
jmp 0x10e66
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18ce0
jmp 0x10e68
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_probe
bool
cuckoo_probe(struct cuckoo * const map, const struct kv * const key)
{
  const u64 hash2[2] = {cuckoo_hash(key, 0), cuckoo_hash(key, 1), };
  const u64 pkey = kvmap_pkey(key->hash);

  cuckoo_lock_two(map, key);
  for (u64 x = 0; x < 2; x++) {
    struct __kvmap_slot * const slot = cuckoo_hash_slot(map, hash2[x]);
    for (u64 k = 0; k < 8; k++) {
      if (slot->e[k].pkey == pkey) {
        const struct kv * const curr = __u64_to_ptr(slot->e[k].ptr);
        if (kv_keymatch(key, curr)) {
          if (map->mm.hf) map->mm.hf(curr, map->mm.hp);
          cuckoo_unlock_two(map, key);
          return true;
        }
      }
    }
  }
  cuckoo_unlock_two(map, key);
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10bb0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x10bb0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10c00
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10c40
movq $0x0, -0x40(%rbp)
cmpq $0x2, -0x40(%rbp)
jae 0x10f9c
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
movq -0x30(%rbp,%rax,8), %rsi
callq 0x10cf0
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
cmpq $0x8, -0x50(%rbp)
jae 0x10f89
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x38(%rbp), %rax
jne 0x10f76
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xe110
testb $0x1, %al
jne 0x10f40
jmp 0x10f74
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x10f61
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10dc0
movb $0x1, -0x1(%rbp)
jmp 0x10fad
jmp 0x10f76
jmp 0x10f78
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x10ef1
jmp 0x10f8b
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x10ec8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10dc0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_set
bool
cuckoo_set(struct cuckoo * const map, const struct kv * const kv)
{
  const struct kv * const new = kv_alloc_dup(kv, &(map->mm));
  if (new == NULL) return false;
  if (map->fixed_power) {
    for (u64 i = 0; i < 8; i++) {
      if (cuckoo_try_set(map, new)) return true;
    }
    return false;
  } else {
    while (cuckoo_try_set(map, new) == false);
    return true;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xf860
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x10fee
movb $0x0, -0x1(%rbp)
jmp 0x11059
movq -0x10(%rbp), %rax
cmpq $0x0, 0x100d0(%rax)
je 0x1103a
movq $0x0, -0x28(%rbp)
cmpq $0x8, -0x28(%rbp)
jae 0x11034
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x11070
testb $0x1, %al
jne 0x1101e
jmp 0x11024
movb $0x1, -0x1(%rbp)
jmp 0x11059
jmp 0x11026
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x11004
movb $0x0, -0x1(%rbp)
jmp 0x11059
jmp 0x1103c
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x11070
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x11055
jmp 0x1103c
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_del
bool
cuckoo_del(struct cuckoo * const map, const struct kv * const key)
{
  const u64 hash2[2] = {cuckoo_hash(key, 0), cuckoo_hash(key, 1), };
  const u64 pkey = kvmap_pkey(key->hash);

  cuckoo_lock_two(map, key);
  for (u64 x = 0; x < 2; x++) {
    struct __kvmap_slot * const slot = cuckoo_hash_slot(map, hash2[x]);
    for (u64 k = 0; k < 8; k++) {
      if (slot->e[k].pkey == pkey) {
        const struct kv * const curr = __u64_to_ptr(slot->e[k].ptr);
        if (kv_keymatch(key, curr)) {
          kvmap_put_entry(&(map->mm), &(slot->e[k]), NULL);
          cuckoo_unlock_two(map, key);
          return true;
        }
      }
    }
  }
  cuckoo_unlock_two(map, key);
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10bb0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x10bb0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10c00
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10c40
movq $0x0, -0x40(%rbp)
cmpq $0x2, -0x40(%rbp)
jae 0x11367
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
movq -0x30(%rbp,%rax,8), %rsi
callq 0x10cf0
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
cmpq $0x8, -0x50(%rbp)
jae 0x11354
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x38(%rbp), %rax
jne 0x11341
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xe110
testb $0x1, %al
jne 0x11310
jmp 0x1133f
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x11390
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10dc0
movb $0x1, -0x1(%rbp)
jmp 0x11378
jmp 0x11341
jmp 0x11343
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x112c1
jmp 0x11356
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x11298
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10dc0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap_put_entry
static inline void
kvmap_put_entry(struct kvmap_mm * const mm, struct __kvmap_entry * const e, const struct kv * const kv)
{
  struct kv * const old = __u64_to_ptr(e->ptr);
  if (old) {
    if (kv && mm->xf) {
      mm->xf(old, kv, mm->xp);
    } else if (mm->rf) {
      mm->rf(old, mm->rp);
    }
  }
  e->ptr = __ptr_to_u64(kv);
  e->pkey = kv ? kvmap_pkey(kv->hash) : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x11412
cmpq $0x0, -0x18(%rbp)
je 0x113ed
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x113ed
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rdx
callq *%rax
jmp 0x11410
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1140e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rsi
callq *%rax
jmp 0x11410
jmp 0x11412
movq -0x18(%rbp), %rdi
callq 0x18610
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
andq %rsi, %rdx
shlq $0x10, %rdx
andq $0xffff, %rcx           # imm = 0xFFFF
orq %rdx, %rcx
movq %rcx, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0x1145c
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10c00
movq %rax, -0x28(%rbp)
jmp 0x11464
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x11464
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
andq $0xffff, %rdx           # imm = 0xFFFF
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq %rdx, %rcx
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_destroy
void
cuckoo_destroy(struct cuckoo * const map)
{
  cuckoo_clean(map);
  for (u64 x = 0; x < 2; x++) {
    if (map->levels[x].table) {
      pages_unmap(map->levels[x].table, map->levels[x].alloc_size);
    }
  }
  free(map->bm);
  free(map);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11490
movq $0x0, -0x10(%rbp)
cmpq $0x2, -0x10(%rbp)
jae 0x1170c
movq -0x8(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x116fc
movq -0x8(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x8c10
jmp 0x116fe
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x116ad
movq -0x8(%rbp), %rax
movq 0x100d8(%rax), %rdi
callq 0x6060
movq -0x8(%rbp), %rdi
callq 0x6060
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_fprint
void
cuckoo_fprint(struct cuckoo * const map, FILE * const out)
{
  mutexlock_lock(&(map->expand_lock));
  for (u64 x = 0; x < 2; x++) {
    if (map->levels[x].table == NULL) continue;
    const u64 power = map->levels[x].power;
    const u64 nr_slots = KVMAP_SLOTS_OF(power);
    const u64 nr_entries = nr_slots * 8;
    fprintf(out, "CUCKOO POWER %"PRIu64" ENTRY %"PRIu64"\n", power, nr_entries);
  }
  mutexlock_unlock(&(map->expand_lock));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x10050, %rdi          # imm = 0x10050
callq 0x6f10
movq $0x0, -0x18(%rbp)
cmpq $0x2, -0x18(%rbp)
jae 0x117d7
movq -0x8(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x11779
jmp 0x117c9
movq -0x8(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0x9d9a(%rip), %rsi      # 0x1b55c
movb $0x0, %al
callq 0x62e0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x11758
movq -0x8(%rbp), %rdi
addq $0x10050, %rdi          # imm = 0x10050
callq 0x6fb0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_iter_create
struct cuckoo_iter *
cuckoo_iter_create(struct cuckoo * const map)
{
  struct cuckoo_iter * const iter = (typeof(iter))malloc(sizeof(*iter));
  if (iter == NULL) {
    return NULL;
  }
  mutexlock_lock(&(map->expand_lock));
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_lock(&(map->hlocks[i]));
  }
  iter->map = map;
  iter->level = map->levels[0].table ? &map->levels[0] : &map->levels[1];
  iter->j = 0;
  iter->k = 0;
  return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x20, %edi
callq 0x6380
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1181e
movq $0x0, -0x8(%rbp)
jmp 0x118cd
movq -0x10(%rbp), %rdi
addq $0x10050, %rdi          # imm = 0x10050
callq 0x6f10
movq $0x0, -0x20(%rbp)
cmpq $0x400, -0x20(%rbp)     # imm = 0x400
jae 0x11866
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
movq -0x20(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x11836
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10118(%rax)
je 0x1188f
movq -0x10(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
movq %rax, -0x28(%rbp)
jmp 0x118a1
movq -0x10(%rbp), %rax
addq $0x10118, %rax          # imm = 0x10118
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_iter_next
struct kv *
cuckoo_iter_next(struct cuckoo_iter * const iter, struct kv * const out)
{
  u64 j = iter->j;
  u64 k = iter->k;
  struct __cuckoo_level * const level= iter->level;

  const u64 nr = KVMAP_SLOTS_OF(level->power);
  if (j >= nr) return NULL;
  while ((j < nr) && (level->table[j].e[k].ptr == 0)) {
    k++;
    if (k == 8) {
      j++;
      k = 0;
    }
  }
  struct kv * ret = NULL;
  if (j < nr) {
    struct kv * kv = __u64_to_ptr(level->table[j].e[k].ptr);
    ret = kv_dup2(kv, out);
    k++;
    if (k == 8) {
      k = 0;
      j++;
    }
  }
  iter->j = j;
  iter->k = k;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x1193f
movq $0x0, -0x8(%rbp)
jmp 0x11a3d
jmp 0x11941
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x38(%rbp), %rcx
movb %al, -0x49(%rbp)
jae 0x11978
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x10, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x11981
jmp 0x119aa
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x8, -0x28(%rbp)
jne 0x119a8
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
jmp 0x11941
movq $0x0, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x11a1d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xdfb0
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x8, -0x28(%rbp)
jne 0x11a1b
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x11a1d
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)