// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, (%rdx)
pushq $-0x1
popq %rbx
testl %edi, %edi
jle 0x9c03
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
movq (%rsi), %rsi
leaq 0x87d6(%rip), %rdi      # 0x123d0
callq 0x62f0
testl %eax, %eax
je 0x9c14
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r15), %r13
leaq 0x87b6(%rip), %rsi      # 0x123d5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0x9cdc
leaq 0x87a7(%rip), %rsi      # 0x123dd
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0x9d38
leaq 0x8798(%rip), %rsi      # 0x123e5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0x9d75
leaq 0x8789(%rip), %rsi      # 0x123ed
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0x9daf
leaq 0x877a(%rip), %rsi      # 0x123f5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0x9de9
leaq 0x876b(%rip), %rsi      # 0x123fd
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0x9e35
leaq 0x875c(%rip), %rsi      # 0x12405
movq %r13, %rdi
callq 0x62f0
cmpl $0x3, %r12d
jb 0x9c03
testl %eax, %eax
jne 0x9c03
movq 0x10(%r15), %rdi
callq 0x998c
testq %rax, %rax
je 0x9c03
pushq $0x3
jmp 0x9e2c
cmpl $0x5, %r12d
jb 0x9c03
movq 0x10(%r15), %rdi
pushq $0xa
popq %r12
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r13
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r12
movq 0x20(%r15), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x62c0
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x9840
testq %rax, %rax
je 0x9c03
pushq $0x5
jmp 0x9e2c
cmpl $0x4, %r12d
jb 0x9c03
movq 0x10(%r15), %rdi
pushq $0xa
popq %r12
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r13
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %r13, %rdi
movq %rax, %rsi
callq 0x98df
jmp 0x9e21
cmpl $0x4, %r12d
jb 0x9c03
movq 0x10(%r15), %rdi
pushq $0xa
popq %r12
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r13
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %r13, %rdi
movq %rax, %rsi
callq 0x9534
jmp 0x9e21
cmpl $0x4, %r12d
jb 0x9c03
movq 0x10(%r15), %rdi
pushq $0xa
popq %r12
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r13
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %r13, %rdi
movq %rax, %rsi
callq 0x926e
jmp 0x9e21
cmpl $0x4, %r12d
jb 0x9c03
movq 0x10(%r15), %rdi
pushq $0xa
popq %r12
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r13
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %r13, %rdi
movq %rax, %rsi
callq 0x944c
testq %rax, %rax
je 0x9c03
pushq $0x4
popq %rbx
movq %rax, (%r14)
jmp 0x9c03
cmpl $0x5, %r12d
jb 0x9c03
movq 0x10(%r15), %rdi
pushq $0xa
popq %r12
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r13
movq 0x18(%r15), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x62c0
movq %rax, %r12
movq 0x20(%r15), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x62c0
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x934d
jmp 0x9d28