LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/kvserver.c
// Function: _read_kv
static struct kv *
__read_kv(struct stream2 * const s2, const bool read_kv)
{
  struct kv head;
  if (fread(&head, sizeof(head), 1, s2->r) != 1) {
    return NULL;
  }

  const size_t size = read_kv ? kv_size(&head) : key_size(&head);
  struct kv * const ret = (typeof(ret))malloc(size);
  memcpy(ret, &head, sizeof(head));
  if (fread(ret->kv, size - sizeof(head), 1, s2->r) != 1) {
    free(ret);
    return NULL;
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq -0x28(%rbp), %rdi
movl $0x10, %esi
movl $0x1, %edx
callq 0x60f0
cmpq $0x1, %rax
je 0x6d42
movq $0x0, -0x8(%rbp)
jmp 0x6dcf
testb $0x1, -0x11(%rbp)
je 0x6d57
leaq -0x28(%rbp), %rdi
callq 0xdbe0
movq %rax, -0x40(%rbp)
jmp 0x6d64
leaq -0x28(%rbp), %rdi
callq 0xdc80
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x6380
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
movq -0x30(%rbp), %rsi
subq $0x10, %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x1, %edx
callq 0x60f0
cmpq $0x1, %rax
je 0x6dc7
movq -0x38(%rbp), %rdi
callq 0x6060
movq $0x0, -0x8(%rbp)
jmp 0x6dcf
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: spinlock_trylock
inline bool
spinlock_trylock(spinlock * const lock)
{
  //lock->padding[7]++;
  const int r = pthread_spin_trylock(&(lock->lock));
  if (r == 0) return true;
  else if (r == EBUSY) return false;
  else exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x64e0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x6ea4
movb $0x1, -0x1(%rbp)
jmp 0x6eb7
cmpl $0x10, -0x14(%rbp)
jne 0x6eb0
movb $0x0, -0x1(%rbp)
jmp 0x6eb7
xorl %edi, %edi
callq 0x6500
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: mutexlock_lock
inline void
mutexlock_lock(mutexlock * const lock)
{
  do {
    const int r = pthread_mutex_lock(&(lock->lock));
    if (r == 0) return;
    else if (r != EAGAIN) exit(0);
  } while (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x65c0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x6f30
jmp 0x6f49
cmpl $0xb, -0xc(%rbp)
je 0x6f3d
xorl %edi, %edi
callq 0x6500
jmp 0x6f3f
jmp 0x6f41
movb $0x1, %al
testb $0x1, %al
jne 0x6f1c
jmp 0x6f49
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: mutexlock_trylock
inline bool
mutexlock_trylock(mutexlock * const lock)
{
  do {
    const int r = pthread_mutex_trylock(&(lock->lock));
    if (r == 0) return true;
    else if (r == EBUSY) return false;
    else if (r != EAGAIN) exit(0);
  } while (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6260
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x6f74
movb $0x1, -0x1(%rbp)
jmp 0x6f9b
cmpl $0x10, -0x14(%rbp)
jne 0x6f80
movb $0x0, -0x1(%rbp)
jmp 0x6f9b
cmpl $0xb, -0x14(%rbp)
je 0x6f8d
xorl %edi, %edi
callq 0x6500
jmp 0x6f8f
jmp 0x6f91
jmp 0x6f93
movb $0x1, %al
testb $0x1, %al
jne 0x6f5c
jmp 0x6f9b
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: mutexlock_unlock
inline void
mutexlock_unlock(mutexlock * const lock)
{
  do {
    const int r = pthread_mutex_unlock(&(lock->lock));
    if (r == 0) return;
    else if ((r != EAGAIN)) exit(0);
  } while (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6370
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x6fd0
jmp 0x6fe9
cmpl $0xb, -0xc(%rbp)
je 0x6fdd
xorl %edi, %edi
callq 0x6500
jmp 0x6fdf
jmp 0x6fe1
movb $0x1, %al
testb $0x1, %al
jne 0x6fbc
jmp 0x6fe9
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rwlock_trylock_read
inline bool
rwlock_trylock_read(rwlock * const lock)
{
  au64 * const pvar = (typeof(pvar))(&(lock->var));
  u64 v0 = *pvar;
  if ((v0 & RWLOCK_WBIT) == UINT64_C(0)) {
    const u64 v1 = v0 + 1;
    const bool r = atomic_compare_exchange_strong(pvar, &v0, v1);
    return r;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq -0x20(%rbp), %rax
cmpq $0x0, %rax
jne 0x70a6
movq -0x20(%rbp), %rax
incq %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x49(%rbp)
movq %rcx, -0x48(%rbp)
testb $0x1, %al
jne 0x708c
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x70aa
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rwlock_unlock_read
inline void
rwlock_unlock_read(rwlock * const lock)
{
  au64 * const pvar = (typeof(pvar))(&(lock->var));
  bool r = false;
  do {
    u64 v0 = *pvar;
    const u64 v1 = v0 - 1;
    r = atomic_compare_exchange_strong(pvar, &v0, v1);
  } while (r == false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
decq %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x41(%rbp)
movq %rcx, -0x40(%rbp)
testb $0x1, %al
jne 0x714c
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, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x7104
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rwlock_trylock_write
inline bool
rwlock_trylock_write(rwlock * const lock)
{
  au64 * const pvar = (typeof(pvar))(&(lock->var));
  u64 v0 = *pvar;
  if ((v0 & RWLOCK_WBIT) == UINT64_C(0)) {
    const u64 v1 = v0 | RWLOCK_WBIT;
    const bool r = atomic_compare_exchange_strong(pvar, &v0, v1);
    if (r) {
      while (atomic_load(pvar) != RWLOCK_WBIT);
    }
    return r;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq -0x20(%rbp), %rax
cmpq $0x0, %rax
jne 0x722b
movq -0x20(%rbp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x51(%rbp)
movq %rcx, -0x50(%rbp)
testb $0x1, %al
jne 0x71ea
movq -0x50(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x51(%rbp), %al
andb $0x1, %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
je 0x7221
jmp 0x7202
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x48(%rbp)
je 0x721f
jmp 0x7202
jmp 0x7221
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x722f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: watch_u64_usr1
void
watch_u64_usr1(u64 * const ptr)
{
  __ptr_watch_u64 = ptr;
  struct sigaction sa = {};
  sa.sa_handler = __signal_handler_watch_u64;
  sigemptyset(&(sa.sa_mask));
  sa.sa_flags = SA_RESTART;
  if (sigaction(SIGUSR1, &sa, NULL) == -1) {
    fprintf(stderr, "Failed to set signal handler for SIGUSR1\n");
  } else {
    fprintf(stderr, "to watch> kill -s SIGUSR1 %d\n", getpid());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, 0x1af46(%rip)     # 0x22330
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x6200
leaq 0x8c(%rip), %rax        # 0x7490
movq %rax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
addq $0x8, %rdi
callq 0x62f0
movl $0x10000000, -0x18(%rbp) # imm = 0x10000000
movl $0xa, %edi
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x60e0
cmpl $-0x1, %eax
jne 0x7456
movq 0x1abb5(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0x13cdc(%rip), %rsi     # 0x1b129
movb $0x0, %al
callq 0x62e0
jmp 0x7483
movq 0x1ab9b(%rip), %rax     # 0x21ff8
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
callq 0x6120
movq -0xa8(%rbp), %rdi
movl %eax, %edx
leaq 0x13cd7(%rip), %rsi     # 0x1b153
movb $0x0, %al
callq 0x62e0
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: debug_wait_gdb
void
debug_wait_gdb(void)
{
  debug_backtrace();
  bool wait = true;
  volatile bool * const v = &wait;
  *v = true;

  time_t now;
  time(&now);
  struct tm nowtm;
  localtime_r(&now, &nowtm);
  char timestamp[64] = {};
  strftime(timestamp, 64, "%F %T %Z (%z)", &nowtm);

  char hostname[256] = {};
  gethostname(hostname, 256);
  char threadname[256];
  pthread_getname_np(pthread_self(), threadname, 256);

  const char * const pattern = "[Waiting GDB] %s %s @ %s\n    Attach me:   sudo -Hi gdb -p %d\n";
  fprintf(stderr, pattern, timestamp, threadname, hostname, getpid());
  fflush(stderr);
  // to continue: gdb> set var *v = 0
  while (*v) {
    sleep(1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
callq 0x7370
movb $0x1, -0x1(%rbp)
leaq -0x1(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x6340
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x60a0
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x6200
leaq -0x90(%rbp), %rdi
movl $0x40, %esi
leaq 0x13c22(%rip), %rdx     # 0x1b171
leaq -0x50(%rbp), %rcx
callq 0x6410
leaq -0x190(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x6200
leaq -0x190(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x64d0
callq 0x6430
movq %rax, %rdi
leaq -0x290(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x6040
leaq 0x13be3(%rip), %rax     # 0x1b17f
movq %rax, -0x298(%rbp)
movq 0x1aa4e(%rip), %rax     # 0x21ff8
movq (%rax), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x2b0(%rbp)
leaq -0x290(%rbp), %rax
movq %rax, -0x2a8(%rbp)
leaq -0x190(%rbp), %rax
movq %rax, -0x2a0(%rbp)
callq 0x6120
movq -0x2b8(%rbp), %rdi
movq -0x2b0(%rbp), %rdx
movq -0x2a8(%rbp), %rcx
movq -0x2a0(%rbp), %r8
movl %eax, %r9d
leaq 0x13b76(%rip), %rsi     # 0x1b17f
movb $0x0, %al
callq 0x62e0
movq 0x1a9e1(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
callq 0x6390
movq -0x10(%rbp), %rax
movb (%rax), %al
testb $0x1, %al
je 0x7635
movl $0x1, %edi
callq 0x6590
jmp 0x761f
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: debug_catch_fatals
__attribute__((constructor))
  static void
debug_catch_fatals(void)
{
  struct sigaction sa = {};
  sa.sa_sigaction = __signal_handler_wait_gdb;
  sigemptyset(&(sa.sa_mask));
  sa.sa_flags = SA_SIGINFO;
  const int fatals[] = {SIGSEGV, SIGFPE, SIGILL, SIGBUS, 0};
  for (int i = 0; fatals[i]; i++) {
    if (sigaction(fatals[i], &sa, NULL) == -1) {
      fprintf(stderr, "Failed to set signal handler for %s\n", strsignal(fatals[i]));
      fflush(stderr);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x6200
leaq 0xfb(%rip), %rax        # 0x7790
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
callq 0x62f0
movl $0x4, -0x10(%rbp)
movq 0x14196(%rip), %rax     # 0x1b850
movq %rax, -0xb0(%rbp)
movq 0x14190(%rip), %rax     # 0x1b858
movq %rax, -0xa8(%rbp)
movl 0x1418b(%rip), %eax     # 0x1b860
movl %eax, -0xa0(%rbp)
movl $0x0, -0xb4(%rbp)
movslq -0xb4(%rbp), %rax
cmpl $0x0, -0xb0(%rbp,%rax,4)
je 0x777e
movslq -0xb4(%rbp), %rax
movl -0xb0(%rbp,%rax,4), %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x60e0
cmpl $-0x1, %eax
jne 0x7768
movq 0x1a8d4(%rip), %rax     # 0x21ff8
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movslq -0xb4(%rbp), %rax
movl -0xb0(%rbp,%rax,4), %edi
callq 0x63b0
movq -0xc0(%rbp), %rdi
movq %rax, %rdx
leaq 0x13a6b(%rip), %rsi     # 0x1b1bd
movb $0x0, %al
callq 0x62e0
movq 0x1a898(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
callq 0x6390
jmp 0x776a
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x76e5
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: debug_dump_maps
void
debug_dump_maps(FILE * const out)
{
  FILE * const in = fopen("/proc/self/smaps", "r");
  char * line0 = malloc(1024);
  size_t size0 = 1024;
  while (!feof(in)) {
    const ssize_t r1 = getline(&line0, &size0, in);
    if (r1 < 0) break;
    fprintf(out, "%s", line0);
  }
  fflush(out);
  fclose(in);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x139ff(%rip), %rdi     # 0x1b1e2
leaq 0x13a4a(%rip), %rsi     # 0x1b234
callq 0x6450
movq %rax, -0x10(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0x6380
movq %rax, -0x18(%rbp)
movq $0x400, -0x20(%rbp)     # imm = 0x400
movq -0x10(%rbp), %rdi
callq 0x6310
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x7820
jmp 0x7856
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x64c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jge 0x783e
jmp 0x7856
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x13ebf(%rip), %rsi     # 0x1b70c
movb $0x0, %al
callq 0x62e0
jmp 0x7809
movq -0x8(%rbp), %rdi
callq 0x6390
movq -0x10(%rbp), %rdi
callq 0x6140
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: debug_perf_start
void
debug_perf_start(void)
{
  const pid_t self = getpid();
  const pid_t perfpid = fork();
  if (perfpid < 0) {
    fprintf(stderr, "%s fork() failed\n", __func__);
  } else if (perfpid == 0) {
    // call perf
    char buf[10];
    sprintf(buf, "%d", self);
    char * args[10] = {};
    args[0] = "perf";
    args[1] = "record";
    args[2] = "--call-graph";
    args[3] = "lbr";
    args[4] = "--switch-output";
    args[5] = "-s";
    args[6] = "-p";
    args[7] = buf;
    args[8] = NULL;
    execvp(args[0], args);
    fprintf(stderr, "%s execvp() failed\n", __func__);
    fflush(stderr);
    exit(0);
  } else {
    __perf_pid = perfpid;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
callq 0x6120
movl %eax, -0x4(%rbp)
callq 0x65b0
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x78b2
movq 0x1a763(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0x13954(%rip), %rsi     # 0x1b1f3
leaq 0x1395f(%rip), %rdx     # 0x1b205
movb $0x0, %al
callq 0x62e0
jmp 0x798b
cmpl $0x0, -0x8(%rbp)
jne 0x7980
leaq -0x12(%rbp), %rdi
movl -0x4(%rbp), %edx
leaq 0x1394c(%rip), %rsi     # 0x1b216
movb $0x0, %al
callq 0x64f0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x6200
leaq 0x13931(%rip), %rax     # 0x1b219
movq %rax, -0x70(%rbp)
leaq 0x1392b(%rip), %rax     # 0x1b21e
movq %rax, -0x68(%rbp)
leaq 0x13927(%rip), %rax     # 0x1b225
movq %rax, -0x60(%rbp)
leaq 0x13929(%rip), %rax     # 0x1b232
movq %rax, -0x58(%rbp)
leaq 0x13922(%rip), %rax     # 0x1b236
movq %rax, -0x50(%rbp)
leaq 0x13927(%rip), %rax     # 0x1b246
movq %rax, -0x48(%rbp)
leaq 0x1391f(%rip), %rax     # 0x1b249
movq %rax, -0x40(%rbp)
leaq -0x12(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x64a0
movq 0x1a6a6(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0x138f0(%rip), %rsi     # 0x1b24c
leaq 0x138a2(%rip), %rdx     # 0x1b205
movb $0x0, %al
callq 0x62e0
movq 0x1a687(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
callq 0x6390
xorl %edi, %edi
callq 0x6500
movl -0x8(%rbp), %eax
movl %eax, 0x1a9af(%rip)     # 0x22338
jmp 0x798b
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bits_reverse_u32
inline u32
bits_reverse_u32(const u32 v)
{
  const u32 v1 = (v >> 16) | (v << 16);
  const u32 v2 = ((v1 & UINT32_C(0xff00ff00)) >> 8) | ((v1 & UINT32_C(0x00ff00ff)) << 8);
  const u32 v3 = ((v2 & UINT32_C(0xf0f0f0f0)) >> 4) | ((v2 & UINT32_C(0x0f0f0f0f)) << 4);
  const u32 v4 = ((v3 & UINT32_C(0xcccccccc)) >> 2) | ((v3 & UINT32_C(0x33333333)) << 2);
  const u32 v5 = ((v4 & UINT32_C(0xaaaaaaaa)) >> 1) | ((v4 & UINT32_C(0x55555555)) << 1);
  return v5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
movl -0x4(%rbp), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xff00ff00, %eax       # imm = 0xFF00FF00
shrl $0x8, %eax
movl -0x8(%rbp), %ecx
andl $0xff00ff, %ecx         # imm = 0xFF00FF
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0xf0f0f0f0, %eax       # imm = 0xF0F0F0F0
shrl $0x4, %eax
movl -0xc(%rbp), %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
shll $0x4, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
andl $0xcccccccc, %eax       # imm = 0xCCCCCCCC
shrl $0x2, %eax
movl -0x10(%rbp), %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
shll $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0xaaaaaaaa, %eax       # imm = 0xAAAAAAAA
shrl %eax
movl -0x14(%rbp), %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
shll %ecx
orl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bits_reverse_u64
inline u64
bits_reverse_u64(const u64 v)
{
  const u64 v0 = (v >> 32) | (v << 32);
  const u64 v1 = ((v0 & UINT64_C(0xffff0000ffff0000)) >> 16) | ((v0 & UINT64_C(0x0000ffff0000ffff)) << 16);
  const u64 v2 = ((v1 & UINT64_C(0xff00ff00ff00ff00)) >>  8) | ((v1 & UINT64_C(0x00ff00ff00ff00ff)) <<  8);
  const u64 v3 = ((v2 & UINT64_C(0xf0f0f0f0f0f0f0f0)) >>  4) | ((v2 & UINT64_C(0x0f0f0f0f0f0f0f0f)) <<  4);
  const u64 v4 = ((v3 & UINT64_C(0xcccccccccccccccc)) >>  2) | ((v3 & UINT64_C(0x3333333333333333)) <<  2);
  const u64 v5 = ((v4 & UINT64_C(0xaaaaaaaaaaaaaaaa)) >>  1) | ((v4 & UINT64_C(0x5555555555555555)) <<  1);
  return v5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x20, %rax
movq -0x8(%rbp), %rcx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x10(%rbp)
movabsq $-0xffff00010000, %rax  # imm = 0xFFFF0000FFFF0000
andq -0x10(%rbp), %rax
shrq $0x10, %rax
movabsq $0xffff0000ffff, %rcx   # imm = 0xFFFF0000FFFF
andq -0x10(%rbp), %rcx
shlq $0x10, %rcx
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movabsq $-0xff00ff00ff0100, %rax # imm = 0xFF00FF00FF00FF00
andq -0x18(%rbp), %rax
shrq $0x8, %rax
movabsq $0xff00ff00ff00ff, %rcx # imm = 0xFF00FF00FF00FF
andq -0x18(%rbp), %rcx
shlq $0x8, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movabsq $-0xf0f0f0f0f0f0f10, %rax # imm = 0xF0F0F0F0F0F0F0F0
andq -0x20(%rbp), %rax
shrq $0x4, %rax
movabsq $0xf0f0f0f0f0f0f0f, %rcx # imm = 0xF0F0F0F0F0F0F0F
andq -0x20(%rbp), %rcx
shlq $0x4, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movabsq $-0x3333333333333334, %rax # imm = 0xCCCCCCCCCCCCCCCC
andq -0x28(%rbp), %rax
shrq $0x2, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
andq -0x28(%rbp), %rcx
shlq $0x2, %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movabsq $-0x5555555555555556, %rax # imm = 0xAAAAAAAAAAAAAAAA
andq -0x30(%rbp), %rax
shrq %rax
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
andq -0x30(%rbp), %rcx
shlq %rcx
orq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bitmap_create
inline struct bitmap *
bitmap_create(const u64 bits)
{
  struct bitmap * const bm = (typeof(bm))calloc(1, sizeof(*bm) + (sizeof(u64) * ((bits + 63) >> 6)));
  bm->bits = bits;
  atomic_store(&(bm->ones), 0);
  return bm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x3f, %rax
shrq $0x6, %rax
leaq 0x10(,%rax,8), %rsi
movl $0x1, %edi
callq 0x62b0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
xchgq %rax, 0x8(%rcx)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bf_create
inline struct bloomfilter *
bf_create(const u64 bpk, const u64 capacity)
{
  struct bitmap * const bm = bitmap_create(bpk * capacity);
  if (bm) {
    struct bloomfilter * const bf = malloc(sizeof(*bf));
    bf->nr_probe = log(2.0) * (double)bpk;
    bf->bm = bm;
    return bf;
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
imulq -0x18(%rbp), %rdi
callq 0x7c70
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8012
movl $0x10, %edi
callq 0x6380
movq %rax, -0x28(%rbp)
vmovsd 0x130c9(%rip), %xmm0    # 0x1b0a8
callq 0x6230
vcvtusi2sdq -0x10(%rbp), %xmm1, %xmm1
vmulsd %xmm1, %xmm0, %xmm0
vcvttsd2usi %xmm0, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x801a
movq $0x0, -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: bf_mark
inline void
bf_mark(struct bloomfilter * const bf, u64 hash64)
{
  u64 t = hash64;
  const u64 inc = bits_rotl_u64(hash64, 31);
  struct bitmap * const bm = bf->bm;
  for (u64 i = 0; i < bf->nr_probe; i++) {
    bitmap_set1(bm, t % bm->bits);
    t += inc;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1f, %esi
callq 0x7b70
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x80ae
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rdx, %rsi
callq 0x7db0
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x806e
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: bf_test
inline bool
bf_test(const struct bloomfilter * const bf, u64 hash64)
{
  u64 t = hash64;
  const u64 inc = bits_rotl_u64(hash64, 31);
  const struct bitmap * const bm = bf->bm;
  for (u64 i = 0; i < bf->nr_probe; i++) {
    if (bitmap_test(bm, t % bm->bits) == false) return false;
    t += inc;
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1f, %esi
callq 0x7b70
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x814e
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rdx, %rsi
callq 0x7cd0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x8134
movb $0x0, -0x1(%rbp)
jmp 0x8152
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x80fe
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: process_get_rss
u64
process_get_rss(void)
{
  u64 size;
  u64 rss;
  FILE * const fp = fopen("/proc/self/statm", "r");
  if (fp == NULL) return 0;
  if (fscanf(fp, "%" PRIu64 "%" PRIu64, &size, &rss) != 2) {
    fclose(fp);
    return 0;
  }
  fclose(fp);
  return rss * (u64)sysconf(_SC_PAGESIZE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x130c1(%rip), %rdi     # 0x1b260
leaq 0x1308e(%rip), %rsi     # 0x1b234
callq 0x6450
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x81c0
movq $0x0, -0x8(%rbp)
jmp 0x821c
movq -0x20(%rbp), %rdi
leaq 0x130a6(%rip), %rsi     # 0x1b271
leaq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rcx
movb $0x0, %al
callq 0x60b0
cmpl $0x2, %eax
je 0x81f2
movq -0x20(%rbp), %rdi
callq 0x6140
movq $0x0, -0x8(%rbp)
jmp 0x821c
movq -0x20(%rbp), %rdi
callq 0x6140
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1e, %edi
callq 0x6470
movq %rax, %rcx
movq -0x28(%rbp), %rax
imulq %rcx, %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: process_affinity_core_count
u64
process_affinity_core_count(void)
{
  size_t xsize = 0;
  cpu_set_t * const set = __cpu_set_alloc(&xsize);
  if (sched_getaffinity(0, xsize, set) != 0) {
    return sysconf(_SC_NPROCESSORS_CONF);
  }
  const int nr = CPU_COUNT_S(xsize, set);
  free(set);
  return (nr > 0) ? nr : sysconf(_SC_NPROCESSORS_CONF);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq $0x0, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x82c0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %edi, %edi
callq 0x6550
cmpl $0x0, %eax
je 0x8271
movl $0x53, %edi
callq 0x6470
movq %rax, -0x8(%rbp)
jmp 0x82b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6150
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6060
cmpl $0x0, -0x1c(%rbp)
jle 0x829a
movslq -0x1c(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x82a8
movl $0x53, %edi
callq 0x6470
movq %rax, -0x28(%rbp)
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: _cpu_set_alloc
static inline cpu_set_t *
__cpu_set_alloc(size_t * const size_out)
{
  const int ncpu = sysconf(_SC_NPROCESSORS_CONF);
  const size_t s1 = CPU_ALLOC_SIZE(ncpu);
  const size_t s2 = sizeof(cpu_set_t);
  const size_t size = s1 > s2 ? s1 : s2;
  *size_out = size;
  cpu_set_t * const set = malloc(size);
  return set;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x53, %edi
callq 0x6470
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rax
addq $0x40, %rax
subq $0x1, %rax
shrq $0x6, %rax
shlq $0x3, %rax
movq %rax, -0x18(%rbp)
movq $0x80, -0x20(%rbp)
cmpq $0x80, -0x18(%rbp)
jbe 0x830d
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x8318
movl $0x80, %eax
movq %rax, -0x38(%rbp)
jmp 0x8318
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x6380
movq %rax, -0x30(%rbp)
movq -0x30(%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: process_affinity_core_list
u64
process_affinity_core_list(const u64 max, u64 * const cores)
{
  memset(cores, 0, max * sizeof(cores[0]));
  size_t xsize = 0;
  cpu_set_t * const set = __cpu_set_alloc(&xsize);
  if (sched_getaffinity(0, xsize, set) != 0) return 0;

  const u64 ncpu = sysconf(_SC_NPROCESSORS_CONF);
  const u64 nr_affinity = CPU_COUNT_S(xsize, set);
  const u64 nr = nr_affinity < max ? nr_affinity : max;
  u64 j = 0;
  for (u64 i = 0; i < ncpu; i++) {
    if (CPU_ISSET_S((int)i, xsize, set)) {
      cores[j++] = i;
    }
    if (j >= nr) break;
  }
  free(set);
  return j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x6200
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x82c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
xorl %edi, %edi
callq 0x6550
cmpl $0x0, %eax
je 0x83a9
movq $0x0, -0x8(%rbp)
jmp 0x84b9
movl $0x53, %edi
callq 0x6470
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x6150
cltq
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x83de
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x83e6
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x84a8
movq -0x50(%rbp), %rax
cltq
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
shrq $0x3, %rax
cmpq -0x20(%rbp), %rax
jae 0x845b
movq -0x28(%rbp), %rax
movq -0x58(%rbp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movq -0x58(%rbp), %rcx
andq $0x3f, %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x6c(%rbp)
jmp 0x8462
xorl %eax, %eax
movl %eax, -0x6c(%rbp)
jmp 0x8462
movl -0x6c(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x8489
movq -0x50(%rbp), %rdx
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x48(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x8495
jmp 0x84a8
jmp 0x8497
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x83fe
movq -0x28(%rbp), %rdi
callq 0x6060
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: process_cpu_time_usec
u64
process_cpu_time_usec(void)
{
  struct rusage r;
  getrusage(RUSAGE_SELF, &r);
  const u64 usr = (r.ru_utime.tv_sec * UINT64_C(1000000)) + r.ru_utime.tv_usec;
  const u64 sys = (r.ru_stime.tv_sec * UINT64_C(1000000)) + r.ru_stime.tv_usec;
  return usr + sys;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
xorl %edi, %edi
leaq -0x90(%rbp), %rsi
callq 0x6460
imulq $0xf4240, -0x90(%rbp), %rax # imm = 0xF4240
addq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
imulq $0xf4240, -0x80(%rbp), %rax # imm = 0xF4240
addq -0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
addq -0xa0(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: thread_set_affinity
void
thread_set_affinity(const u64 cpu)
{
  const u64 ncpu = sysconf(_SC_NPROCESSORS_CONF);
  size_t xsize = 0;
  cpu_set_t * const set = __cpu_set_alloc(&xsize);

  CPU_ZERO_S(xsize, set);
  CPU_SET_S(cpu % ncpu, xsize, set);
  sched_setaffinity(0, xsize, set);
  free(set);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x53, %edi
callq 0x6470
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x82c0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x6200
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x10(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x28(%rbp), %rax
shrq $0x3, %rax
cmpq -0x18(%rbp), %rax
jae 0x85b6
movq -0x28(%rbp), %rcx
andq $0x3f, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rdx
shrq $0x6, %rdx
orq (%rcx,%rdx,8), %rax
movq %rax, (%rcx,%rdx,8)
movq %rax, -0x38(%rbp)
jmp 0x85be
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x85be
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %edi, %edi
callq 0x6240
movq -0x20(%rbp), %rdi
callq 0x6060
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: thread_fork_join
inline double
thread_fork_join(const u64 nr, void *(*func) (void *), void * const arg)
{
  const u64 nthreads = nr ? nr : process_affinity_core_count();
  void * argv[nthreads];
  for (u64 i = 0; i < nthreads; i++) {
    argv[i] = arg;
  }
  return thread_fork_join_private(nthreads, func, argv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x8a15
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x8a1e
callq 0x8230
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x48(%rbp)
movq %rcx, %rsp
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8a7e
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x8a56
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x85f0
movq -0x28(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: thread_create_at
inline int
thread_create_at(const u64 cpu, pthread_t * const thread, void *(*start_routine) (void *), void * const arg)
{
  const u64 ncpu = sysconf(_SC_NPROCESSORS_CONF);
  const u64 cpu_id = cpu % ncpu;
  pthread_attr_t attr;
  pthread_attr_init(&attr);
  pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
  size_t xsize = 0;
  cpu_set_t * const set = __cpu_set_alloc(&xsize);

  CPU_ZERO_S(xsize, set);
  CPU_SET_S(cpu_id, xsize, set);
  pthread_attr_setaffinity_np(&attr, xsize, set);
  const int r = pthread_create(thread, &attr, start_routine, arg);
  pthread_attr_destroy(&attr);
  free(set);
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x53, %edi
callq 0x6470
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x28(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6290
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0x6360
movq $0x0, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x82c0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
xorl %esi, %esi
callq 0x6200
movq -0x30(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shrq $0x3, %rax
cmpq -0x70(%rbp), %rax
jae 0x8b54
movq -0x80(%rbp), %rcx
andq $0x3f, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq -0x78(%rbp), %rcx
movq -0x80(%rbp), %rdx
shrq $0x6, %rdx
orq (%rcx,%rdx,8), %rax
movq %rax, (%rcx,%rdx,8)
movq %rax, -0x98(%rbp)
jmp 0x8b5f
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x8b5f
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x6080
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x68(%rbp), %rsi
callq 0x6400
movl %eax, -0x8c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6490
movq -0x78(%rbp), %rdi
callq 0x6060
movl -0x8c(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: _pages_alloc
static inline void *
__pages_alloc(const size_t size, const int flags)
{
  void * const p = mmap(NULL, size, PROT_READ | PROT_WRITE, flags | MAP_LOCKED, -1, 0);
  if (p == MAP_FAILED) {
    return NULL;
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %ecx
orl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %r9, %rdi
callq 0x6190
movq %rax, -0x20(%rbp)
movq $-0x1, %rax
cmpq %rax, -0x20(%rbp)
jne 0x8cbf
movq $0x0, -0x8(%rbp)
jmp 0x8cc7
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: pages_alloc_best
void *
pages_alloc_best(const size_t size, const bool try_1gb, u64 * const size_out)
{
  if (try_1gb) {
    const size_t nr_1gb = (size + ((UINT64_C(1) << 30) - UINT64_C(1))) >> 30;
    // 1gb super huge page: waste < 1/16 or 6.25%
    if (((nr_1gb << 30) - size) < (size >> 4)) {
      void * const p1 = pages_alloc_1gb(nr_1gb);
      if (p1) {
        *size_out = nr_1gb << 30;
        return p1;
      }
    }
  }

  // 2mb huge page: at least 1MB
  if (size >= (UINT64_C(1) << 20)) {
    const size_t nr_2mb = (size + ((UINT64_C(1) << 21) - UINT64_C(1))) >> 21;
    void * const p2 = pages_alloc_2mb(nr_2mb);
    if (p2) {
      *size_out = nr_2mb << 21;
      return p2;
    }
  }

  const size_t nr_4kb = (size + ((UINT64_C(1) << 12) - UINT64_C(1))) >> 12;
  void * const p3 = pages_alloc_4kb(nr_4kb);
  if (p3) {
    *size_out = nr_4kb << 12;
  }
  return p3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
testb $0x1, -0x11(%rbp)
je 0x8dbd
movq -0x10(%rbp), %rax
addq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
shrq $0x1e, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x1e, %rax
subq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
shrq $0x4, %rcx
cmpq %rcx, %rax
jae 0x8dbb
movq -0x28(%rbp), %rdi
callq 0x8c40
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x8db9
movq -0x28(%rbp), %rcx
shlq $0x1e, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8e45
jmp 0x8dbb
jmp 0x8dbd
cmpq $0x100000, -0x10(%rbp)  # imm = 0x100000
jb 0x8e08
movq -0x10(%rbp), %rax
addq $0x1fffff, %rax         # imm = 0x1FFFFF
shrq $0x15, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x8ce0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x8e06
movq -0x38(%rbp), %rcx
shlq $0x15, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8e45
jmp 0x8e08
movq -0x10(%rbp), %rax
addq $0xfff, %rax            # imm = 0xFFF
shrq $0xc, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x8d10
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x8e3d
movq -0x48(%rbp), %rcx
shlq $0xc, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: oalloc_create
struct oalloc *
oalloc_create(void)
{
  struct oalloc * const oa = (typeof(oa))calloc(1, sizeof(*oa));
  spinlock_init(&(oa->lp.lock));
  for (u64 i = 0; i < OALLOC_NR_SHARDS; i++) {
    spinlock_init(&(oa->sps[i].lock));
  }
  return oa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x15f90, %esi          # imm = 0x15F90
callq 0x62b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6e30
movq $0x0, -0x10(%rbp)
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jae 0x8eac
movq -0x8(%rbp), %rdi
addq $0x1f90, %rdi           # imm = 0x1F90
imulq $0x50, -0x10(%rbp), %rax
addq %rax, %rdi
callq 0x6e30
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x8e7c
movq -0x8(%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: oalloc_alloc
void *
oalloc_alloc(const u64 size, struct oalloc * const oa)
{
  const u64 s = random_u64() % OALLOC_NR_SHARDS;
  struct oalloc_sp * const sp = &(oa->sps[s]);
  const u64 asize = (size + 7) & (~ UINT64_C(7));
  spinlock_lock(&(sp->lock));
  if (sp->unit == NULL || ((sp->offset + asize) > OALLOC_UNIT_SIZE)) {
    sp->unit = oalloc_lp_alloc(&(oa->lp));
    sp->offset = 0;
    if (sp->unit == NULL) {
      spinlock_unlock(&(sp->lock));
      return NULL;
    }
  }
  void * const ptr = &(sp->unit[sp->offset]);
  sp->offset += asize;
  spinlock_unlock(&(sp->lock));
  return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x8fb0
andq $0x3ff, %rax            # imm = 0x3FF
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1f90, %rax           # imm = 0x1F90
imulq $0x50, -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x7, %rax
andq $-0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x6e50
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x8f2d
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
addq -0x30(%rbp), %rax
cmpq $0x40000, %rax          # imm = 0x40000
jbe 0x8f6d
movq -0x18(%rbp), %rdi
callq 0x9000
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x8f6b
movq -0x28(%rbp), %rdi
callq 0x6ed0
movq $0x0, -0x8(%rbp)
jmp 0x8fa2
jmp 0x8f6d
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x28(%rbp), %rdi
callq 0x6ed0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: oalloc_lp_alloc
static u8 *
oalloc_lp_alloc(struct oalloc_lp * const lp)
{
  spinlock_lock(&(lp->lock));
  if ((lp->unit_id) >= OALLOC_NR_UNIT) {
    lp->page_id++;
    lp->unit_id = 0;
  }

  if (lp->page_id >= OALLOC_NR_PAGE) {
    spinlock_unlock(&(lp->lock));
    return NULL;
  }
  const u64 pid = lp->page_id;
  const u64 uid = lp->unit_id;
  if (lp->pages[pid] == NULL) {
    u64 size = 0;
    lp->pages[pid] = pages_alloc_best(OALLOC_PAGE_SIZE, true, &size);
    debug_assert(size == OALLOC_PAGE_SIZE);
  }

  u8 * const ptr = &(lp->pages[pid][uid << OALLOC_UNIT_POWER]);
  lp->unit_id++;
  spinlock_unlock(&(lp->lock));
  return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6e50
movq -0x10(%rbp), %rax
cmpq $0x1000, 0x48(%rax)     # imm = 0x1000
jb 0x903f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
cmpq $0x3e8, 0x40(%rax)      # imm = 0x3E8
jb 0x9063
movq -0x10(%rbp), %rdi
callq 0x6ed0
movq $0x0, -0x8(%rbp)
jmp 0x9109
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq $0x0, 0x50(%rax,%rcx,8)
jne 0x90cc
movq $0x0, -0x28(%rbp)
movl $0x40000000, %edi       # imm = 0x40000000
movl $0x1, %esi
leaq -0x28(%rbp), %rdx
callq 0x8d40
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rdx, 0x50(%rax,%rcx,8)
cmpq $0x40000000, -0x28(%rbp) # imm = 0x40000000
sete %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x50(%rax,%rcx,8), %rax
movq -0x20(%rbp), %rcx
shlq $0x12, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rdi
callq 0x6ed0
movq -0x30(%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: oalloc_destroy
void
oalloc_destroy(struct oalloc * const oa)
{
  for (u64 i = 0; i < OALLOC_NR_PAGE; i++) {
    if (oa->lp.pages[i]) {
      pages_unmap(oa->lp.pages[i], OALLOC_PAGE_SIZE);
    }
  }
  free(oa);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x3e8, -0x10(%rbp)     # imm = 0x3E8
jae 0x9175
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq $0x0, 0x50(%rax,%rcx,8)
je 0x9165
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rax,%rcx,8), %rdi
movl $0x40000000, %esi       # imm = 0x40000000
callq 0x8c10
jmp 0x9167
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x9134
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: gcache_create
struct gcache *
gcache_create(const u64 nr_classes, const u64 inc)
{
  struct gcache * const g = (typeof(g))calloc(1, sizeof(*g) + (nr_classes * sizeof(g->cs[0])));
  for (u64 i = 0; i < GALLOC_SHARDS; i++) {
    spinlock_init(&(g->locks[i]));
  }
  g->nr = nr_classes;
  g->inc = inc;
  return g;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
shlq $0x8, %rsi
addq $0x810, %rsi            # imm = 0x810
movl $0x1, %edi
callq 0x62b0
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
jae 0x91ee
movq -0x18(%rbp), %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 0x91c5
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x800(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x808(%rax)
movq -0x18(%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: gcache_pull
void *
gcache_pull(struct gcache * const g, const u64 size)
{
  const u64 idx = (size + g->inc - 1) / g->inc;
  if (idx >= g->nr || idx == 0) return NULL;
  struct gcache_class * const gc = &(g->cs[idx]);
  return gcache_pull_gc(g, gc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
addq 0x808(%rcx), %rax
subq $0x1, %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq 0x808(%rcx)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x800(%rcx), %rax
jae 0x926c
cmpq $0x0, -0x20(%rbp)
jne 0x9276
movq $0x0, -0x8(%rbp)
jmp 0x92a0
movq -0x10(%rbp), %rax
addq $0x810, %rax            # imm = 0x810
movq -0x20(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x92b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)