#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 m_random(double, double);
int maximum_index(float *, int);
int minimum_index(float *, int);
int /*<<< orphan*/ print_array(float *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void test2() {
  int i = 0;
  float s = 0;
  float r[11] = {0};
  srand(time(NULL));
  for (i = 0; i < 11; i++) {
    r[i] = m_random(6.0, 12.0);
    s += r[i];
    printf("i: %d, %.2f,  ", i, r[i]);
    printf("sum %.2f\n", s);
  }
  float ava = r[10] / 10;
  for (i = 0; i < 10; i++) {
    if (ava + r[i] <= 12 && ava + r[i] >= 6) {
      r[i] += ava;
    } else if (ava + r[i] < 6) {
      int t = maximum_index(r, 10);
      r[t] += ava;
      printf("add %d=%.2f to r[%d]=%.2f\n", i, ava, t, r[t]);
    } else if (ava + r[i] > 12) {
      int t = minimum_index(r, 10);
      r[t] += ava;
      printf("add %d=%.2f to r[%d]=%.2f\n", i, ava, t, r[t]);
    }
  }
  print_array(r, 10);
  printf("\n");
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x2c,%edx
call   1070 <memset@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0xb,-0x4(%rbp)
jge    123f <test2+0xbf>
movsd  0xe40(%rip),%xmm0
movsd  0xe40(%rip),%xmm1
call   10a0 <m_random@plt>
movslq -0x4(%rbp),%rax
movss  %xmm0,-0x40(%rbp,%rax,4)
movslq -0x4(%rbp),%rax
movss  -0x40(%rbp,%rax,4),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
movslq -0x4(%rbp),%rax
movss  -0x40(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe0d(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe05(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11be <test2+0x3e>
movss  -0x18(%rbp),%xmm0
movss  0xdb4(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    13c4 <test2+0x244>
movss  -0x44(%rbp),%xmm1
movslq -0x4(%rbp),%rax
addss  -0x40(%rbp,%rax,4),%xmm1
movss  0xd87(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     12c0 <test2+0x140>
movss  -0x44(%rbp),%xmm0
movslq -0x4(%rbp),%rax
addss  -0x40(%rbp,%rax,4),%xmm0
movss  0xd6b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     12c0 <test2+0x140>
movss  -0x44(%rbp),%xmm0
movslq -0x4(%rbp),%rax
addss  -0x40(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x40(%rbp,%rax,4)
jmp    13b1 <test2+0x231>
movss  -0x44(%rbp),%xmm1
movslq -0x4(%rbp),%rax
addss  -0x40(%rbp,%rax,4),%xmm1
movss  0xd31(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1336 <test2+0x1b6>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
call   1050 <maximum_index@plt>
mov    %eax,-0x48(%rbp)
movss  -0x44(%rbp),%xmm0
movslq -0x48(%rbp),%rax
addss  -0x40(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x40(%rbp,%rax,4)
mov    -0x4(%rbp),%esi
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x48(%rbp),%edx
movslq -0x48(%rbp),%rax
movss  -0x40(%rbp,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd0f(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    13ac <test2+0x22c>
movss  -0x44(%rbp),%xmm0
movslq -0x4(%rbp),%rax
addss  -0x40(%rbp,%rax,4),%xmm0
movss  0xcb7(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    13a7 <test2+0x227>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
call   1030 <minimum_index@plt>
mov    %eax,-0x4c(%rbp)
movss  -0x44(%rbp),%xmm0
movslq -0x4c(%rbp),%rax
addss  -0x40(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x40(%rbp,%rax,4)
mov    -0x4(%rbp),%esi
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x4c(%rbp),%edx
movslq -0x4c(%rbp),%rax
movss  -0x40(%rbp,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xc99(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    13ac <test2+0x22c>
jmp    13b1 <test2+0x231>
jmp    13b6 <test2+0x236>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    125c <test2+0xdc>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
call   1040 <print_array@plt>
lea    0xc5e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
xor    %ebx,%ebx
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
movsd  0xe5f(%rip),%xmm0
movsd  0xe5f(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0xc(%rsp)
movss  %xmm0,0x10(%rsp)
xorps  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe4b(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe3e(%rip),%r15
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xe01(%rip),%xmm0
movsd  0xe01(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x14(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xdb2(%rip),%xmm0
movsd  0xdb2(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x18(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xd63(%rip),%xmm0
movsd  0xd63(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x1c(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xd14(%rip),%xmm0
movsd  0xd14(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x20(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xcc5(%rip),%xmm0
movsd  0xcc5(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x24(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xc76(%rip),%xmm0
movsd  0xc76(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x28(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x6,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xc27(%rip),%xmm0
movsd  0xc27(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x2c(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x7,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xbd8(%rip),%xmm0
movsd  0xbd8(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x30(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x8,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xb89(%rip),%xmm0
movsd  0xb89(%rip),%xmm1
call   10a0 <m_random@plt>
movss  %xmm0,0x34(%rsp)
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x9,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xb3a(%rip),%xmm0
movsd  0xb3a(%rip),%xmm1
call   10a0 <m_random@plt>
movaps %xmm0,%xmm1
movss  %xmm0,0x8(%rsp)
movss  %xmm0,0x38(%rsp)
movss  (%rsp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mov    %r14,%rdi
mov    $0xa,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
divss  0xae3(%rip),%xmm1
movss  %xmm1,0x8(%rsp)
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,(%rsp)
movss  0xad0(%rip),%xmm1
movss  0xacc(%rip),%xmm2
lea    0x10(%rsp),%r14
lea    0xadd(%rip),%r15
nopl   0x0(%rax,%rax,1)
addss  0x8(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jb     1580 <test2+0x400>
ucomiss %xmm2,%xmm0
jb     1580 <test2+0x400>
movss  %xmm0,0x10(%rsp,%rbx,4)
jmp    15ef <test2+0x46f>
nopl   0x0(%rax,%rax,1)
ucomiss %xmm0,%xmm2
jbe    15a0 <test2+0x420>
mov    %r14,%rdi
mov    $0xa,%esi
call   1060 <maximum_index@plt>
jmp    15b2 <test2+0x432>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
ucomiss %xmm1,%xmm0
jbe    15ef <test2+0x46f>
mov    %r14,%rdi
mov    $0xa,%esi
call   1040 <minimum_index@plt>
movslq %eax,%rdx
movss  0x10(%rsp,%rdx,4),%xmm0
addss  0x8(%rsp),%xmm0
movss  %xmm0,0x10(%rsp,%rdx,4)
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
mov    %r15,%rdi
mov    %ebx,%esi
movsd  (%rsp),%xmm0
mov    $0x2,%al
call   1070 <printf@plt>
movss  0xa31(%rip),%xmm2
movss  0xa25(%rip),%xmm1
cmp    $0x9,%rbx
je     1604 <test2+0x484>
movss  0x14(%rsp,%rbx,4),%xmm0
add    $0x1,%rbx
jmp    1560 <test2+0x3e0>
lea    0x10(%rsp),%rdi
mov    $0xa,%esi
call   1050 <print_array@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"i: %d, %.2f, \00"
@.str.1 = [10 x i8] c"sum %.2f\0A\00"
@.str.2 = [27 x i8] c"add %d=%.2f to r[%d]=%.2f\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @test2() {
%1 = alloca i32
%2 = alloca float
%3 = alloca [11 x float]
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %2
%7 = bitcast [11 x float]* %3 to i8*
%8 = call i32 @time(i32* null)
%9 = call i32 @srand(i32 %8)
store i32 0, i32* %1
br label %10
10: ; preds = %34, %0
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 11
br i1 %12, label %13, label %37
13: ; preds = %10
%14 = call float @m_random(double 6.000000e+00, double 1.200000e+01)
%15 = load i32, i32* %1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %16
store float %14, float* %17
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %19
%21 = load float, float* %20
%22 = load float, float* %2
%23 = fadd float %22, %21
store float %23, float* %2
%24 = load i32, i32* %1
%25 = load i32, i32* %1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %26
%28 = load float, float* %27
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %24, double %29)
%31 = load float, float* %2
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %32)
br label %34
34: ; preds = %13
%35 = load i32, i32* %1
%36 = add nsw i32 %35, 1
store i32 %36, i32* %1
br label %10
37: ; preds = %10
%38 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 10
%39 = load float, float* %38
%40 = fdiv float %39, 1.000000e+01
store float %40, float* %4
store i32 0, i32* %1
br label %41
41: ; preds = %124, %37
%42 = load i32, i32* %1
%43 = icmp slt i32 %42, 10
br i1 %43, label %44, label %127
44: ; preds = %41
%45 = load float, float* %4
%46 = load i32, i32* %1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %47
%49 = load float, float* %48
%50 = fadd float %45, %49
%51 = fcmp ole float %50, 1.200000e+01
br i1 %51, label %52, label %67
52: ; preds = %44
%53 = load float, float* %4
%54 = load i32, i32* %1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %55
%57 = load float, float* %56
%58 = fadd float %53, %57
%59 = fcmp oge float %58, 6.000000e+00
br i1 %59, label %60, label %67
60: ; preds = %52
%61 = load float, float* %4
%62 = load i32, i32* %1
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %63
%65 = load float, float* %64
%66 = fadd float %65, %61
store float %66, float* %64
br label %123
67: ; preds = %52, %44
%68 = load float, float* %4
%69 = load i32, i32* %1
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %70
%72 = load float, float* %71
%73 = fadd float %68, %72
%74 = fcmp olt float %73, 6.000000e+00
br i1 %74, label %75, label %94
75: ; preds = %67
%76 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 0
%77 = call i32 @maximum_index(float* %76, i32 10)
store i32 %77, i32* %5
%78 = load float, float* %4
%79 = load i32, i32* %5
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %80
%82 = load float, float* %81
%83 = fadd float %82, %78
store float %83, float* %81
%84 = load i32, i32* %1
%85 = load float, float* %4
%86 = fpext float %85 to double
%87 = load i32, i32* %5
%88 = load i32, i32* %5
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %89
%91 = load float, float* %90
%92 = fpext float %91 to double
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %84, double %86, i32 %87, double %92)
br label %122
94: ; preds = %67
%95 = load float, float* %4
%96 = load i32, i32* %1
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %97
%99 = load float, float* %98
%100 = fadd float %95, %99
%101 = fcmp ogt float %100, 1.200000e+01
br i1 %101, label %102, label %121
102: ; preds = %94
%103 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 0
%104 = call i32 @minimum_index(float* %103, i32 10)
store i32 %104, i32* %6
%105 = load float, float* %4
%106 = load i32, i32* %6
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %107
%109 = load float, float* %108
%110 = fadd float %109, %105
store float %110, float* %108
%111 = load i32, i32* %1
%112 = load float, float* %4
%113 = fpext float %112 to double
%114 = load i32, i32* %6
%115 = load i32, i32* %6
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 %116
%118 = load float, float* %117
%119 = fpext float %118 to double
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %111, double %113, i32 %114, double %119)
br label %121
121: ; preds = %102, %94
br label %122
122: ; preds = %121, %75
br label %123
123: ; preds = %122, %60
br label %124
124: ; preds = %123
%125 = load i32, i32* %1
%126 = add nsw i32 %125, 1
store i32 %126, i32* %1
br label %41
127: ; preds = %41
%128 = getelementptr inbounds [11 x float], [11 x float]* %3, i64 0, i64 0
%129 = call i32 @print_array(float* %128, i32 10)
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"i: %d, %.2f, \00"
@.str.1 = [10 x i8] c"sum %.2f\0A\00"
@.str.2 = [27 x i8] c"add %d=%.2f to r[%d]=%.2f\0A\00"
define void @test2() {
%1 = alloca [11 x float]
%2 = bitcast [11 x float]* %1 to i8*
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%6 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 0
store float %5, float* %6
%7 = fadd float %5, 0.000000e+00
%8 = fpext float %5 to double
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, double %8)
%10 = fpext float %7 to double
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %10)
%12 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%13 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 1
store float %12, float* %13
%14 = fadd float %7, %12
%15 = fpext float %12 to double
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, double %15)
%17 = fpext float %14 to double
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %17)
%19 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%20 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 2
store float %19, float* %20
%21 = fadd float %14, %19
%22 = fpext float %19 to double
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, double %22)
%24 = fpext float %21 to double
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %24)
%26 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%27 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 3
store float %26, float* %27
%28 = fadd float %21, %26
%29 = fpext float %26 to double
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, double %29)
%31 = fpext float %28 to double
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %31)
%33 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%34 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 4
store float %33, float* %34
%35 = fadd float %28, %33
%36 = fpext float %33 to double
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4, double %36)
%38 = fpext float %35 to double
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %38)
%40 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%41 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 5
store float %40, float* %41
%42 = fadd float %35, %40
%43 = fpext float %40 to double
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 5, double %43)
%45 = fpext float %42 to double
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %45)
%47 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%48 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 6
store float %47, float* %48
%49 = fadd float %42, %47
%50 = fpext float %47 to double
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 6, double %50)
%52 = fpext float %49 to double
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %52)
%54 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%55 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 7
store float %54, float* %55
%56 = fadd float %49, %54
%57 = fpext float %54 to double
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 7, double %57)
%59 = fpext float %56 to double
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %59)
%61 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%62 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 8
store float %61, float* %62
%63 = fadd float %56, %61
%64 = fpext float %61 to double
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 8, double %64)
%66 = fpext float %63 to double
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %66)
%68 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%69 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 9
store float %68, float* %69
%70 = fadd float %63, %68
%71 = fpext float %68 to double
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 9, double %71)
%73 = fpext float %70 to double
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %73)
%75 = tail call float @m_random(double 6.000000e+00, double 1.200000e+01)
%76 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 10
store float %75, float* %76
%77 = fadd float %70, %75
%78 = fpext float %75 to double
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 10, double %78)
%80 = fpext float %77 to double
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %80)
%82 = fdiv float %75, 1.000000e+01
%83 = fpext float %82 to double
br label %84
84: ; preds = %118, %0
%85 = phi float [ %5, %0 ], [ %120, %118 ]
%86 = phi i64 [ 0, %0 ], [ %116, %118 ]
%87 = fadd float %82, %85
%88 = fcmp ugt float %87, 1.200000e+01
%89 = fcmp ult float %87, 6.000000e+00
%90 = or i1 %88, %89
br i1 %90, label %93, label %91
91: ; preds = %84
%92 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 %86
store float %87, float* %92
br label %115
93: ; preds = %84
%94 = fcmp olt float %87, 6.000000e+00
br i1 %94, label %95, label %104
95: ; preds = %93
%96 = call i32 @maximum_index(float* %6, i32 10)
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 %97
%99 = load float, float* %98
%100 = fadd float %82, %99
store float %100, float* %98
%101 = fpext float %100 to double
%102 = trunc i64 %86 to i32
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %102, double %83, i32 %96, double %101)
br label %115
104: ; preds = %93
%105 = fcmp ogt float %87, 1.200000e+01
br i1 %105, label %106, label %115
106: ; preds = %104
%107 = call i32 @minimum_index(float* %6, i32 10)
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 %108
%110 = load float, float* %109
%111 = fadd float %82, %110
store float %111, float* %109
%112 = fpext float %111 to double
%113 = trunc i64 %86 to i32
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %113, double %83, i32 %107, double %112)
br label %115
115: ; preds = %91, %104, %106, %95
%116 = add nuw nsw i64 %86, 1
%117 = icmp eq i64 %116, 10
br i1 %117, label %121, label %118
118: ; preds = %115
%119 = getelementptr inbounds [11 x float], [11 x float]* %1, i64 0, i64 %116
%120 = load float, float* %119
br label %84
121: ; preds = %115
%122 = call i32 @print_array(float* %6, i32 10)
%123 = call i32 @putchar(i32 10)
ret void
}