LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gcache_pull_gc
static void *
gcache_pull_gc(struct gcache * const g, struct gcache_class * const gc)
{
  const u64 r = random_u64();
  for (u64 i = 0; i < GALLOC_SHARDS; i++) {
    const u64 idx = (i + r) % GALLOC_SHARDS;
    if (gc->heads[idx]) {
      spinlock_lock(&(g->locks[idx]));
      if (gc->heads[idx]) {
        struct gcache_object * const curr = gc->heads[idx];
        gc->heads[idx] = curr->next;
        spinlock_unlock(&(g->locks[idx]));
        return (void *)curr;
      }
      spinlock_unlock(&(g->locks[idx]));
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x8fb0
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x20, -0x28(%rbp)
jae 0x9386
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
andq $0x1f, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x9373
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x935f
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x938e
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
jmp 0x9375
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x92d1
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gcache_push
bool
gcache_push(struct gcache * const g, const u64 size, void * ptr)
{
  struct gcache_object * const go = (typeof(go))ptr;
  const u64 idx = (size + g->inc - 1) / g->inc;
  if (idx >= g->nr || idx == 0) return false;
  struct gcache_class * const gc = &(g->cs[idx]);
  gcache_push_gc(g, gc, go);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%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, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x800(%rcx), %rax
jae 0x93f8
cmpq $0x0, -0x30(%rbp)
jne 0x93fe
movb $0x0, -0x1(%rbp)
jmp 0x942c
movq -0x10(%rbp), %rax
addq $0x810, %rax            # imm = 0x810
movq -0x30(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x9440
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gcache_push_gc
static void
gcache_push_gc(struct gcache * const g, struct gcache_class * const gc, struct gcache_object * const go)
{
  const u64 idx = random_u64() % GALLOC_SHARDS;
  spinlock_lock(&(g->locks[idx]));
  go->next = gc->heads[idx];
  gc->heads[idx] = go;
  spinlock_unlock(&(g->locks[idx]));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
callq 0x8fb0
andq $0x1f, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gcache_clean
void
gcache_clean(struct gcache * const g)
{
  for (u64 i = 0; i < GALLOC_SHARDS; i++) {
    spinlock_lock(&(g->locks[i]));
  }
  for (u64 i = 1; i < g->nr; i++) {
    memset(&(g->cs[i]), 0, sizeof(g->cs[i]));
  }
  for (u64 i = 0; i < GALLOC_SHARDS; i++) {
    spinlock_unlock(&(g->locks[i]));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x20, -0x10(%rbp)
jae 0x94fd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6e50
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x94d4
movq $0x1, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x800(%rcx), %rax
jae 0x9546
movq -0x8(%rbp), %rdi
addq $0x810, %rdi            # imm = 0x810
movq -0x18(%rbp), %rax
shlq $0x8, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x6200
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x9505
movq $0x0, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
jae 0x9577
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x6ed0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x954e
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gcache_iter_create
struct gcache_iter *
gcache_iter_create(struct gcache * const g)
{
  struct gcache_iter * const gi = calloc(1, sizeof(*gi));
  gi->g = g;
  gi->cid = 1;
  gi->curr = g->cs[1].heads[0];
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x62b0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x1, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x910(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gcache_iter_next
void *
gcache_iter_next(struct gcache_iter * const gi)
{
  if (gi->cid >= gi->g->nr) return NULL;
  while (gi->curr == NULL) {
    gi->sid++;
    if (gi->sid >= GALLOC_SHARDS) {
      gi->cid++;
      gi->sid = 0;
    }
    if (gi->cid >= gi->g->nr) return NULL;
    gi->curr = gi->g->cs[gi->cid].heads[gi->sid];
  }
  struct gcache_object * const curr = gi->curr;
  gi->curr = curr->next;
  return curr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x800(%rcx), %rax
jb 0x962d
movq $0x0, -0x8(%rbp)
jmp 0x96ef
jmp 0x962f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x96cc
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x20, 0x10(%rax)
jb 0x9675
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x800(%rcx), %rax
jb 0x9697
movq $0x0, -0x8(%rbp)
jmp 0x96ef
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0x810, %rax            # imm = 0x810
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x962f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: cpu_clflush
inline void
cpu_clflush(void * const ptr, const size_t size)
{
  u8 * first = (typeof(first))(((u64)ptr) & (~ UINT64_C(0x3f)));
  u8 * const last  = (typeof(last))(((u64)(((u8*)ptr) + (size - 1u))) & (~ UINT64_C(0x3f)));
  while ((last - first) >= 256) {
    __builtin_ia32_clflush(first);
    __builtin_ia32_clflush(first + 64);
    __builtin_ia32_clflush(first + 128);
    __builtin_ia32_clflush(first + 192);
    first += 256;
  }
  for (u8 * p = first; p <= last; p += 64u) {
    __builtin_ia32_clflush(p);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
andq $-0x40, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
addq %rcx, %rax
andq $-0x40, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
cmpq $0x100, %rax            # imm = 0x100
jl 0x97be
movq -0x18(%rbp), %rax
clflush (%rax)
movq -0x18(%rbp), %rax
addq $0x40, %rax
clflush (%rax)
movq -0x18(%rbp), %rax
addq $0x80, %rax
clflush (%rax)
movq -0x18(%rbp), %rax
addq $0xc0, %rax
clflush (%rax)
movq -0x18(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x18(%rbp)
jmp 0x976f
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x97e5
movq -0x28(%rbp), %rax
clflush (%rax)
movq -0x28(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x28(%rbp)
jmp 0x97c6
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: _compare_u16
static int
__compare_u16(const void * const p1, const void * const p2)
{
  const u16 v1 = *((const u16 *)p1);
  const u16 v2 = *((const u16 *)p2);
  if (v1 < v2) return -1;
  else if (v1 > v2) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x1a(%rbp)
movq -0x18(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x1c(%rbp)
movzwl -0x1a(%rbp), %eax
movzwl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x9867
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9883
movzwl -0x1a(%rbp), %eax
movzwl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jle 0x987c
movl $0x1, -0x4(%rbp)
jmp 0x9883
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: _compare_u32
static int
__compare_u32(const void * const p1, const void * const p2)
{
  const u32 v1 = *((const u32 *)p1);
  const u32 v2 = *((const u32 *)p2);
  if (v1 < v2) return -1;
  else if (v1 > v2) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x98ef
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9907
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0x9900
movl $0x1, -0x4(%rbp)
jmp 0x9907
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: _compare_u64
static int
__compare_u64(const void * const p1, const void * const p2)
{
  const u64 v1 = *((const u64 *)p1);
  const u64 v2 = *((const u64 *)p2);
  if (v1 < v2) return -1;
  else if (v1 > v2) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x9975
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x998f
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x9988
movl $0x1, -0x4(%rbp)
jmp 0x998f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: _compare_double
static int
__compare_double(const void * const p1, const void * const p2)
{
  const double v1 = *((const double *)p1);
  const double v2 = *((const double *)p2);
  if (v1 < v2) return -1;
  else if (v1 > v2) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
vmovsd (%rax), %xmm0
vmovsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rax
vmovsd (%rax), %xmm0
vmovsd %xmm0, -0x28(%rbp)
vmovsd -0x20(%rbp), %xmm1
vmovsd -0x28(%rbp), %xmm0
vucomisd %xmm1, %xmm0
jbe 0x9a0f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a2b
vmovsd -0x20(%rbp), %xmm0
vucomisd -0x28(%rbp), %xmm0
jbe 0x9a24
movl $0x1, -0x4(%rbp)
jmp 0x9a2b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: crc32
inline u32
crc32(const void * const ptr, const size_t size)
{
  const uint8_t * p = (typeof(p))ptr;
  size_t sz = size;

  u32 crc = UINT32_C(0xffffffff);

  while (sz--)
    crc = __crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);

  return crc ^ UINT32_C(0xffffffff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0xa03f
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movzbl (%rcx), %ecx
xorl %ecx, %eax
andl $0xff, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x11841(%rip), %rax     # 0x1b870
movl (%rax,%rcx,4), %eax
movl -0x24(%rbp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, -0x24(%rbp)
jmp 0x9ff3
movl -0x24(%rbp), %eax
xorl $-0x1, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: xlog_create
struct xlog *
xlog_create(const u64 nr_init, const u64 unit_size)
{
  struct xlog * const xlog = (typeof(xlog))xalloc(64, sizeof(*xlog));
  debug_assert(xlog);
  xlog->nr_rec = 0;
  xlog->nr_cap = nr_init ? nr_init : 4096;
  debug_assert(unit_size);
  xlog->unit_size = unit_size;

  xlog->ptr = malloc(xlog->unit_size * xlog->nr_cap);
  debug_assert(xlog->ptr);
  return xlog;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x40, %edi
movl $0x20, %esi
callq 0x8bc0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x8(%rbp)
je 0xa162
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xa16d
movl $0x1000, %eax           # imm = 0x1000
movq %rax, -0x20(%rbp)
jmp 0xa16d
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x10(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rdi
callq 0x6380
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: xlog_append
inline void
xlog_append(struct xlog * const xlog, const void * const rec)
{
  if (xlog->nr_rec == xlog->nr_cap) {
    xlog_enlarge(xlog);
  }
  u8 * const ptr = xlog->ptr + (xlog->nr_rec * xlog->unit_size);
  memcpy(ptr, rec, xlog->unit_size);
  xlog->nr_rec++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xa20a
movq -0x8(%rbp), %rdi
callq 0xa260
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
imulq 0x10(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x6320
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: xlog_enlarge
static inline void
xlog_enlarge(struct xlog * const xlog)
{
  const u64 new_cap = (xlog->nr_cap < (1lu<<20)) ? (xlog->nr_cap * 2lu) : (xlog->nr_cap + (1lu<<20));
  void * const new_ptr = realloc(xlog->ptr, xlog->unit_size * new_cap);
  debug_assert(new_ptr);
  xlog->ptr = new_ptr;
  xlog->nr_cap = new_cap;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x100000, 0x8(%rax)    # imm = 0x100000
jae 0xa28b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x20(%rbp)
jmp 0xa29d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x100000, %rax         # imm = 0x100000
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
imulq -0x10(%rbp), %rsi
callq 0x63c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: xlog_iter_create
inline struct xlog_iter *
xlog_iter_create(const struct xlog * const xlog)
{
  struct xlog_iter * const iter = (typeof(iter))malloc(sizeof(*iter));
  iter->xlog = xlog;
  iter->next_id = 0;
  return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x10, %edi
callq 0x6380
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: xlog_iter_next
inline bool
xlog_iter_next(struct xlog_iter * const iter, void * const out)
{
  const struct xlog * const xlog = iter->xlog;
  if (iter->next_id < xlog->nr_rec) {
    void * const ptr = xlog->ptr + (xlog->unit_size * iter->next_id);
    memcpy(out, ptr, xlog->unit_size);
    iter->next_id++;
    return true;
  } else {
    return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0xa4a7
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x10(%rbp), %rdx
imulq 0x8(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x6320
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xa4ab
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: str10_u32
void
str10_u32(void * const out, const u32 v)
{
  u32 vv = v;
  u16 * const ptr = (typeof(ptr))out;
  for (int i = 4; i >= 0; i--) {
    ptr[i] = __conv_table_10[vv % 100];
    vv /= 100u;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x4, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0xa597
movl -0x10(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movl %eax, %ecx
leaq 0x17dd3(%rip), %rax     # 0x22340
movw (%rax,%rcx,2), %dx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x10(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa550
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: str10_u64
void
str10_u64(void * const out, const u64 v)
{
  u64 vv = v;
  u16 * const ptr = (typeof(ptr))out;
  for (int i = 9; i >= 0; i--) {
    ptr[i] = __conv_table_10[vv % 100];
    vv /= 100;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x9, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0xa60b
movq -0x18(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
leaq 0x17d62(%rip), %rax     # 0x22340
movw (%rax,%rdx,2), %dx
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movq -0x18(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa5c3
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: damp_create
struct damp *
damp_create(const u64 cap, const double dshort, const double dlong)
{
  struct damp * const d = malloc(sizeof(*d) + (sizeof(d->hist[0]) * cap));
  d->cap = cap;
  d->used = 0;
  d->next = 0;
  d->events = 0;
  d->dshort = dshort;
  d->dlong = dlong;
  return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
vmovsd %xmm0, -0x10(%rbp)
vmovsd %xmm1, -0x18(%rbp)
movq -0x8(%rbp), %rdi
shlq $0x3, %rdi
addq $0x30, %rdi
callq 0x6380
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
vmovsd -0x10(%rbp), %xmm0
movq -0x20(%rbp), %rax
vmovsd %xmm0, 0x20(%rax)
vmovsd -0x18(%rbp), %xmm0
movq -0x20(%rbp), %rax
vmovsd %xmm0, 0x28(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: damp_average
double
damp_average(const struct damp * const d)
{
  if (d->used == 0) return 0.0;
  const u64 start = d->next - d->used;
  double sum = 0.0;
  for (u64 i = 0; i < d->used; i++) {
    const u64 idx = (start + i) % d->cap;
    sum += d->hist[idx];
  }
  const double avg = sum / ((double)d->used);
  return avg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xa991
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x8(%rbp)
jmp 0xaa22
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x18(%rbp)
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0xa9ff
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rdx, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
vmovsd 0x30(%rax,%rcx,8), %xmm0
vaddsd -0x20(%rbp), %xmm0, %xmm0
vmovsd %xmm0, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa9b6
vmovsd -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
vcvtusi2sdq 0x8(%rax), %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x38(%rbp)
vmovsd -0x38(%rbp), %xmm0
vmovsd %xmm0, -0x8(%rbp)
vmovsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: damp_min
double
damp_min(const struct damp * const d)
{
  if (d->used == 0) return 0.0;
  const u64 start = d->next - d->used;
  double min = d->hist[start % d->cap];
  for (u64 i = 1; i < d->used; i++) {
    const u64 idx = (start + i) % d->cap;
    const double v = d->hist[idx];
    if (v < min) min = v;
  }
  return min;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xaa51
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x8(%rbp)
jmp 0xaafb
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq -0x40(%rbp), %rax
vmovsd 0x30(%rax,%rdx,8), %xmm0
vmovsd %xmm0, -0x20(%rbp)
movq $0x1, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0xaaf1
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rdx, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
vmovsd 0x30(%rax,%rcx,8), %xmm0
vmovsd %xmm0, -0x38(%rbp)
vmovsd -0x38(%rbp), %xmm1
vmovsd -0x20(%rbp), %xmm0
vucomisd %xmm1, %xmm0
jbe 0xaae1
vmovsd -0x38(%rbp), %xmm0
vmovsd %xmm0, -0x20(%rbp)
jmp 0xaae3
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xaa91
vmovsd -0x20(%rbp), %xmm0
vmovsd %xmm0, -0x8(%rbp)
vmovsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: damp_max
double
damp_max(const struct damp * const d)
{
  if (d->used == 0) return 0.0;
  const u64 start = d->next - d->used;
  double max = d->hist[start % d->cap];
  for (u64 i = 1; i < d->used; i++) {
    const u64 idx = (start + i) % d->cap;
    const double v = d->hist[idx];
    if (v > max) max = v;
  }
  return max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xab31
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x8(%rbp)
jmp 0xabd7
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq -0x40(%rbp), %rax
vmovsd 0x30(%rax,%rdx,8), %xmm0
vmovsd %xmm0, -0x20(%rbp)
movq $0x1, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0xabcd
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rdx, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
vmovsd 0x30(%rax,%rcx,8), %xmm0
vmovsd %xmm0, -0x38(%rbp)
vmovsd -0x38(%rbp), %xmm0
vucomisd -0x20(%rbp), %xmm0
jbe 0xabbd
vmovsd -0x38(%rbp), %xmm0
vmovsd %xmm0, -0x20(%rbp)
jmp 0xabbf
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xab71
vmovsd -0x20(%rbp), %xmm0
vmovsd %xmm0, -0x8(%rbp)
vmovsd -0x8(%rbp), %xmm0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: xorshift
inline u64
xorshift(const u64 seed)
{
  u64 x = seed ? seed : time_nsec();
  x ^= x >> 12; // a
  x ^= x << 25; // b
  x ^= x >> 27; // c
  return x * UINT64_C(2685821657736338717);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb1bd
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xb1c6
callq 0x72a0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq $0xc, %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shlq $0x19, %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq $0x1b, %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movabsq $0x2545f4914f6cdd1d, %rax # imm = 0x2545F4914F6CDD1D
imulq -0x10(%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: rgen_new_exponential
struct rgen *
rgen_new_exponential(const double percentile, const double range)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = true;
  gi->gen.exponential.gamma = - log(1.0 - (percentile/100.0)) / range;

  gi->type = GEN_EXPONENTIAL;
  gi->next_wait = gen_exponential;
  gi->next_nowait = gen_exponential;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
vmovsd %xmm0, -0x8(%rbp)
vmovsd %xmm1, -0x10(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x1, 0x14(%rax)
vmovsd -0x8(%rbp), %xmm0
vmovsd 0xfdd6(%rip), %xmm1     # 0x1b0b0
vdivsd %xmm1, %xmm0, %xmm1
vmovsd 0xfdda(%rip), %xmm0     # 0x1b0c0
vsubsd %xmm1, %xmm0, %xmm0
callq 0x6230
vmovq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
vmovq %rax, %xmm0
vdivsd -0x10(%rbp), %xmm0, %xmm0
movq -0x18(%rbp), %rax
vmovsd %xmm0, 0x18(%rax)
movq -0x18(%rbp), %rax
movl $0x7, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x26(%rip), %rcx        # 0xb350
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x18(%rip), %rcx        # 0xb350
movq %rcx, 0x8(%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: rgen_new_constant
struct rgen *
rgen_new_constant(const u64 constant)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = constant > UINT32_MAX ? true : false;
  gi->gen.constant.constant = constant;

  gi->type = GEN_CONSTANT;
  gi->next_wait = gen_constant;
  gi->next_nowait = gen_constant;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x14(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x29(%rip), %rcx        # 0xb430
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x1b(%rip), %rcx        # 0xb430
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_counter
struct rgen *
rgen_new_counter(const u64 min, const u64 max)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->gen.counter.counter = 0;
  gi->gen.counter.base = min;
  gi->gen.counter.modulus = max - min + 1;

  gi->type = GEN_COUNTER;
  gi->next_wait = gen_counter;
  gi->next_nowait = gen_counter;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
testq %rax, %rax
movq -0x18(%rbp), %rax
setne 0x14(%rax)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
xchgq %rax, 0x18(%rcx)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
subq -0x8(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x1f(%rip), %rcx        # 0xb4e0
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x11(%rip), %rcx        # 0xb4e0
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_counter_unsafe
struct rgen *
rgen_new_counter_unsafe(const u64 min, const u64 max)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->gen.counter.counter_unsafe = 0;
  gi->gen.counter.base = min;
  gi->gen.counter.modulus = max - min + 1;

  gi->type = GEN_COUNTER_UNSAFE;
  gi->next_wait = gen_counter_unsafe;
  gi->next_nowait = gen_counter_unsafe;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x14(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
subq -0x8(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movl $0x2, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x25(%rip), %rcx        # 0xb5e0
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x17(%rip), %rcx        # 0xb5e0
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_skipinc
struct rgen *
rgen_new_skipinc(const u64 min, const u64 max, const u64 inc)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->gen.skipinc.counter = 0;
  gi->gen.skipinc.base = min;
  gi->gen.skipinc.modulus = max - min + 1;
  gi->gen.skipinc.inc = inc;

  gi->type = GEN_SKIPINC;
  gi->next_wait = gen_skipinc;
  gi->next_nowait = gen_skipinc;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
testq %rax, %rax
movq -0x20(%rbp), %rax
setne 0x14(%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
xchgq %rax, 0x18(%rcx)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
subq -0x8(%rbp), %rcx
addq $0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x20(%rbp), %rax
leaq 0x1f(%rip), %rcx        # 0xb6c0
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
leaq 0x11(%rip), %rcx        # 0xb6c0
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_skipinc_unsafe
struct rgen *
rgen_new_skipinc_unsafe(const u64 min, const u64 max, const u64 inc)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->gen.skipinc.counter_unsafe = 0;
  gi->gen.skipinc.base = min;
  gi->gen.skipinc.modulus = max - min + 1;
  gi->gen.skipinc.inc = inc;

  gi->type = GEN_SKIPINC_UNSAFE;
  gi->next_wait = gen_skipinc_unsafe;
  gi->next_nowait = gen_skipinc_unsafe;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq -0x20(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x14(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
subq -0x8(%rbp), %rcx
addq $0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
movl $0x4, 0x10(%rax)
movq -0x20(%rbp), %rax
leaq 0x25(%rip), %rcx        # 0xb7d0
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
leaq 0x17(%rip), %rcx        # 0xb7d0
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_reducer_unsafe
struct rgen *
rgen_new_reducer_unsafe(const u64 min, const u64 max)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->gen.reducer.counter_unsafe = 0;
  gi->gen.reducer.base = max;
  gi->gen.reducer.modulus = max - min + 1;

  gi->type = GEN_REDUCER_UNSAFE;
  gi->next_wait = gen_reducer_unsafe;
  gi->next_nowait = gen_reducer_unsafe;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x14(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
subq -0x8(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movl $0x6, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x25(%rip), %rcx        # 0xb9b0
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x17(%rip), %rcx        # 0xb9b0
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: zeta
static double
zeta(const u64 n, const double theta)
{
  //assert(theta == 0.99);
  const u64 zlid0 = n / zetalist_step;
  const u64 zlid = (zlid0 > zetalist_count) ? zetalist_count : zlid0;
  const double sum0 = zetalist_double[zlid];
  const u64 start = zlid * zetalist_step;
  const u64 count = n - start;
  const double sum1 = zeta_range(start, count, theta);
  return sum0 + sum1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
vmovsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
shrq $0x28, %rax
movq %rax, -0x18(%rbp)
cmpq $0x10, -0x18(%rbp)
jbe 0xbc0f
movl $0x10, %eax
movq %rax, -0x48(%rbp)
jmp 0xbc17
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x166ea(%rip), %rax     # 0x22310
movq -0x20(%rbp), %rcx
vmovsd (%rax,%rcx,8), %xmm0
vmovsd %xmm0, -0x28(%rbp)
movq -0x20(%rbp), %rax
shlq $0x28, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
vmovsd -0x10(%rbp), %xmm0
callq 0x18200
vmovsd %xmm0, -0x40(%rbp)
vmovsd -0x28(%rbp), %xmm0
vaddsd -0x40(%rbp), %xmm0, %xmm0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gen_zipfian
static u64
gen_zipfian(struct rgen * const gi)
{
  // simplified: no increamental update
  const struct rgen_zipfian * const gz = &(gi->gen.zipfian);
  const double u = random_double();
  const double uz = u * gz->zetan;
  if (uz < 1.0) {
    return gz->base;
  } else if (uz < gz->quick1) {
    return gz->base1;
  }
  //const double x = gz->nr_items_d * pow(gz->eta * (u - 1.0) + 1.0, gz->alpha);
  const double x = gz->nr_items_d * pow((gz->eta * u) + gz->quick2, gz->alpha);
  const u64 ret = gz->base + (u64)x;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
callq 0xb270
vmovsd %xmm0, -0x20(%rbp)
vmovsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
vmulsd 0x28(%rax), %xmm0, %xmm0
vmovsd %xmm0, -0x28(%rbp)
vmovsd 0xf403(%rip), %xmm0     # 0x1b0c0
vucomisd -0x28(%rbp), %xmm0
jbe 0xbcd5
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xbd55
vmovsd -0x28(%rbp), %xmm1
movq -0x18(%rbp), %rax
vmovsd 0x18(%rax), %xmm0
vucomisd %xmm1, %xmm0
jbe 0xbcf7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xbd55
jmp 0xbcf9
movq -0x18(%rbp), %rax
vmovsd 0x40(%rax), %xmm1
vmovsd -0x20(%rbp), %xmm0
vmovsd 0x38(%rax), %xmm2
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd 0x20(%rax), %xmm1
vmovsd %xmm1, -0x40(%rbp)
vmovsd 0x30(%rax), %xmm1
callq 0x6130
vmovaps %xmm0, %xmm1
vmovsd -0x40(%rbp), %xmm0
vmulsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
vcvttsd2usi -0x30(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_xzipfian
struct rgen *
rgen_new_xzipfian(const u64 min, const u64 max)
{
  struct rgen * gi = rgen_new_zipfian(min, max);
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->type = GEN_XZIPFIAN;
  gi->next_wait = gen_xzipfian;
  gi->next_nowait = gen_xzipfian;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xba00
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x14(%rax)
movq -0x18(%rbp), %rax
movl $0x9, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x23(%rip), %rcx        # 0xbde0
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x15(%rip), %rcx        # 0xbde0
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_unizipf
struct rgen *
rgen_new_unizipf(const u64 min, const u64 max, const u64 ufactor)
{
  const u64 nr = max - min + 1;
  if (ufactor == 1lu) { // covers both special gens
    return rgen_new_zipfian(min, max);
  } else if ((ufactor == 0) || ((nr / ufactor) <= 1lu)) {
    return rgen_new_uniform(min, max);
  }
  const u64 znr = nr / ufactor;
  struct rgen * gi = rgen_new_zipfian(0, znr - 1);
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->gen.unizipf.ufactor = ufactor;
  gi->gen.unizipf.min = min;
  gi->gen.unizipf.max = max;
  gi->next_wait = gen_unizipf;
  gi->next_nowait = gen_unizipf;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x1, -0x20(%rbp)
jne 0xbe81
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xba00
movq %rax, -0x8(%rbp)
jmp 0xbf4c
cmpq $0x0, -0x20(%rbp)
je 0xbe9a
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
cmpq $0x1, %rax
ja 0xbeb0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xbf60
movq %rax, -0x8(%rbp)
jmp 0xbf4c
jmp 0xbeb2
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
subq $0x1, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0xba00
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq -0x38(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x14(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x38(%rbp), %rax
leaq 0xde(%rip), %rcx        # 0xc010
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
leaq 0xd0(%rip), %rcx        # 0xc010
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%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_new_uniform
struct rgen *
rgen_new_uniform(const u64 min, const u64 max)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  gi->gen.uniform.min = min;
  gi->gen.uniform.max = max;
  gi->gen.uniform.interval = (double)(max - min);

  gi->type = GEN_UNIFORM;
  gi->next_wait = gen_uniform;
  gi->next_nowait = gen_uniform;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x14(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
subq -0x8(%rbp), %rax
vcvtusi2sd %rax, %xmm0, %xmm0
movq -0x18(%rbp), %rax
vmovsd %xmm0, 0x28(%rax)
movq -0x18(%rbp), %rax
movl $0xb, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x72(%rip), %rcx        # 0xc060
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x64(%rip), %rcx        # 0xc060
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_trace32
struct rgen *
rgen_new_trace32(const char * const filename)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->gen.trace32.fin = fopen(filename, "rb");
  if (gi->gen.trace32.fin == NULL) {
    free(gi);
    return NULL;
  }
  gi->gen.trace32.idx = 0;
  gi->gen.trace32.max = fread(gi->gen.trace32.buf, sizeof(u32), 32, gi->gen.trace32.fin);
  if (gi->gen.trace32.max == 0) {
    free(gi);
    return NULL;
  }
  posix_fadvise(fileno(gi->gen.trace32.fin), 0, 0, POSIX_FADV_SEQUENTIAL);
  gi->type = GEN_TRACE32;
  gi->next_wait = gen_trace32;
  gi->next_nowait = gen_trace32;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xf1e3(%rip), %rsi      # 0x1b2ad
callq 0x6450
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xc0fb
movq -0x18(%rbp), %rdi
callq 0x6060
movq $0x0, -0x8(%rbp)
jmp 0xc1a3
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movl $0x4, %esi
movl $0x20, %edx
callq 0x60f0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0xc153
movq -0x18(%rbp), %rdi
callq 0x6060
movq $0x0, -0x8(%rbp)
jmp 0xc1a3
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6350
movl %eax, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x2, %ecx
movq %rdx, %rsi
callq 0x6250
movq -0x18(%rbp), %rax
movl $0xc, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x27(%rip), %rcx        # 0xc1b0
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x19(%rip), %rcx        # 0xc1b0
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: gen_trace32
static u64
gen_trace32(struct rgen * const gi)
{
  if (gi->gen.trace32.idx >= gi->gen.trace32.max) {
    if (feof(gi->gen.trace32.fin)) rewind(gi->gen.trace32.fin);
    gi->gen.trace32.idx = 0;
    gi->gen.trace32.max = fread(gi->gen.trace32.buf, sizeof(u32), 32, gi->gen.trace32.fin);
  }
  const u64 r = gi->gen.trace32.buf[gi->gen.trace32.idx];
  gi->gen.trace32.idx++;
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jb 0xc227
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6310
cmpl $0x0, %eax
je 0xc1ed
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
addq $0x18, %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movl $0x4, %esi
movl $0x20, %edx
callq 0x60f0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
movl 0x30(%rax,%rcx,4), %eax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)