#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 */
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ const member_1;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int RAND_MAX;
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int getopt_long_only(int, char **, char *, struct option *, int *);
char *optarg;
int optind;
int /*<<< orphan*/ print_usage(char *);
int /*<<< orphan*/ printf(char *, int);
int rand();
#define required_argument 128
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ stderr;
int time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  int count = 0;
  int min = 0;
  int max = RAND_MAX;
  int seed = -1;
  while (1) {
    static struct option long_options[] = {{"min", required_argument, 0, 'm'},
                                           {"max", required_argument, 0, 'n'},
                                           {"seed", required_argument, 0, 's'},
                                           {0, 0, 0, 0}};
    int option_index = 0;
    int c = getopt_long_only(argc, argv, "m:n:", long_options, &option_index);
    if (c == -1)
      break;
    switch (c) {
    case 'm':
      min = atoi(optarg);
      break;
    case 'n':
      max = atoi(optarg);
      break;
    case 's':
      seed = atoi(optarg);
      break;
    default:
      fprintf(stderr, "error: bad command line option\n");
      print_usage(argv[0]);
    }
  }
  if (optind == argc - 1)
    count = atoi(argv[optind]);
  else {
    fprintf(stderr, "error: count not specified\n");
    print_usage(argv[0]);
  }
  if (count <= 0) {
    fprintf(stderr, "error: count <= 0\n");
    print_usage(argv[0]);
  }
  if (max < min) {
    fprintf(stderr, "error: max < min\n");
    print_usage(argv[0]);
  }
  if (min < 0) {
    fprintf(stderr, "error: min < 0\n");
    print_usage(argv[0]);
  }
  if (max > RAND_MAX) {
    fprintf(stderr, "error: max > RAND_MAX\n");
    print_usage(argv[0]);
  }
  if (seed == -1)
    srand(time(NULL));
  else
    srand(seed);
  int range = max - min + 1;
  int i;
  for (i = 0; i < count; i++) {
    int val = (rand() % range) + min;
    printf("%d\n", val);
  }
  exit(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)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    0x2e25(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
movl   $0xffffffff,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe31(%rip),%rdx
lea    0x2e8d(%rip),%rcx
lea    -0x24(%rbp),%r8
call   1050 <getopt_long_only@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jne    11fe <main+0x6e>
jmp    129f <main+0x10f>
mov    -0x28(%rbp),%eax
mov    %eax,-0x38(%rbp)
sub    $0x6d,%eax
je     1234 <main+0xa4>
jmp    1212 <main+0x82>
mov    -0x38(%rbp),%eax
sub    $0x6e,%eax
je     124b <main+0xbb>
jmp    1223 <main+0x93>
mov    -0x38(%rbp),%eax
sub    $0x73,%eax
je     1262 <main+0xd2>
jmp    1279 <main+0xe9>
mov    0x2dbd(%rip),%rax
mov    (%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    129a <main+0x10a>
mov    0x2da6(%rip),%rax
mov    (%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x1c(%rbp)
jmp    129a <main+0x10a>
mov    0x2d8f(%rip),%rax
mov    (%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x20(%rbp)
jmp    129a <main+0x10a>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
lea    0xd89(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
jmp    11c7 <main+0x37>
mov    0x2d32(%rip),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    12d5 <main+0x145>
mov    -0x10(%rbp),%rax
mov    0x2d17(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    12f6 <main+0x166>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
lea    0xd4d(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
cmpl   $0x0,-0x14(%rbp)
jg     1321 <main+0x191>
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
lea    0xd3e(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    134e <main+0x1be>
mov    0x2c94(%rip),%rax
mov    (%rax),%edi
lea    0xd24(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
cmpl   $0x0,-0x18(%rbp)
jge    1379 <main+0x1e9>
mov    0x2c69(%rip),%rax
mov    (%rax),%edi
lea    0xd0b(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
mov    -0x1c(%rbp),%eax
mov    0x2c5d(%rip),%rcx
cmp    (%rcx),%eax
jle    13ac <main+0x21c>
mov    0x2c36(%rip),%rax
mov    (%rax),%edi
lea    0xce8(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
cmpl   $0xffffffff,-0x20(%rbp)
jne    13cb <main+0x23b>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
jmp    13d3 <main+0x243>
mov    -0x20(%rbp),%edi
call   1040 <srand@plt>
mov    -0x1c(%rbp),%eax
sub    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1420 <main+0x290>
mov    $0x0,%al
call   10b0 <rand@plt>
cltd
idivl  -0x2c(%rbp)
add    -0x18(%rbp),%edx
mov    %edx,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xc8d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13e6 <main+0x256>
mov    0x2b99(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
mov    0x2e36(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
xor    %eax,%eax
mov    %rax,0x8(%rsp)
movl   $0xffffffff,0x4(%rsp)
ff
lea    0xe48(%rip),%r13
lea    0x2ea4(%rip),%r14
lea    0x14(%rsp),%r15
mov    0x2e20(%rip),%r12
jmp    1201 <main+0x71>
cmp    $0xffffffff,%eax
je     126e <main+0xde>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
lea    0xe1f(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   10a0 <print_usage@plt>
movl   $0x0,0x14(%rsp)
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r14,%rcx
mov    %r15,%r8
call   1050 <getopt_long_only@plt>
cmp    $0x6d,%eax
jle    1240 <main+0xb0>
cmp    $0x6e,%eax
je     1260 <main+0xd0>
cmp    $0x73,%eax
jne    11e3 <main+0x53>
mov    (%r12),%rdi
call   1080 <atoi@plt>
mov    %eax,0x4(%rsp)
jmp    1201 <main+0x71>
nopw   0x0(%rax,%rax,1)
jne    11da <main+0x4a>
mov    (%r12),%rdi
call   1080 <atoi@plt>
mov    %rax,0x8(%rsp)
jmp    1201 <main+0x71>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12),%rdi
call   1080 <atoi@plt>
mov    %eax,(%rsp)
jmp    1201 <main+0x71>
mov    0x2d63(%rip),%rax
movslq (%rax),%rax
add    $0xffffffff,%ebx
cmp    %ebx,%eax
jne    129a <main+0x10a>
mov    0x0(%rbp,%rax,8),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebx
test   %eax,%eax
mov    0x8(%rsp),%r15
mov    (%rsp),%r12d
jle    12c3 <main+0x133>
jmp    12e1 <main+0x151>
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
lea    0xd88(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   10a0 <print_usage@plt>
xor    %ebx,%ebx
mov    0x8(%rsp),%r15
mov    (%rsp),%r12d
mov    0x2cfe(%rip),%rax
mov    (%rax),%edi
lea    0xd7b(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   10a0 <print_usage@plt>
mov    %r12d,%r14d
sub    %r15d,%r14d
jge    1307 <main+0x177>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
lea    0xd68(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   10a0 <print_usage@plt>
test   %r15d,%r15d
jns    132a <main+0x19a>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
lea    0xd57(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   10a0 <print_usage@plt>
mov    0x2caf(%rip),%rax
cmp    (%rax),%r12d
jle    1354 <main+0x1c4>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
lea    0xd3d(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   10a0 <print_usage@plt>
mov    0x4(%rsp),%edi
cmp    $0xffffffff,%edi
jne    1366 <main+0x1d6>
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
test   %ebx,%ebx
jle    139c <main+0x20c>
add    $0x1,%r14d
lea    0xd20(%rip),%rbp
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10b0 <rand@plt>
cltd
idiv   %r14d
lea    (%rdx,%r15,1),%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1380 <main+0x1f0>
mov    0x2c1d(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32, i32 }
@RAND_MAX = global i32 0
@main.long_options = internal global [4 x %struct.option] [%struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8 -128, i32 0, i32 109 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8 -128, i32 0, i32 110 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 115 }, %struct.option zeroinitializer]
@.str = [4 x i8] c"min\00"
@.str.1 = [4 x i8] c"max\00"
@.str.2 = [5 x i8] c"seed\00"
@.str.3 = [5 x i8] c"m:n:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.4 = [32 x i8] c"error: bad command line option\0A\00"
@optind = global i32 0
@.str.5 = [28 x i8] c"error: count not specified\0A\00"
@.str.6 = [19 x i8] c"error: count <= 0\0A\00"
@.str.7 = [18 x i8] c"error: max < min\0A\00"
@.str.8 = [16 x i8] c"error: min < 0\0A\00"
@.str.9 = [23 x i8] c"error: max > RAND_MAX\0A\00"
@.str.10 = [4 x i8] c"%d\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 i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%15 = load i32, i32* @RAND_MAX
store i32 %15, i32* %8
store i32 -1, i32* %9
br label %16
16: ; preds = %2, %41
store i32 0, i32* %10
%17 = load i32, i32* %4
%18 = load i8**, i8*** %5
%19 = call i32 @getopt_long_only(i32 %17, i8** %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %struct.option* getelementptr inbounds ([4 x %struct.option], [4 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %10)
store i32 %19, i32* %11
%20 = load i32, i32* %11
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %23
22: ; preds = %16
br label %42
23: ; preds = %16
%24 = load i32, i32* %11
switch i32 %24, label %34 [
i32 109, label %25
i32 110, label %28
i32 115, label %31
]
25: ; preds = %23
%26 = load i8*, i8** @optarg
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %7
br label %41
28: ; preds = %23
%29 = load i8*, i8** @optarg
%30 = call i32 @atoi(i8* %29)
store i32 %30, i32* %8
br label %41
31: ; preds = %23
%32 = load i8*, i8** @optarg
%33 = call i32 @atoi(i8* %32)
store i32 %33, i32* %9
br label %41
34: ; preds = %23
%35 = load i32, i32* @stderr
%36 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 0
%39 = load i8*, i8** %38
%40 = call i32 @print_usage(i8* %39)
br label %41
41: ; preds = %34, %31, %28, %25
br label %16
42: ; preds = %22
%43 = load i32, i32* @optind
%44 = load i32, i32* %4
%45 = sub nsw i32 %44, 1
%46 = icmp eq i32 %43, %45
br i1 %46, label %47, label %54
47: ; preds = %42
%48 = load i8**, i8*** %5
%49 = load i32, i32* @optind
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8*, i8** %48, i64 %50
%52 = load i8*, i8** %51
%53 = call i32 @atoi(i8* %52)
store i32 %53, i32* %6
br label %61
54: ; preds = %42
%55 = load i32, i32* @stderr
%56 = call i32 @fprintf(i32 %55, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 0
%59 = load i8*, i8** %58
%60 = call i32 @print_usage(i8* %59)
br label %61
61: ; preds = %54, %47
%62 = load i32, i32* %6
%63 = icmp sle i32 %62, 0
br i1 %63, label %64, label %71
64: ; preds = %61
%65 = load i32, i32* @stderr
%66 = call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 0
%69 = load i8*, i8** %68
%70 = call i32 @print_usage(i8* %69)
br label %71
71: ; preds = %64, %61
%72 = load i32, i32* %8
%73 = load i32, i32* %7
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %82
75: ; preds = %71
%76 = load i32, i32* @stderr
%77 = call i32 @fprintf(i32 %76, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 0
%80 = load i8*, i8** %79
%81 = call i32 @print_usage(i8* %80)
br label %82
82: ; preds = %75, %71
%83 = load i32, i32* %7
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %92
85: ; preds = %82
%86 = load i32, i32* @stderr
%87 = call i32 @fprintf(i32 %86, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%88 = load i8**, i8*** %5
%89 = getelementptr inbounds i8*, i8** %88, i64 0
%90 = load i8*, i8** %89
%91 = call i32 @print_usage(i8* %90)
br label %92
92: ; preds = %85, %82
%93 = load i32, i32* %8
%94 = load i32, i32* @RAND_MAX
%95 = icmp sgt i32 %93, %94
br i1 %95, label %96, label %103
96: ; preds = %92
%97 = load i32, i32* @stderr
%98 = call i32 @fprintf(i32 %97, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
%99 = load i8**, i8*** %5
%100 = getelementptr inbounds i8*, i8** %99, i64 0
%101 = load i8*, i8** %100
%102 = call i32 @print_usage(i8* %101)
br label %103
103: ; preds = %96, %92
%104 = load i32, i32* %9
%105 = icmp eq i32 %104, -1
br i1 %105, label %106, label %109
106: ; preds = %103
%107 = call i32 @time(i32* null)
%108 = call i32 @srand(i32 %107)
br label %112
109: ; preds = %103
%110 = load i32, i32* %9
%111 = call i32 @srand(i32 %110)
br label %112
112: ; preds = %109, %106
%113 = load i32, i32* %8
%114 = load i32, i32* %7
%115 = sub nsw i32 %113, %114
%116 = add nsw i32 %115, 1
store i32 %116, i32* %12
store i32 0, i32* %13
br label %117
117: ; preds = %129, %112
%118 = load i32, i32* %13
%119 = load i32, i32* %6
%120 = icmp slt i32 %118, %119
br i1 %120, label %121, label %132
121: ; preds = %117
%122 = call i32 (...) @rand()
%123 = load i32, i32* %12
%124 = srem i32 %122, %123
%125 = load i32, i32* %7
%126 = add nsw i32 %124, %125
store i32 %126, i32* %14
%127 = load i32, i32* %14
%128 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %127)
br label %129
129: ; preds = %121
%130 = load i32, i32* %13
%131 = add nsw i32 %130, 1
store i32 %131, i32* %13
br label %117
132: ; preds = %117
%133 = load i32, i32* @EXIT_SUCCESS
%134 = call i32 @exit(i32 %133)
unreachable
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32, i32 }
@RAND_MAX = global i32 0
@main.long_options = internal global [4 x %struct.option] [%struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8 -128, i32 0, i32 109 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8 -128, i32 0, i32 110 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 115 }, %struct.option zeroinitializer]
@.str = [4 x i8] c"min\00"
@.str.1 = [4 x i8] c"max\00"
@.str.2 = [5 x i8] c"seed\00"
@.str.3 = [5 x i8] c"m:n:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.4 = [32 x i8] c"error: bad command line option\0A\00"
@optind = global i32 0
@.str.5 = [28 x i8] c"error: count not specified\0A\00"
@.str.6 = [19 x i8] c"error: count <= 0\0A\00"
@.str.7 = [18 x i8] c"error: max < min\0A\00"
@.str.8 = [16 x i8] c"error: min < 0\0A\00"
@.str.9 = [23 x i8] c"error: max > RAND_MAX\0A\00"
@.str.10 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = load i32, i32* @RAND_MAX
%5 = bitcast i32* %3 to i8*
br label %6
6: ; preds = %25, %2
%7 = phi i32 [ -1, %2 ], [ %26, %25 ]
%8 = phi i32 [ %4, %2 ], [ %27, %25 ]
%9 = phi i32 [ 0, %2 ], [ %28, %25 ]
store i32 0, i32* %3
%10 = call i32 @getopt_long_only(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %struct.option* getelementptr inbounds ([4 x %struct.option], [4 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %3)
switch i32 %10, label %20 [
i32 -1, label %29
i32 109, label %11
i32 110, label %14
i32 115, label %17
]
11: ; preds = %6
%12 = load i8*, i8** @optarg
%13 = call i32 @atoi(i8* %12)
br label %25
14: ; preds = %6
%15 = load i8*, i8** @optarg
%16 = call i32 @atoi(i8* %15)
br label %25
17: ; preds = %6
%18 = load i8*, i8** @optarg
%19 = call i32 @atoi(i8* %18)
br label %25
20: ; preds = %6
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%23 = load i8*, i8** %1
%24 = call i32 @print_usage(i8* %23)
br label %25
25: ; preds = %11, %14, %17, %20
%26 = phi i32 [ %7, %20 ], [ %19, %17 ], [ %7, %14 ], [ %7, %11 ]
%27 = phi i32 [ %8, %20 ], [ %8, %17 ], [ %16, %14 ], [ %8, %11 ]
%28 = phi i32 [ %9, %20 ], [ %9, %17 ], [ %9, %14 ], [ %13, %11 ]
br label %6
29: ; preds = %6
%30 = load i32, i32* @optind
%31 = add nsw i32 %0, -1
%32 = icmp eq i32 %30, %31
br i1 %32, label %38, label %33
33: ; preds = %29
%34 = load i32, i32* @stderr
%35 = call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%36 = load i8*, i8** %1
%37 = call i32 @print_usage(i8* %36)
br label %44
38: ; preds = %29
%39 = sext i32 %30 to i64
%40 = getelementptr inbounds i8*, i8** %1, i64 %39
%41 = load i8*, i8** %40
%42 = call i32 @atoi(i8* %41)
%43 = icmp slt i32 %42, 1
br i1 %43, label %44, label %50
44: ; preds = %33, %38
%45 = phi i32 [ 0, %33 ], [ %42, %38 ]
%46 = load i32, i32* @stderr
%47 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%48 = load i8*, i8** %1
%49 = call i32 @print_usage(i8* %48)
br label %50
50: ; preds = %44, %38
%51 = phi i32 [ %45, %44 ], [ %42, %38 ]
%52 = icmp slt i32 %8, %9
br i1 %52, label %53, label %58
53: ; preds = %50
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%56 = load i8*, i8** %1
%57 = call i32 @print_usage(i8* %56)
br label %58
58: ; preds = %53, %50
%59 = icmp slt i32 %9, 0
br i1 %59, label %60, label %65
60: ; preds = %58
%61 = load i32, i32* @stderr
%62 = call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%63 = load i8*, i8** %1
%64 = call i32 @print_usage(i8* %63)
br label %65
65: ; preds = %60, %58
%66 = load i32, i32* @RAND_MAX
%67 = icmp sgt i32 %8, %66
br i1 %67, label %68, label %73
68: ; preds = %65
%69 = load i32, i32* @stderr
%70 = call i32 @fprintf(i32 %69, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
%71 = load i8*, i8** %1
%72 = call i32 @print_usage(i8* %71)
br label %73
73: ; preds = %68, %65
%74 = icmp eq i32 %7, -1
br i1 %74, label %75, label %77
75: ; preds = %73
%76 = call i32 @time(i32* null)
br label %77
77: ; preds = %73, %75
%78 = phi i32 [ %76, %75 ], [ %7, %73 ]
%79 = call i32 @srand(i32 %78)
%80 = add i32 %8, 1
%81 = sub i32 %80, %9
%82 = icmp sgt i32 %51, 0
br i1 %82, label %83, label %91
83: ; preds = %77, %83
%84 = phi i32 [ %89, %83 ], [ 0, %77 ]
%85 = call i32 (...) @rand()
%86 = srem i32 %85, %81
%87 = add nsw i32 %86, %9
%88 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %87)
%89 = add nuw nsw i32 %84, 1
%90 = icmp eq i32 %89, %51
br i1 %90, label %91, label %83
91: ; preds = %83, %77
%92 = load i32, i32* @EXIT_SUCCESS
%93 = call i32 @exit(i32 %92)
unreachable
}