// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r12
movq %rdi, %r14
movl $0x1, %r13d
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62d0
movq %rax, %r15
movq %r12, %rax
shrq $0x20, %rax
setne 0x14(%r15)
movq %r12, -0x40(%rbp)
subq %r14, %r12
incq %r12
movq %r12, 0x18(%r15)
vcvtusi2sd %r12, %xmm0, %xmm0
vmovsd %xmm0, -0x50(%rbp)
vmovsd %xmm0, 0x38(%r15)
movq %r14, 0x20(%r15)
leaq 0x1(%r14), %rax
movq %rax, 0x28(%r15)
movabsq $0x3fefae147ae147ae, %rax # imm = 0x3FEFAE147AE147AE
movq %rax, 0x60(%r15)
movabsq $0x3ff80e3eb6202786, %rax # imm = 0x3FF80E3EB6202786
movq %rax, 0x30(%r15)
vxorpd %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x30(%rbp)
vcvtsi2sd %r13, %xmm2, %xmm0
vmovsd 0xaf16(%rip), %xmm1     # 0x15098
callq 0x6130
vmovsd 0xaee9(%rip), %xmm1     # 0x15078
vdivsd %xmm0, %xmm1, %xmm0
vmovsd -0x30(%rbp), %xmm1
vaddsd %xmm0, %xmm1, %xmm1
vmovsd %xmm1, -0x30(%rbp)
vmovsd -0x30(%rbp), %xmm0
incq %r13
cmpq $0x3, %r13
jne 0xa170
movabsq $0x4058fffffffffffa, %rax # imm = 0x4058FFFFFFFFFFFA
movq %rax, 0x48(%r15)
movq %r12, %rax
shrq $0x28, %rax
cmpq $0x10, %rax
movl $0x10, %r13d
cmovbq %rax, %r13
leaq 0xba57(%rip), %rax      # 0x15c30
vmovsd (%rax,%r13,8), %xmm0
vmovsd %xmm0, -0x48(%rbp)
shlq $0x28, %r13
movq %r12, %rbx
subq %r13, %rbx
cmpq $0xffff, %rbx           # imm = 0xFFFF
ja 0xa25b
vxorpd %xmm0, %xmm0, %xmm0
cmpq %r13, %r12
movq -0x40(%rbp), %rbx
je 0xa2c4
orq $0x1, %r13
movq %r14, %r12
subq %rbx, %r12
vmovsd %xmm0, -0x38(%rbp)
vcvtusi2sd %r13, %xmm2, %xmm0
vmovsd 0xae73(%rip), %xmm1     # 0x15098
callq 0x6130
vmovsd 0xae46(%rip), %xmm1     # 0x15078
vdivsd %xmm0, %xmm1, %xmm0
vmovsd -0x38(%rbp), %xmm1
vaddsd %xmm0, %xmm1, %xmm1
vmovsd %xmm1, -0x38(%rbp)
vmovsd -0x38(%rbp), %xmm0
leaq (%r12,%r13), %rax
incq %rax
incq %r13
cmpq $0x2, %rax
jne 0xa212
jmp 0xa2c4
callq 0x7bee
movq %rax, %r12
testq %rax, %rax
je 0xa35d
xorl %eax, %eax
leaq -0xd0(%rbp), %rdi
movq %rax, -0x30(%rdi)
movq %r12, -0x28(%rdi)
movq %r13, -0x20(%rdi)
movq %rbx, -0x18(%rdi)
movabsq $0x3fefae147ae147ae, %rcx # imm = 0x3FEFAE147AE147AE
movq %rcx, -0x10(%rdi)
movq %rax, -0x8(%rdi)
movl $0x1, %esi
callq 0x62e0
leaq 0x9480(%rip), %rsi      # 0x13728
leaq -0x100(%rbp), %r13
movq %r12, %rdi
movq %r13, %rdx
callq 0x80fb
vmovsd 0x28(%r13), %xmm0
movq -0x40(%rbp), %rbx
vaddsd -0x48(%rbp), %xmm0, %xmm1
vmovsd %xmm1, -0x38(%rbp)
vxorpd %xmm0, %xmm0, %xmm0
vaddsd -0x30(%rbp), %xmm0, %xmm0
vmovsd %xmm0, -0x30(%rbp)
vmovsd %xmm1, 0x40(%r15)
vmovsd 0xadb6(%rip), %xmm0     # 0x150a0
vdivsd -0x50(%rbp), %xmm0, %xmm0
vmovsd 0xadb1(%rip), %xmm1     # 0x150a8
callq 0x6130
vmovsd 0xad74(%rip), %xmm2     # 0x15078
vsubsd %xmm0, %xmm2, %xmm0
vmovsd -0x30(%rbp), %xmm1
vdivsd -0x38(%rbp), %xmm1, %xmm1
vsubsd %xmm1, %xmm2, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x58(%r15)
vsubsd %xmm0, %xmm2, %xmm0
vmovsd %xmm0, 0x50(%r15)
movq %r14, 0x68(%r15)
movq %rbx, 0x70(%r15)
movl $0x8, 0x10(%r15)
leaq 0x26(%rip), %rax        # 0xa367
movq %rax, (%r15)
movq %rax, 0x8(%r15)
movq %r15, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x66ef
jmp 0xa26c