#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int atoi(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int getopt(int, char **, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ optarg;
int /*<<< orphan*/ print_usage();
int /*<<< orphan*/ printf(char *, ...);
size_t rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
size_t strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int passwdSize = 24;
  int i, j;
  int min = -1, max = -1;
  int option = 0;
  int numberOfPassword = 1;
  char *password;
  char array[] = ",?;.:/!&(-_@)*#[]=+<>";
  srand(time(0));
  while ((option = getopt(argc, argv, "s:n:a:p:")) != -1) {
    switch (option) {
    case 's':
      passwdSize = atoi(optarg);
      break;
    case 'n':
      numberOfPassword = atoi(optarg);
      break;
    case 'p':
      min = atoi(optarg);
      break;
    case 'a':
      max = atoi(optarg);
      break;
    case '?':
      print_usage();
      exit(EXIT_FAILURE);
    }
  }
  if (passwdSize <= 0) {
    passwdSize = 24;
  } else {
    if (passwdSize > 1024) {
      passwdSize = 1024;
    }
  }
  for (j = 0; j < numberOfPassword; ++j) {
    if (min != -1) {
      if (max != -1 && min < max) {
        passwdSize = rand() % (max - min);
        passwdSize += min;
      } else {
        passwdSize = rand() % (128 - min);
        passwdSize += min;
      }
    } else {
      if (max != -1) {
        passwdSize = rand() % (max - 24);
        passwdSize += 24;
      }
    }
    password = (char *)malloc(passwdSize * sizeof(char));
    for (i = 0; i < passwdSize; ++i) {
      char *v = password + i;
      switch (rand() & 3) {
      case 0:
        *v = 'A' + (rand() % 26);
        break;
      case 1:
        *v = 'a' + (rand() % 26);
        break;
      case 2:
        *v = '0' + (rand() % 10);
        break;
      case 3:
        *v = array[rand() % strlen(array)];
      }
    }
    for (i = 0; i < passwdSize; i++) {
      printf("%c", password[i]);
    }
    printf("\n");
    free(password);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x18,-0x14(%rbp)
movl   $0xffffffff,-0x20(%rbp)
movl   $0xffffffff,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    0xe20(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe1d(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe1b(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    0xe15(%rip),%ax
mov    %ax,-0x3c(%rbp)
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdf7(%rip),%rdx
call   1090 <getopt@plt>
mov    %eax,-0x28(%rbp)
cmp    $0xffffffff,%eax
je     130a <main+0x15a>
mov    -0x28(%rbp),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x3f,%eax
je     12f0 <main+0x140>
jmp    1254 <main+0xa4>
mov    -0x5c(%rbp),%eax
sub    $0x61,%eax
je     12da <main+0x12a>
jmp    1265 <main+0xb5>
mov    -0x5c(%rbp),%eax
sub    $0x6e,%eax
je     12ae <main+0xfe>
jmp    1276 <main+0xc6>
mov    -0x5c(%rbp),%eax
sub    $0x70,%eax
je     12c4 <main+0x114>
jmp    1287 <main+0xd7>
mov    -0x5c(%rbp),%eax
sub    $0x73,%eax
jne    1305 <main+0x155>
jmp    1298 <main+0xe8>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
call   10a0 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1305 <main+0x155>
mov    0x2d43(%rip),%rax
mov    (%rax),%edi
call   10a0 <atoi@plt>
mov    %eax,-0x2c(%rbp)
jmp    1305 <main+0x155>
mov    0x2d2d(%rip),%rax
mov    (%rax),%edi
call   10a0 <atoi@plt>
mov    %eax,-0x20(%rbp)
jmp    1305 <main+0x155>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
call   10a0 <atoi@plt>
mov    %eax,-0x24(%rbp)
jmp    1305 <main+0x155>
mov    $0x0,%al
call   10c0 <print_usage@plt>
mov    0x2cda(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
jmp    1221 <main+0x71>
cmpl   $0x0,-0x14(%rbp)
jg     1320 <main+0x170>
movl   $0x18,-0x14(%rbp)
jmp    1339 <main+0x189>
cmpl   $0x400,-0x14(%rbp)
jle    1334 <main+0x184>
movl   $0x400,-0x14(%rbp)
jmp    1339 <main+0x189>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1554 <main+0x3a4>
cmpl   $0xffffffff,-0x20(%rbp)
je     13be <main+0x20e>
cmpl   $0xffffffff,-0x24(%rbp)
je     1394 <main+0x1e4>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1394 <main+0x1e4>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    -0x24(%rbp),%ecx
sub    -0x20(%rbp),%ecx
movslq %ecx,%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    13b9 <main+0x209>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    $0x80,%ecx
sub    -0x20(%rbp),%ecx
movslq %ecx,%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    13f0 <main+0x240>
cmpl   $0xffffffff,-0x24(%rbp)
je     13eb <main+0x23b>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    -0x24(%rbp),%ecx
sub    $0x18,%ecx
movslq %ecx,%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x18,%eax
mov    %eax,-0x14(%rbp)
jmp    13f0 <main+0x240>
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14f4 <main+0x344>
mov    -0x38(%rbp),%rax
movslq -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
xor    %eax,%eax
call   10d0 <rand@plt>
and    $0x3,%eax
mov    %rax,-0x68(%rbp)
sub    $0x3,%rax
ja     14e1 <main+0x331>
mov    -0x68(%rbp),%rax
lea    0xbb8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   10d0 <rand@plt>
mov    $0x1a,%ecx
xor    %edx,%edx
div    %rcx
add    $0x41,%rdx
mov    %dl,%cl
mov    -0x58(%rbp),%rax
mov    %cl,(%rax)
jmp    14e1 <main+0x331>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    $0x1a,%ecx
xor    %edx,%edx
div    %rcx
add    $0x61,%rdx
mov    %dl,%cl
mov    -0x58(%rbp),%rax
mov    %cl,(%rax)
jmp    14e1 <main+0x331>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
add    $0x30,%rdx
mov    %dl,%cl
mov    -0x58(%rbp),%rax
mov    %cl,(%rax)
jmp    14e1 <main+0x331>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    %rax,-0x70(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x70(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    -0x50(%rbp,%rdx,1),%cl
mov    -0x58(%rbp),%rax
mov    %cl,(%rax)
jmp    14e6 <main+0x336>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    140a <main+0x25a>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    152f <main+0x37f>
mov    -0x38(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xb15(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    14fb <main+0x34b>
lea    0xafc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1340 <main+0x190>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x18,%r13d
movl   $0x1,0x14(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
lea    0xe98(%rip),%r14
lea    0xe1b(%rip),%r15
mov    0x2e0c(%rip),%r12
mov    $0xffffffff,%eax
jmp    1209 <main+0x69>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12),%edi
call   1090 <atoi@plt>
mov    %rax,0x18(%rsp)
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1080 <getopt@plt>
lea    -0x61(%rax),%ecx
cmp    $0x12,%ecx
ja     1240 <main+0xa0>
movslq (%r15,%rcx,4),%rax
add    %r15,%rax
jmp    *%rax
mov    (%r12),%edi
call   1090 <atoi@plt>
mov    %eax,0x14(%rsp)
jmp    1210 <main+0x70>
nopl   (%rax)
cmp    $0xffffffff,%eax
je     126c <main+0xcc>
cmp    $0x3f,%eax
jne    1210 <main+0x70>
jmp    1519 <main+0x379>
mov    (%r12),%edi
call   1090 <atoi@plt>
mov    %eax,0x10(%rsp)
jmp    1210 <main+0x70>
mov    (%r12),%edi
call   1090 <atoi@plt>
mov    %eax,%r13d
jmp    1210 <main+0x70>
cmpl   $0x0,0x14(%rsp)
jle    1508 <main+0x368>
cmp    $0x400,%r13d
mov    $0x400,%eax
cmovl  %r13d,%eax
test   %r13d,%r13d
mov    $0x18,%r15d
cmovg  %eax,%r15d
mov    0x18(%rsp),%rdx
cmp    $0xffffffff,%edx
setne  %al
mov    %edx,%esi
mov    0x10(%rsp),%ecx
sub    %ecx,%esi
setg   %bl
and    %al,%bl
mov    %bl,0xf(%rsp)
mov    $0x80,%eax
sub    %ecx,%eax
mov    %eax,0x30(%rsp)
cltq
mov    %rax,0x38(%rsp)
mov    %esi,0x34(%rsp)
movslq %esi,%r13
lea    -0x18(%rdx),%eax
mov    %eax,0x2c(%rsp)
movslq %eax,%rbx
lea    0xd72(%rip),%r14
xor    %r12d,%r12d
mov    %rbx,0x40(%rsp)
jmp    131b <main+0x17b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
add    $0x1,%r12d
cmp    0x14(%rsp),%r12d
mov    0x40(%rsp),%rbx
mov    0x20(%rsp),%r15
je     1508 <main+0x368>
cmpl   $0xffffffff,0x10(%rsp)
je     1350 <main+0x1b0>
xor    %eax,%eax
call   10c0 <rand@plt>
cmpb   $0x0,0xf(%rsp)
je     1380 <main+0x1e0>
mov    %rax,%rcx
or     %r13,%rcx
shr    $0x20,%rcx
je     13a0 <main+0x200>
xor    %edx,%edx
div    %r13
jmp    1396 <main+0x1f6>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpl   $0xffffffff,0x18(%rsp)
je     13c5 <main+0x225>
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     13b8 <main+0x218>
xor    %edx,%edx
div    %rbx
mov    %rdx,%r15
jmp    13c1 <main+0x221>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rcx
mov    0x38(%rsp),%rsi
or     %rsi,%rcx
shr    $0x20,%rcx
je     13a8 <main+0x208>
xor    %edx,%edx
div    %rsi
mov    %rdx,%r15
add    0x10(%rsp),%r15d
jmp    13c5 <main+0x225>
xor    %edx,%edx
divl   0x34(%rsp)
jmp    13ae <main+0x20e>
xor    %edx,%edx
divl   0x30(%rsp)
mov    %edx,%r15d
add    0x10(%rsp),%r15d
jmp    13c5 <main+0x225>
xor    %edx,%edx
divl   0x2c(%rsp)
mov    %edx,%r15d
add    $0x18,%r15d
mov    %r15d,%edi
call   1070 <malloc@plt>
mov    %rax,%rbp
mov    %r15,0x20(%rsp)
test   %r15d,%r15d
jle    12f0 <main+0x150>
mov    %r13,%rbx
mov    0x20(%rsp),%r15d
xor    %r13d,%r13d
jmp    143f <main+0x29f>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %rax,%rcx
movabs $0x8618618618618619,%rdx
61 18 86
mul    %rdx
mov    %rcx,%rax
sub    %rdx,%rax
shr    %rax
add    %rdx,%rax
shr    $0x4,%rax
lea    (%rax,%rax,4),%rdx
lea    (%rax,%rdx,4),%rax
sub    %rax,%rcx
lea    0xc37(%rip),%rax
movzbl (%rax,%rcx,1),%ecx
mov    %cl,0x0(%rbp,%r13,1)
add    $0x1,%r13
cmp    %r13,%r15
je     14e0 <main+0x340>
xor    %eax,%eax
call   10c0 <rand@plt>
and    $0x3,%eax
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %rax,%rcx
movabs $0x4ec4ec4ec4ec4ec5,%rdx
ec c4 4e
mul    %rdx
shr    $0x3,%edx
lea    (%rdx,%rdx,4),%eax
lea    (%rax,%rax,4),%eax
add    %edx,%eax
sub    %eax,%ecx
add    $0x41,%cl
jmp    142d <main+0x28d>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %rax,%rcx
movabs $0x4ec4ec4ec4ec4ec5,%rdx
ec c4 4e
mul    %rdx
shr    $0x3,%edx
lea    (%rdx,%rdx,4),%eax
lea    (%rax,%rax,4),%eax
add    %edx,%eax
sub    %eax,%ecx
add    $0x61,%cl
jmp    142d <main+0x28d>
nopl   0x0(%rax)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %rax,%rcx
movabs $0xcccccccccccccccd,%rdx
cc cc cc
mul    %rdx
shr    $0x2,%edx
and    $0xfffffffe,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%ecx
or     $0x30,%cl
jmp    142d <main+0x28d>
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0x20(%rsp)
mov    %rbx,%r13
jle    12f0 <main+0x150>
xor    %ebx,%ebx
movsbl 0x0(%rbp,%rbx,1),%edi
call   1040 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    14f0 <main+0x350>
jmp    12f0 <main+0x150>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   10b0 <print_usage@plt>
mov    0x2ab1(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@__const.main.array = [22 x i8] c",?;.:/!&(-_@)*#[]=+<>\00"
@.str = [9 x i8] c"s:n:a:p:\00"
@optarg = global i32 0
@EXIT_FAILURE = global i32 0
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca [22 x i8]
%15 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 24, i32* %6
store i32 -1, i32* %9
store i32 -1, i32* %10
store i32 0, i32* %11
store i32 1, i32* %12
%16 = bitcast [22 x i8]* %14 to i8*
%17 = call i32 @time(i32 0)
%18 = call i32 @srand(i32 %17)
br label %19
19: ; preds = %42, %2
%20 = load i32, i32* %4
%21 = load i8**, i8*** %5
%22 = call i32 @getopt(i32 %20, i8** %21, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %22, i32* %11
%23 = icmp ne i32 %22, -1
br i1 %23, label %24, label %43
24: ; preds = %19
%25 = load i32, i32* %11
switch i32 %25, label %42 [
i32 115, label %26
i32 110, label %29
i32 112, label %32
i32 97, label %35
i32 63, label %38
]
26: ; preds = %24
%27 = load i32, i32* @optarg
%28 = call i32 @atoi(i32 %27)
store i32 %28, i32* %6
br label %42
29: ; preds = %24
%30 = load i32, i32* @optarg
%31 = call i32 @atoi(i32 %30)
store i32 %31, i32* %12
br label %42
32: ; preds = %24
%33 = load i32, i32* @optarg
%34 = call i32 @atoi(i32 %33)
store i32 %34, i32* %9
br label %42
35: ; preds = %24
%36 = load i32, i32* @optarg
%37 = call i32 @atoi(i32 %36)
store i32 %37, i32* %10
br label %42
38: ; preds = %24
%39 = call i32 (...) @print_usage()
%40 = load i32, i32* @EXIT_FAILURE
%41 = call i32 @exit(i32 %40)
unreachable
42: ; preds = %24, %35, %32, %29, %26
br label %19
43: ; preds = %19
%44 = load i32, i32* %6
%45 = icmp sle i32 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %43
store i32 24, i32* %6
br label %52
47: ; preds = %43
%48 = load i32, i32* %6
%49 = icmp sgt i32 %48, 1024
br i1 %49, label %50, label %51
50: ; preds = %47
store i32 1024, i32* %6
br label %51
51: ; preds = %50, %47
br label %52
52: ; preds = %51, %46
store i32 0, i32* %8
br label %53
53: ; preds = %170, %52
%54 = load i32, i32* %8
%55 = load i32, i32* %12
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %173
57: ; preds = %53
%58 = load i32, i32* %9
%59 = icmp ne i32 %58, -1
br i1 %59, label %60, label %89
60: ; preds = %57
%61 = load i32, i32* %10
%62 = icmp ne i32 %61, -1
br i1 %62, label %63, label %78
63: ; preds = %60
%64 = load i32, i32* %9
%65 = load i32, i32* %10
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %78
67: ; preds = %63
%68 = call i64 (...) @rand()
%69 = load i32, i32* %10
%70 = load i32, i32* %9
%71 = sub nsw i32 %69, %70
%72 = sext i32 %71 to i64
%73 = urem i64 %68, %72
%74 = trunc i64 %73 to i32
store i32 %74, i32* %6
%75 = load i32, i32* %9
%76 = load i32, i32* %6
%77 = add nsw i32 %76, %75
store i32 %77, i32* %6
br label %88
78: ; preds = %63, %60
%79 = call i64 (...) @rand()
%80 = load i32, i32* %9
%81 = sub nsw i32 128, %80
%82 = sext i32 %81 to i64
%83 = urem i64 %79, %82
%84 = trunc i64 %83 to i32
store i32 %84, i32* %6
%85 = load i32, i32* %9
%86 = load i32, i32* %6
%87 = add nsw i32 %86, %85
store i32 %87, i32* %6
br label %88
88: ; preds = %78, %67
br label %102
89: ; preds = %57
%90 = load i32, i32* %10
%91 = icmp ne i32 %90, -1
br i1 %91, label %92, label %101
92: ; preds = %89
%93 = call i64 (...) @rand()
%94 = load i32, i32* %10
%95 = sub nsw i32 %94, 24
%96 = sext i32 %95 to i64
%97 = urem i64 %93, %96
%98 = trunc i64 %97 to i32
store i32 %98, i32* %6
%99 = load i32, i32* %6
%100 = add nsw i32 %99, 24
store i32 %100, i32* %6
br label %101
101: ; preds = %92, %89
br label %102
102: ; preds = %101, %88
%103 = load i32, i32* %6
%104 = sext i32 %103 to i64
%105 = mul i64 %104, 1
%106 = trunc i64 %105 to i32
%107 = call i64 @malloc(i32 %106)
%108 = inttoptr i64 %107 to i8*
store i8* %108, i8** %13
store i32 0, i32* %7
br label %109
109: ; preds = %147, %102
%110 = load i32, i32* %7
%111 = load i32, i32* %6
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %150
113: ; preds = %109
%114 = load i8*, i8** %13
%115 = load i32, i32* %7
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8, i8* %114, i64 %116
store i8* %117, i8** %15
%118 = call i64 (...) @rand()
%119 = and i64 %118, 3
switch i64 %119, label %146 [
i64 0, label %120
i64 1, label %126
i64 2, label %132
i64 3, label %138
]
120: ; preds = %113
%121 = call i64 (...) @rand()
%122 = urem i64 %121, 26
%123 = add i64 65, %122
%124 = trunc i64 %123 to i8
%125 = load i8*, i8** %15
store i8 %124, i8* %125
br label %146
126: ; preds = %113
%127 = call i64 (...) @rand()
%128 = urem i64 %127, 26
%129 = add i64 97, %128
%130 = trunc i64 %129 to i8
%131 = load i8*, i8** %15
store i8 %130, i8* %131
br label %146
132: ; preds = %113
%133 = call i64 (...) @rand()
%134 = urem i64 %133, 10
%135 = add i64 48, %134
%136 = trunc i64 %135 to i8
%137 = load i8*, i8** %15
store i8 %136, i8* %137
br label %146
138: ; preds = %113
%139 = call i64 (...) @rand()
%140 = getelementptr inbounds [22 x i8], [22 x i8]* %14, i64 0, i64 0
%141 = call i64 @strlen(i8* %140)
%142 = urem i64 %139, %141
%143 = getelementptr inbounds [22 x i8], [22 x i8]* %14, i64 0, i64 %142
%144 = load i8, i8* %143
%145 = load i8*, i8** %15
store i8 %144, i8* %145
br label %146
146: ; preds = %138, %113, %132, %126, %120
br label %147
147: ; preds = %146
%148 = load i32, i32* %7
%149 = add nsw i32 %148, 1
store i32 %149, i32* %7
br label %109
150: ; preds = %109
store i32 0, i32* %7
br label %151
151: ; preds = %163, %150
%152 = load i32, i32* %7
%153 = load i32, i32* %6
%154 = icmp slt i32 %152, %153
br i1 %154, label %155, label %166
155: ; preds = %151
%156 = load i8*, i8** %13
%157 = load i32, i32* %7
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds i8, i8* %156, i64 %158
%160 = load i8, i8* %159
%161 = sext i8 %160 to i32
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %161)
br label %163
163: ; preds = %155
%164 = load i32, i32* %7
%165 = add nsw i32 %164, 1
store i32 %165, i32* %7
br label %151
166: ; preds = %151
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%168 = load i8*, i8** %13
%169 = call i32 @free(i8* %168)
br label %170
170: ; preds = %166
%171 = load i32, i32* %8
%172 = add nsw i32 %171, 1
store i32 %172, i32* %8
br label %53
173: ; preds = %53
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [22 x i8] c",?;.:/!&(-_@)*#[]=+<>\00"
@.str = [9 x i8] c"s:n:a:p:\00"
@optarg = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @time(i32 0)
%4 = tail call i32 @srand(i32 %3)
br label %5
5: ; preds = %27, %2
%6 = phi i32 [ %29, %27 ], [ -1, %2 ]
%7 = phi i32 [ %11, %27 ], [ -1, %2 ]
%8 = phi i32 [ %15, %27 ], [ 1, %2 ]
%9 = phi i32 [ %18, %27 ], [ 24, %2 ]
br label %10
10: ; preds = %5, %30
%11 = phi i32 [ %7, %5 ], [ %32, %30 ]
%12 = phi i32 [ %8, %5 ], [ %15, %30 ]
%13 = phi i32 [ %9, %5 ], [ %18, %30 ]
br label %14
14: ; preds = %10, %24
%15 = phi i32 [ %12, %10 ], [ %26, %24 ]
%16 = phi i32 [ %13, %10 ], [ %18, %24 ]
br label %17
17: ; preds = %14, %21
%18 = phi i32 [ %16, %14 ], [ %23, %21 ]
br label %19
19: ; preds = %17, %19
%20 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
switch i32 %20, label %19 [
i32 -1, label %37
i32 115, label %21
i32 110, label %24
i32 112, label %27
i32 97, label %30
i32 63, label %33
]
21: ; preds = %19
%22 = load i32, i32* @optarg
%23 = tail call i32 @atoi(i32 %22)
br label %17
24: ; preds = %19
%25 = load i32, i32* @optarg
%26 = tail call i32 @atoi(i32 %25)
br label %14
27: ; preds = %19
%28 = load i32, i32* @optarg
%29 = tail call i32 @atoi(i32 %28)
br label %5
30: ; preds = %19
%31 = load i32, i32* @optarg
%32 = tail call i32 @atoi(i32 %31)
br label %10
33: ; preds = %19
%34 = tail call i32 (...) @print_usage()
%35 = load i32, i32* @EXIT_FAILURE
%36 = tail call i32 @exit(i32 %35)
unreachable
37: ; preds = %19
%38 = icmp sgt i32 %15, 0
br i1 %38, label %39, label %127
39: ; preds = %37
%40 = icmp slt i32 %18, 1
%41 = icmp slt i32 %18, 1024
%42 = select i1 %41, i32 %18, i32 1024
%43 = select i1 %40, i32 24, i32 %42
%44 = icmp eq i32 %6, -1
%45 = icmp ne i32 %11, -1
%46 = icmp sgt i32 %11, %6
%47 = select i1 %45, i1 %46, i1 false
%48 = sub nsw i32 128, %6
%49 = sext i32 %48 to i64
%50 = sub nsw i32 %11, %6
%51 = sext i32 %50 to i64
%52 = icmp eq i32 %11, -1
%53 = add nsw i32 %11, -24
%54 = sext i32 %53 to i64
br label %55
55: ; preds = %39, %122
%56 = phi i32 [ %43, %39 ], [ %75, %122 ]
%57 = phi i32 [ 0, %39 ], [ %125, %122 ]
br i1 %44, label %68, label %58
58: ; preds = %55
%59 = tail call i64 (...) @rand()
br i1 %47, label %60, label %64
60: ; preds = %58
%61 = urem i64 %59, %51
%62 = trunc i64 %61 to i32
%63 = add nsw i32 %6, %62
br label %74
64: ; preds = %58
%65 = urem i64 %59, %49
%66 = trunc i64 %65 to i32
%67 = add nsw i32 %6, %66
br label %74
68: ; preds = %55
br i1 %52, label %74, label %69
69: ; preds = %68
%70 = tail call i64 (...) @rand()
%71 = urem i64 %70, %54
%72 = trunc i64 %71 to i32
%73 = add nsw i32 %72, 24
br label %74
74: ; preds = %68, %69, %60, %64
%75 = phi i32 [ %63, %60 ], [ %67, %64 ], [ %73, %69 ], [ %56, %68 ]
%76 = tail call i64 @malloc(i32 %75)
%77 = inttoptr i64 %76 to i8*
%78 = icmp sgt i32 %75, 0
br i1 %78, label %79, label %122
79: ; preds = %74
%80 = zext i32 %75 to i64
br label %84
81: ; preds = %110
br i1 %78, label %82, label %122
82: ; preds = %81
%83 = zext i32 %75 to i64
br label %114
84: ; preds = %79, %110
%85 = phi i64 [ 0, %79 ], [ %112, %110 ]
%86 = getelementptr inbounds i8, i8* %77, i64 %85
%87 = tail call i64 (...) @rand()
%88 = and i64 %87, 3
switch i64 %88, label %109 [
i64 0, label %89
i64 1, label %94
i64 2, label %99
i64 3, label %104
]
89: ; preds = %84
%90 = tail call i64 (...) @rand()
%91 = urem i64 %90, 26
%92 = trunc i64 %91 to i8
%93 = add nuw nsw i8 %92, 65
br label %110
94: ; preds = %84
%95 = tail call i64 (...) @rand()
%96 = urem i64 %95, 26
%97 = trunc i64 %96 to i8
%98 = add nuw nsw i8 %97, 97
br label %110
99: ; preds = %84
%100 = tail call i64 (...) @rand()
%101 = urem i64 %100, 10
%102 = trunc i64 %101 to i8
%103 = or i8 %102, 48
br label %110
104: ; preds = %84
%105 = tail call i64 (...) @rand()
%106 = urem i64 %105, 21
%107 = getelementptr inbounds [22 x i8], [22 x i8]* @__const.main.array, i64 0, i64 %106
%108 = load i8, i8* %107
br label %110
109: ; preds = %84
unreachable
110: ; preds = %104, %99, %94, %89
%111 = phi i8 [ %108, %104 ], [ %103, %99 ], [ %98, %94 ], [ %93, %89 ]
store i8 %111, i8* %86
%112 = add nuw nsw i64 %85, 1
%113 = icmp eq i64 %112, %80
br i1 %113, label %81, label %84
114: ; preds = %82, %114
%115 = phi i64 [ 0, %82 ], [ %120, %114 ]
%116 = getelementptr inbounds i8, i8* %77, i64 %115
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = tail call i32 @putchar(i32 %118)
%120 = add nuw nsw i64 %115, 1
%121 = icmp eq i64 %120, %83
br i1 %121, label %122, label %114
122: ; preds = %114, %74, %81
%123 = tail call i32 @putchar(i32 10)
%124 = tail call i32 @free(i8* %77)
%125 = add nuw nsw i32 %57, 1
%126 = icmp eq i32 %125, %15
br i1 %126, label %127, label %55
127: ; preds = %122, %37
ret i32 0
}