// File: /workspace/github_c_makefile_star2_O1/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 0xa929
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %r12d
movq (%rsi), %rsi
leaq 0xaaa0(%rip), %rdi      # 0x153c0
callq 0x62f0
testl %eax, %eax
je 0xa93b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r15), %r13
leaq 0xaa7f(%rip), %rsi      # 0x153c5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xaa07
leaq 0xaa70(%rip), %rsi      # 0x153cd
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xaa69
leaq 0xaa61(%rip), %rsi      # 0x153d5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xaae3
leaq 0xaa52(%rip), %rsi      # 0x153dd
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xab1d
leaq 0xaa43(%rip), %rsi      # 0x153e5
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xab57
leaq 0xaa34(%rip), %rsi      # 0x153ed
movq %r13, %rdi
callq 0x62f0
testl %eax, %eax
je 0xaba6
leaq 0xaa25(%rip), %rsi      # 0x153f5
movq %r13, %rdi
callq 0x62f0
cmpl $0x3, %r12d
jl 0xa929
testl %eax, %eax
jne 0xa929
movq 0x10(%r15), %rdi
callq 0xa760
testq %rax, %rax
je 0xa929
movl $0x3, %r14d
jmp 0xab9e
cmpl $0x5, %r12d
jl 0xa929
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 0xa50d
testq %rax, %rax
je 0xa929
movl $0x5, %r14d
jmp 0xab9e
cmpl $0x4, %r12d
jl 0xa929
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 -0x40a(%rip), %rcx      # 0xa6cd
movq %rcx, (%rax)
movq %rcx, 0x8(%rax)
jmp 0xab98
cmpl $0x4, %r12d
jl 0xa929
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 0xa0e7
jmp 0xab8f
cmpl $0x4, %r12d
jl 0xa929
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 0x9e07
jmp 0xab8f
cmpl $0x4, %r12d
jl 0xa929
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 0x9ff8
testq %rax, %rax
je 0xa929
movl $0x4, %r14d
movq %rax, (%rbx)
jmp 0xa929
cmpl $0x5, %r12d
jl 0xa929
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 0x9eed
jmp 0xaa55