// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: rgen_new_zipfian
struct rgen *
rgen_new_zipfian(const u64 min, const u64 max)
{
  struct rgen * const gi = (typeof(gi))calloc(1, sizeof(*gi));
  gi->unit_u64 = max > UINT32_MAX ? true : false;
  struct rgen_zipfian * const gz = &(gi->gen.zipfian);

  const u64 items = max - min + 1;
  gz->nr_items = items;
  gz->nr_items_d = (double)items;
  gz->base = min;
  gz->base1 = min + 1lu;
  gz->theta = ZIPFIAN_CONSTANT;
  gz->quick1 = 1.0 + pow(0.5, gz->theta);
  const double zeta2theta = zeta(2, ZIPFIAN_CONSTANT);
  gz->alpha = 1.0 / (1.0 - ZIPFIAN_CONSTANT);
  const double zetan = zeta(items, ZIPFIAN_CONSTANT);
  gz->zetan = zetan;
  gz->eta = (1.0 - pow(2.0 / (double)items, 1.0 - ZIPFIAN_CONSTANT)) / (1.0 - (zeta2theta / zetan));
  gz->quick2 = 1.0 - gz->eta;
  gz->min = min;
  gz->max = max;

  gi->type = GEN_ZIPFIAN;
  gi->next_wait = gen_zipfian;
  gi->next_nowait = gen_zipfian;
  return gi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
subq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
vcvtusi2sdq -0x28(%rbp), %xmm0, %xmm0
movq -0x20(%rbp), %rax
vmovsd %xmm0, 0x20(%rax)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
addq $0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
vmovsd 0xf638(%rip), %xmm0     # 0x1b0e0
vmovsd %xmm0, 0x48(%rax)
movq -0x20(%rbp), %rax
vmovsd 0x48(%rax), %xmm1
vmovsd 0xf632(%rip), %xmm0     # 0x1b0f0
callq 0x6130
vmovaps %xmm0, %xmm1
vmovsd 0xf5f1(%rip), %xmm0     # 0x1b0c0
vaddsd %xmm1, %xmm0, %xmm0
movq -0x20(%rbp), %rax
vmovsd %xmm0, 0x18(%rax)
movl $0x2, %edi
vmovsd 0xf5f7(%rip), %xmm0     # 0x1b0e0
callq 0xbbe0
vmovsd %xmm0, -0x30(%rbp)
movq -0x20(%rbp), %rax
vmovsd 0xf5e9(%rip), %xmm0     # 0x1b0e8
vmovsd %xmm0, 0x30(%rax)
movq -0x28(%rbp), %rdi
vmovsd 0xf5d0(%rip), %xmm0     # 0x1b0e0
callq 0xbbe0
vmovsd %xmm0, -0x38(%rbp)
vmovsd -0x38(%rbp), %xmm0
movq -0x20(%rbp), %rax
vmovsd %xmm0, 0x28(%rax)
vcvtusi2sdq -0x28(%rbp), %xmm0, %xmm1
vmovsd 0xf571(%rip), %xmm0     # 0x1b0a8
vdivsd %xmm1, %xmm0, %xmm0
vmovsd 0xf595(%rip), %xmm1     # 0x1b0d8
callq 0x6130
vmovaps %xmm0, %xmm1
vmovsd 0xf56c(%rip), %xmm0     # 0x1b0c0
vsubsd %xmm1, %xmm0, %xmm0
vmovsd -0x30(%rbp), %xmm1
vdivsd -0x38(%rbp), %xmm1, %xmm2
vmovsd 0xf556(%rip), %xmm1     # 0x1b0c0
vsubsd %xmm2, %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
movq -0x20(%rbp), %rax
vmovsd %xmm0, 0x40(%rax)
movq -0x20(%rbp), %rax
vmovsd 0xf539(%rip), %xmm0     # 0x1b0c0
vsubsd 0x40(%rax), %xmm0, %xmm0
movq -0x20(%rbp), %rax
vmovsd %xmm0, 0x38(%rax)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rax
movl $0x8, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0xbd(%rip), %rcx        # 0xbc80
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0xaf(%rip), %rcx        # 0xbc80
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop