LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_iter_destroy
void
cuckoo_iter_destroy(struct cuckoo_iter * const iter)
{
  struct cuckoo * const map = iter->map;
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_unlock(&(map->hlocks[i]));
  }
  mutexlock_unlock(&(map->expand_lock));
  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 $0x0, -0x18(%rbp)
cmpq $0x400, -0x18(%rbp)     # imm = 0x400
jae 0x11a9f
movq -0x10(%rbp), %rdi
addq $0x50, %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 0x11a6f
movq -0x10(%rbp), %rdi
addq $0x10050, %rdi          # imm = 0x10050
callq 0x6fb0
movq -0x8(%rbp), %rdi
callq 0x6060
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cuckoo_api_create
struct kvmap_api *
cuckoo_api_create(struct cuckoo * const map)
{
  if (map == NULL) return NULL;
  const struct kvmap_api api = {
    .map = map,
    .get = (typeof(api.get))cuckoo_get,
    .probe = (typeof(api.probe))cuckoo_probe,
    .set = (typeof(api.set))cuckoo_set,
    .del = (typeof(api.del))cuckoo_del,
    .clean = (typeof(api.clean))cuckoo_clean,
    .destroy = (typeof(api.destroy))cuckoo_destroy,
    .fprint = (typeof(api.fprint))cuckoo_fprint,
    .iter_create = (typeof(api.iter_create))cuckoo_iter_create,
    .iter_next = (typeof(api.iter_next))cuckoo_iter_next,
    .iter_destroy = (typeof(api.iter_destroy))cuckoo_iter_destroy,
  };
  struct kvmap_api * const papi = (typeof(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 0x11ae0
movq $0x0, -0x8(%rbp)
jmp 0x11b7e
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x10af(%rip), %rax     # 0x10a40
movq %rax, -0x60(%rbp)
leaq -0xc8a(%rip), %rax      # 0x10e70
movq %rax, -0x58(%rbp)
leaq -0xb45(%rip), %rax      # 0x10fc0
movq %rax, -0x50(%rbp)
leaq -0x8d0(%rip), %rax      # 0x11240
movq %rax, -0x48(%rbp)
leaq -0x68b(%rip), %rax      # 0x11490
movq %rax, -0x40(%rbp)
leaq -0x496(%rip), %rax      # 0x11690
movq %rax, -0x38(%rbp)
leaq -0x401(%rip), %rax      # 0x11730
movq %rax, -0x30(%rbp)
leaq -0x34c(%rip), %rax      # 0x117f0
movq %rax, -0x28(%rbp)
leaq -0x267(%rip), %rax      # 0x118e0
movq %rax, -0x20(%rbp)
leaq -0x102(%rip), %rax      # 0x11a50
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: skiplist_create_f
struct skiplist *
skiplist_create_f(const struct kvmap_mm * const mm, kv_compare_func comp)
{
  struct skiplist * const head = (typeof(head))malloc(sizeof(*head));
  memset(head, 0, sizeof(*head));
  head->mm = mm ? (*mm) : __kvmap_mm_default;
  head->comp = comp;
  head->height = 1;
  head->factors[0] = 1.0;
  const double factor = 0.25;
  const double mul = fabs(factor) > 0.5 ? 0.5 : fabs(factor);
  for (u64 i = 1; i < 64; i++) {
    head->factors[i] = head->factors[i-1] * mul;
  }
  return head;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x468, %edi            # imm = 0x468
callq 0x6380
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x468, %edx            # imm = 0x468
callq 0x6200
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x11be1
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x50, %edx
callq 0x6320
jmp 0x11bf6
movq -0x38(%rbp), %rdi
leaq 0x1019c(%rip), %rsi     # 0x21d88
movl $0x50, %edx
callq 0x6320
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movq $0x1, 0x258(%rax)
movq -0x18(%rbp), %rax
vmovsd 0x94a3(%rip), %xmm0     # 0x1b0c0
vmovsd %xmm0, 0x58(%rax)
vmovsd 0x94d6(%rip), %xmm0     # 0x1b100
vmovsd %xmm0, -0x20(%rbp)
vmovsd 0x94c9(%rip), %xmm0     # 0x1b100
vmovsd 0x94b1(%rip), %xmm1     # 0x1b0f0
vucomisd %xmm1, %xmm0
jbe 0x11c54
vmovsd 0x94a3(%rip), %xmm0     # 0x1b0f0
vmovsd %xmm0, -0x40(%rbp)
jmp 0x11c61
vmovsd 0x94a4(%rip), %xmm0     # 0x1b100
vmovsd %xmm0, -0x40(%rbp)
vmovsd -0x40(%rbp), %xmm0
vmovsd %xmm0, -0x28(%rbp)
movq $0x1, -0x30(%rbp)
cmpq $0x40, -0x30(%rbp)
jae 0x11cad
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq $0x1, %rcx
vmovsd 0x58(%rax,%rcx,8), %xmm0
vmulsd -0x28(%rbp), %xmm0, %xmm0
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
vmovsd %xmm0, 0x58(%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x11c73
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: skiplist_clean
void
skiplist_clean(struct skiplist * const list)
{
  struct skipnode * iter = list->n0.next[0];
  while (iter) {
    struct skipnode * const next = iter->next[0];
    kvmap_put_entry(&(list->mm), &(iter->e), NULL);
    free(iter);
    iter = next;
  }
  for (u64 i = 0; i < 64; i++) {
    list->n0.next[i] = NULL;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x268(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x12642
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x11390
movq -0x10(%rbp), %rdi
callq 0x6060
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x1260b
movq $0x0, -0x20(%rbp)
cmpq $0x40, -0x20(%rbp)
jae 0x12673
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq $0x0, 0x268(%rax,%rcx,8)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1264a
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: skiplist_fprint
void
skiplist_fprint(struct skiplist * const list, FILE * const out)
{
  struct skipnode * iter = list->n0.next[0];
  u64 count = 0;
  while (iter) {
    count++;
    iter = iter->next[0];
  }
  fprintf(out, "%s count %"PRIu64" height %"PRIu64"\n", __func__, count, list->height);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x268(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x126f8
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x126d7
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x258(%rax), %r8
leaq 0x8e66(%rip), %rsi      # 0x1b578
leaq 0x8e78(%rip), %rdx      # 0x1b591
movb $0x0, %al
callq 0x62e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: skiplist_head
struct kv *
skiplist_head(struct skiplist * const list, struct kv * const out)
{
  if (list->n0.next[0] == NULL) return NULL;
  struct kv * const curr = __u64_to_ptr(list->n0.next[0]->e.ptr);
  struct kv * const ret = kv_dup2(curr, out);
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x268(%rax)
jne 0x12758
movq $0x0, -0x8(%rbp)
jmp 0x1278c
movq -0x10(%rbp), %rax
movq 0x268(%rax), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xdfb0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: skiplist_tail
struct kv *
skiplist_tail(struct skiplist * const list, struct kv * const out)
{
  if (list->n0.next[0] == NULL) return NULL;
  u64 i = list->height - 1;
  struct skipnode * iter = &(list->n0);
  while (i) {
    while (iter->next[i]) iter = iter->next[i];
    i--;
  }
  while (iter->next[0]) iter = iter->next[0];
  struct kv * const curr = __u64_to_ptr(iter->e.ptr);
  struct kv * const ret = kv_dup2(curr, out);
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x268(%rax)
jne 0x127cb
movq $0x0, -0x8(%rbp)
jmp 0x1286e
movq -0x10(%rbp), %rax
movq 0x258(%rax), %rax
subq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x260, %rax            # imm = 0x260
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x12826
jmp 0x127f5
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x12818
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0x127f5
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x127ec
jmp 0x12828
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x12841
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x12828
movq -0x28(%rbp), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xdfb0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: skiplist_iter_create
struct skiplist_iter *
skiplist_iter_create(struct skiplist * const list)
{
  struct skiplist_iter * const iter = malloc(sizeof(*iter));
  iter->iter = list->n0.next[0];
  iter->list = list;
  return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x10, %edi
callq 0x6380
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x268(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: skiplist_iter_next
struct kv *
skiplist_iter_next(struct skiplist_iter * const iter, struct kv * const out)
{
  if (iter->iter == NULL) return NULL;
  struct kv * const curr = __u64_to_ptr(iter->iter->e.ptr);
  struct kv * const ret = kv_dup2(curr, out);
  iter->iter = iter->iter->next[0];
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x128f4
movq $0x0, -0x8(%rbp)
jmp 0x12936
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xdfb0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: skiplist_api_create
struct kvmap_api *
skiplist_api_create(struct skiplist * const map)
{
  if (map == NULL) return NULL;
  const struct kvmap_api api = {
    .map = map,
    .get = (typeof(api.get))skiplist_get,
    .probe = (typeof(api.probe))skiplist_probe,
    .set = (typeof(api.set))skiplist_set,
    .del = (typeof(api.del))skiplist_del,
    .clean = (typeof(api.clean))skiplist_clean,
    .destroy = (typeof(api.destroy))skiplist_destroy,
    .fprint = (typeof(api.fprint))skiplist_fprint,
    .iter_create = (typeof(api.iter_create))skiplist_iter_create,
    .iter_next = (typeof(api.iter_next))skiplist_iter_next,
    .iter_destroy = (typeof(api.iter_destroy))skiplist_iter_destroy,
  };
  struct kvmap_api * const papi = (typeof(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 0x12980
movq $0x0, -0x8(%rbp)
jmp 0x12a1e
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0xc9f(%rip), %rax      # 0x11cf0
movq %rax, -0x60(%rbp)
leaq -0xaaa(%rip), %rax      # 0x11ef0
movq %rax, -0x58(%rbp)
leaq -0x8e5(%rip), %rax      # 0x120c0
movq %rax, -0x50(%rbp)
leaq -0x5d0(%rip), %rax      # 0x123e0
movq %rax, -0x48(%rbp)
leaq -0x3cb(%rip), %rax      # 0x125f0
movq %rax, -0x40(%rbp)
leaq -0x346(%rip), %rax      # 0x12680
movq %rax, -0x38(%rbp)
leaq -0x321(%rip), %rax      # 0x126b0
movq %rax, -0x30(%rbp)
leaq -0x15c(%rip), %rax      # 0x12880
movq %rax, -0x28(%rbp)
leaq -0x117(%rip), %rax      # 0x128d0
movq %rax, -0x20(%rbp)
leaq -0xb2(%rip), %rax       # 0x12940
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: chainmap_create
struct chainmap *
chainmap_create(const struct kvmap_mm * const mm)
{
  struct chainmap * const map = (typeof(map))malloc(sizeof(*map));
  debug_assert(map);
  memset(map, 0, sizeof(*map));
  map->mm = mm ? (*mm) : __kvmap_mm_default;
  atomic_store(&(map->nr_kv), 0);
  map->fixed_power = 0;
  //if (map->fixed_power && (map->fixed_power < KVMAP_MIN_LEVEL)) {
  //  map->fixed_power = KVMAP_MIN_LEVEL;
  //}
  map->power = map->fixed_power ? map->fixed_power : KVMAP_MIN_LEVEL;
  map->trigger = UINT64_C(2) << map->power;
  const u64 table_size = sizeof(map->table[0]) * (UINT64_C(1) << map->power);
  map->table = (typeof(map->table))pages_alloc_best(table_size, true, &(map->alloc_size));
  mutexlock_init(&(map->expand_lock));
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_init(&(map->hlocks[i]));
  }
  return map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x10138, %edi          # imm = 0x10138
callq 0x6380
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10138, %edx          # imm = 0x10138
callq 0x6200
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x12a90
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x50, %edx
callq 0x6320
jmp 0x12aa5
movq -0x30(%rbp), %rdi
leaq 0xf2ed(%rip), %rsi      # 0x21d88
movl $0x50, %edx
callq 0x6320
movq -0x10(%rbp), %rcx
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
xchgq %rax, 0x88(%rcx)
movq -0x10(%rbp), %rax
movq $0x0, 0xc8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
je 0x12aea
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x12af5
movl $0x10, %eax
movq %rax, -0x38(%rbp)
jmp 0x12af5
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rcx
movl $0x2, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
shlq $0x3, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0xf0, %rdx
movl $0x1, %esi
callq 0x8d40
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe8(%rax)
movq -0x10(%rbp), %rdi
addq $0xf8, %rdi
callq 0x6ef0
movq $0x0, -0x28(%rbp)
cmpq $0x400, -0x28(%rbp)     # imm = 0x400
jae 0x12bb2
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e30
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x12b7f
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: chainmap_get
struct kv *
chainmap_get(struct chainmap * const map, const struct kv * const key, struct kv * const out)
{
  const u64 hash = key->hash;
  const u64 lidx = kvmap_hlocks_index(hash);
  const u64 pkey = kvmap_pkey(hash);
  spinlock_lock(&(map->hlocks[lidx]));
  const u64 cid = (hash >> KVMAP_BASE_LEVEL) & ((UINT64_C(1) << map->power) - UINT64_C(1));
  struct chainnode * iter = map->table[cid];
  while (iter) {
    if (iter->e.pkey == pkey) {
      const struct kv * const curr = __u64_to_ptr(iter->e.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);
        spinlock_unlock(&(map->hlocks[lidx]));
        return ret;
      }
    }
    iter = iter->next;
  }
  spinlock_unlock(&(map->hlocks[lidx]));
  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), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x12d40
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10c00
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x30(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x28(%rbp), %rax
shrq $0x6, %rax
movq -0x10(%rbp), %rcx
movq 0xd0(%rcx), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
subq $0x1, %rcx
andq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x12d07
movq -0x48(%rbp), %rax
movq (%rax), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x38(%rbp), %rax
jne 0x12cf6
movq -0x48(%rbp), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xe110
testb $0x1, %al
jne 0x12c9d
jmp 0x12cf4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x12cbe
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), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x30(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x12d2a
jmp 0x12cf6
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x12c54
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x30(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
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: chainmap_probe
bool
chainmap_probe(struct chainmap * const map, const struct kv * const key)
{
  const u64 hash = key->hash;
  const u64 lidx = kvmap_hlocks_index(hash);
  const u64 pkey = kvmap_pkey(hash);
  spinlock_lock(&(map->hlocks[lidx]));
  const u64 cid = (hash >> KVMAP_BASE_LEVEL) & ((UINT64_C(1) << map->power) - UINT64_C(1));
  struct chainnode * iter = map->table[cid];
  while (iter) {
    if (iter->e.pkey == pkey) {
      const struct kv * const curr = __u64_to_ptr(iter->e.ptr);
      if (kv_keymatch(key, curr)) {
        if (map->mm.hf) map->mm.hf(curr, map->mm.hp);
        spinlock_unlock(&(map->hlocks[lidx]));
        return true;
      }
    }
    iter = iter->next;
  }
  spinlock_unlock(&(map->hlocks[lidx]));
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x12d40
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10c00
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x20(%rbp), %rax
shrq $0x6, %rax
movq -0x10(%rbp), %rcx
movq 0xd0(%rcx), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
subq $0x1, %rcx
andq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x12e8a
movq -0x40(%rbp), %rax
movq (%rax), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x30(%rbp), %rax
jne 0x12e79
movq -0x40(%rbp), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0xe110
testb $0x1, %al
jne 0x12e35
jmp 0x12e77
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x12e56
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), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movb $0x1, -0x1(%rbp)
jmp 0x12ea9
jmp 0x12e79
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x12df0
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
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: chainmap_del
bool
chainmap_del(struct chainmap * const map, const struct kv * const key)
{
  const u64 hash = key->hash;
  const u64 lidx = kvmap_hlocks_index(hash);
  const u64 pkey = kvmap_pkey(hash);
  spinlock_lock(&(map->hlocks[lidx]));
  const u64 cid = (hash >> KVMAP_BASE_LEVEL) & ((UINT64_C(1) << map->power) - UINT64_C(1));
  struct chainnode ** piter = &(map->table[cid]);
  while (*piter) {
    struct chainnode * const iter = *piter;
    if (iter->e.pkey == pkey) {
      const struct kv * const curr = __u64_to_ptr(iter->e.ptr);
      if (kv_keymatch(key, curr)) {
        kvmap_put_entry(&(map->mm), &(iter->e), NULL);
        *piter = iter->next;
        free(iter);
        atomic_fetch_sub(&(map->nr_kv), 1);
        spinlock_unlock(&(map->hlocks[lidx]));
        return true;
      }
    }
    piter = &(iter->next);
  }
  spinlock_unlock(&(map->hlocks[lidx]));
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x12d40
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10c00
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x20(%rbp), %rax
shrq $0x6, %rax
movq -0x10(%rbp), %rcx
movq 0xd0(%rcx), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
subq $0x1, %rcx
andq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, (%rax)
je 0x132e7
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x30(%rbp), %rax
jne 0x132d6
movq -0x48(%rbp), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xe110
testb $0x1, %al
jne 0x1326a
jmp 0x132d4
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x11390
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rdi
callq 0x6060
movq -0x10(%rbp), %rcx
movq $0x1, -0x58(%rbp)
movq -0x58(%rbp), %rax
negq %rax
lock
xaddq %rax, 0x88(%rcx)
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movb $0x1, -0x1(%rbp)
jmp 0x13306
jmp 0x132d6
movq -0x48(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
jmp 0x13213
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
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: chainmap_clean
inline void
chainmap_clean(struct chainmap * const map)
{
  mutexlock_lock(&(map->expand_lock));
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_lock(&(map->hlocks[i]));
  }
  const u64 nr = UINT64_C(1) << map->power;
  for (u64 i = 0; i < nr; i++) {
    struct chainnode * iter = map->table[i];
    while (iter) {
      kvmap_put_entry(&(map->mm), &(iter->e), NULL);
      atomic_fetch_sub(&(map->nr_kv), 1);
      struct chainnode * const next = iter->next;
      free(iter);
      iter = next;
    }
    map->table[i] = NULL;
  }
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_unlock(&(map->hlocks[i]));
  }
  mutexlock_unlock(&(map->expand_lock));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0xf8, %rdi
callq 0x6f10
movq $0x0, -0x10(%rbp)
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jae 0x13377
movq -0x8(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x10(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x13344
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1343a
movq -0x8(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x13412
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x11390
movq -0x8(%rbp), %rcx
movq $0x1, -0x30(%rbp)
movq -0x30(%rbp), %rax
negq %rax
lock
xaddq %rax, 0x88(%rcx)
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x6060
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x133bb
movq -0x8(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x20(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x13396
movq $0x0, -0x48(%rbp)
cmpq $0x400, -0x48(%rbp)     # imm = 0x400
jae 0x13475
movq -0x8(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x48(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x13442
movq -0x8(%rbp), %rdi
addq $0xf8, %rdi
callq 0x6fb0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: chainmap_iter_create
struct chainmap_iter *
chainmap_iter_create(struct chainmap * const map)
{
  mutexlock_lock(&(map->expand_lock));
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_lock(&(map->hlocks[i]));
  }
  struct chainmap_iter * const iter = (typeof(iter))malloc(sizeof(*iter));
  iter->map = map;
  u64 cid = 0;
  while (map->table[cid] == NULL) cid++;
  iter->curr = map->table[cid];
  iter->cid = cid;
  return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0xf8, %rdi
callq 0x6f10
movq $0x0, -0x10(%rbp)
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jae 0x13577
movq -0x8(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x10(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x13544
movl $0x18, %edi
callq 0x6380
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x135bc
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x13598
movq -0x8(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: chainmap_iter_next
struct kv *
chainmap_iter_next(struct chainmap_iter * const iter, struct kv * const out)
{
  struct chainnode * curr = iter->curr;
  if (iter->curr == NULL) return NULL;
  struct kv * const ret = kv_dup2(__u64_to_ptr(curr->e.ptr), out);
  curr = curr->next;
  if (curr == NULL) {
    const u64 dirsize = UINT64_C(1) << iter->map->power;
    for (u64 cid = iter->cid + 1; cid < dirsize; cid++) {
      if (iter->map->table[cid]) {
        curr = iter->map->table[cid];
        iter->cid = cid;
        break;
      }
    }
  }
  iter->curr = curr;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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
cmpq $0x0, 0x10(%rax)
jne 0x13624
movq $0x0, -0x8(%rbp)
jmp 0x136f6
movq -0x20(%rbp), %rax
movq (%rax), %rdi
shrq $0x10, %rdi
callq 0xf220
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xdfb0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x136e2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xd0(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x136e0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xe8(%rax), %rax
movq -0x38(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x136d0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xe8(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x136e0
jmp 0x136d2
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x13685
jmp 0x136e2
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: chainmap_iter_destroy
void
chainmap_iter_destroy(struct chainmap_iter * const iter)
{
  struct chainmap * const map = iter->map;
  for (u64 i = 0; i < KVMAP_HLOCK_NR; i++) {
    spinlock_unlock(&(map->hlocks[i]));
  }
  mutexlock_unlock(&(map->expand_lock));
  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 $0x0, -0x18(%rbp)
cmpq $0x400, -0x18(%rbp)     # imm = 0x400
jae 0x13752
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq -0x18(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1371f
movq -0x10(%rbp), %rdi
addq $0xf8, %rdi
callq 0x6fb0
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: chainmap_api_create
struct kvmap_api *
chainmap_api_create(struct chainmap * const map)
{
  if (map == NULL) return NULL;
  const struct kvmap_api api = {
    .map = map,
    .get = (typeof(api.get))chainmap_get,
    .probe = (typeof(api.probe))chainmap_probe,
    .set = (typeof(api.set))chainmap_set,
    .del = (typeof(api.del))chainmap_del,
    .clean = (typeof(api.clean))chainmap_clean,
    .destroy = (typeof(api.destroy))chainmap_destroy,
    .fprint = (typeof(api.fprint))chainmap_fprint,
    .iter_create = (typeof(api.iter_create))chainmap_iter_create,
    .iter_next = (typeof(api.iter_next))chainmap_iter_next,
    .iter_destroy = (typeof(api.iter_destroy))chainmap_iter_destroy,
  };
  struct kvmap_api * const papi = (typeof(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 0x137a0
movq $0x0, -0x8(%rbp)
jmp 0x1383e
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0xbef(%rip), %rax      # 0x12bc0
movq %rax, -0x60(%rbp)
leaq -0xa5a(%rip), %rax      # 0x12d60
movq %rax, -0x58(%rbp)
leaq -0x905(%rip), %rax      # 0x12ec0
movq %rax, -0x50(%rbp)
leaq -0x650(%rip), %rax      # 0x13180
movq %rax, -0x48(%rbp)
leaq -0x4bb(%rip), %rax      # 0x13320
movq %rax, -0x40(%rbp)
leaq -0x356(%rip), %rax      # 0x13490
movq %rax, -0x38(%rbp)
leaq -0x321(%rip), %rax      # 0x134d0
movq %rax, -0x30(%rbp)
leaq -0x2dc(%rip), %rax      # 0x13520
movq %rax, -0x28(%rbp)
leaq -0x217(%rip), %rax      # 0x135f0
movq %rax, -0x20(%rbp)
leaq -0x112(%rip), %rax      # 0x13700
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: bptree_create
struct bptree *
bptree_create(const struct kvmap_mm * const mm)
{
  debug_assert(sizeof(struct bpnode) < PGSZ);
  struct bptree * const tree = (typeof(tree))malloc(sizeof(*tree));
  if (tree == NULL) return NULL;
  tree->mm = mm ? (*mm) : __kvmap_mm_default;
  struct bpnode * const root = bptree_alloc_node(true);
  if (root == NULL) {
    free(tree);
    return NULL;
  }
  root->nr = 1;
  tree->root = root;
  return tree;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, %edi
callq 0x7640
movl $0x58, %edi
callq 0x6380
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x13888
movq $0x0, -0x8(%rbp)
jmp 0x13908
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x138ab
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x50, %edx
callq 0x6320
jmp 0x138c0
movq -0x28(%rbp), %rdi
leaq 0xe4d2(%rip), %rsi      # 0x21d88
movl $0x50, %edx
callq 0x6320
movl $0x1, %edi
callq 0x13920
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x138e8
movq -0x18(%rbp), %rdi
callq 0x6060
movq $0x0, -0x8(%rbp)
jmp 0x13908
movq -0x20(%rbp), %rax
movq $0x1, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_get_rec
static struct kv *
bptree_get_rec(struct bptree * const tree, struct bpnode * const node, const struct kv * const key, struct kv * const out)
{
  debug_assert(node);
  if (node->leaf) {
    return bptree_get_leaf(tree, node, key, out);
  } else {
    const u64 subidx = bptree_intm_locate(node, key);
    return bptree_get_rec(tree, node->iarray[subidx].sub, key, out);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x18(%rbp), %rax
testb $0x1, (%rax)
je 0x139ef
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x19890
movq %rax, -0x8(%rbp)
jmp 0x13a2c
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x140f0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x139a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_probe_rec
static bool
bptree_probe_rec(struct bptree * const tree, struct bpnode * const node, const struct kv * const key)
{
  debug_assert(node);
  if (node->leaf) {
    return bptree_probe_leaf(tree, node, key);
  } else {
    const u64 subidx = bptree_intm_locate(node, key);
    return bptree_probe_rec(tree, node->iarray[subidx].sub, key);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x18(%rbp), %rax
testb $0x1, (%rax)
je 0x13ab8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x19940
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x13af2
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x140f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x13a70
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_raw_balance_leaf
bool
bptree_raw_balance_leaf(struct bpnode * const left, struct bpnode * const right)
{
  const u64 nr_r = (left->nr + right->nr) >> 1;
  const u64 nr_l = (left->nr + right->nr) - nr_r;
  if (nr_l == left->nr) {
    return false;
  } else if (nr_l < left->nr) { // shift right
    const u64 rmore = nr_r - right->nr;
    memmove(&(right->karray[rmore]), &(right->karray[0]), sizeof(right->karray[0]) * right->nr);
    memmove(&(right->karray[0]), &(left->karray[nr_l]), sizeof(right->karray[0]) * rmore);
  } else { // shift left
    const u64 rless = nr_l - left->nr;
    memmove(&(left->karray[left->nr]), &(right->karray[0]), sizeof(right->karray[0]) * rless);
    memmove(&(right->karray[0]), &(right->karray[rless]), sizeof(right->karray[0]) * nr_r);
  }
  left->nr = nr_l;
  right->nr = nr_r;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
shrq %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x13b56
movb $0x0, -0x1(%rbp)
jmp 0x13c4c
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x13bca
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x30(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x3, %rdx
callq 0x6420
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movq -0x28(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x30(%rbp), %rdx
shlq $0x3, %rdx
callq 0x6420
jmp 0x13c2e
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
movq -0x38(%rbp), %rdx
shlq $0x3, %rdx
callq 0x6420
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
shlq $0x3, %rdx
callq 0x6420
jmp 0x13c30
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_raw_balance_intm
bool
bptree_raw_balance_intm(struct bpnode * const left, struct bpnode * const right)
{
  const u64 nr_r = (left->nr + right->nr) >> 1;
  const u64 nr_l = (left->nr + right->nr) - nr_r;
  if (nr_l == left->nr) {
    return false;
  } else if (nr_l < left->nr) { // shift right
    const u64 rmore = nr_r - right->nr;
    memmove(&(right->iarray[rmore]), &(right->iarray[0]), sizeof(right->iarray[0]) * right->nr);
    memmove(&(right->iarray[0]), &(left->iarray[nr_l]), sizeof(right->iarray[0]) * rmore);
  } else { // shift left
    const u64 rless = nr_l - left->nr;
    memmove(&(left->iarray[left->nr]), &(right->iarray[0]), sizeof(right->iarray[0]) * rless);
    memmove(&(right->iarray[0]), &(right->iarray[rless]), sizeof(right->iarray[0]) * nr_r);
  }
  left->nr = nr_l;
  right->nr = nr_r;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
shrq %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x13cb6
movb $0x0, -0x1(%rbp)
jmp 0x13dac
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x13d2a
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x6420
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movq -0x28(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x30(%rbp), %rdx
shlq $0x4, %rdx
callq 0x6420
jmp 0x13d8e
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
movq -0x38(%rbp), %rdx
shlq $0x4, %rdx
callq 0x6420
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
movq -0x38(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
shlq $0x4, %rdx
callq 0x6420
jmp 0x13d90
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_set
bool
bptree_set(struct bptree * const tree, const struct kv * const kv0)
{
  const struct kv * const kv = kv_alloc_dup(kv0, &(tree->mm));
  if (kv == NULL) return false;

  if ((tree->root->leaf) && (tree->root->nr == BPTREE_LEAF_FO)) {
    bptree_split_root_leaf(tree);
  }
  if (tree->root->leaf) {
    return bptree_set_leaf(tree, tree->root, kv);
  }
  // intm
  if (tree->root->nr == BPTREE_INTM_FO) {
    bptree_split_root_intm(tree);
  }
  const u64 subidx = bptree_intm_locate(tree->root, kv);
  return bptree_set_rec(tree, tree->root, subidx, kv);
}

// 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 0x13df1
movb $0x0, -0x1(%rbp)
jmp 0x13e90
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
testb $0x1, (%rax)
je 0x13e19
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
cmpq $0x1f4, 0x8(%rax)       # imm = 0x1F4
jne 0x13e19
movq -0x10(%rbp), %rdi
callq 0x13ea0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
testb $0x1, (%rax)
je 0x13e42
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x13f50
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x13e90
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
cmpq $0xfa, 0x8(%rax)
jne 0x13e5d
movq -0x10(%rbp), %rdi
callq 0x14050
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x140f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x141c0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_split_root_leaf
static void
bptree_split_root_leaf(struct bptree * const tree)
{
  struct bpnode * const left = tree->root;
  struct bpnode * const right = bptree_alloc_node(true);
  (void)bptree_raw_balance_leaf(left, right);

  struct bpnode * const newroot = bptree_alloc_node(false);
  bptree_raw_insert_intm(newroot, 0, kv_dup_key(left->karray[0]), left);
  bptree_raw_insert_intm(newroot, 1, kv_dup_key(right->karray[0]), right);
  tree->root = newroot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x1, %edi
callq 0x13920
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x13b00
xorl %edi, %edi
callq 0x13920
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xdf40
movq -0x30(%rbp), %rdi
movq %rax, %rdx
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x199d0
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xdf40
movq -0x28(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x199d0
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_set_leaf
static bool
bptree_set_leaf(struct bptree * const tree, struct bpnode * const leaf, const struct kv * const kv)
{
  debug_assert(leaf->nr < BPTREE_LEAF_FO);

  const u64 idx = bptree_leaf_locate(leaf, kv);
  if (kv_keymatch(kv, leaf->karray[idx])) {
    struct kv * const victim = (typeof(victim))(leaf->karray[idx]);
    if (victim && tree->mm.xf) tree->mm.xf(victim, kv, tree->mm.xp);
    else if (victim && tree->mm.rf) tree->mm.rf(victim, tree->mm.rp);
    leaf->karray[idx] = kv;
  } else {
    const u64 insert = idx + 1;
    bptree_raw_insert_leaf(leaf, insert, kv);
  }
  return true;
}

// 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
cmpq $0x1f4, 0x8(%rax)       # imm = 0x1F4
setb %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x19b70
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x20(%rax,%rcx,8), %rsi
callq 0xe110
testb $0x1, %al
jne 0x13fab
jmp 0x14027
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x20(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x13fea
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x13fea
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rdx
callq *%rax
jmp 0x14014
cmpq $0x0, -0x28(%rbp)
je 0x14012
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x14012
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rsi
callq *%rax
jmp 0x14014
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, 0x20(%rax,%rcx,8)
jmp 0x14044
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x19c30
movb $0x1, %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bptree_split_root_intm
static void
bptree_split_root_intm(struct bptree * const tree)
{
  struct bpnode * const left = tree->root;
  struct bpnode * const right = bptree_alloc_node(false);
  (void)bptree_raw_balance_intm(left, right);

  struct bpnode * const newroot = bptree_alloc_node(false);
  bptree_raw_insert_intm(newroot, 0, kv_dup_key(left->iarray[0].key), left);
  bptree_raw_insert_intm(newroot, 1, kv_dup_key(right->iarray[0].key), right);
  tree->root = newroot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x10(%rbp)
xorl %edi, %edi
callq 0x13920
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x13c60
xorl %edi, %edi
callq 0x13920
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xdf40
movq -0x30(%rbp), %rdi
movq %rax, %rdx
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x199d0
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xdf40
movq -0x28(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x199d0
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
addq $0x30, %rsp
popq %rbp
retq