// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/lib1.c
// Function: rgen_helper
int
rgen_helper(const int argc, char ** const argv, struct rgen ** const gen_out)
{
  *gen_out = NULL;
  if ((argc < 1) || (strcmp("rgen", argv[0]) != 0)) {
    return -1;
  }
  if (0 == strcmp(argv[1], "unizipf")) {
    if (argc < 5) return -1;
    const u64 min = strtoull(argv[2], NULL, 10);
    const u64 max = strtoull(argv[3], NULL, 10);
    const u64 uf = strtoull(argv[4], NULL, 10);
    struct rgen * const gen = rgen_new_unizipf(min, max, uf);
    if (gen == NULL) return -1;
    *gen_out = gen;
    return 5;
  } else if (0 == strcmp(argv[1], "uniform")) {
    if (argc < 4) return -1;
    const u64 min = strtoull(argv[2], NULL, 10);
    const u64 max = strtoull(argv[3], NULL, 10);
    struct rgen * const gen = rgen_new_uniform(min, max);
    if (gen == NULL) return -1;
    *gen_out = gen;
    return 4;
  } else if (0 == strcmp(argv[1], "zipfian")) {
    if (argc < 4) return -1;
    const u64 min = strtoull(argv[2], NULL, 10);
    const u64 max = strtoull(argv[3], NULL, 10);
    struct rgen * const gen = rgen_new_zipfian(min, max);
    if (gen == NULL) return -1;
    *gen_out = gen;
    return 4;
  } else if (0 == strcmp(argv[1], "counter")) {
    if (argc < 4) return -1;
    const u64 min = strtoull(argv[2], NULL, 10);
    const u64 max = strtoull(argv[3], NULL, 10);
    struct rgen * const gen = rgen_new_counter(min, max);
    if (gen == NULL) return -1;
    *gen_out = gen;
    return 4;
  } else if (0 == strcmp(argv[1], "reducer")) {
    if (argc < 4) return -1;
    const u64 min = strtoull(argv[2], NULL, 10);
    const u64 max = strtoull(argv[3], NULL, 10);
    struct rgen * const gen = rgen_new_reducer(min, max);
    if (gen == NULL) return -1;
    *gen_out = gen;
    return 4;
  } else if (0 == strcmp(argv[1], "skipinc")) {
    if (argc < 5) return -1;
    const u64 min = strtoull(argv[2], NULL, 10);
    const u64 max = strtoull(argv[3], NULL, 10);
    const u64 inc = strtoull(argv[4], NULL, 10);
    struct rgen * const gen = rgen_new_skipinc(min, max, inc);
    if (gen == NULL) return -1;
    *gen_out = gen;
    return 5;
  } else if (0 == strcmp(argv[1], "trace32")) {
    if (argc < 3) return -1;
    struct rgen * const gen = rgen_new_trace32(argv[2]);
    if (gen == NULL) return -1;
    *gen_out = gen;
    return 3;
  }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, (%rdx)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %edi, %edi
jle 0xa821
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %r12d
movq (%rsi), %rsi
leaq 0x9bb8(%rip), %rdi      # 0x143d0
callq 0x62f0
testl %eax, %eax
je 0xa833
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r15), %r13
leaq 0x9b97(%rip), %rsi      # 0x143d5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xa8ff
leaq 0x9b88(%rip), %rsi      # 0x143dd
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xa961
leaq 0x9b79(%rip), %rsi      # 0x143e5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xa9db
leaq 0x9b6a(%rip), %rsi      # 0x143ed
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xaa15
leaq 0x9b5b(%rip), %rsi      # 0x143f5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xaa4f
leaq 0x9b4c(%rip), %rsi      # 0x143fd
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xaa9e
leaq 0x9b3d(%rip), %rsi      # 0x14405
movq %r13, %rdi
callq 0x62f0
cmpl $0x3, %r12d
jb 0xa821
testl %eax, %eax
jne 0xa821
movq 0x10(%r15), %rdi
callq 0xa660
testq %rax, %rax
je 0xa821
movl $0x3, %r14d
jmp 0xaa96
cmpl $0x5, %r12d
jb 0xa821
movq 0x10(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r12
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r13
movq 0x20(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xa407
testq %rax, %rax
je 0xa821
movl $0x5, %r14d
jmp 0xaa96
cmpl $0x4, %r12d
jb 0xa821
movq 0x10(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r14
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r15
movl $0x1, %edi
movl $0x220, %esi            # imm = 0x220
callq 0x62d0
movq %r15, %rcx
shrq $0x20, %rcx
setne 0x14(%rax)
movq %r14, 0x18(%rax)
movq %r15, 0x20(%rax)
subq %r14, %r15
vcvtusi2sd %r15, %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rax)
movl $0xb, 0x10(%rax)
leaq -0x402(%rip), %rcx      # 0xa5cd
movq %rcx, (%rax)
movq %rcx, 0x8(%rax)
jmp 0xaa90
cmpl $0x4, %r12d
jb 0xa821
movq 0x10(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r12
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %r12, %rdi
movq %rax, %rsi
callq 0xa032
jmp 0xaa87
cmpl $0x4, %r12d
jb 0xa821
movq 0x10(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r12
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %r12, %rdi
movq %rax, %rsi
callq 0x9d6a
jmp 0xaa87
cmpl $0x4, %r12d
jb 0xa821
movq 0x10(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r12
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %r12, %rdi
movq %rax, %rsi
callq 0x9f4b
testq %rax, %rax
je 0xa821
movl $0x4, %r14d
movq %rax, (%rbx)
jmp 0xa821
cmpl $0x5, %r12d
jb 0xa821
movq 0x10(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r12
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %rax, %r13
movq 0x20(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x62c0
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x9e48
jmp 0xa94d