#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 */
scalar_t__ ERANGE;
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
long LONG_MAX;
long LONG_MIN;
int /*<<< orphan*/ abort();
int atoi(int /*<<< orphan*/);
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt(int, char **, char *);
int /*<<< orphan*/ isprint(char);
int /*<<< orphan*/ optarg;
scalar_t__ opterr;
int optind;
char optopt;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printUsage(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(int);
int rand();
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ stderr;
long strtol(char *, char **, int);
scalar_t__ time(int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *cvalue = "80";
  int index;
  int getOptRetVal, base = 0;
  long length = 0;
  char *endptr;
  opterr = 0;
  while ((getOptRetVal = getopt(argc, argv, "ab:hv")) != -1)
    switch (getOptRetVal) {
    case 'a':
      break;
    case 'b':
      base = atoi(optarg);
      break;
    case 'v':
      printf("%s is at version %s\n", argv[0], "1.1.0");
      return 1;
    case 'h':
    case '?':
      if (optopt == 'b')
        fprintf(stderr, "Option -%c requires an argument.\n", optopt);
      else if (isprint(optopt))
        fprintf(stderr, "Unknown option `-%c'.\n", optopt);
      else
        fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt);
      printUsage(argv[0]);
      return 1;
    default:
      printUsage(argv[0]);
      abort();
    }
  if (++optind == argc) {
    cvalue = argv[argc - 1];
  }
  for (index = optind; index < argc; index++)
    printf("Non-option argument %s\n", argv[index]);
  errno = 0;
  length = strtol(cvalue, &endptr, base);
  if ((errno == ERANGE && (length == LONG_MAX || length == LONG_MIN)) ||
      (errno != 0 && length == 0)) {
    perror("strtol");
    exit(EXIT_FAILURE);
  }
  if (endptr == cvalue) {
    fprintf(stderr, "No digits were found\n");
    exit(EXIT_FAILURE);
  }
  srand((unsigned int)time(0));
  while (length--) {
    putchar(rand() % 94 + 33);
  }
  printf("\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe03(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
mov    0x2d81(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdd7(%rip),%rdx
call   10d0 <getopt@plt>
mov    %eax,-0x20(%rbp)
cmp    $0xffffffff,%eax
je     13a5 <main+0x1c5>
mov    -0x20(%rbp),%eax
mov    %eax,-0x3c(%rbp)
sub    $0x3f,%eax
je     12d8 <main+0xf8>
jmp    1251 <main+0x71>
mov    -0x3c(%rbp),%eax
sub    $0x61,%eax
je     1295 <main+0xb5>
jmp    1262 <main+0x82>
mov    -0x3c(%rbp),%eax
sub    $0x62,%eax
je     129a <main+0xba>
jmp    1273 <main+0x93>
mov    -0x3c(%rbp),%eax
sub    $0x68,%eax
je     12d8 <main+0xf8>
jmp    1284 <main+0xa4>
mov    -0x3c(%rbp),%eax
sub    $0x76,%eax
je     12b0 <main+0xd0>
jmp    138d <main+0x1ad>
jmp    13a0 <main+0x1c0>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x24(%rbp)
jmp    13a0 <main+0x1c0>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd4b(%rip),%rdi
lea    0xd59(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1544 <main+0x364>
mov    0x2cf9(%rip),%rax
movsbl (%rax),%eax
cmp    $0x62,%eax
jne    1311 <main+0x131>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
mov    0x2cdd(%rip),%rax
movsbl (%rax),%edx
lea    0xd1f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1375 <main+0x195>
mov    0x2cc0(%rip),%rax
movsbl (%rax),%edi
call   10a0 <isprint@plt>
cmp    $0x0,%eax
je     134f <main+0x16f>
mov    0x2c88(%rip),%rax
mov    (%rax),%edi
mov    0x2c9f(%rip),%rax
movsbl (%rax),%edx
lea    0xd03(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1370 <main+0x190>
mov    0x2c62(%rip),%rax
mov    (%rax),%edi
mov    0x2c79(%rip),%rax
movsbl (%rax),%edx
lea    0xcf4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1375 <main+0x195>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <printUsage@plt>
movl   $0x1,-0x4(%rbp)
jmp    1544 <main+0x364>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <printUsage@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    121e <main+0x3e>
mov    0x2c24(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    0x2c18(%rip),%rcx
mov    %eax,(%rcx)
cmp    -0x8(%rbp),%eax
jne    13d8 <main+0x1f8>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    0x2bf1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1418 <main+0x238>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xc7c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13e4 <main+0x204>
mov    0x2b89(%rip),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    -0x38(%rbp),%rsi
call   1080 <strtol@plt>
mov    %rax,-0x30(%rbp)
mov    0x2b67(%rip),%rax
mov    (%rax),%rax
mov    0x2b7d(%rip),%rcx
cmp    (%rcx),%rax
jne    147c <main+0x29c>
mov    -0x30(%rbp),%rax
mov    0x2b51(%rip),%rcx
cmp    (%rcx),%rax
je     1498 <main+0x2b8>
mov    -0x30(%rbp),%rax
mov    0x2b6d(%rip),%rcx
cmp    (%rcx),%rax
je     1498 <main+0x2b8>
mov    0x2b25(%rip),%rax
cmpq   $0x0,(%rax)
je     14b2 <main+0x2d2>
cmpq   $0x0,-0x30(%rbp)
jne    14b2 <main+0x2d2>
lea    0xbf8(%rip),%rdi
call   10c0 <perror@plt>
mov    0x2af5(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>
mov    -0x38(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    14e5 <main+0x305>
mov    0x2af1(%rip),%rax
mov    (%rax),%edi
lea    0xbce(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2ac2(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x30(%rbp)
cmp    $0x0,%rax
je     152a <main+0x34a>
mov    $0x0,%al
call   1100 <rand@plt>
mov    $0x5e,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x21,%edi
call   1030 <putchar@plt>
jmp    14f3 <main+0x313>
lea    0xb2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2a51(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %edi,%ebp
mov    0x2da1(%rip),%rax
movq   $0x0,(%rax)
xor    %r14d,%r14d
lea    0xdfb(%rip),%rbx
mov    0x2de9(%rip),%r15
nop
mov    %ebp,%edi
mov    %r12,%rsi
mov    %rbx,%rdx
call   10d0 <getopt@plt>
cmp    $0x61,%eax
je     1210 <main+0x30>
jle    1244 <main+0x64>
cmp    $0x76,%eax
je     1279 <main+0x99>
cmp    $0x68,%eax
je     1252 <main+0x72>
cmp    $0x62,%eax
jne    1426 <main+0x246>
mov    (%r15),%edi
call   10e0 <atoi@plt>
mov    %eax,%r14d
jmp    1210 <main+0x30>
cmp    $0xffffffff,%eax
je     1297 <main+0xb7>
cmp    $0x3f,%eax
jne    1426 <main+0x246>
mov    0x2d7f(%rip),%rbx
mov    (%rbx),%al
cmp    $0x62,%al
jne    12b9 <main+0xd9>
mov    0x2d52(%rip),%rax
mov    (%rax),%edi
lea    0xdb5(%rip),%rsi
mov    $0x62,%edx
jmp    1402 <main+0x222>
mov    (%r12),%rsi
lea    0xd85(%rip),%rdi
lea    0xd93(%rip),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1412 <main+0x232>
mov    0x2d32(%rip),%rcx
mov    (%rcx),%r13d
lea    0x1(%r13),%eax
mov    %eax,(%rcx)
cmp    %ebp,%eax
jne    12e1 <main+0x101>
movslq %ebp,%rcx
mov    -0x8(%r12,%rcx,8),%r15
cmp    %ebp,%eax
jl     12ec <main+0x10c>
jmp    1327 <main+0x147>
movsbl %al,%edi
call   10a0 <isprint@plt>
mov    0x2cf0(%rip),%rcx
mov    (%rcx),%edi
movsbl (%rbx),%edx
test   %eax,%eax
je     13fb <main+0x21b>
lea    0xd6a(%rip),%rsi
jmp    1402 <main+0x222>
lea    0xd18(%rip),%r15
cmp    %ebp,%eax
jge    1327 <main+0x147>
cltq
lea    (%r12,%rax,8),%rbx
not    %r13d
add    %ebp,%r13d
lea    0xd80(%rip),%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,8),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %ebp,%r13d
jne    1310 <main+0x130>
mov    0x2c7a(%rip),%rbp
movq   $0x0,0x0(%rbp)
mov    %rsp,%rsi
mov    %r15,%rdi
mov    %r14d,%edx
call   1080 <strtol@plt>
mov    %rax,%rbx
mov    0x0(%rbp),%rax
mov    0x2c76(%rip),%rcx
cmp    (%rcx),%rax
jne    1377 <main+0x197>
mov    0x2c52(%rip),%rcx
cmp    (%rcx),%rbx
je     1436 <main+0x256>
mov    0x2c72(%rip),%rcx
cmp    (%rcx),%rbx
je     1436 <main+0x256>
test   %rax,%rax
je     1385 <main+0x1a5>
test   %rbx,%rbx
je     1436 <main+0x256>
cmp    %r15,(%rsp)
je     1444 <main+0x264>
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
test   %rbx,%rbx
je     13e6 <main+0x206>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1100 <rand@plt>
cltq
imul   $0xffffffffae4c415d,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x5e,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x21,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbx
jne    13b0 <main+0x1d0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2b99(%rip),%rax
mov    (%rax),%eax
jmp    1417 <main+0x237>
lea    0xc5b(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r12),%rdi
call   10b0 <printUsage@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r12),%rdi
call   10b0 <printUsage@plt>
xor    %eax,%eax
call   1040 <abort@plt>
lea    0xc5a(%rip),%rdi
call   10c0 <perror@plt>
jmp    145b <main+0x27b>
mov    0x2b6d(%rip),%rax
mov    (%rax),%edi
lea    0xc4a(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2b3e(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"80\00"
@opterr = global i64 0
@.str.1 = [6 x i8] c"ab:hv\00"
@optarg = global i32 0
@.str.2 = [21 x i8] c"%s is at version %s\0A\00"
@.str.3 = [6 x i8] c"1.1.0\00"
@optopt = global i8 0
@stderr = global i32 0
@.str.4 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.5 = [23 x i8] c"Unknown option `-%c'.\0A\00"
@.str.6 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@optind = global i32 0
@.str.7 = [24 x i8] c"Non-option argument %s\0A\00"
@errno = global i64 0
@ERANGE = global i64 0
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.8 = [7 x i8] c"strtol\00"
@EXIT_FAILURE = global i32 0
@.str.9 = [22 x i8] c"No digits were found\0A\00"
@.str.10 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %6
store i32 0, i32* %9
store i64 0, i64* %10
store i64 0, i64* @opterr
br label %12
12: ; preds = %63, %2
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @getopt(i32 %13, i8** %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 %15, i32* %8
%16 = icmp ne i32 %15, -1
br i1 %16, label %17, label %64
17: ; preds = %12
%18 = load i32, i32* %8
switch i32 %18, label %57 [
i32 97, label %19
i32 98, label %20
i32 118, label %23
i32 104, label %28
i32 63, label %28
]
19: ; preds = %17
br label %63
20: ; preds = %17
%21 = load i32, i32* @optarg
%22 = call i32 @atoi(i32 %21)
store i32 %22, i32* %9
br label %63
23: ; preds = %17
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %142
28: ; preds = %17, %17
%29 = load i8, i8* @optopt
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 98
br i1 %31, label %32, label %37
32: ; preds = %28
%33 = load i32, i32* @stderr
%34 = load i8, i8* @optopt
%35 = sext i8 %34 to i32
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %35)
br label %52
37: ; preds = %28
%38 = load i8, i8* @optopt
%39 = call i32 @isprint(i8 signext %38)
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load i32, i32* @stderr
%43 = load i8, i8* @optopt
%44 = sext i8 %43 to i32
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %44)
br label %51
46: ; preds = %37
%47 = load i32, i32* @stderr
%48 = load i8, i8* @optopt
%49 = sext i8 %48 to i32
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %46, %41
br label %52
52: ; preds = %51, %32
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 0
%55 = load i8*, i8** %54
%56 = call i32 @printUsage(i8* %55)
store i32 1, i32* %3
br label %142
57: ; preds = %17
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 0
%60 = load i8*, i8** %59
%61 = call i32 @printUsage(i8* %60)
%62 = call i32 (...) @abort()
unreachable
63: ; preds = %20, %19
br label %12
64: ; preds = %12
%65 = load i32, i32* @optind
%66 = add nsw i32 %65, 1
store i32 %66, i32* @optind
%67 = load i32, i32* %4
%68 = icmp eq i32 %66, %67
br i1 %68, label %69, label %76
69: ; preds = %64
%70 = load i8**, i8*** %5
%71 = load i32, i32* %4
%72 = sub nsw i32 %71, 1
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8*, i8** %70, i64 %73
%75 = load i8*, i8** %74
store i8* %75, i8** %6
br label %76
76: ; preds = %69, %64
%77 = load i32, i32* @optind
store i32 %77, i32* %7
br label %78
78: ; preds = %89, %76
%79 = load i32, i32* %7
%80 = load i32, i32* %4
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %92
82: ; preds = %78
%83 = load i8**, i8*** %5
%84 = load i32, i32* %7
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8*, i8** %83, i64 %85
%87 = load i8*, i8** %86
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i8* %87)
br label %89
89: ; preds = %82
%90 = load i32, i32* %7
%91 = add nsw i32 %90, 1
store i32 %91, i32* %7
br label %78
92: ; preds = %78
store i64 0, i64* @errno
%93 = load i8*, i8** %6
%94 = load i32, i32* %9
%95 = call i64 @strtol(i8* %93, i8** %11, i32 %94)
store i64 %95, i64* %10
%96 = load i64, i64* @errno
%97 = load i64, i64* @ERANGE
%98 = icmp eq i64 %96, %97
br i1 %98, label %99, label %107
99: ; preds = %92
%100 = load i64, i64* %10
%101 = load i64, i64* @LONG_MAX
%102 = icmp eq i64 %100, %101
br i1 %102, label %113, label %103
103: ; preds = %99
%104 = load i64, i64* %10
%105 = load i64, i64* @LONG_MIN
%106 = icmp eq i64 %104, %105
br i1 %106, label %113, label %107
107: ; preds = %103, %92
%108 = load i64, i64* @errno
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %117
110: ; preds = %107
%111 = load i64, i64* %10
%112 = icmp eq i64 %111, 0
br i1 %112, label %113, label %117
113: ; preds = %110, %103, %99
%114 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%115 = load i32, i32* @EXIT_FAILURE
%116 = call i32 @exit(i32 %115)
unreachable
117: ; preds = %110, %107
%118 = load i8*, i8** %11
%119 = load i8*, i8** %6
%120 = icmp eq i8* %118, %119
br i1 %120, label %121, label %126
121: ; preds = %117
%122 = load i32, i32* @stderr
%123 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%124 = load i32, i32* @EXIT_FAILURE
%125 = call i32 @exit(i32 %124)
unreachable
126: ; preds = %117
%127 = call i64 @time(i32 0)
%128 = trunc i64 %127 to i32
%129 = call i32 @srand(i32 %128)
br label %130
130: ; preds = %134, %126
%131 = load i64, i64* %10
%132 = add nsw i64 %131, -1
store i64 %132, i64* %10
%133 = icmp ne i64 %131, 0
br i1 %133, label %134, label %139
134: ; preds = %130
%135 = call i32 (...) @rand()
%136 = srem i32 %135, 94
%137 = add nsw i32 %136, 33
%138 = call i32 @putchar(i32 %137)
br label %130
139: ; preds = %130
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%141 = load i32, i32* @EXIT_SUCCESS
store i32 %141, i32* %3
br label %142
142: ; preds = %139, %52, %23
%143 = load i32, i32* %3
ret i32 %143
}

LLVM IR (-O2):
@.str = [3 x i8] c"80\00"
@opterr = global i64 0
@.str.1 = [6 x i8] c"ab:hv\00"
@optarg = global i32 0
@.str.2 = [21 x i8] c"%s is at version %s\0A\00"
@.str.3 = [6 x i8] c"1.1.0\00"
@optopt = global i8 0
@stderr = global i32 0
@.str.4 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.5 = [23 x i8] c"Unknown option `-%c'.\0A\00"
@.str.6 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@optind = global i32 0
@.str.7 = [24 x i8] c"Non-option argument %s\0A\00"
@errno = global i64 0
@ERANGE = global i64 0
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.8 = [7 x i8] c"strtol\00"
@EXIT_FAILURE = global i32 0
@.str.9 = [22 x i8] c"No digits were found\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i64 0, i64* @opterr
br label %5
5: ; preds = %9, %2
%6 = phi i32 [ %11, %9 ], [ 0, %2 ]
br label %7
7: ; preds = %5, %7
%8 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
switch i32 %8, label %34 [
i32 -1, label %38
i32 97, label %7
i32 98, label %9
i32 118, label %12
i32 104, label %15
i32 63, label %15
]
9: ; preds = %7
%10 = load i32, i32* @optarg
%11 = tail call i32 @atoi(i32 %10)
br label %5
12: ; preds = %7
%13 = load i8*, i8** %1
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %102
15: ; preds = %7, %7
%16 = load i8, i8* @optopt
%17 = icmp eq i8 %16, 98
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 98)
br label %31
21: ; preds = %15
%22 = tail call i32 @isprint(i8 signext %16)
%23 = icmp eq i32 %22, 0
%24 = load i32, i32* @stderr
%25 = load i8, i8* @optopt
%26 = sext i8 %25 to i32
br i1 %23, label %29, label %27
27: ; preds = %21
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %26)
br label %31
29: ; preds = %21
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %26)
br label %31
31: ; preds = %27, %29, %18
%32 = load i8*, i8** %1
%33 = tail call i32 @printUsage(i8* %32)
br label %102
34: ; preds = %7
%35 = load i8*, i8** %1
%36 = tail call i32 @printUsage(i8* %35)
%37 = tail call i32 (...) @abort()
unreachable
38: ; preds = %7
%39 = load i32, i32* @optind
%40 = add i32 %39, 1
store i32 %40, i32* @optind
%41 = icmp eq i32 %40, %0
br i1 %41, label %42, label %47
42: ; preds = %38
%43 = add nsw i32 %0, -1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %1, i64 %44
%46 = load i8*, i8** %45
br label %47
47: ; preds = %42, %38
%48 = phi i8* [ %46, %42 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %38 ]
%49 = icmp slt i32 %40, %0
br i1 %49, label %50, label %60
50: ; preds = %47
%51 = sext i32 %40 to i64
br label %52
52: ; preds = %50, %52
%53 = phi i64 [ %51, %50 ], [ %57, %52 ]
%54 = getelementptr inbounds i8*, i8** %1, i64 %53
%55 = load i8*, i8** %54
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i8* %55)
%57 = add nsw i64 %53, 1
%58 = trunc i64 %57 to i32
%59 = icmp eq i32 %58, %0
br i1 %59, label %60, label %52
60: ; preds = %52, %47
store i64 0, i64* @errno
%61 = call i64 @strtol(i8* %48, i8** %3, i32 %6)
%62 = load i64, i64* @errno
%63 = load i64, i64* @ERANGE
%64 = icmp eq i64 %62, %63
br i1 %64, label %65, label %71
65: ; preds = %60
%66 = load i64, i64* @LONG_MAX
%67 = icmp eq i64 %61, %66
%68 = load i64, i64* @LONG_MIN
%69 = icmp eq i64 %61, %68
%70 = select i1 %67, i1 true, i1 %69
br i1 %70, label %75, label %71
71: ; preds = %65, %60
%72 = icmp ne i64 %62, 0
%73 = icmp eq i64 %61, 0
%74 = select i1 %72, i1 %73, i1 false
br i1 %74, label %75, label %79
75: ; preds = %71, %65
%76 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%77 = load i32, i32* @EXIT_FAILURE
%78 = tail call i32 @exit(i32 %77)
unreachable
79: ; preds = %71
%80 = load i8*, i8** %3
%81 = icmp eq i8* %80, %48
br i1 %81, label %82, label %87
82: ; preds = %79
%83 = load i32, i32* @stderr
%84 = tail call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%85 = load i32, i32* @EXIT_FAILURE
%86 = tail call i32 @exit(i32 %85)
unreachable
87: ; preds = %79
%88 = tail call i64 @time(i32 0)
%89 = trunc i64 %88 to i32
%90 = tail call i32 @srand(i32 %89)
br i1 %73, label %99, label %91
91: ; preds = %87, %91
%92 = phi i64 [ %93, %91 ], [ %61, %87 ]
%93 = add nsw i64 %92, -1
%94 = tail call i32 (...) @rand()
%95 = srem i32 %94, 94
%96 = add nsw i32 %95, 33
%97 = tail call i32 @putchar(i32 %96)
%98 = icmp eq i64 %93, 0
br i1 %98, label %99, label %91
99: ; preds = %91, %87
%100 = tail call i32 @putchar(i32 10)
%101 = load i32, i32* @EXIT_SUCCESS
br label %102
102: ; preds = %99, %31, %12
%103 = phi i32 [ 1, %31 ], [ 1, %12 ], [ %101, %99 ]
ret i32 %103
}