#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 addArray(int *, int);
int atoi(char *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, float, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
void peak(FILE *file, int fps, int window_sec, int br_target) {
  int size = fps * window_sec;
  int *bitrates = malloc(sizeof(int) * size);
  char buf[1024];
  int i = 0;
  int pos, br, max_br = 0;
  float br_display;
  bool aboveTarget;
  if (!bitrates) {
    fprintf(stderr, "Can not allocate bitrates array\n");
    return;
  }
  memset(bitrates, 0, size * sizeof(int));
  while (!feof(file)) {
    fgets(buf, 1024, file);
    if (!strcmp(buf, "[FRAME]\n")) {
      i++;
    } else if (!strncmp(buf, "pkt_size=", strlen("pkt_size="))) {
      if (i < size)
        pos = i;
      else
        pos = i % size;
      br = atoi(buf + strlen("pkt_size="));
      bitrates[pos] = br;
      br = addArray(bitrates, size);
      if (i < size)
        br_display = (float)br * size / i / 1024.0 / window_sec * 8;
      else
        br_display = (float)br / 1024.0 / window_sec * 8;
      if (max_br < br)
        max_br = br;
      if (br_display > br_target)
        aboveTarget = true;
      else
        aboveTarget = false;
      printf("Peak bitrate window for frame %8d: %8.1f kibit/s %s\n", i,
             br_display, aboveTarget ? "Above target" : "");
    }
  }
  printf("\nMaximum peak bitrate: %f kibit/s\n",
         (float)max_br / 1024.0 / window_sec * 8);
  free(bitrates);
}


x86 assembly (clang, -O0):
<peak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x424(%rbp)
movl   $0x0,-0x430(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    122e <peak+0x6e>
mov    0x2dc5(%rip),%rax
mov    (%rax),%edi
lea    0xdec(%rip),%rsi
call   10a0 <fprintf@plt>
jmp    14dc <peak+0x31c>
mov    -0x20(%rbp),%rdi
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1070 <memset@plt>
mov    -0x8(%rbp),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1261 <peak+0xa1>
jmp    1494 <peak+0x2d4>
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
lea    -0x420(%rbp),%rdi
lea    0xdad(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    12a6 <peak+0xe6>
mov    -0x424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
jmp    148f <peak+0x2cf>
lea    -0x420(%rbp),%rax
mov    %rax,-0x440(%rbp)
lea    0xd7f(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x440(%rbp),%rdi
mov    %eax,%edx
lea    0xd6a(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    148a <peak+0x2ca>
mov    -0x424(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12fe <peak+0x13e>
mov    -0x424(%rbp),%eax
mov    %eax,-0x428(%rbp)
jmp    130e <peak+0x14e>
mov    -0x424(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %edx,-0x428(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x448(%rbp)
lea    0xd17(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x448(%rbp),%rdi
cltq
add    %rax,%rdi
call   10e0 <atoi@plt>
mov    %eax,-0x42c(%rbp)
mov    -0x42c(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x428(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   10d0 <addArray@plt>
mov    %eax,-0x42c(%rbp)
mov    -0x424(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13c7 <peak+0x207>
cvtsi2ssl -0x42c(%rbp),%xmm0
ff
cvtsi2ssl -0x18(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtsi2ssl -0x424(%rbp),%xmm1
ff
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc6b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc4e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x434(%rbp)
ff
jmp    1400 <peak+0x240>
cvtsi2ssl -0x42c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  0xc2d(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc10(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x434(%rbp)
ff
mov    -0x430(%rbp),%eax
cmp    -0x42c(%rbp),%eax
jge    141e <peak+0x25e>
mov    -0x42c(%rbp),%eax
mov    %eax,-0x430(%rbp)
movss  -0x434(%rbp),%xmm0
ff
cvtsi2ssl -0x14(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jbe    1443 <peak+0x283>
movl   $0x1,-0x438(%rbp)
jmp    144d <peak+0x28d>
movl   $0x0,-0x438(%rbp)
cvtsi2ssl -0x424(%rbp),%xmm0
ff
movss  -0x434(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
mov    -0x438(%rbp),%ecx
lea    0xbcb(%rip),%rsi
lea    0xc04(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xbc1(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    148f <peak+0x2cf>
jmp    1243 <peak+0x83>
cvtsi2ssl -0x430(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  0xb60(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xb43(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xbba(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peak>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x428,%rsp
mov    %ecx,%r15d
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r12
imul   %edx,%ebp
lea    0x0(,%rbp,4),%ebx
mov    %ebx,%edi
call   10b0 <malloc@plt>
test   %rax,%rax
je     1267 <peak+0xb7>
movl   $0x0,0x4(%rsp)
mov    %rax,0x18(%rsp)
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1070 <memset@plt>
mov    %r12,%rdi
call   10a0 <feof@plt>
cvtsi2sd %r14d,%xmm0
movsd  %xmm0,0x10(%rsp)
test   %eax,%eax
je     128d <peak+0xdd>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xdd5(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
mulsd  0xdcf(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe42(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
add    $0x428,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
lea    0xd99(%rip),%rsi
add    $0x428,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <fprintf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %r15d,%xmm0
movss  %xmm0,0xc(%rsp)
movl   $0x0,0x4(%rsp)
lea    0x20(%rsp),%rbx
movabs $0xa5d454d4152465b,%r13
45 5d 0a
xor    %r14d,%r14d
jmp    12e4 <peak+0x134>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r14d
mov    %r12,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    1216 <peak+0x66>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %r12,%rdx
call   1080 <fgets@plt>
mov    0x20(%rsp),%rax
xor    %r13,%rax
movzbl 0x28(%rsp),%ecx
or     %rax,%rcx
je     12d0 <peak+0x120>
lea    0xd2d(%rip),%r15
mov    %r15,%rdi
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    12d4 <peak+0x124>
mov    0x4(%rsp),%r15d
mov    %r14d,%ebx
cmp    %ebp,%r14d
jl     133b <peak+0x18b>
mov    %r14d,%eax
cltd
idiv   %ebp
mov    %edx,%ebx
lea    0xcf8(%rip),%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x20,%rdi
call   10d0 <atoi@plt>
movslq %ebx,%rcx
mov    0x18(%rsp),%rdi
mov    %eax,(%rdi,%rcx,4)
mov    %ebp,%esi
call   10c0 <addArray@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
cmp    %ebp,%r14d
jge    1388 <peak+0x1d8>
mulss  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
divss  %xmm0,%xmm1
jmp    1390 <peak+0x1e0>
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
lea    0x20(%rsp),%rbx
cvtss2sd %xmm1,%xmm1
mulsd  0xc5f(%rip),%xmm1
divsd  0x10(%rsp),%xmm1
mulsd  0xc59(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cmp    %eax,%r15d
cmovl  %eax,%r15d
mov    %r15d,0x4(%rsp)
ucomiss 0xc(%rsp),%xmm1
lea    0xc6e(%rip),%rsi
lea    0xca7(%rip),%rax
cmova  %rax,%rsi
cvtss2sd %xmm1,%xmm1
lea    0xc63(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    12d4 <peak+0x124>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Can not allocate bitrates array\0A\00"
@.str.1 = [9 x i8] c"[FRAME]\0A\00"
@.str.2 = [10 x i8] c"pkt_size=\00"
@.str.3 = [53 x i8] c"Peak bitrate window for frame %8d: %8.1f kibit/s %s\0A\00"
@.str.4 = [13 x i8] c"Above target\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [35 x i8] c"\0AMaximum peak bitrate: %f kibit/s\0A\00"
define void @peak(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca [1024 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca float
%17 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = mul nsw i32 %18, %19
store i32 %20, i32* %9
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = mul i64 4, %22
%24 = trunc i64 %23 to i32
%25 = call i32* @malloc(i32 %24)
store i32* %25, i32** %10
store i32 0, i32* %12
store i32 0, i32* %15
%26 = load i32*, i32** %10
%27 = icmp ne i32* %26, null
br i1 %27, label %31, label %28
28: ; preds = %4
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %149
31: ; preds = %4
%32 = load i32*, i32** %10
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = mul i64 %34, 4
%36 = trunc i64 %35 to i32
%37 = call i32 @memset(i32* %32, i32 0, i32 %36)
br label %38
38: ; preds = %135, %31
%39 = load i32*, i32** %5
%40 = call i32 @feof(i32* %39)
%41 = icmp ne i32 %40, 0
%42 = xor i1 %41, true
br i1 %42, label %43, label %136
43: ; preds = %38
%44 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%45 = load i32*, i32** %5
%46 = call i32 @fgets(i8* %44, i32 1024, i32* %45)
%47 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%48 = call i32 @strcmp(i8* %47, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%49 = icmp ne i32 %48, 0
br i1 %49, label %53, label %50
50: ; preds = %43
%51 = load i32, i32* %12
%52 = add nsw i32 %51, 1
store i32 %52, i32* %12
br label %135
53: ; preds = %43
%54 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%55 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%56 = call i32 @strncmp(i8* %54, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %55)
%57 = icmp ne i32 %56, 0
br i1 %57, label %134, label %58
58: ; preds = %53
%59 = load i32, i32* %12
%60 = load i32, i32* %9
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %64
62: ; preds = %58
%63 = load i32, i32* %12
store i32 %63, i32* %13
br label %68
64: ; preds = %58
%65 = load i32, i32* %12
%66 = load i32, i32* %9
%67 = srem i32 %65, %66
store i32 %67, i32* %13
br label %68
68: ; preds = %64, %62
%69 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%70 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %69, i64 %71
%73 = call i32 @atoi(i8* %72)
store i32 %73, i32* %14
%74 = load i32, i32* %14
%75 = load i32*, i32** %10
%76 = load i32, i32* %13
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i32, i32* %75, i64 %77
store i32 %74, i32* %78
%79 = load i32*, i32** %10
%80 = load i32, i32* %9
%81 = call i32 @addArray(i32* %79, i32 %80)
store i32 %81, i32* %14
%82 = load i32, i32* %12
%83 = load i32, i32* %9
%84 = icmp slt i32 %82, %83
br i1 %84, label %85, label %101
85: ; preds = %68
%86 = load i32, i32* %14
%87 = sitofp i32 %86 to float
%88 = load i32, i32* %9
%89 = sitofp i32 %88 to float
%90 = fmul float %87, %89
%91 = load i32, i32* %12
%92 = sitofp i32 %91 to float
%93 = fdiv float %90, %92
%94 = fpext float %93 to double
%95 = fdiv double %94, 1.024000e+03
%96 = load i32, i32* %7
%97 = sitofp i32 %96 to double
%98 = fdiv double %95, %97
%99 = fmul double %98, 8.000000e+00
%100 = fptrunc double %99 to float
store float %100, float* %16
br label %111
101: ; preds = %68
%102 = load i32, i32* %14
%103 = sitofp i32 %102 to float
%104 = fpext float %103 to double
%105 = fdiv double %104, 1.024000e+03
%106 = load i32, i32* %7
%107 = sitofp i32 %106 to double
%108 = fdiv double %105, %107
%109 = fmul double %108, 8.000000e+00
%110 = fptrunc double %109 to float
store float %110, float* %16
br label %111
111: ; preds = %101, %85
%112 = load i32, i32* %15
%113 = load i32, i32* %14
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %117
115: ; preds = %111
%116 = load i32, i32* %14
store i32 %116, i32* %15
br label %117
117: ; preds = %115, %111
%118 = load float, float* %16
%119 = load i32, i32* %8
%120 = sitofp i32 %119 to float
%121 = fcmp ogt float %118, %120
br i1 %121, label %122, label %123
122: ; preds = %117
store i32 1, i32* %17
br label %124
123: ; preds = %117
store i32 0, i32* %17
br label %124
124: ; preds = %123, %122
%125 = load i32, i32* %12
%126 = sitofp i32 %125 to float
%127 = load float, float* %16
%128 = fpext float %127 to double
%129 = load i32, i32* %17
%130 = icmp ne i32 %129, 0
%131 = zext i1 %130 to i64
%132 = select i1 %130, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%133 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), float %126, double %128, i8* %132)
br label %134
134: ; preds = %124, %53
br label %135
135: ; preds = %134, %50
br label %38
136: ; preds = %38
%137 = load i32, i32* %15
%138 = sitofp i32 %137 to float
%139 = fpext float %138 to double
%140 = fdiv double %139, 1.024000e+03
%141 = load i32, i32* %7
%142 = sitofp i32 %141 to double
%143 = fdiv double %140, %142
%144 = fmul double %143, 8.000000e+00
%145 = fptrunc double %144 to float
%146 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), float %145)
%147 = load i32*, i32** %10
%148 = call i32 @free(i32* %147)
br label %149
149: ; preds = %136, %28
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Can not allocate bitrates array\0A\00"
@.str.1 = [9 x i8] c"[FRAME]\0A\00"
@.str.2 = [10 x i8] c"pkt_size=\00"
@.str.3 = [53 x i8] c"Peak bitrate window for frame %8d: %8.1f kibit/s %s\0A\00"
@.str.4 = [13 x i8] c"Above target\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [35 x i8] c"\0AMaximum peak bitrate: %f kibit/s\0A\00"
define void @peak(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [1024 x i8]
%6 = mul nsw i32 %2, %1
%7 = shl i32 %6, 2
%8 = tail call i32* @malloc(i32 %7)
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%10 = icmp eq i32* %8, null
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %83
14: ; preds = %4
%15 = tail call i32 @memset(i32* %8, i32 0, i32 %7)
%16 = call i32 @feof(i32* %0)
%17 = icmp eq i32 %16, 0
%18 = sitofp i32 %2 to double
br i1 %17, label %19, label %73
19: ; preds = %14
%20 = sitofp i32 %6 to float
%21 = sitofp i32 %3 to float
br label %22
22: ; preds = %19, %68
%23 = phi i32 [ 0, %19 ], [ %70, %68 ]
%24 = phi i32 [ 0, %19 ], [ %69, %68 ]
%25 = call i32 @fgets(i8* %9, i32 1024, i32* %0)
%26 = call i32 @bcmp(i8* dereferenceable(9) %9, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 9)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %22
%29 = add nsw i32 %24, 1
br label %68
30: ; preds = %22
%31 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%32 = call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %31)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %68
34: ; preds = %30
%35 = icmp slt i32 %24, %6
br i1 %35, label %38, label %36
36: ; preds = %34
%37 = srem i32 %24, %6
br label %38
38: ; preds = %34, %36
%39 = phi i32 [ %37, %36 ], [ %24, %34 ]
%40 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %41
%43 = call i32 @atoi(i8* %42)
%44 = sext i32 %39 to i64
%45 = getelementptr inbounds i32, i32* %8, i64 %44
store i32 %43, i32* %45
%46 = call i32 @addArray(i32* %8, i32 %6)
%47 = sitofp i32 %46 to float
br i1 %35, label %48, label %52
48: ; preds = %38
%49 = fmul float %20, %47
%50 = sitofp i32 %24 to float
%51 = fdiv float %49, %50
br label %54
52: ; preds = %38
%53 = sitofp i32 %24 to float
br label %54
54: ; preds = %52, %48
%55 = phi float [ %53, %52 ], [ %50, %48 ]
%56 = phi float [ %47, %52 ], [ %51, %48 ]
%57 = fpext float %56 to double
%58 = fmul double %57, 0x3F50000000000000
%59 = fdiv double %58, %18
%60 = fmul double %59, 8.000000e+00
%61 = fptrunc double %60 to float
%62 = icmp slt i32 %23, %46
%63 = select i1 %62, i32 %46, i32 %23
%64 = fcmp ogt float %61, %21
%65 = select i1 %64, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%66 = fpext float %61 to double
%67 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), float %55, double %66, i8* %65)
br label %68
68: ; preds = %30, %54, %28
%69 = phi i32 [ %24, %30 ], [ %24, %54 ], [ %29, %28 ]
%70 = phi i32 [ %23, %30 ], [ %63, %54 ], [ %23, %28 ]
%71 = call i32 @feof(i32* %0)
%72 = icmp eq i32 %71, 0
br i1 %72, label %22, label %73
73: ; preds = %68, %14
%74 = phi i32 [ 0, %14 ], [ %70, %68 ]
%75 = sitofp i32 %74 to float
%76 = fpext float %75 to double
%77 = fmul double %76, 0x3F50000000000000
%78 = fdiv double %77, %18
%79 = fmul double %78, 8.000000e+00
%80 = fptrunc double %79 to float
%81 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), float %80)
%82 = call i32 @free(i32* %8)
br label %83
83: ; preds = %73, %11
ret void
}