#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 calcDistortion(int, double, double);
double calcError(double, double);
int calcTEDSound(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  double bestError = 1000000000000.0;
  double bestGamma0 = 0.0;
  double bestGamma1 = 0.0;
  double gamma0 = 1.0;
  int i;
  do {
    double gamma1 = 1.0;
    do {
      double err = calcError(gamma0, gamma1);
      if (err < bestError) {
        bestGamma0 = gamma0;
        bestGamma1 = gamma1;
        bestError = err;
      }
      gamma1 = gamma1 + 0.001;
    } while (gamma1 < 1.5);
    gamma0 = gamma0 + 0.001;
  } while (gamma0 < 1.5);
  printf("gamma0 = %f\n", bestGamma0);
  printf("gamma1 = %f\n", bestGamma1);
  printf("err = %f\n", bestError);
  printf("static const int16_t soundVolumeTable[64] = {\n");
  for (i = 0; i < 64; i++) {
    int tmp2 = calcDistortion(calcTEDSound(i), bestGamma0, bestGamma1);
    if (!(i & 7))
      printf(" ");
    printf("%6d", tmp2);
    if (i != 63)
      printf(",");
    if ((i & 7) == 7)
      printf("\n");
  }
  printf("};\n");
  printf("static const int16_t tedSoundDistortionTable[301] = {\n");
  for (i = 0; i <= 300; i++) {
    int tmp2 = calcDistortion(i, bestGamma0, bestGamma1);
    if (!(i & 7))
      printf(" ");
    printf("%6d", tmp2);
    if (i != 300)
      printf(",");
    if ((i & 7) == 7 || i == 300)
      printf("\n");
  }
  printf("};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe85(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe78(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1060 <calcError@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11d3 <main+0x93>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe35(%rip),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe2b(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
ja     118d <main+0x4d>
movsd  0xe10(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe06(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
ja     1180 <main+0x40>
movsd  -0x20(%rbp),%xmm0
lea    0xdf7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
lea    0xdf1(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xdeb(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x40,-0x34(%rbp)
jge    1307 <main+0x1c7>
mov    -0x34(%rbp),%edi
call   1050 <calcTEDSound@plt>
mov    %eax,%edi
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <calcDistortion@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
and    $0x7,%eax
cmp    $0x0,%eax
jne    12ae <main+0x16e>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4c(%rbp),%esi
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x3f,-0x34(%rbp)
je     12d7 <main+0x197>
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
and    $0x7,%eax
cmp    $0x7,%eax
jne    12f4 <main+0x1b4>
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f9 <main+0x1b9>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    126b <main+0x12b>
lea    0xd6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x12c,-0x34(%rbp)
jg     13d2 <main+0x292>
mov    -0x34(%rbp),%edi
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <calcDistortion@plt>
mov    %eax,-0x50(%rbp)
mov    -0x34(%rbp),%eax
and    $0x7,%eax
cmp    $0x0,%eax
jne    1369 <main+0x229>
lea    0xd11(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x50(%rbp),%esi
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x12c,-0x34(%rbp)
je     1395 <main+0x255>
lea    0xceb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
and    $0x7,%eax
cmp    $0x7,%eax
je     13b1 <main+0x271>
cmpl   $0x12c,-0x34(%rbp)
jne    13bf <main+0x27f>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13c4 <main+0x284>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    132a <main+0x1ea>
lea    0xca2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
movsd  0xe8e(%rip),%xmm3
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0xe86(%rip),%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
jmp    11b4 <main+0x54>
nopl   0x0(%rax)
movsd  (%rsp),%xmm2
addsd  0xe73(%rip),%xmm2
movsd  0xe73(%rip),%xmm1
movsd  %xmm2,(%rsp)
ucomisd %xmm2,%xmm1
jbe    125b <main+0xfb>
movsd  0xe4c(%rip),%xmm1
movaps %xmm0,%xmm4
movapd %xmm3,%xmm2
jmp    1220 <main+0xc0>
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm3,%xmm2
cmpltsd %xmm4,%xmm2
movapd %xmm2,%xmm1
movapd 0x40(%rsp),%xmm5
andpd  %xmm5,%xmm1
andnpd 0x20(%rsp),%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
minsd  %xmm4,%xmm3
addsd  0xe0d(%rip),%xmm5
movsd  0xe0d(%rip),%xmm1
ucomisd %xmm5,%xmm1
movaps %xmm0,%xmm4
movapd %xmm3,%xmm2
movapd %xmm5,%xmm1
jbe    1190 <main+0x30>
movsd  %xmm4,0x38(%rsp)
movaps %xmm1,0x40(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  (%rsp),%xmm0
call   1080 <calcError@plt>
movsd  0x18(%rsp),%xmm4
movapd %xmm0,%xmm3
ucomisd %xmm0,%xmm4
movsd  (%rsp),%xmm0
ja     11d0 <main+0x70>
movsd  0x38(%rsp),%xmm0
jmp    11d0 <main+0x70>
lea    0xdbe(%rip),%rdi
movaps %xmm0,(%rsp)
mov    $0x1,%al
movsd  %xmm3,0x18(%rsp)
call   1060 <printf@plt>
lea    0xdb3(%rip),%rdi
movaps 0x20(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xdad(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xda7(%rip),%rdi
call   1040 <puts@plt>
lea    0xd97(%rip),%r14
xor    %ebp,%ebp
jmp    12d2 <main+0x172>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x40,%ebp
je     1321 <main+0x1c1>
mov    %ebp,%edi
call   1070 <calcTEDSound@plt>
mov    %eax,%edi
movaps (%rsp),%xmm0
movapd 0x20(%rsp),%xmm1
call   1050 <calcDistortion@plt>
mov    %eax,%r15d
mov    %ebp,%ebx
and    $0x7,%ebx
jne    12fe <main+0x19e>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x3f,%ebp
je     12c0 <main+0x160>
mov    $0x2c,%edi
call   1030 <putchar@plt>
cmp    $0x7,%ebx
je     12c0 <main+0x160>
jmp    12ca <main+0x16a>
lea    0xd84(%rip),%rdi
call   1040 <puts@plt>
lea    0xd42(%rip),%rdi
call   1040 <puts@plt>
lea    0xd04(%rip),%r14
xor    %ebp,%ebp
jmp    1365 <main+0x205>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x12d,%ebp
je     13b0 <main+0x250>
mov    %ebp,%edi
movaps (%rsp),%xmm0
movapd 0x20(%rsp),%xmm1
call   1050 <calcDistortion@plt>
mov    %eax,%r15d
mov    %ebp,%ebx
and    $0x7,%ebx
jne    138a <main+0x22a>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x12c,%ebp
je     1350 <main+0x1f0>
mov    $0x2c,%edi
call   1030 <putchar@plt>
cmp    $0x7,%ebx
je     1350 <main+0x1f0>
jmp    135a <main+0x1fa>
lea    0xcf5(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"gamma0 = %f\0A\00"
@.str.1 = [13 x i8] c"gamma1 = %f\0A\00"
@.str.2 = [10 x i8] c"err = %f\0A\00"
@.str.3 = [47 x i8] c"static const int16_t soundVolumeTable[64] = {\0A\00"
@.str.4 = [2 x i8] c" \00"
@.str.5 = [4 x i8] c"%6d\00"
@.str.6 = [2 x i8] c",\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [4 x i8] c"};\0A\00"
@.str.9 = [55 x i8] c"static const int16_t tedSoundDistortionTable[301] = {\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e+12, double* %6
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
store double 1.000000e+00, double* %9
br label %15
15: ; preds = %36, %2
store double 1.000000e+00, double* %11
br label %16
16: ; preds = %30, %15
%17 = load double, double* %9
%18 = load double, double* %11
%19 = call double @calcError(double %17, double %18)
store double %19, double* %12
%20 = load double, double* %12
%21 = load double, double* %6
%22 = fcmp olt double %20, %21
br i1 %22, label %23, label %27
23: ; preds = %16
%24 = load double, double* %9
store double %24, double* %7
%25 = load double, double* %11
store double %25, double* %8
%26 = load double, double* %12
store double %26, double* %6
br label %27
27: ; preds = %23, %16
%28 = load double, double* %11
%29 = fadd double %28, 1.000000e-03
store double %29, double* %11
br label %30
30: ; preds = %27
%31 = load double, double* %11
%32 = fcmp olt double %31, 1.500000e+00
br i1 %32, label %16, label %33
33: ; preds = %30
%34 = load double, double* %9
%35 = fadd double %34, 1.000000e-03
store double %35, double* %9
br label %36
36: ; preds = %33
%37 = load double, double* %9
%38 = fcmp olt double %37, 1.500000e+00
br i1 %38, label %15, label %39
39: ; preds = %36
%40 = load double, double* %7
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %40)
%42 = load double, double* %8
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %42)
%44 = load double, double* %6
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %10
br label %47
47: ; preds = %75, %39
%48 = load i32, i32* %10
%49 = icmp slt i32 %48, 64
br i1 %49, label %50, label %78
50: ; preds = %47
%51 = load i32, i32* %10
%52 = call i32 @calcTEDSound(i32 %51)
%53 = load double, double* %7
%54 = load double, double* %8
%55 = call i32 @calcDistortion(i32 %52, double %53, double %54)
store i32 %55, i32* %13
%56 = load i32, i32* %10
%57 = and i32 %56, 7
%58 = icmp ne i32 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %50
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %61
61: ; preds = %59, %50
%62 = load i32, i32* %13
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %10
%65 = icmp ne i32 %64, 63
br i1 %65, label %66, label %68
66: ; preds = %61
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %68
68: ; preds = %66, %61
%69 = load i32, i32* %10
%70 = and i32 %69, 7
%71 = icmp eq i32 %70, 7
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %74
74: ; preds = %72, %68
br label %75
75: ; preds = %74
%76 = load i32, i32* %10
%77 = add nsw i32 %76, 1
store i32 %77, i32* %10
br label %47
78: ; preds = %47
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %10
br label %81
81: ; preds = %111, %78
%82 = load i32, i32* %10
%83 = icmp sle i32 %82, 300
br i1 %83, label %84, label %114
84: ; preds = %81
%85 = load i32, i32* %10
%86 = load double, double* %7
%87 = load double, double* %8
%88 = call i32 @calcDistortion(i32 %85, double %86, double %87)
store i32 %88, i32* %14
%89 = load i32, i32* %10
%90 = and i32 %89, 7
%91 = icmp ne i32 %90, 0
br i1 %91, label %94, label %92
92: ; preds = %84
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %94
94: ; preds = %92, %84
%95 = load i32, i32* %14
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %95)
%97 = load i32, i32* %10
%98 = icmp ne i32 %97, 300
br i1 %98, label %99, label %101
99: ; preds = %94
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %101
101: ; preds = %99, %94
%102 = load i32, i32* %10
%103 = and i32 %102, 7
%104 = icmp eq i32 %103, 7
br i1 %104, label %108, label %105
105: ; preds = %101
%106 = load i32, i32* %10
%107 = icmp eq i32 %106, 300
br i1 %107, label %108, label %110
108: ; preds = %105, %101
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %110
110: ; preds = %108, %105
br label %111
111: ; preds = %110
%112 = load i32, i32* %10
%113 = add nsw i32 %112, 1
store i32 %113, i32* %10
br label %81
114: ; preds = %81
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"gamma0 = %f\0A\00"
@.str.1 = [13 x i8] c"gamma1 = %f\0A\00"
@.str.2 = [10 x i8] c"err = %f\0A\00"
@.str.5 = [4 x i8] c"%6d\00"
@str = [46 x i8] c"static const int16_t soundVolumeTable[64] = {\00"
@str.11 = [54 x i8] c"static const int16_t tedSoundDistortionTable[301] = {\00"
@str.12 = [3 x i8] c"};\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %20, %2
%4 = phi double [ 1.000000e+00, %2 ], [ %21, %20 ]
%5 = phi double [ 0.000000e+00, %2 ], [ %15, %20 ]
%6 = phi double [ 0.000000e+00, %2 ], [ %16, %20 ]
%7 = phi double [ 1.000000e+12, %2 ], [ %17, %20 ]
br label %8
8: ; preds = %8, %3
%9 = phi double [ 1.000000e+00, %3 ], [ %18, %8 ]
%10 = phi double [ %5, %3 ], [ %15, %8 ]
%11 = phi double [ %6, %3 ], [ %16, %8 ]
%12 = phi double [ %7, %3 ], [ %17, %8 ]
%13 = tail call double @calcError(double %4, double %9)
%14 = fcmp olt double %13, %12
%15 = select i1 %14, double %9, double %10
%16 = select i1 %14, double %4, double %11
%17 = select i1 %14, double %13, double %12
%18 = fadd double %9, 1.000000e-03
%19 = fcmp olt double %18, 1.500000e+00
br i1 %19, label %8, label %20
20: ; preds = %8
%21 = fadd double %4, 1.000000e-03
%22 = fcmp olt double %21, 1.500000e+00
br i1 %22, label %3, label %23
23: ; preds = %20
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %16)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %15)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %17)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
br label %28
28: ; preds = %23, %44
%29 = phi i32 [ 0, %23 ], [ %45, %44 ]
%30 = tail call i32 @calcTEDSound(i32 %29)
%31 = tail call i32 @calcDistortion(i32 %30, double %16, double %15)
%32 = and i32 %29, 7
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %28
%35 = tail call i32 @putchar(i32 32)
br label %36
36: ; preds = %34, %28
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %31)
%38 = icmp eq i32 %29, 63
br i1 %38, label %42, label %39
39: ; preds = %36
%40 = tail call i32 @putchar(i32 44)
%41 = icmp eq i32 %32, 7
br i1 %41, label %42, label %44
42: ; preds = %36, %39
%43 = tail call i32 @putchar(i32 10)
br label %44
44: ; preds = %42, %39
%45 = add nuw nsw i32 %29, 1
%46 = icmp eq i32 %45, 64
br i1 %46, label %47, label %28
47: ; preds = %44
%48 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.12, i64 0, i64 0))
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.11, i64 0, i64 0))
br label %50
50: ; preds = %47, %65
%51 = phi i32 [ 0, %47 ], [ %66, %65 ]
%52 = tail call i32 @calcDistortion(i32 %51, double %16, double %15)
%53 = and i32 %51, 7
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %50
%56 = tail call i32 @putchar(i32 32)
br label %57
57: ; preds = %55, %50
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %52)
%59 = icmp eq i32 %51, 300
br i1 %59, label %63, label %60
60: ; preds = %57
%61 = tail call i32 @putchar(i32 44)
%62 = icmp eq i32 %53, 7
br i1 %62, label %63, label %65
63: ; preds = %57, %60
%64 = tail call i32 @putchar(i32 10)
br label %65
65: ; preds = %60, %63
%66 = add nuw nsw i32 %51, 1
%67 = icmp eq i32 %66, 301
br i1 %67, label %68, label %50
68: ; preds = %65
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.12, i64 0, i64 0))
ret i32 0
}