#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
double RAND_MAX;
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int getopt(int, char **, char *);
char *optarg;
scalar_t__ opterr;
int optopt;
int /*<<< orphan*/ puts(char *);
scalar_t__ rand();
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int line = 1000;
  int dimension = 2;
  int isShowLineNum = 1;
  char separator = ' ';
  char *filename = NULL;
  int i, j;
  FILE *pFile;
  opterr = 0;
  int opt;
  while ((opt = getopt(argc, argv, "l:d:f:s:m:h")) != EOF) {
    switch (opt) {
    case 'l':
      line = atoi(optarg);
      break;
    case 'd':
      dimension = atoi(optarg);
      break;
    case 'f':
      filename = optarg;
      break;
    case 's':
      isShowLineNum = atoi(optarg);
      break;
    case 'm':
      separator = optarg[0];
      break;
    case 'h':
      puts("Usage:");
      puts("-l line number");
      puts("-d dimension");
      puts("-f filename");
      puts("-s [0|1] write the line number or not");
      puts("-m set the separator");
      puts("-h show the help");
      break;
    case '?':
      fprintf(stderr, "Unknown option '-%c'\n", optopt);
      exit(1);
    }
  }
  pFile = fopen(filename, "w+");
  if (pFile == NULL) {
    fputs("file open error\n", stderr);
    exit(1);
  }
  srand(1);
  for (i = 0; i < line; i++) {
    if (isShowLineNum) {
      fprintf(pFile, "%d%c", i + 1, separator);
    }
    for (j = 0; j < dimension - 1; j++) {
      double random = (double)rand() / RAND_MAX;
      fprintf(pFile, "%.6f%c", 9 * random + 1, separator);
    }
    double random = (double)rand() / RAND_MAX;
    fprintf(pFile, "%.6f", 9 * random + 1);
    fprintf(pFile, "\n");
  }
  fclose(pFile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3e8,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movb   $0x20,-0x1d(%rbp)
movq   $0x0,-0x28(%rbp)
mov    0x2dda(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xef1(%rip),%rdx
call   1090 <getopt@plt>
mov    %eax,-0x3c(%rbp)
mov    0x2dd6(%rip),%rcx
cmp    (%rcx),%eax
je     1328 <main+0x188>
mov    -0x3c(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x34,%eax
ja     1323 <main+0x183>
mov    -0x58(%rbp),%rax
lea    0xde6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2dbe(%rip),%rax
mov    (%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1323 <main+0x183>
mov    0x2da7(%rip),%rax
mov    (%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    1323 <main+0x183>
mov    0x2d90(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    1323 <main+0x183>
mov    0x2d7d(%rip),%rax
mov    (%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x1c(%rbp)
jmp    1323 <main+0x183>
mov    0x2d66(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x1d(%rbp)
jmp    1323 <main+0x183>
lea    0xe4a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe45(%rip),%rdi
call   1030 <puts@plt>
lea    0xe48(%rip),%rdi
call   1030 <puts@plt>
lea    0xe49(%rip),%rdi
call   1030 <puts@plt>
lea    0xe49(%rip),%rdi
call   1030 <puts@plt>
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6c(%rip),%rdi
call   1030 <puts@plt>
jmp    1323 <main+0x183>
mov    0x2cc1(%rip),%rax
movslq (%rax),%rdi
mov    0x2cd7(%rip),%rax
mov    (%rax),%edx
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
jmp    11e5 <main+0x45>
mov    -0x28(%rbp),%rdi
lea    0xe4e(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1366 <main+0x1c6>
mov    0x2c72(%rip),%rax
mov    (%rax),%esi
lea    0xe2d(%rip),%rdi
call   1050 <fputs@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    $0x1,%edi
call   1060 <srand@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1489 <main+0x2e9>
cmpl   $0x0,-0x1c(%rbp)
je     13a9 <main+0x209>
mov    -0x38(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
movsbl -0x1d(%rbp),%ecx
lea    0xdf3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    141e <main+0x27e>
mov    $0x0,%al
call   10c0 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2bfc(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x38(%rbp),%rdi
movsd  -0x48(%rbp),%xmm0
movsd  0xc12(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc0e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsbl -0x1d(%rbp),%edx
lea    0xd91(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13b0 <main+0x210>
mov    $0x0,%al
call   10c0 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2b9f(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x38(%rbp),%rdi
movsd  -0x50(%rbp),%xmm0
movsd  0xbb5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbb1(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xd3f(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd0b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1377 <main+0x1d7>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2dee(%rip),%rax
movq   $0x0,(%rax)
lea    0xf0c(%rip),%rdx
call   10a0 <getopt@plt>
mov    0x2df4(%rip),%r14
cmp    (%r14),%eax
jne    1338 <main+0x188>
movl   $0x3e8,(%rsp)
mov    $0x2,%eax
mov    %rax,0x8(%rsp)
movl   $0x1,0x4(%rsp)
mov    $0x20,%r15b
xor    %r12d,%r12d
lea    0xf6e(%rip),%rsi
mov    %r12,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     147d <main+0x2cd>
mov    %rax,%rbx
mov    $0x1,%edi
call   1070 <srand@plt>
cmpl   $0x0,(%rsp)
jle    131f <main+0x16f>
movsbl %r15b,%ebp
mov    0x8(%rsp),%rax
add    $0xffffffff,%eax
mov    %eax,0x14(%rsp)
mov    0x2d7e(%rip),%r12
lea    0xf41(%rip),%r13
xor    %r15d,%r15d
jmp    12ad <main+0xfd>
xchg   %ax,%ax
xor    %eax,%eax
call   10d0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r12),%xmm0
mulsd  0xd83(%rip),%xmm0
addsd  0xd83(%rip),%xmm0
mov    %rbx,%rdi
lea    0xf12(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1060 <fputc@plt>
add    $0x1,%r15d
cmp    (%rsp),%r15d
je     131f <main+0x16f>
cmpl   $0x0,0x4(%rsp)
je     12cb <main+0x11b>
lea    0x1(%r15),%edx
mov    %rbx,%rdi
lea    0xed3(%rip),%rsi
mov    %ebp,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
cmpl   $0x2,0x8(%rsp)
jl     1260 <main+0xb0>
mov    0x14(%rsp),%r14d
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10d0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r12),%xmm0
mulsd  0xd03(%rip),%xmm0
addsd  0xd03(%rip),%xmm0
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %ebp,%edx
mov    $0x1,%al
call   1080 <fprintf@plt>
add    $0xffffffff,%r14d
jne    12e0 <main+0x130>
jmp    1260 <main+0xb0>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x20,%r15b
movl   $0x1,0x4(%rsp)
mov    $0x2,%ecx
mov    %rcx,0x8(%rsp)
movl   $0x3e8,(%rsp)
xor    %r12d,%r12d
lea    0xcb2(%rip),%r13
jmp    139a <main+0x1ea>
mov    0x2c91(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
lea    0xd58(%rip),%rdx
call   10a0 <getopt@plt>
cmp    (%r14),%eax
je     120c <main+0x5c>
add    $0xffffffc1,%eax
cmp    $0x34,%eax
ja     1380 <main+0x1d0>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
mov    0x2c45(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %rax,0x8(%rsp)
jmp    1380 <main+0x1d0>
mov    0x2c2f(%rip),%rax
mov    (%rax),%r12
jmp    1380 <main+0x1d0>
lea    0xd1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xd16(%rip),%rdi
call   1030 <puts@plt>
lea    0xd19(%rip),%rdi
call   1030 <puts@plt>
lea    0xd1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xd1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xd34(%rip),%rdi
call   1030 <puts@plt>
lea    0xd3d(%rip),%rdi
call   1030 <puts@plt>
jmp    1380 <main+0x1d0>
mov    0x2bca(%rip),%rax
mov    (%rax),%rax
movzbl (%rax),%r15d
jmp    1380 <main+0x1d0>
mov    0x2bb7(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,0x4(%rsp)
jmp    1380 <main+0x1d0>
mov    0x2b67(%rip),%rax
movslq (%rax),%rdi
mov    0x2b7d(%rip),%rax
mov    (%rax),%edx
lea    0xcff(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    0x2b3c(%rip),%rax
mov    (%rax),%esi
lea    0xcf7(%rip),%rdi
call   1050 <fputs@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@opterr = global i64 0
@.str = [12 x i8] c"l:d:f:s:m:h\00"
@EOF = global i32 0
@optarg = global i8* null
@.str.1 = [7 x i8] c"Usage:\00"
@.str.2 = [15 x i8] c"-l line number\00"
@.str.3 = [13 x i8] c"-d dimension\00"
@.str.4 = [12 x i8] c"-f filename\00"
@.str.5 = [38 x i8] c"-s [0|1] write the line number or not\00"
@.str.6 = [21 x i8] c"-m set the separator\00"
@.str.7 = [17 x i8] c"-h show the help\00"
@stderr = global i32 0
@.str.8 = [22 x i8] c"Unknown option '-%c'\0A\00"
@optopt = global i32 0
@.str.9 = [3 x i8] c"w+\00"
@.str.10 = [17 x i8] c"file open error\0A\00"
@.str.11 = [5 x i8] c"%d%c\00"
@RAND_MAX = global double 0.000000e+00
@.str.12 = [7 x i8] c"%.6f%c\00"
@.str.13 = [5 x i8] c"%.6f\00"
@.str.14 = [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 i8
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
%15 = alloca double
%16 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1000, i32* %6
store i32 2, i32* %7
store i32 1, i32* %8
store i8 32, i8* %9
store i8* null, i8** %10
store i64 0, i64* @opterr
br label %17
17: ; preds = %55, %2
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call i32 @getopt(i32 %18, i8** %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i32 %20, i32* %14
%21 = load i32, i32* @EOF
%22 = icmp ne i32 %20, %21
br i1 %22, label %23, label %56
23: ; preds = %17
%24 = load i32, i32* %14
switch i32 %24, label %55 [
i32 108, label %25
i32 100, label %28
i32 102, label %31
i32 115, label %33
i32 109, label %36
i32 104, label %40
i32 63, label %48
]
25: ; preds = %23
%26 = load i8*, i8** @optarg
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %6
br label %55
28: ; preds = %23
%29 = load i8*, i8** @optarg
%30 = call i32 @atoi(i8* %29)
store i32 %30, i32* %7
br label %55
31: ; preds = %23
%32 = load i8*, i8** @optarg
store i8* %32, i8** %10
br label %55
33: ; preds = %23
%34 = load i8*, i8** @optarg
%35 = call i32 @atoi(i8* %34)
store i32 %35, i32* %8
br label %55
36: ; preds = %23
%37 = load i8*, i8** @optarg
%38 = getelementptr inbounds i8, i8* %37, i64 0
%39 = load i8, i8* %38
store i8 %39, i8* %9
br label %55
40: ; preds = %23
%41 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%42 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%43 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%44 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%45 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%46 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%47 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %55
48: ; preds = %23
%49 = load i32, i32* @stderr
%50 = sext i32 %49 to i64
%51 = inttoptr i64 %50 to i32*
%52 = load i32, i32* @optopt
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %51, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %52)
%54 = call i32 @exit(i32 1)
unreachable
55: ; preds = %23, %40, %36, %33, %31, %28, %25
br label %17
56: ; preds = %17
%57 = load i8*, i8** %10
%58 = call i32* @fopen(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
store i32* %58, i32** %13
%59 = load i32*, i32** %13
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %65
61: ; preds = %56
%62 = load i32, i32* @stderr
%63 = call i32 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32 %62)
%64 = call i32 @exit(i32 1)
unreachable
65: ; preds = %56
%66 = call i32 @srand(i32 1)
store i32 0, i32* %11
br label %67
67: ; preds = %112, %65
%68 = load i32, i32* %11
%69 = load i32, i32* %6
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %115
71: ; preds = %67
%72 = load i32, i32* %8
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %81
74: ; preds = %71
%75 = load i32*, i32** %13
%76 = load i32, i32* %11
%77 = add nsw i32 %76, 1
%78 = load i8, i8* %9
%79 = sext i8 %78 to i32
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 %77, i32 %79)
br label %81
81: ; preds = %74, %71
store i32 0, i32* %12
br label %82
82: ; preds = %98, %81
%83 = load i32, i32* %12
%84 = load i32, i32* %7
%85 = sub nsw i32 %84, 1
%86 = icmp slt i32 %83, %85
br i1 %86, label %87, label %101
87: ; preds = %82
%88 = call i64 (...) @rand()
%89 = sitofp i64 %88 to double
%90 = load double, double* @RAND_MAX
%91 = fdiv double %89, %90
store double %91, double* %15
%92 = load i32*, i32** %13
%93 = load double, double* %15
%94 = call double @llvm.fmuladd.f64(double 9.000000e+00, double %93, double 1.000000e+00)
%95 = load i8, i8* %9
%96 = sext i8 %95 to i32
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %94, i32 %96)
br label %98
98: ; preds = %87
%99 = load i32, i32* %12
%100 = add nsw i32 %99, 1
store i32 %100, i32* %12
br label %82
101: ; preds = %82
%102 = call i64 (...) @rand()
%103 = sitofp i64 %102 to double
%104 = load double, double* @RAND_MAX
%105 = fdiv double %103, %104
store double %105, double* %16
%106 = load i32*, i32** %13
%107 = load double, double* %16
%108 = call double @llvm.fmuladd.f64(double 9.000000e+00, double %107, double 1.000000e+00)
%109 = call i32 (i32*, i8*, ...) @fprintf(i32* %106, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), double %108)
%110 = load i32*, i32** %13
%111 = call i32 (i32*, i8*, ...) @fprintf(i32* %110, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %112
112: ; preds = %101
%113 = load i32, i32* %11
%114 = add nsw i32 %113, 1
store i32 %114, i32* %11
br label %67
115: ; preds = %67
%116 = load i32*, i32** %13
%117 = call i32 @fclose(i32* %116)
ret i32 0
}

LLVM IR (-O2):
@opterr = global i64 0
@.str = [12 x i8] c"l:d:f:s:m:h\00"
@EOF = global i32 0
@optarg = global i8* null
@.str.1 = [7 x i8] c"Usage:\00"
@.str.2 = [15 x i8] c"-l line number\00"
@.str.3 = [13 x i8] c"-d dimension\00"
@.str.4 = [12 x i8] c"-f filename\00"
@.str.5 = [38 x i8] c"-s [0|1] write the line number or not\00"
@.str.6 = [21 x i8] c"-m set the separator\00"
@.str.7 = [17 x i8] c"-h show the help\00"
@stderr = global i32 0
@.str.8 = [22 x i8] c"Unknown option '-%c'\0A\00"
@optopt = global i32 0
@.str.9 = [3 x i8] c"w+\00"
@.str.10 = [17 x i8] c"file open error\0A\00"
@.str.11 = [5 x i8] c"%d%c\00"
@RAND_MAX = global double 0.000000e+00
@.str.12 = [7 x i8] c"%.6f%c\00"
@.str.13 = [5 x i8] c"%.6f\00"
define i32 @main(i32 %0, i8** %1) {
store i64 0, i64* @opterr
%3 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %51, label %6
6: ; preds = %2, %42
%7 = phi i32 [ %48, %42 ], [ %3, %2 ]
%8 = phi i32 [ %47, %42 ], [ 1000, %2 ]
%9 = phi i32 [ %46, %42 ], [ 2, %2 ]
%10 = phi i32 [ %45, %42 ], [ 1, %2 ]
%11 = phi i8* [ %44, %42 ], [ null, %2 ]
%12 = phi i8 [ %43, %42 ], [ 32, %2 ]
switch i32 %7, label %42 [
i32 108, label %13
i32 100, label %16
i32 102, label %19
i32 115, label %21
i32 109, label %24
i32 104, label %27
i32 63, label %35
]
13: ; preds = %6
%14 = load i8*, i8** @optarg
%15 = tail call i32 @atoi(i8* %14)
br label %42
16: ; preds = %6
%17 = load i8*, i8** @optarg
%18 = tail call i32 @atoi(i8* %17)
br label %42
19: ; preds = %6
%20 = load i8*, i8** @optarg
br label %42
21: ; preds = %6
%22 = load i8*, i8** @optarg
%23 = tail call i32 @atoi(i8* %22)
br label %42
24: ; preds = %6
%25 = load i8*, i8** @optarg
%26 = load i8, i8* %25
br label %42
27: ; preds = %6
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %42
35: ; preds = %6
%36 = load i32, i32* @stderr
%37 = sext i32 %36 to i64
%38 = inttoptr i64 %37 to i32*
%39 = load i32, i32* @optopt
%40 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %39)
%41 = tail call i32 @exit(i32 1)
unreachable
42: ; preds = %6, %27, %24, %21, %19, %16, %13
%43 = phi i8 [ %12, %6 ], [ %12, %27 ], [ %26, %24 ], [ %12, %21 ], [ %12, %19 ], [ %12, %16 ], [ %12, %13 ]
%44 = phi i8* [ %11, %6 ], [ %11, %27 ], [ %11, %24 ], [ %11, %21 ], [ %20, %19 ], [ %11, %16 ], [ %11, %13 ]
%45 = phi i32 [ %10, %6 ], [ %10, %27 ], [ %10, %24 ], [ %23, %21 ], [ %10, %19 ], [ %10, %16 ], [ %10, %13 ]
%46 = phi i32 [ %9, %6 ], [ %9, %27 ], [ %9, %24 ], [ %9, %21 ], [ %9, %19 ], [ %18, %16 ], [ %9, %13 ]
%47 = phi i32 [ %8, %6 ], [ %8, %27 ], [ %8, %24 ], [ %8, %21 ], [ %8, %19 ], [ %8, %16 ], [ %15, %13 ]
%48 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%49 = load i32, i32* @EOF
%50 = icmp eq i32 %48, %49
br i1 %50, label %51, label %6
51: ; preds = %42, %2
%52 = phi i8 [ 32, %2 ], [ %43, %42 ]
%53 = phi i8* [ null, %2 ], [ %44, %42 ]
%54 = phi i32 [ 1, %2 ], [ %45, %42 ]
%55 = phi i32 [ 2, %2 ], [ %46, %42 ]
%56 = phi i32 [ 1000, %2 ], [ %47, %42 ]
%57 = tail call i32* @fopen(i8* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%58 = icmp eq i32* %57, null
br i1 %58, label %59, label %63
59: ; preds = %51
%60 = load i32, i32* @stderr
%61 = tail call i32 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32 %60)
%62 = tail call i32 @exit(i32 1)
unreachable
63: ; preds = %51
%64 = tail call i32 @srand(i32 1)
%65 = icmp sgt i32 %56, 0
br i1 %65, label %66, label %97
66: ; preds = %63
%67 = icmp eq i32 %54, 0
%68 = sext i8 %52 to i32
%69 = add i32 %55, -1
%70 = icmp sgt i32 %55, 1
br label %71
71: ; preds = %66, %87
%72 = phi i32 [ 0, %66 ], [ %95, %87 ]
br i1 %67, label %76, label %73
73: ; preds = %71
%74 = add nuw nsw i32 %72, 1
%75 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 %74, i32 %68)
br label %76
76: ; preds = %73, %71
br i1 %70, label %77, label %87
77: ; preds = %76, %77
%78 = phi i32 [ %85, %77 ], [ 0, %76 ]
%79 = tail call i64 (...) @rand()
%80 = sitofp i64 %79 to double
%81 = load double, double* @RAND_MAX
%82 = fdiv double %80, %81
%83 = tail call double @llvm.fmuladd.f64(double %82, double 9.000000e+00, double 1.000000e+00)
%84 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %83, i32 %68)
%85 = add nuw nsw i32 %78, 1
%86 = icmp eq i32 %85, %69
br i1 %86, label %87, label %77
87: ; preds = %77, %76
%88 = tail call i64 (...) @rand()
%89 = sitofp i64 %88 to double
%90 = load double, double* @RAND_MAX
%91 = fdiv double %89, %90
%92 = tail call double @llvm.fmuladd.f64(double %91, double 9.000000e+00, double 1.000000e+00)
%93 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), double %92)
%94 = tail call i32 @fputc(i32 10, i32* %57)
%95 = add nuw nsw i32 %72, 1
%96 = icmp eq i32 %95, %56
br i1 %96, label %97, label %71
97: ; preds = %87, %63
%98 = tail call i32 @fclose(i32* %57)
ret i32 0
}