#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(void) {
  const float rain[5][12] = {
      {4.3, 4.3, 4.3, 3.0, 2.0, 1.2, 0.2, 0.2, 0.4, 2.4, 3.5, 6.6},
      {8.5, 8.2, 1.2, 1.6, 2.4, 0.0, 5.2, 0.9, 0.3, 0.9, 1.4, 7.3},
      {9.1, 8.5, 6.7, 4.3, 2.1, 0.8, 0.2, 0.2, 1.1, 2.3, 6.1, 8.4},
      {7.2, 9.9, 8.4, 3.3, 1.2, 0.8, 0.4, 0.0, 0.6, 1.7, 4.3, 6.2},
      {7.6, 5.6, 3.8, 2.8, 3.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 5.2}};
  int year, month;
  float subtot, total;
  printf(" YEAR	RAINFALL(inches)\n");
  for (year = 0, total = 0; year < 5; year++) {
    for (month = 0, subtot = 0; month < 12; month++) {
      subtot += rain[year][month];
    }
    printf("%5d %12.1f\n", 2010 + year, subtot);
    total += subtot;
  }
  printf("\nThe yearly average is %.lf inches.\n\n", total / 5);
  printf(" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\n");
  for (month = 0; month < 12; month++) {
    for (year = 0, subtot = 0; year < 5; year++) {
      subtot += rain[year][month];
    }
    printf("%4.1f", subtot / 5);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x100(%rbp),%rdi
lea    0xed0(%rip),%rsi
mov    $0xf0,%edx
call   1040 <memcpy@plt>
lea    0xfaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x104(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x110(%rbp)
ff
cmpl   $0x5,-0x104(%rbp)
jge    1233 <main+0x113>
movl   $0x0,-0x108(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10c(%rbp)
ff
cmpl   $0xc,-0x108(%rbp)
jge    11e1 <main+0xc1>
movslq -0x104(%rbp),%rcx
lea    -0x100(%rbp),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x108(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x10c(%rbp),%xmm0
ff
movss  %xmm0,-0x10c(%rbp)
ff
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    118f <main+0x6f>
mov    -0x104(%rbp),%esi
add    $0x7da,%esi
movss  -0x10c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xf18(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x10c(%rbp),%xmm0
ff
addss  -0x110(%rbp),%xmm0
ff
movss  %xmm0,-0x110(%rbp)
ff
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    116d <main+0x4d>
movss  -0x110(%rbp),%xmm0
ff
movss  0xdbd(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x108(%rbp)
cmpl   $0xc,-0x108(%rbp)
jge    131f <main+0x1ff>
movl   $0x0,-0x104(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10c(%rbp)
ff
cmpl   $0x5,-0x104(%rbp)
jge    12e5 <main+0x1c5>
movslq -0x104(%rbp),%rcx
lea    -0x100(%rbp),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x108(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x10c(%rbp),%xmm0
ff
movss  %xmm0,-0x10c(%rbp)
ff
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    1293 <main+0x173>
movss  -0x10c(%rbp),%xmm0
ff
movss  0xd0b(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe78(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1271 <main+0x151>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xffa(%rip),%rdi
call   1040 <puts@plt>
mov    $0x7da,%ebp
xor    %ebx,%ebx
lea    0xebf(%rip),%r15
lea    0xfa8(%rip),%r14
xorps  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
movss  %xmm0,0x4(%rsp)
movss  (%rbx,%r15,1),%xmm0
addss  0xe90(%rip),%xmm0
addss  0x4(%rbx,%r15,1),%xmm0
addss  0x8(%rbx,%r15,1),%xmm0
addss  0xc(%rbx,%r15,1),%xmm0
addss  0x10(%rbx,%r15,1),%xmm0
addss  0x14(%rbx,%r15,1),%xmm0
addss  0x18(%rbx,%r15,1),%xmm0
addss  0x1c(%rbx,%r15,1),%xmm0
addss  0x20(%rbx,%r15,1),%xmm0
addss  0x24(%rbx,%r15,1),%xmm0
addss  0x28(%rbx,%r15,1),%xmm0
addss  0x2c(%rbx,%r15,1),%xmm0
movss  %xmm0,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x4(%rsp),%xmm0
addss  (%rsp),%xmm0
add    $0x1,%ebp
add    $0x30,%rbx
cmp    $0xf0,%rbx
jne    1160 <main+0x30>
divss  0xe03(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf04(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xf39(%rip),%rdi
call   1040 <puts@plt>
mov    $0xfffffffffffffff4,%rbp
lea    0xf09(%rip),%rbx
nopl   0x0(%rax)
movss  0x30(%r15,%rbp,4),%xmm0
addss  0xdc5(%rip),%xmm0
addss  0x60(%r15,%rbp,4),%xmm0
addss  0x90(%r15,%rbp,4),%xmm0
addss  0xc0(%r15,%rbp,4),%xmm0
addss  0xf0(%r15,%rbp,4),%xmm0
divss  0xd94(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
inc    %rbp
jne    1230 <main+0x100>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.rain = [5 x [12 x float]] [[12 x float] [float 0x4011333340000000, float 0x4011333340000000, float 0x4011333340000000, float 3.000000e+00, float 2.000000e+00, float 0x3FF3333340000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD99999A0000000, float 0x4003333340000000, float 3.500000e+00, float 0x401A666660000000], [12 x float] [float 8.500000e+00, float 0x4020666660000000, float 0x3FF3333340000000, float 0x3FF99999A0000000, float 0x4003333340000000, float 0.000000e+00, float 0x4014CCCCC0000000, float 0x3FECCCCCC0000000, float 0x3FD3333340000000, float 0x3FECCCCCC0000000, float 0x3FF6666660000000, float 0x401D333340000000], [12 x float] [float 0x4022333340000000, float 8.500000e+00, float 0x401ACCCCC0000000, float 0x4011333340000000, float 0x4000CCCCC0000000, float 0x3FE99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FF19999A0000000, float 0x4002666660000000, float 0x4018666660000000, float 0x4020CCCCC0000000], [12 x float] [float 0x401CCCCCC0000000, float 0x4023CCCCC0000000, float 0x4020CCCCC0000000, float 0x400A666660000000, float 0x3FF3333340000000, float 0x3FE99999A0000000, float 0x3FD99999A0000000, float 0.000000e+00, float 0x3FE3333340000000, float 0x3FFB333340000000, float 0x4011333340000000, float 0x4018CCCCC0000000], [12 x float] [float 0x401E666660000000, float 0x4016666660000000, float 0x400E666660000000, float 0x4006666660000000, float 0x400E666660000000, float 0x3FC99999A0000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0x3FF4CCCCC0000000, float 0x4004CCCCC0000000, float 0x4014CCCCC0000000]]
@.str = [24 x i8] c" YEAR\09RAINFALL(inches)\0A\00"
@.str.1 = [12 x i8] c"%5d %12.1f\0A\00"
@.str.2 = [38 x i8] c"\0AThe yearly average is %.lf inches.\0A\0A\00"
@.str.3 = [50 x i8] c" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\0A\00"
@.str.4 = [6 x i8] c"%4.1f\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [12 x float]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = bitcast [5 x [12 x float]]* %2 to i8*
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
store float 0.000000e+00, float* %6
br label %9
9: ; preds = %38, %0
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %41
12: ; preds = %9
store i32 0, i32* %4
store float 0.000000e+00, float* %5
br label %13
13: ; preds = %26, %12
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 12
br i1 %15, label %16, label %29
16: ; preds = %13
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* %2, i64 0, i64 %18
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [12 x float], [12 x float]* %19, i64 0, i64 %21
%23 = load float, float* %22
%24 = load float, float* %5
%25 = fadd float %24, %23
store float %25, float* %5
br label %26
26: ; preds = %16
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %13
29: ; preds = %13
%30 = load i32, i32* %3
%31 = add nsw i32 2010, %30
%32 = load float, float* %5
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %31, double %33)
%35 = load float, float* %5
%36 = load float, float* %6
%37 = fadd float %36, %35
store float %37, float* %6
br label %38
38: ; preds = %29
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
br label %9
41: ; preds = %9
%42 = load float, float* %6
%43 = fdiv float %42, 5.000000e+00
%44 = fpext float %43 to double
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %4
br label %47
47: ; preds = %72, %41
%48 = load i32, i32* %4
%49 = icmp slt i32 %48, 12
br i1 %49, label %50, label %75
50: ; preds = %47
store i32 0, i32* %3
store float 0.000000e+00, float* %5
br label %51
51: ; preds = %64, %50
%52 = load i32, i32* %3
%53 = icmp slt i32 %52, 5
br i1 %53, label %54, label %67
54: ; preds = %51
%55 = load i32, i32* %3
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* %2, i64 0, i64 %56
%58 = load i32, i32* %4
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [12 x float], [12 x float]* %57, i64 0, i64 %59
%61 = load float, float* %60
%62 = load float, float* %5
%63 = fadd float %62, %61
store float %63, float* %5
br label %64
64: ; preds = %54
%65 = load i32, i32* %3
%66 = add nsw i32 %65, 1
store i32 %66, i32* %3
br label %51
67: ; preds = %51
%68 = load float, float* %5
%69 = fdiv float %68, 5.000000e+00
%70 = fpext float %69 to double
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %70)
br label %72
72: ; preds = %67
%73 = load i32, i32* %4
%74 = add nsw i32 %73, 1
store i32 %74, i32* %4
br label %47
75: ; preds = %47
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.rain = [5 x [12 x float]] [[12 x float] [float 0x4011333340000000, float 0x4011333340000000, float 0x4011333340000000, float 3.000000e+00, float 2.000000e+00, float 0x3FF3333340000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD99999A0000000, float 0x4003333340000000, float 3.500000e+00, float 0x401A666660000000], [12 x float] [float 8.500000e+00, float 0x4020666660000000, float 0x3FF3333340000000, float 0x3FF99999A0000000, float 0x4003333340000000, float 0.000000e+00, float 0x4014CCCCC0000000, float 0x3FECCCCCC0000000, float 0x3FD3333340000000, float 0x3FECCCCCC0000000, float 0x3FF6666660000000, float 0x401D333340000000], [12 x float] [float 0x4022333340000000, float 8.500000e+00, float 0x401ACCCCC0000000, float 0x4011333340000000, float 0x4000CCCCC0000000, float 0x3FE99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FF19999A0000000, float 0x4002666660000000, float 0x4018666660000000, float 0x4020CCCCC0000000], [12 x float] [float 0x401CCCCCC0000000, float 0x4023CCCCC0000000, float 0x4020CCCCC0000000, float 0x400A666660000000, float 0x3FF3333340000000, float 0x3FE99999A0000000, float 0x3FD99999A0000000, float 0.000000e+00, float 0x3FE3333340000000, float 0x3FFB333340000000, float 0x4011333340000000, float 0x4018CCCCC0000000], [12 x float] [float 0x401E666660000000, float 0x4016666660000000, float 0x400E666660000000, float 0x4006666660000000, float 0x400E666660000000, float 0x3FC99999A0000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0x3FF4CCCCC0000000, float 0x4004CCCCC0000000, float 0x4014CCCCC0000000]]
@.str.1 = [12 x i8] c"%5d %12.1f\0A\00"
@.str.2 = [38 x i8] c"\0AThe yearly average is %.lf inches.\0A\0A\00"
@.str.4 = [6 x i8] c"%4.1f\00"
@str = [23 x i8] c" YEAR\09RAINFALL(inches)\00"
@str.6 = [49 x i8] c" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %46, %2 ]
%4 = phi float [ 0.000000e+00, %0 ], [ %45, %2 ]
%5 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 0
%6 = load float, float* %5
%7 = fadd float %6, 0.000000e+00
%8 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 1
%9 = load float, float* %8
%10 = fadd float %7, %9
%11 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 2
%12 = load float, float* %11
%13 = fadd float %10, %12
%14 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 3
%15 = load float, float* %14
%16 = fadd float %13, %15
%17 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 4
%18 = load float, float* %17
%19 = fadd float %16, %18
%20 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 5
%21 = load float, float* %20
%22 = fadd float %19, %21
%23 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 6
%24 = load float, float* %23
%25 = fadd float %22, %24
%26 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 7
%27 = load float, float* %26
%28 = fadd float %25, %27
%29 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 8
%30 = load float, float* %29
%31 = fadd float %28, %30
%32 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 9
%33 = load float, float* %32
%34 = fadd float %31, %33
%35 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 10
%36 = load float, float* %35
%37 = fadd float %34, %36
%38 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %3, i64 11
%39 = load float, float* %38
%40 = fadd float %37, %39
%41 = fpext float %40 to double
%42 = trunc i64 %3 to i32
%43 = add i32 %42, 2010
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %43, double %41)
%45 = fadd float %4, %40
%46 = add nuw nsw i64 %3, 1
%47 = icmp eq i64 %46, 5
br i1 %47, label %48, label %2
48: ; preds = %2
%49 = fdiv float %45, 5.000000e+00
%50 = fpext float %49 to double
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %50)
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.6, i64 0, i64 0))
br label %53
53: ; preds = %48, %53
%54 = phi i64 [ 0, %48 ], [ %73, %53 ]
%55 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 0, i64 %54
%56 = load float, float* %55
%57 = fadd float %56, 0.000000e+00
%58 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 1, i64 %54
%59 = load float, float* %58
%60 = fadd float %57, %59
%61 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 2, i64 %54
%62 = load float, float* %61
%63 = fadd float %60, %62
%64 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 3, i64 %54
%65 = load float, float* %64
%66 = fadd float %63, %65
%67 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 4, i64 %54
%68 = load float, float* %67
%69 = fadd float %66, %68
%70 = fdiv float %69, 5.000000e+00
%71 = fpext float %70 to double
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %71)
%73 = add nuw nsw i64 %54, 1
%74 = icmp eq i64 %73, 12
br i1 %74, label %75, label %53
75: ; preds = %53
%76 = tail call i32 @putchar(i32 10)
ret i32 0
}