#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 /*<<< orphan*/ printf(char *, ...);
int main() {
  float initialwerte[21][2] = {
      {0.0, 0.15}, {0.1, 0.55}, {0.2, 0.89}, {0.3, 1.50}, {0.4, 1.95},
      {0.5, 1.97}, {0.6, 2.91}, {0.7, 3.20}, {0.8, 3.46}, {0.9, 3.40},
      {1.0, 4.22}, {1.1, 5.11}, {1.2, 5.06}, {1.3, 5.70}, {1.4, 5.89},
      {1.5, 5.65}, {1.6, 6.90}, {1.7, 7.04}, {1.8, 8.16}, {1.9, 8.00},
      {2.0, 8.61}};
  int i, zeile;
  float Q, U0, Ui, Diff, Proz, maxProz, absProz;
  maxProz = 0.0;
  printf("Q[cubm/h]\tU0[V]\tUi[V]\tDiff[V]\t %%\n");
  for (i = 0; i < 21; i++) {
    Q = initialwerte[i][0];
    U0 = initialwerte[i][1];
    Ui = (4.7 * Q) + 0.13;
    Diff = U0 - Ui;
    Proz = (Diff * 100) / U0;
    absProz = Proz;
    if (absProz < 0) {
      absProz = absProz * -1;
    }
    if (absProz > maxProz) {
      maxProz = absProz;
      zeile = i + 1;
    }
    printf("%.2f\t\t%.2f\t%.2f\t%+.2f\t%+.2f\n", Q, U0, Ui, Diff, Proz);
  }
  printf("Maximale Abweichung: %.2f%% bei Messwert %d\n", maxProz, zeile);
  if (maxProz > 5.0) {
    printf("Prüfung nicht bestanden\n");
  } else {
    printf("Prüfung bestanden!\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xee0(%rip),%rsi
mov    $0xa8,%edx
call   1040 <memcpy@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xd0(%rbp)
ff
lea    0xf6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xb4(%rbp)
cmpl   $0x15,-0xb4(%rbp)
jge    12dc <main+0x1bc>
movslq -0xb4(%rbp),%rax
movss  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movss  %xmm0,-0xbc(%rbp)
ff
movslq -0xb4(%rbp),%rax
movss  -0xac(%rbp,%rax,8),%xmm0
ff ff
movss  %xmm0,-0xc0(%rbp)
ff
movss  -0xbc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  0xe4a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe46(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc4(%rbp)
ff
movss  -0xc0(%rbp),%xmm0
ff
subss  -0xc4(%rbp),%xmm0
ff
movss  %xmm0,-0xc8(%rbp)
ff
movss  0xe1e(%rip),%xmm0
mulss  -0xc8(%rbp),%xmm0
ff
divss  -0xc0(%rbp),%xmm0
ff
movss  %xmm0,-0xcc(%rbp)
ff
movss  -0xcc(%rbp),%xmm0
ff
movss  %xmm0,-0xd4(%rbp)
ff
xorps  %xmm0,%xmm0
ucomiss -0xd4(%rbp),%xmm0
jbe    124a <main+0x12a>
movss  0xde2(%rip),%xmm0
mulss  -0xd4(%rbp),%xmm0
ff
movss  %xmm0,-0xd4(%rbp)
ff
movss  -0xd4(%rbp),%xmm0
ff
ucomiss -0xd0(%rbp),%xmm0
jbe    127e <main+0x15e>
movss  -0xd4(%rbp),%xmm0
ff
movss  %xmm0,-0xd0(%rbp)
ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
movss  -0xbc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0xc0(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0xc4(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
movss  -0xc8(%rbp),%xmm3
ff
cvtss2sd %xmm3,%xmm3
movss  -0xcc(%rbp),%xmm4
ff
cvtss2sd %xmm4,%xmm4
lea    0xe2a(%rip),%rdi
mov    $0x5,%al
call   1030 <printf@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    116d <main+0x4d>
movss  -0xd0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
mov    -0xb8(%rbp),%esi
lea    0xe13(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xd0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  0xcf0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    132d <main+0x20d>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    133b <main+0x21b>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xfa7(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeef(%rip),%r15
lea    0xfb3(%rip),%r14
xorps  %xmm1,%xmm1
nopl   0x0(%rax,%rax,1)
movss  (%r15,%rbx,8),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm2
mulsd  0xe9b(%rip),%xmm2
addsd  0xe9b(%rip),%xmm2
cvtsd2ss %xmm2,%xmm2
movss  0x4(%r15,%rbx,8),%xmm4
movaps %xmm4,%xmm3
subss  %xmm2,%xmm3
movaps %xmm3,%xmm5
mulss  0xe86(%rip),%xmm5
divss  %xmm4,%xmm5
movaps %xmm5,%xmm6
xorps  0xe88(%rip),%xmm6
movaps %xmm5,%xmm7
cmpltss 0xe74(%rip),%xmm7
andps  %xmm7,%xmm6
andnps %xmm5,%xmm7
orps   %xmm6,%xmm7
add    $0x1,%rbx
ucomiss %xmm1,%xmm7
cvtss2sd %xmm3,%xmm3
cmova  %ebx,%ebp
maxss  %xmm1,%xmm7
movaps %xmm7,(%rsp)
xorps  %xmm1,%xmm1
cvtss2sd %xmm4,%xmm1
cvtss2sd %xmm2,%xmm2
xorps  %xmm4,%xmm4
cvtss2sd %xmm5,%xmm4
mov    %r14,%rdi
mov    $0x5,%al
call   1040 <printf@plt>
movaps (%rsp),%xmm1
cmp    $0x15,%rbx
jne    1150 <main+0x30>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xf1d(%rip),%rdi
mov    %ebp,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movaps (%rsp),%xmm0
ucomiss 0xe05(%rip),%xmm0
lea    0xf43(%rip),%rax
lea    0xf28(%rip),%rdi
cmova  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.initialwerte = [21 x [2 x float]] [[2 x float] [float 0.000000e+00, float 0x3FC3333340000000], [2 x float] [float 0x3FB99999A0000000, float 0x3FE19999A0000000], [2 x float] [float 0x3FC99999A0000000, float 0x3FEC7AE140000000], [2 x float] [float 0x3FD3333340000000, float 1.500000e+00], [2 x float] [float 0x3FD99999A0000000, float 0x3FFF333340000000], [2 x float] [float 5.000000e-01, float 0x3FFF851EC0000000], [2 x float] [float 0x3FE3333340000000, float 0x400747AE20000000], [2 x float] [float 0x3FE6666660000000, float 0x40099999A0000000], [2 x float] [float 0x3FE99999A0000000, float 0x400BAE1480000000], [2 x float] [float 0x3FECCCCCC0000000, float 0x400B333340000000], [2 x float] [float 1.000000e+00, float 0x4010E147A0000000], [2 x float] [float 0x3FF19999A0000000, float 0x401470A3E0000000], [2 x float] [float 0x3FF3333340000000, float 0x40143D70A0000000], [2 x float] [float 0x3FF4CCCCC0000000, float 0x4016CCCCC0000000], [2 x float] [float 0x3FF6666660000000, float 0x40178F5C20000000], [2 x float] [float 1.500000e+00, float 0x40169999A0000000], [2 x float] [float 0x3FF99999A0000000, float 0x401B9999A0000000], [2 x float] [float 0x3FFB333340000000, float 0x401C28F5C0000000], [2 x float] [float 0x3FFCCCCCC0000000, float 0x402051EB80000000], [2 x float] [float 0x3FFE666660000000, float 8.000000e+00], [2 x float] [float 2.000000e+00, float 0x40213851E0000000]]
@.str = [35 x i8] c"Q[cubm/h]\09U0[V]\09Ui[V]\09Diff[V]\09 %%\0A\00"
@.str.1 = [29 x i8] c"%.2f\09\09%.2f\09%.2f\09%+.2f\09%+.2f\0A\00"
@.str.2 = [45 x i8] c"Maximale Abweichung: %.2f%% bei Messwert %d\0A\00"
@.str.3 = [26 x i8] c"Pr\C3\BCfung nicht bestanden\0A\00"
@.str.4 = [21 x i8] c"Pr\C3\BCfung bestanden!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x [2 x float]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
store i32 0, i32* %1
%12 = bitcast [21 x [2 x float]]* %2 to i8*
store float 0.000000e+00, float* %10
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %14
14: ; preds = %65, %0
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 21
br i1 %16, label %17, label %68
17: ; preds = %14
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [21 x [2 x float]], [21 x [2 x float]]* %2, i64 0, i64 %19
%21 = getelementptr inbounds [2 x float], [2 x float]* %20, i64 0, i64 0
%22 = load float, float* %21
store float %22, float* %5
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [21 x [2 x float]], [21 x [2 x float]]* %2, i64 0, i64 %24
%26 = getelementptr inbounds [2 x float], [2 x float]* %25, i64 0, i64 1
%27 = load float, float* %26
store float %27, float* %6
%28 = load float, float* %5
%29 = fpext float %28 to double
%30 = call double @llvm.fmuladd.f64(double 4.700000e+00, double %29, double 1.300000e-01)
%31 = fptrunc double %30 to float
store float %31, float* %7
%32 = load float, float* %6
%33 = load float, float* %7
%34 = fsub float %32, %33
store float %34, float* %8
%35 = load float, float* %8
%36 = fmul float %35, 1.000000e+02
%37 = load float, float* %6
%38 = fdiv float %36, %37
store float %38, float* %9
%39 = load float, float* %9
store float %39, float* %11
%40 = load float, float* %11
%41 = fcmp olt float %40, 0.000000e+00
br i1 %41, label %42, label %45
42: ; preds = %17
%43 = load float, float* %11
%44 = fmul float %43, -1.000000e+00
store float %44, float* %11
br label %45
45: ; preds = %42, %17
%46 = load float, float* %11
%47 = load float, float* %10
%48 = fcmp ogt float %46, %47
br i1 %48, label %49, label %53
49: ; preds = %45
%50 = load float, float* %11
store float %50, float* %10
%51 = load i32, i32* %3
%52 = add nsw i32 %51, 1
store i32 %52, i32* %4
br label %53
53: ; preds = %49, %45
%54 = load float, float* %5
%55 = fpext float %54 to double
%56 = load float, float* %6
%57 = fpext float %56 to double
%58 = load float, float* %7
%59 = fpext float %58 to double
%60 = load float, float* %8
%61 = fpext float %60 to double
%62 = load float, float* %9
%63 = fpext float %62 to double
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %55, double %57, double %59, double %61, double %63)
br label %65
65: ; preds = %53
%66 = load i32, i32* %3
%67 = add nsw i32 %66, 1
store i32 %67, i32* %3
br label %14
68: ; preds = %14
%69 = load float, float* %10
%70 = fpext float %69 to double
%71 = load i32, i32* %4
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), double %70, i32 %71)
%73 = load float, float* %10
%74 = fpext float %73 to double
%75 = fcmp ogt double %74, 5.000000e+00
br i1 %75, label %76, label %78
76: ; preds = %68
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %80
78: ; preds = %68
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %80
80: ; preds = %78, %76
%81 = load i32, i32* %1
ret i32 %81
}

LLVM IR (-O2):
@__const.main.initialwerte = [21 x [2 x float]] [[2 x float] [float 0.000000e+00, float 0x3FC3333340000000], [2 x float] [float 0x3FB99999A0000000, float 0x3FE19999A0000000], [2 x float] [float 0x3FC99999A0000000, float 0x3FEC7AE140000000], [2 x float] [float 0x3FD3333340000000, float 1.500000e+00], [2 x float] [float 0x3FD99999A0000000, float 0x3FFF333340000000], [2 x float] [float 5.000000e-01, float 0x3FFF851EC0000000], [2 x float] [float 0x3FE3333340000000, float 0x400747AE20000000], [2 x float] [float 0x3FE6666660000000, float 0x40099999A0000000], [2 x float] [float 0x3FE99999A0000000, float 0x400BAE1480000000], [2 x float] [float 0x3FECCCCCC0000000, float 0x400B333340000000], [2 x float] [float 1.000000e+00, float 0x4010E147A0000000], [2 x float] [float 0x3FF19999A0000000, float 0x401470A3E0000000], [2 x float] [float 0x3FF3333340000000, float 0x40143D70A0000000], [2 x float] [float 0x3FF4CCCCC0000000, float 0x4016CCCCC0000000], [2 x float] [float 0x3FF6666660000000, float 0x40178F5C20000000], [2 x float] [float 1.500000e+00, float 0x40169999A0000000], [2 x float] [float 0x3FF99999A0000000, float 0x401B9999A0000000], [2 x float] [float 0x3FFB333340000000, float 0x401C28F5C0000000], [2 x float] [float 0x3FFCCCCCC0000000, float 0x402051EB80000000], [2 x float] [float 0x3FFE666660000000, float 8.000000e+00], [2 x float] [float 2.000000e+00, float 0x40213851E0000000]]
@.str = [35 x i8] c"Q[cubm/h]\09U0[V]\09Ui[V]\09Diff[V]\09 %%\0A\00"
@.str.1 = [29 x i8] c"%.2f\09\09%.2f\09%.2f\09%+.2f\09%+.2f\0A\00"
@.str.2 = [45 x i8] c"Maximale Abweichung: %.2f%% bei Messwert %d\0A\00"
@str = [20 x i8] c"Pr\C3\BCfung bestanden!\00"
@str.5 = [25 x i8] c"Pr\C3\BCfung nicht bestanden\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %20, %2 ]
%4 = phi float [ 0.000000e+00, %0 ], [ %23, %2 ]
%5 = phi i32 [ undef, %0 ], [ %22, %2 ]
%6 = getelementptr inbounds [21 x [2 x float]], [21 x [2 x float]]* @__const.main.initialwerte, i64 0, i64 %3, i64 0
%7 = load float, float* %6
%8 = getelementptr inbounds [21 x [2 x float]], [21 x [2 x float]]* @__const.main.initialwerte, i64 0, i64 %3, i64 1
%9 = load float, float* %8
%10 = fpext float %7 to double
%11 = tail call double @llvm.fmuladd.f64(double %10, double 4.700000e+00, double 1.300000e-01)
%12 = fptrunc double %11 to float
%13 = fsub float %9, %12
%14 = fmul float %13, 1.000000e+02
%15 = fdiv float %14, %9
%16 = fcmp olt float %15, 0.000000e+00
%17 = fneg float %15
%18 = select i1 %16, float %17, float %15
%19 = fcmp ogt float %18, %4
%20 = add nuw nsw i64 %3, 1
%21 = trunc i64 %20 to i32
%22 = select i1 %19, i32 %21, i32 %5
%23 = select i1 %19, float %18, float %4
%24 = fpext float %9 to double
%25 = fpext float %12 to double
%26 = fpext float %13 to double
%27 = fpext float %15 to double
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %10, double %24, double %25, double %26, double %27)
%29 = icmp eq i64 %20, 21
br i1 %29, label %30, label %2
30: ; preds = %2
%31 = fpext float %23 to double
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), double %31, i32 %22)
%33 = fcmp ogt float %23, 5.000000e+00
%34 = select i1 %33, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%35 = tail call i32 @puts(i8* dereferenceable(1) %34)
ret i32 0
}