#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 */
float atof(char *);
char generate(float *);
int /*<<< orphan*/ printf(char *, float, int);
int /*<<< orphan*/ puts(char *);
float sample(float *, char *, float, float);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  if (argc != 5) {
    puts("usage: chi-squared-tester pA(float) pT(float) pG(float) pC(float)");
    return 1;
  }
  srand(time(NULL));
  float atgc_prob[4] = {atof(argv[1]), atof(argv[2]), atof(argv[3]),
                        atof(argv[4])};
  char rr[2] = {generate(atgc_prob), generate(atgc_prob)};
  float c = 0;
  if (rr[0] == rr[1]) {
    c = 1.0 + 2.0 * atgc_prob[rr[0]] -
        3.0 * atgc_prob[rr[1]] * atgc_prob[rr[1]];
  } else {
    c = 1 - 3.0 * atgc_prob[rr[0]] * atgc_prob[rr[1]];
  }
  float E = (999.0) * atgc_prob[rr[0]] * atgc_prob[rr[1]];
  float samples[10000];
  for (int i = 0; i < 10000; i++) {
    samples[i] = sample(atgc_prob, rr, c, E);
  }
  int hist_bars[30] = {};
  for (int i = 0; i < 10000; i++) {
    int bar = samples[i] / 1;
    if (bar > 30) {
      puts("WARNING - DATA LOST");
    } else {
      hist_bars[bar]++;
    }
  }
  for (int i = 0; i < 30; i++) {
    printf("%05.2f | %i\n", (float)i * 1, hist_bars[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9d00,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     11bb <main+0x3b>
lea    0xe72(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,-0x4(%rbp)
jmp    149a <main+0x31a>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atof@plt>
movss  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atof@plt>
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1040 <atof@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1040 <atof@plt>
movss  %xmm0,-0x14(%rbp)
lea    -0x20(%rbp),%rdi
call   10a0 <generate@plt>
mov    %al,-0x22(%rbp)
lea    -0x20(%rbp),%rdi
call   10a0 <generate@plt>
mov    %al,-0x21(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movsbl -0x22(%rbp),%eax
movsbl -0x21(%rbp),%ecx
cmp    %ecx,%eax
jne    12b9 <main+0x139>
movsbq -0x22(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
addsd  %xmm1,%xmm1
movsd  0xda2(%rip),%xmm0
addsd  %xmm0,%xmm1
movsbq -0x21(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xd8f(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsbq -0x21(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm2
cvtss2sd %xmm2,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
jmp    1313 <main+0x193>
movsbq -0x22(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd38(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsbq -0x21(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xcfa(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movsbq -0x22(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xce6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsbq -0x21(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movl   $0x0,-0x9c74(%rbp)
cmpl   $0x2710,-0x9c74(%rbp)
jge    139f <main+0x21f>
lea    -0x20(%rbp),%rdi
lea    -0x22(%rbp),%rsi
movss  -0x28(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
call   1090 <sample@plt>
movslq -0x9c74(%rbp),%rax
movss  %xmm0,-0x9c70(%rbp,%rax,4)
ff ff
mov    -0x9c74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c74(%rbp)
jmp    1354 <main+0x1d4>
lea    -0x9cf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x78,%edx
call   1060 <memset@plt>
movl   $0x0,-0x9cf4(%rbp)
cmpl   $0x2710,-0x9cf4(%rbp)
jge    1441 <main+0x2c1>
movslq -0x9cf4(%rbp),%rax
movss  -0x9c70(%rbp,%rax,4),%xmm0
ff ff
movss  0xc34(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x9cf8(%rbp)
cmpl   $0x1e,-0x9cf8(%rbp)
jle    1410 <main+0x290>
lea    0xc58(%rip),%rdi
call   1030 <puts@plt>
jmp    1428 <main+0x2a8>
movslq -0x9cf8(%rbp),%rax
mov    -0x9cf0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x9cf0(%rbp,%rax,4)
jmp    142d <main+0x2ad>
mov    -0x9cf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9cf4(%rbp)
jmp    13bc <main+0x23c>
movl   $0x0,-0x9cfc(%rbp)
cmpl   $0x1e,-0x9cfc(%rbp)
jge    149a <main+0x31a>
cvtsi2ssl -0x9cfc(%rbp),%xmm0
ff
movss  0xbb0(%rip),%xmm1
mulss  %xmm1,%xmm0
movslq -0x9cfc(%rbp),%rax
mov    -0x9cf0(%rbp,%rax,4),%esi
lea    0xbf1(%rip),%rdi
call   1050 <printf@plt>
mov    -0x9cfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9cfc(%rbp)
jmp    144b <main+0x2cb>
mov    -0x4(%rbp),%eax
add    $0x9d00,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x9cf0,%rsp
cmp    $0x5,%edi
jne    122c <main+0xbc>
mov    %rsi,%rbx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    0x8(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x10(%rsp)
mov    0x10(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x14(%rsp)
mov    0x18(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x18(%rsp)
mov    0x20(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x1c(%rsp)
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1090 <generate@plt>
mov    %eax,%ebx
mov    %al,0xe(%rsp)
mov    %r14,%rdi
call   1090 <generate@plt>
mov    %al,0xf(%rsp)
movsbq %bl,%rcx
movss  0x10(%rsp,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
cmp    %al,%bl
jne    1242 <main+0xd2>
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm2
addsd  0xdf5(%rip),%xmm2
movsd  0xde5(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movaps %xmm0,%xmm2
jmp    1268 <main+0xf8>
lea    0xde5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
jmp    136f <main+0x1ff>
movsbq %al,%rax
movss  0x10(%rsp,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xda8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
addsd  0xda0(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x2c(%rsp)
mulsd  0xd96(%rip),%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
xor    %ebx,%ebx
lea    0x10(%rsp),%r14
lea    0xe(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
movss  0x2c(%rsp),%xmm0
movss  0x28(%rsp),%xmm1
call   1080 <sample@plt>
movss  %xmm0,0xb0(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x2710,%rbx
jne    12a0 <main+0x130>
xorps  %xmm0,%xmm0
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movq   $0x0,0xa0(%rsp)
xor    %ebx,%ebx
lea    0xd4c(%rip),%r14
jmp    1324 <main+0x1b4>
cltq
addl   $0x1,0x30(%rsp,%rax,4)
add    $0x1,%rbx
cmp    $0x2710,%rbx
je     133c <main+0x1cc>
cvttss2si 0xb0(%rsp,%rbx,4),%eax
cmp    $0x1f,%eax
jl     1310 <main+0x1a0>
mov    %r14,%rdi
call   1030 <puts@plt>
jmp    1317 <main+0x1a7>
xor    %ebx,%ebx
lea    0xd29(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
mov    0x30(%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    $0x1e,%rbx
jne    1350 <main+0x1e0>
xor    %eax,%eax
add    $0x9cf0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [66 x i8] c"usage: chi-squared-tester pA(float) pT(float) pG(float) pC(float)\00"
@.str.1 = [20 x i8] c"WARNING - DATA LOST\00"
@.str.2 = [13 x i8] c"%05.2f | %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x float]
%7 = alloca [2 x i8]
%8 = alloca float
%9 = alloca float
%10 = alloca [10000 x float]
%11 = alloca i32
%12 = alloca [30 x i32]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 5
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 @puts(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %170
20: ; preds = %2
%21 = call i32 @time(i32* null)
%22 = call i32 @srand(i32 %21)
%23 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 0
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call float @atof(i8* %26)
store float %27, float* %23
%28 = getelementptr inbounds float, float* %23, i64 1
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
%32 = call float @atof(i8* %31)
store float %32, float* %28
%33 = getelementptr inbounds float, float* %28, i64 1
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 3
%36 = load i8*, i8** %35
%37 = call float @atof(i8* %36)
store float %37, float* %33
%38 = getelementptr inbounds float, float* %33, i64 1
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 4
%41 = load i8*, i8** %40
%42 = call float @atof(i8* %41)
store float %42, float* %38
%43 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%44 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 0
%45 = call signext i8 @generate(float* %44)
store i8 %45, i8* %43
%46 = getelementptr inbounds i8, i8* %43, i64 1
%47 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 0
%48 = call signext i8 @generate(float* %47)
store i8 %48, i8* %46
store float 0.000000e+00, float* %8
%49 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 1
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %51, %54
br i1 %55, label %56, label %80
56: ; preds = %20
%57 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%58 = load i8, i8* %57
%59 = sext i8 %58 to i64
%60 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 %59
%61 = load float, float* %60
%62 = fpext float %61 to double
%63 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %62, double 1.000000e+00)
%64 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 1
%65 = load i8, i8* %64
%66 = sext i8 %65 to i64
%67 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 %66
%68 = load float, float* %67
%69 = fpext float %68 to double
%70 = fmul double 3.000000e+00, %69
%71 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 1
%72 = load i8, i8* %71
%73 = sext i8 %72 to i64
%74 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 %73
%75 = load float, float* %74
%76 = fpext float %75 to double
%77 = fneg double %70
%78 = call double @llvm.fmuladd.f64(double %77, double %76, double %63)
%79 = fptrunc double %78 to float
store float %79, float* %8
br label %97
80: ; preds = %20
%81 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%82 = load i8, i8* %81
%83 = sext i8 %82 to i64
%84 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 %83
%85 = load float, float* %84
%86 = fpext float %85 to double
%87 = fmul double 3.000000e+00, %86
%88 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 1
%89 = load i8, i8* %88
%90 = sext i8 %89 to i64
%91 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 %90
%92 = load float, float* %91
%93 = fpext float %92 to double
%94 = fneg double %87
%95 = call double @llvm.fmuladd.f64(double %94, double %93, double 1.000000e+00)
%96 = fptrunc double %95 to float
store float %96, float* %8
br label %97
97: ; preds = %80, %56
%98 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%99 = load i8, i8* %98
%100 = sext i8 %99 to i64
%101 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 %100
%102 = load float, float* %101
%103 = fpext float %102 to double
%104 = fmul double 9.990000e+02, %103
%105 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 1
%106 = load i8, i8* %105
%107 = sext i8 %106 to i64
%108 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 %107
%109 = load float, float* %108
%110 = fpext float %109 to double
%111 = fmul double %104, %110
%112 = fptrunc double %111 to float
store float %112, float* %9
store i32 0, i32* %11
br label %113
113: ; preds = %125, %97
%114 = load i32, i32* %11
%115 = icmp slt i32 %114, 10000
br i1 %115, label %116, label %128
116: ; preds = %113
%117 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 0
%118 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%119 = load float, float* %8
%120 = load float, float* %9
%121 = call float @sample(float* %117, i8* %118, float %119, float %120)
%122 = load i32, i32* %11
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [10000 x float], [10000 x float]* %10, i64 0, i64 %123
store float %121, float* %124
br label %125
125: ; preds = %116
%126 = load i32, i32* %11
%127 = add nsw i32 %126, 1
store i32 %127, i32* %11
br label %113
128: ; preds = %113
%129 = bitcast [30 x i32]* %12 to i8*
store i32 0, i32* %13
br label %130
130: ; preds = %151, %128
%131 = load i32, i32* %13
%132 = icmp slt i32 %131, 10000
br i1 %132, label %133, label %154
133: ; preds = %130
%134 = load i32, i32* %13
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [10000 x float], [10000 x float]* %10, i64 0, i64 %135
%137 = load float, float* %136
%138 = fdiv float %137, 1.000000e+00
%139 = fptosi float %138 to i32
store i32 %139, i32* %14
%140 = load i32, i32* %14
%141 = icmp sgt i32 %140, 30
br i1 %141, label %142, label %144
142: ; preds = %133
%143 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %150
144: ; preds = %133
%145 = load i32, i32* %14
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [30 x i32], [30 x i32]* %12, i64 0, i64 %146
%148 = load i32, i32* %147
%149 = add nsw i32 %148, 1
store i32 %149, i32* %147
br label %150
150: ; preds = %144, %142
br label %151
151: ; preds = %150
%152 = load i32, i32* %13
%153 = add nsw i32 %152, 1
store i32 %153, i32* %13
br label %130
154: ; preds = %130
store i32 0, i32* %15
br label %155
155: ; preds = %167, %154
%156 = load i32, i32* %15
%157 = icmp slt i32 %156, 30
br i1 %157, label %158, label %170
158: ; preds = %155
%159 = load i32, i32* %15
%160 = sitofp i32 %159 to float
%161 = fmul float %160, 1.000000e+00
%162 = load i32, i32* %15
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [30 x i32], [30 x i32]* %12, i64 0, i64 %163
%165 = load i32, i32* %164
%166 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), float %161, i32 %165)
br label %167
167: ; preds = %158
%168 = load i32, i32* %15
%169 = add nsw i32 %168, 1
store i32 %169, i32* %15
br label %155
170: ; preds = %18, %155
%171 = load i32, i32* %3
ret i32 %171
}

LLVM IR (-O2):
@.str = [66 x i8] c"usage: chi-squared-tester pA(float) pT(float) pG(float) pC(float)\00"
@.str.1 = [20 x i8] c"WARNING - DATA LOST\00"
@.str.2 = [13 x i8] c"%05.2f | %i\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [4 x float]
%4 = alloca [2 x i8]
%5 = alloca [10000 x float]
%6 = alloca [30 x i32]
%7 = icmp eq i32 %0, 5
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
br label %92
10: ; preds = %2
%11 = tail call i32 @time(i32* null)
%12 = tail call i32 @srand(i32 %11)
%13 = bitcast [4 x float]* %3 to i8*
%14 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call float @atof(i8* %16)
store float %17, float* %14
%18 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 1
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = tail call float @atof(i8* %20)
store float %21, float* %18
%22 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 2
%23 = getelementptr inbounds i8*, i8** %1, i64 3
%24 = load i8*, i8** %23
%25 = tail call float @atof(i8* %24)
store float %25, float* %22
%26 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 3
%27 = getelementptr inbounds i8*, i8** %1, i64 4
%28 = load i8*, i8** %27
%29 = tail call float @atof(i8* %28)
store float %29, float* %26
%30 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%31 = call signext i8 @generate(float* %14)
store i8 %31, i8* %30
%32 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
%33 = call signext i8 @generate(float* %14)
store i8 %33, i8* %32
%34 = icmp eq i8 %31, %33
%35 = sext i8 %31 to i64
%36 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 %35
%37 = load float, float* %36
%38 = fpext float %37 to double
br i1 %34, label %39, label %43
39: ; preds = %10
%40 = call double @llvm.fmuladd.f64(double %38, double 2.000000e+00, double 1.000000e+00)
%41 = fmul double %38, -3.000000e+00
%42 = call double @llvm.fmuladd.f64(double %41, double %38, double %40)
br label %50
43: ; preds = %10
%44 = sext i8 %33 to i64
%45 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 %44
%46 = load float, float* %45
%47 = fpext float %46 to double
%48 = fmul double %38, -3.000000e+00
%49 = call double @llvm.fmuladd.f64(double %48, double %47, double 1.000000e+00)
br label %50
50: ; preds = %43, %39
%51 = phi double [ %47, %43 ], [ %38, %39 ]
%52 = phi double [ %49, %43 ], [ %42, %39 ]
%53 = fptrunc double %52 to float
%54 = fmul double %38, 9.990000e+02
%55 = fmul double %54, %51
%56 = fptrunc double %55 to float
%57 = bitcast [10000 x float]* %5 to i8*
br label %60
58: ; preds = %60
%59 = bitcast [30 x i32]* %6 to i8*
br label %66
60: ; preds = %50, %60
%61 = phi i64 [ 0, %50 ], [ %64, %60 ]
%62 = call float @sample(float* %14, i8* %30, float %53, float %56)
%63 = getelementptr inbounds [10000 x float], [10000 x float]* %5, i64 0, i64 %61
store float %62, float* %63
%64 = add nuw nsw i64 %61, 1
%65 = icmp eq i64 %64, 10000
br i1 %65, label %58, label %60
66: ; preds = %58, %79
%67 = phi i64 [ 0, %58 ], [ %80, %79 ]
%68 = getelementptr inbounds [10000 x float], [10000 x float]* %5, i64 0, i64 %67
%69 = load float, float* %68
%70 = fptosi float %69 to i32
%71 = icmp sgt i32 %70, 30
br i1 %71, label %72, label %74
72: ; preds = %66
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %79
74: ; preds = %66
%75 = sext i32 %70 to i64
%76 = getelementptr inbounds [30 x i32], [30 x i32]* %6, i64 0, i64 %75
%77 = load i32, i32* %76
%78 = add nsw i32 %77, 1
store i32 %78, i32* %76
br label %79
79: ; preds = %74, %72
%80 = add nuw nsw i64 %67, 1
%81 = icmp eq i64 %80, 10000
br i1 %81, label %83, label %66
82: ; preds = %83
br label %92
83: ; preds = %79, %83
%84 = phi i64 [ %90, %83 ], [ 0, %79 ]
%85 = trunc i64 %84 to i32
%86 = sitofp i32 %85 to float
%87 = getelementptr inbounds [30 x i32], [30 x i32]* %6, i64 0, i64 %84
%88 = load i32, i32* %87
%89 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), float %86, i32 %88)
%90 = add nuw nsw i64 %84, 1
%91 = icmp eq i64 %90, 30
br i1 %91, label %82, label %83
92: ; preds = %82, %8
%93 = phi i32 [ 1, %8 ], [ 0, %82 ]
ret i32 %93
}