LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_destroy
void
rgen_destroy(struct rgen * const gen)
{
  if (gen == NULL) return;
  if (gen->async_worker) {
    struct rgen_worker_info * const info = &(gen->wi);
    atomic_store(&(info->running), false);
    pthread_join(info->thread, NULL);
    rgen_clean_async_buffers(info);
  }
  if (gen->type == GEN_TRACE32) {
    fclose(gen->gen.trace32.fin);
  }
  free(gen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xc2b5
jmp 0xc31b
movq -0x8(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0xc2fb
movq -0x8(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movb $0x0, -0x11(%rbp)
movb -0x11(%rbp), %al
xchgb %al, 0xd8(%rcx)
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6570
movq -0x10(%rbp), %rdi
callq 0xc330
movq -0x8(%rbp), %rax
cmpl $0xc, 0x10(%rax)
jne 0xc312
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6140
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: rgen_clean_async_buffers
static inline void
rgen_clean_async_buffers(struct rgen_worker_info * const info)
{
  if (info->mem == NULL) return;
  pages_unmap(info->mem, info->alloc_size);
  info->mem = NULL;
  for (u64 j = 0; j < RGEN_ASYNC_BUFFER_NR; j++) {
    info->buffers_u64[j] = NULL;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0xc349
jmp 0xc397
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x8c10
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq $0x0, -0x10(%rbp)
cmpq $0x4, -0x10(%rbp)
jae 0xc397
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xc372
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_helper_message
void
rgen_helper_message(void)
{
  fprintf(stderr, "%s Usage: rgen <type> ...\n", __func__);
  fprintf(stderr, "%s example: rgen unizipf <min> <max> <ufactor>\n", __func__);
  fprintf(stderr, "%s example: rgen uniform <min> <max>\n", __func__);
  fprintf(stderr, "%s example: rgen zipfian <min> <max>\n", __func__);
  fprintf(stderr, "%s example: rgen counter <min> <max>\n", __func__);
  fprintf(stderr, "%s example: rgen reducer <min> <max>\n", __func__);
  fprintf(stderr, "%s example: rgen skipinc <min> <max> <inc>\n", __func__);
  fprintf(stderr, "%s example: rgen trace32 <filename>\n", __func__);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x15c4d(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xeefb(%rip), %rsi      # 0x1b2b0
leaq 0xef0f(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
movq 0x15c2e(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xef0b(%rip), %rsi      # 0x1b2df
leaq 0xeef0(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
movq 0x15c0f(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xef1c(%rip), %rsi      # 0x1b30f
leaq 0xeed1(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
movq 0x15bf0(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xef23(%rip), %rsi      # 0x1b335
leaq 0xeeb2(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
movq 0x15bd1(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xef2a(%rip), %rsi      # 0x1b35b
leaq 0xee93(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
movq 0x15bb2(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xef31(%rip), %rsi      # 0x1b381
leaq 0xee74(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
movq 0x15b93(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xef38(%rip), %rsi      # 0x1b3a7
leaq 0xee55(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
movq 0x15b74(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xef45(%rip), %rsi      # 0x1b3d3
leaq 0xee36(%rip), %rdx      # 0x1b2cb
movb $0x0, %al
callq 0x62e0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_dup
struct rgen *
rgen_dup(struct rgen * const gen0)
{
  if (gen0->async_worker) {
    return NULL;
  }
  struct rgen * const gen = (typeof(gen))malloc(sizeof(*gen));
  memcpy(gen, gen0, sizeof(*gen));
  struct rgen_worker_info * const info = &(gen->wi);
  memset(info, 0, sizeof(*info));
  if (gen->type == GEN_TRACE32) {
    FILE * const f2 = fdopen(dup(fileno(gen0->gen.trace32.fin)), "rb");
    posix_fadvise(fileno(f2), 0, 0, POSIX_FADV_SEQUENTIAL);
    gen->gen.trace32.fin = f2;
    gen->gen.trace32.idx = 0;
    gen->gen.trace32.max = 0;
  }
  return gen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0xcab3
movq $0x0, -0x8(%rbp)
jmp 0xcb69
movl $0x220, %edi            # imm = 0x220
callq 0x6380
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x220, %edx            # imm = 0x220
callq 0x6320
movq -0x18(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x130, %edx            # imm = 0x130
callq 0x6200
movq -0x18(%rbp), %rax
cmpl $0xc, 0x10(%rax)
jne 0xcb61
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6350
movl %eax, %edi
callq 0x61f0
movl %eax, %edi
leaq 0xe795(%rip), %rsi      # 0x1b2ad
callq 0x63d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x6350
movl %eax, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x2, %ecx
movq %rdx, %rsi
callq 0x6250
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%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: rgen_async_next_wait
static u64
rgen_async_next_wait(struct rgen * const gen)
{
  struct rgen_worker_info * const info = &(gen->wi);
  u64 i = info->i;
  if (i == 0) rgen_async_wait(gen);

  const u64 id0 = info->reader_id;
  const u64 r = gen->unit_u64 ? info->buffers_u64[id0][i] : info->buffers_u32[id0][i];
  i++;
  if (i >= info->buffer_nr) {
    atomic_store(&(info->avail[id0]), false);
    info->reader_id = (id0 + 1) % RGEN_ASYNC_BUFFER_NR;
    i = 0;
  }
  info->i = i;
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xcea9
movq -0x8(%rbp), %rdi
callq 0xc9b0
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x14(%rax)
je 0xcedc
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0xcef3
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jb 0xcf4a
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movb $0x0, -0x29(%rbp)
movb -0x29(%rbp), %al
xchgb %al, 0x70(%rcx,%rdx)
movq -0x20(%rbp), %rcx
addq $0x1, %rcx
andq $0x3, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x128(%rax)
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_async_next_nowait
static u64
rgen_async_next_nowait(struct rgen * const gen)
{
  struct rgen_worker_info * const info = &(gen->wi);
  u64 i = info->i;

  const u64 id0 = info->reader_id;
  const u64 r = gen->unit_u64 ? info->buffers_u64[id0][i] : info->buffers_u32[id0][i];
  i++;
  if (i >= info->buffer_nr) {
    info->reader_id = (id0 + 1) % RGEN_ASYNC_BUFFER_NR;
    i = 0;
  }
  info->i = i;
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x14(%rax)
je 0xcfc8
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
jmp 0xcfdf
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jb 0xd023
movq -0x20(%rbp), %rcx
addq $0x1, %rcx
andq $0x3, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x128(%rax)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_worker
static void *
rgen_worker(void * const ptr)
{
  struct rgen * const gen = (typeof(gen))ptr;
  struct rgen_worker_info * const info = &(gen->wi);
  const u64 cpu = info->cpu;
  srandom_u64((cpu + 3) * 97);
  const u64 nr = info->buffer_nr;
  while (true) {
    for (u64 i = 0; i < RGEN_ASYNC_BUFFER_NR; i++) {
      while (atomic_load(&(info->avail[i])) == true) {
        usleep(10);
        if (atomic_load(&(info->running)) == false) {
          return NULL;
        }
      }
      if (gen->unit_u64) {
        u64 * const buf64 = info->buffers_u64[i];
        for (u64 j = 0; j < nr; j++) {
          buf64[j] = info->real_next(gen);
        }
      } else {
        u32 * const buf32 = info->buffers_u32[i];
        for (u64 j = 0; j < nr; j++) {
          buf32[j] = (u32)(info->real_next(gen));
        }
      }
      atomic_thread_fence(memory_order_seq_cst);
      atomic_store(&(info->avail[i]), true);
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x3, %rax
imulq $0x61, %rax, %rdi
callq 0xb220
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x4, -0x30(%rbp)
jae 0xd1c3
jmp 0xd0a6
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movb 0x70(%rax,%rcx), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xd0f0
movl $0xa, %edi
callq 0x65d0
movq -0x18(%rbp), %rax
movb 0xd8(%rax), %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xd0ee
xorl %eax, %eax
addq $0x60, %rsp
popq %rbp
retq
jmp 0xd0a6
movq -0x10(%rbp), %rax
testb $0x1, 0x14(%rax)
je 0xd14c
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xd14a
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq %rax, %rdx
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xd112
jmp 0xd19c
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xd19a
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, %edx
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0xd164
jmp 0xd19c
mfence
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rdx
movb $0x1, -0x59(%rbp)
movb -0x59(%rbp), %al
xchgb %al, 0x70(%rcx,%rdx)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xd099
jmp 0xd091
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rcu_read_ref
void *
rcu_read_ref(struct rcu_node * const node)
{
  do {
    for (u64 i = 0; i < 2; i++) {
      u64 x = node->x[i];
      if (x & RCU_VALID_MASK) {
        const bool r = atomic_compare_exchange_strong(&(node->x[i]), &x, x + 1);
        if (r == true) {
          return (void *)(x >> RCU_VALUE_SHIFT);
        }
      }
    }
  } while (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x2, -0x18(%rbp)
jae 0xd2f5
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
andq $0x8000, %rax           # imm = 0x8000
cmpq $0x0, %rax
je 0xd2e2
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
incq %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rsi
lock
cmpxchgq %rsi, (%rcx,%rdx,8)
movq %rax, %rcx
sete %al
movb %al, -0x41(%rbp)
movq %rcx, -0x40(%rbp)
testb $0x1, %al
jne 0xd2b5
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xd2e0
movq -0x20(%rbp), %rax
shrq $0x10, %rax
movq %rax, -0x8(%rbp)
jmp 0xd303
jmp 0xd2e2
jmp 0xd2e4
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd250
jmp 0xd2f7
movb $0x1, %al
testb $0x1, %al
jne 0xd248
jmp 0xd303
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rcu_read_unref
void
rcu_read_unref(struct rcu_node * const node, void * ptr)
{
  for (u64 i = 0; i < 2; i++) {
    const u64 x = node->x[i];
    if ((x >> RCU_VALUE_SHIFT) == ((u64)ptr)) {
      bool r = false;
      do {
        u64 xx = node->x[i];
        debug_assert(xx & RCU_COUNT_MASK);
        r = atomic_compare_exchange_strong(&(node->x[i]), &xx, xx - 1);
      } while (r == false);
      return;
    }
  }
  debug_assert(false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x2, -0x18(%rbp)
jae 0xd3ee
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
shrq $0x10, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0xd3db
movb $0x0, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
shlq $0x31, %rax
testq %rax, %rax
setne %al
movzbl %al, %edi
callq 0x7640
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
decq %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rsi
lock
cmpxchgq %rsi, (%rcx,%rdx,8)
movq %rax, %rcx
sete %al
movb %al, -0x49(%rbp)
movq %rcx, -0x48(%rbp)
testb $0x1, %al
jne 0xd3bc
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xd35c
jmp 0xd3f5
jmp 0xd3dd
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd328
xorl %edi, %edi
callq 0x7640
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rcu_update
void
rcu_update(struct rcu_node * const node, void * ptr)
{
  for (u64 i = 0; i < 2; i++) {
    const u64 x = node->x[i];
    if ((x & RCU_VALID_MASK) == 0) {
      debug_assert((node->x[1-i] >> RCU_VALUE_SHIFT) != ((u64)ptr));
      const u64 xx = (((u64)ptr) << RCU_VALUE_SHIFT) | RCU_VALID_MASK;
      atomic_store(&(node->x[i]), xx);
      atomic_thread_fence(memory_order_seq_cst);
      __rcu_gc(&(node->x[1-i]));
      return;
    }
  }
  debug_assert(false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x2, -0x18(%rbp)
jae 0xd4c8
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
andq $0x8000, %rax           # imm = 0x8000
cmpq $0x0, %rax
jne 0xd4b5
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rdx
movl $0x1, %ecx
subq %rdx, %rcx
movq (%rax,%rcx,8), %rax
shrq $0x10, %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
setne %al
movzbl %al, %edi
callq 0x7640
movq -0x10(%rbp), %rax
shlq $0x10, %rax
orq $0x8000, %rax           # imm = 0x8000
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
xchgq %rax, (%rcx,%rdx,8)
mfence
movq -0x8(%rbp), %rdi
movl $0x1, %eax
subq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0xd4e0
jmp 0xd4cf
jmp 0xd4b7
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd418
xorl %edi, %edi
callq 0x7640
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: _rcu_gc
static void
__rcu_gc(au64 * const px)
{
  bool r = false;
  do {
    u64 x0 = *px;
    const u64 x1 = x0 & (~RCU_VALID_MASK);
    r = atomic_compare_exchange_strong(px, &x0, x1);
  } while (r == false);
  atomic_thread_fence(memory_order_seq_cst);
  while (atomic_load(px) & RCU_COUNT_MASK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $-0x8001, %rax          # imm = 0xFFFF7FFF
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x41(%rbp)
movq %rcx, -0x40(%rbp)
testb $0x1, %al
jne 0xd537
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xd4ec
mfence
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
andq $0x7fff, %rax           # imm = 0x7FFF
cmpq $0x0, %rax
je 0xd574
jmp 0xd557
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: _server_master
static void *
__server_master(void * const ptr)
{
  const u64 nr_cores = process_affinity_core_count();
  u64 * const cores = (typeof(cores))calloc(nr_cores, sizeof(cores[0]));
  const u64 nr_cores1 = process_affinity_core_list(nr_cores, cores);
  u64 next_core_id = 0;

  struct server * const server = (typeof(server))ptr;
  while (server->running) {
    const int cli = accept(server->fd, NULL, NULL);
    if (cli < 0) {
      if (errno == EINTR) continue;
      break;
    }
    pthread_t worker;
    struct server_wi * const wi = (typeof(wi))malloc(sizeof(*wi));
    wi->server = server;
    wi->s2.r = fdopen(dup(cli), "rb");
    wi->s2.w = fdopen(cli, "wb");
    wi->priv = server->priv;
    const int r = thread_create_at(cores[next_core_id], &worker, server->worker, wi);
    if (r != 0) {
      fclose(wi->s2.r);
      fclose(wi->s2.w);
      free(wi);
    } else {
      next_core_id = (next_core_id + 1) % nr_cores1;
    }
  }
  close(server->fd);
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
callq 0x8230
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x62b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8350
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0xd8e7
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x6480
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0xd81b
callq 0x6090
cmpl $0x4, (%rax)
jne 0xd816
jmp 0xd7d8
jmp 0xd8e7
movl $0x20, %edi
callq 0x6380
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movl -0x34(%rbp), %edi
callq 0x61f0
movl %eax, %edi
leaq 0xda68(%rip), %rsi      # 0x1b2ad
callq 0x63d0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x34(%rbp), %edi
leaq 0xdbe5(%rip), %rsi      # 0x1b444
callq 0x63d0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x50(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq 0x8aa0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0xd8ce
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x6140
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6140
movq -0x50(%rbp), %rdi
callq 0x6060
jmp 0xd8e2
movq -0x28(%rbp), %rax
addq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rdx, -0x28(%rbp)
jmp 0xd7d8
movq -0x30(%rbp), %rax
movl (%rax), %edi
callq 0x6210
xorl %eax, %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: server_destroy
void
server_destroy(struct server * const server)
{
  server->running = false;
  shutdown(server->fd, SHUT_RDWR);
  pthread_join(server->pt, NULL);
  free(server);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl (%rax), %edi
movl $0x2, %esi
callq 0x6160
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6570
movq -0x8(%rbp), %rdi
callq 0x6060
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: stream2_create
struct stream2 *
stream2_create(const char * const host, const int port)
{
  char portstr[6];
  snprintf(portstr, 6, "%d", port);
  struct addrinfo info0 = {.ai_family = AF_INET, .ai_socktype = SOCK_STREAM};
  struct addrinfo *info = NULL;
  if (getaddrinfo(host, portstr, &info0, &info) != 0) return NULL;

  for (struct addrinfo * p = info; p != NULL; p = p->ai_next) {
    const int fd = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
    if (fd < 0) continue;
    int one = 1;
    (void)setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
    if (connect(fd, p->ai_addr, p->ai_addrlen) != 0) {
      close(fd);
      continue;
    }
    freeaddrinfo(info);
    struct stream2 * const stream2 = (typeof(stream2))malloc(sizeof(*stream2));
    stream2->w = fdopen(dup(fd), "wb");
    stream2->r= fdopen(fd, "rb");
    return stream2;
  }
  if (info) freeaddrinfo(info);
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq -0x1a(%rbp), %rdi
movl -0x14(%rbp), %ecx
movl $0x6, %esi
leaq 0xd7f1(%rip), %rdx      # 0x1b216
movb $0x0, %al
callq 0x61e0
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x6200
movl $0x2, -0x4c(%rbp)
movl $0x1, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1a(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x6560
cmpl $0x0, %eax
je 0xda79
movq $0x0, -0x8(%rbp)
jmp 0xdb89
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xdb71
movq -0x60(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x60(%rbp), %rax
movl 0xc(%rax), %edx
callq 0x65f0
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jge 0xdab4
jmp 0xdb60
movl $0x1, -0x68(%rbp)
movl -0x64(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x68(%rbp), %rcx
movl $0x4, %r8d
callq 0x6100
movl -0x64(%rbp), %edi
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x70(%rbp), %rsi
callq 0x6510
cmpl $0x0, %eax
je 0xdb05
movl -0x64(%rbp), %edi
callq 0x6210
jmp 0xdb60
movq -0x58(%rbp), %rdi
callq 0x65e0
movl $0x10, %edi
callq 0x6380
movq %rax, -0x78(%rbp)
movl -0x64(%rbp), %edi
callq 0x61f0
movl %eax, %edi
leaq 0xd917(%rip), %rsi      # 0x1b444
callq 0x63d0
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, (%rax)
movl -0x64(%rbp), %edi
leaq 0xd767(%rip), %rsi      # 0x1b2ad
callq 0x63d0
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xdb89
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0xda81
cmpq $0x0, -0x58(%rbp)
je 0xdb81
movq -0x58(%rbp), %rdi
callq 0x65e0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kv_refill
inline void
kv_refill(struct kv * const kv, const void * const key, const u32 klen, const void * const value, const u32 vlen)
{
  if (kv) {
    kv->klen = klen;
    kv->vlen = vlen;
    memcpy(&(kv->kv[0]), key, klen);
    memcpy(&(kv->kv[klen]), value, vlen);
    kv_update_hash(kv);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xddc1
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x6320
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movl -0x14(%rbp), %eax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x6320
movq -0x8(%rbp), %rdi
callq 0xdd10
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kv_dup
inline struct kv *
kv_dup(const struct kv * const kv)
{
  if (kv == NULL) return NULL;

  const size_t sz = kv_size(kv);
  struct kv * const new = (typeof(new))malloc(sz);
  if (new) {
    memcpy(new, kv, sz);
  }
  return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xdeed
movq $0x0, -0x8(%rbp)
jmp 0xdf27
movq -0x10(%rbp), %rdi
callq 0xdbe0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6380
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xdf1f
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6320
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%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: kv_dup_key
inline struct kv *
kv_dup_key(const struct kv * const kv)
{
  if (kv == NULL) return NULL;

  const size_t sz = key_size(kv);
  struct kv * const new = (typeof(new))malloc(sz);
  if (new) {
    memcpy(new, kv, sz);
  }
  return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xdf5d
movq $0x0, -0x8(%rbp)
jmp 0xdf97
movq -0x10(%rbp), %rdi
callq 0xdc80
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6380
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xdf8f
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6320
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%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: kv_dup2
inline struct kv *
kv_dup2(const struct kv * const from, struct kv * const to)
{
  if (from == NULL) return NULL;

  const size_t sz = kv_size(from);
  if (to) {
    memcpy(to, from, sz);
    return to;
  } else {
    struct kv * const new = (typeof(new))malloc(sz);
    if (new) {
      memcpy(new, from, sz);
    }
    return new;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xdfd1
movq $0x0, -0x8(%rbp)
jmp 0xe02d
movq -0x10(%rbp), %rdi
callq 0xdbe0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe000
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6320
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe02d
movq -0x20(%rbp), %rdi
callq 0x6380
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xe025
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6320
movq -0x28(%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: kv_dup2_key
inline struct kv *
kv_dup2_key(const struct kv * const from, struct kv * const to)
{
  if (from == NULL) return NULL;

  const size_t sz = key_size(from);
  if (to) {
    memcpy(to, from, sz);
    return to;
  } else {
    struct kv * const new = (typeof(new))malloc(sz);
    if (new) {
      memcpy(new, from, sz);
    }
    return new;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xe061
movq $0x0, -0x8(%rbp)
jmp 0xe0bd
movq -0x10(%rbp), %rdi
callq 0xdc80
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe090
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6320
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe0bd
movq -0x20(%rbp), %rdi
callq 0x6380
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xe0b5
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6320
movq -0x28(%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: kv_keymatch
inline bool
kv_keymatch(const struct kv * const key1, const struct kv * const key2)
{
  if ((!key1) || (!key2) || (key1->hash != key2->hash) || (key1->klen != key2->klen)) {
    return false;
  }
  const int cmp = memcmp(key1->kv, key2->kv, (size_t)(key1->klen));
  return (cmp == 0) ? true : false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xe14e
cmpq $0x0, -0x18(%rbp)
je 0xe14e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xe14e
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0xe154
movb $0x0, -0x1(%rbp)
jmp 0xe190
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
callq 0x6280
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kv_fullmatch
inline bool
kv_fullmatch(const struct kv * const kv1, const struct kv * const kv2)
{
  if ((!kv1) || (!kv2) || (kv1->hash != kv2->hash) || (kv1->klen != kv2->klen) || (kv1->vlen != kv2->vlen)) {
    return false;
  }
  const int cmp = memcmp(kv1->kv, kv2->kv, (size_t)(kv1->klen + kv1->vlen));
  return (cmp == 0) ? true : false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xe1ee
cmpq $0x0, -0x18(%rbp)
je 0xe1ee
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xe1ee
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0xe1ee
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
je 0xe1f4
movb $0x0, -0x1(%rbp)
jmp 0xe239
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0xc(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x6280
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kv_keycompare
int
kv_keycompare(const struct kv * const kv1, const struct kv * const kv2)
{
  if (kv1 == NULL) {
    return (kv2 == NULL) ? 0 : -1;
  } else if (kv2 == NULL) {
    return 1;
  }
  const u32 len = kv1->klen < kv2->klen ? kv1->klen : kv2->klen;
  const int cmp = memcmp(kv1->kv, kv2->kv, (size_t)len);
  if (cmp == 0) {
    if (kv1->klen < kv2->klen) {
      return -1;
    } else if (kv1->klen > kv2->klen) {
      return 1;
    } else {
      return 0;
    }
  } else {
    return cmp;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xe281
movq -0x18(%rbp), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xe326
cmpq $0x0, -0x18(%rbp)
jne 0xe294
movl $0x1, -0x4(%rbp)
jmp 0xe326
jmp 0xe296
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xe2b2
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0xe2bc
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x6280
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0xe320
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xe2fe
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe326
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jbe 0xe317
movl $0x1, -0x4(%rbp)
jmp 0xe326
movl $0x0, -0x4(%rbp)
jmp 0xe326
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap_api_helper_message
void
kvmap_api_helper_message(void)
{
  fprintf(stderr, "%s Usage: api <cache-mb> <map-type> <param1> ...\n", __func__);
  fprintf(stderr, "%s example: api 0 kvmap2\n", __func__);
  fprintf(stderr, "%s example: api 0 cuckoo\n", __func__);
  fprintf(stderr, "%s example: api 0 skiplist\n", __func__);
  fprintf(stderr, "%s example: api 0 chainmap\n", __func__);
  fprintf(stderr, "%s example: api 0 bptree\n", __func__);
  fprintf(stderr, "%s example: api 0 tcpmap <host> <port>\n", __func__);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x13b8d(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcfd2(%rip), %rsi      # 0x1b447
leaq 0xcffd(%rip), %rdx      # 0x1b479
movb $0x0, %al
callq 0x62e0
movq 0x13b6e(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcffe(%rip), %rsi      # 0x1b492
leaq 0xcfde(%rip), %rdx      # 0x1b479
movb $0x0, %al
callq 0x62e0
movq 0x13b4f(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcff9(%rip), %rsi      # 0x1b4ac
leaq 0xcfbf(%rip), %rdx      # 0x1b479
movb $0x0, %al
callq 0x62e0
movq 0x13b30(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcff4(%rip), %rsi      # 0x1b4c6
leaq 0xcfa0(%rip), %rdx      # 0x1b479
movb $0x0, %al
callq 0x62e0
movq 0x13b11(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcff1(%rip), %rsi      # 0x1b4e2
leaq 0xcf81(%rip), %rdx      # 0x1b479
movb $0x0, %al
callq 0x62e0
movq 0x13af2(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcfee(%rip), %rsi      # 0x1b4fe
leaq 0xcf62(%rip), %rdx      # 0x1b479
movb $0x0, %al
callq 0x62e0
movq 0x13ad3(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcfe9(%rip), %rsi      # 0x1b518
leaq 0xcf43(%rip), %rdx      # 0x1b479
movb $0x0, %al
callq 0x62e0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap_api_helper
int
kvmap_api_helper(int argc, char ** const argv, struct kvmap_api ** const out, struct kvmap_mm * const mm, const bool use_ucache)
{
  if (argc < 3 || strcmp(argv[0], "api") != 0) {
    return -1;
  }
  const u64 mb = strtoull(argv[1], NULL, 10);
  if (mb == 0) {
    // no icache
    return 2 + kvmap_api_helper_map(argc - 2, argv + 2, out, mm);
  }

  // index + icache
  struct icache * const cache = icache_create(NULL, mb);
  if (cache == NULL) {
    fprintf(stderr, "icache_create() failed\n");
    return -1;
  }
  icache_wrap_mm(cache, mm);
  struct kvmap_api * map_api = NULL;
  const int n1 = kvmap_api_helper_map(argc - 2, argv + 2, &map_api, mm);
  if (n1 < 0) {
    icache_destroy(cache);
    return -1;
  }
  struct kvmap_api * const icache_api = use_ucache ? ucache_api_create(cache) : icache_api_create(cache);
  if (icache_api == NULL) {
    kvmap_api_destroy(map_api);
    icache_destroy(cache);
    return -1;
  }
  icache_wrap_kvmap(cache, map_api);
  *out = icache_api;
  return 2 + n1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r8b, %al
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
cmpl $0x3, -0x8(%rbp)
jl 0xe57d
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xcfcd(%rip), %rsi      # 0x1b540
callq 0x62d0
cmpl $0x0, %eax
je 0xe589
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe6c4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x62a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xe5d0
movl -0x8(%rbp), %edi
subl $0x2, %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xe6d0
addl $0x2, %eax
movl %eax, -0x4(%rbp)
jmp 0xe6c4
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0xe8c0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xe60c
movq 0x13a09(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0xcf4b(%rip), %rsi      # 0x1b544
movb $0x0, %al
callq 0x62e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe6c4
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xeaa0
movq $0x0, -0x40(%rbp)
movl -0x8(%rbp), %edi
subl $0x2, %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rdx
callq 0xe6d0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jge 0xe657
movq -0x38(%rbp), %rdi
callq 0xeb50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe6c4
testb $0x1, -0x21(%rbp)
je 0xe66c
movq -0x38(%rbp), %rdi
callq 0xebd0
movq %rax, -0x58(%rbp)
jmp 0xe679
movq -0x38(%rbp), %rdi
callq 0xeca0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0xe6a3
movq -0x40(%rbp), %rdi
callq 0xe420
movq -0x38(%rbp), %rdi
callq 0xeb50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe6c4
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xed70
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: icache_wrap_mm
inline void
icache_wrap_mm(struct icache * const cache, struct kvmap_mm * const mm)
{
  cache->map_mm = *mm;
  if (mm->rf) {
    mm->rf = __icache_kv_retire_cb;
    mm->rp = cache;
    mm->uf = __icache_kv_uncache_cb;
    mm->up = cache;
  }
  mm->hf = __icache_kv_hit_cb;
  mm->hp = cache;
  mm->xf = __icache_kv_refresh_cb;
  mm->xp = cache;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
movq -0x10(%rbp), %rsi
movl $0x50, %edx
callq 0x6320
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xeb07
movq -0x10(%rbp), %rax
leaq 0x6eb4(%rip), %rcx      # 0x15990
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x6ec9(%rip), %rcx      # 0x159c0
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
leaq 0x6ede(%rip), %rcx      # 0x159f0
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
leaq 0x6ef3(%rip), %rcx      # 0x15a20
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: icache_destroy
void
icache_destroy(struct icache * const cache)
{
  icache_clean(cache);
  pages_unmap(cache->table, cache->slots_alloc_size);
  pages_unmap(cache->hists, cache->hists_alloc_size);
  if (cache->map_api) {
    kvmap_api_destroy(cache->map_api);
  }
  free(cache);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x15170
movq -0x8(%rbp), %rax
movq 0x10130(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10128(%rax), %rsi
callq 0x8c10
movq -0x8(%rbp), %rax
movq 0x10148(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10140(%rax), %rsi
callq 0x8c10
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10150(%rax)
je 0xebb9
movq -0x8(%rbp), %rax
movq 0x10150(%rax), %rdi
callq 0xe420
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: ucache_api_create
struct kvmap_api *
ucache_api_create(struct icache * const cache)
{
  if (cache == NULL) return NULL;
  const struct kvmap_api api = {
    .map = cache,
    .get = (typeof(api.get))ucache_get,
    .probe = (typeof(api.probe))ucache_probe,
    .set = (typeof(api.set))ucache_set,
    .del = (typeof(api.del))ucache_del,
    .clean = (typeof(api.clean))icache_clean,
    .destroy = (typeof(api.destroy))icache_destroy,
    .fprint = (typeof(api.fprint))icache_fprint,
    .iter_create = (typeof(api.iter_create))icache_iter_create,
    .iter_next = (typeof(api.iter_next))icache_iter_next,
    .iter_destroy = (typeof(api.iter_destroy))icache_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 0xebf0
movq $0x0, -0x8(%rbp)
jmp 0xec8e
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x6e61(%rip), %rax      # 0x15a60
movq %rax, -0x60(%rbp)
leaq 0x6f96(%rip), %rax      # 0x15ba0
movq %rax, -0x58(%rbp)
leaq 0x70ab(%rip), %rax      # 0x15cc0
movq %rax, -0x50(%rbp)
leaq 0x70f0(%rip), %rax      # 0x15d10
movq %rax, -0x48(%rbp)
leaq 0x6545(%rip), %rax      # 0x15170
movq %rax, -0x40(%rbp)
leaq -0xe6(%rip), %rax       # 0xeb50
movq %rax, -0x38(%rbp)
leaq 0x663f(%rip), %rax      # 0x15280
movq %rax, -0x30(%rbp)
leaq 0x6744(%rip), %rax      # 0x15390
movq %rax, -0x28(%rbp)
leaq 0x67c9(%rip), %rax      # 0x15420
movq %rax, -0x20(%rbp)
leaq 0x681e(%rip), %rax      # 0x15480
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: icache_api_create
struct kvmap_api *
icache_api_create(struct icache * const cache)
{
  if (cache == NULL) return NULL;
  const struct kvmap_api api = {
    .map = cache,
    .get = (typeof(api.get))icache_get,
    .probe = (typeof(api.probe))icache_probe,
    .set = (typeof(api.set))icache_set,
    .del = (typeof(api.del))icache_del,
    .clean = (typeof(api.clean))icache_clean,
    .destroy = (typeof(api.destroy))icache_destroy,
    .fprint = (typeof(api.fprint))icache_fprint,
    .iter_create = (typeof(api.iter_create))icache_iter_create,
    .iter_next = (typeof(api.iter_next))icache_iter_next,
    .iter_destroy = (typeof(api.iter_destroy))icache_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 0xecc0
movq $0x0, -0x8(%rbp)
jmp 0xed5e
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x6011(%rip), %rax      # 0x14ce0
movq %rax, -0x60(%rbp)
leaq 0x6276(%rip), %rax      # 0x14f50
movq %rax, -0x58(%rbp)
leaq 0x63ab(%rip), %rax      # 0x15090
movq %rax, -0x50(%rbp)
leaq 0x6410(%rip), %rax      # 0x15100
movq %rax, -0x48(%rbp)
leaq 0x6475(%rip), %rax      # 0x15170
movq %rax, -0x40(%rbp)
leaq -0x1b6(%rip), %rax      # 0xeb50
movq %rax, -0x38(%rbp)
leaq 0x656f(%rip), %rax      # 0x15280
movq %rax, -0x30(%rbp)
leaq 0x6674(%rip), %rax      # 0x15390
movq %rax, -0x28(%rbp)
leaq 0x66f9(%rip), %rax      # 0x15420
movq %rax, -0x20(%rbp)
leaq 0x674e(%rip), %rax      # 0x15480
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: kvmap2_create
struct kvmap2 *
kvmap2_create(const struct kvmap_mm * const mm)
{
  struct kvmap2 * const map2 = calloc(1, sizeof(*map2));
  map2->mm = mm ? (*mm) : __kvmap_mm_default;
  map2->sz_shift = 5;
  map2->maps[0] = kvmap1_create(mm, 0);
  map2->maps[1] = kvmap1_create(mm, 19);
  return map2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x62b0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xedd2
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x50, %edx
callq 0x6320
jmp 0xede7
movq -0x18(%rbp), %rdi
leaq 0x12fab(%rip), %rsi     # 0x21d88
movl $0x50, %edx
callq 0x6320
movq -0x10(%rbp), %rax
movq $0x5, 0x50(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xee30
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rdi
movl $0x13, %esi
callq 0xee30
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: kvmap1_create
static struct kvmap1 *
kvmap1_create(const struct kvmap_mm * const mm, const u64 hash_rotate)
{
  struct kvmap1 * const map = xalloc(64, sizeof(*map));
  memset(map, 0, sizeof(*map));

  map->mm = mm ? (*mm) : __kvmap_mm_default;
  map->hash_rotate = hash_rotate;

  for (u64 j = 0; j < KVMAP_HLOCK_NR; j++) {
    spinlock_init(&(map->hlocks[j]));
  }
  spinlock_init(&(map->split_lock));

  kvmap1_init(map);
  return map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x40, %edi
movl $0x10928, %esi          # imm = 0x10928
callq 0x8bc0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10928, %edx          # imm = 0x10928
callq 0x6200
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xee86
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x50, %edx
callq 0x6320
jmp 0xee9b
movq -0x28(%rbp), %rdi
leaq 0x12ef7(%rip), %rsi     # 0x21d88
movl $0x50, %edx
callq 0x6320
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq $0x0, -0x20(%rbp)
cmpq $0x400, -0x20(%rbp)     # imm = 0x400
jae 0xeee2
movq -0x18(%rbp), %rdi
addq $0xe8, %rdi
movq -0x20(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e30
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xeeaf
movq -0x18(%rbp), %rdi
addq $0x100e8, %rdi          # imm = 0x100E8
callq 0x6e30
movq -0x18(%rbp), %rdi
callq 0x18440
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)