#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(int argc, char const *argv[]) {
  const float rain[5][12] = {
      {1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.1, 1.1, 1.1},
      {2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2},
      {3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9},
      {4.8, 4.8, 4.8, 4.8, 4.8, 4.8, 4.8, 4.8, 4.8, 4.8, 4.8, 4.8},
      {5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7}};
  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 %15.1f\n", 2000 + year, subtot);
    total += subtot;
  }
  printf("\nThe yearly average is %.1f inches.\n\n", total / 5);
  printf("MONTHLY AVERAGES:\n\n");
  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)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x100(%rbp),%rdi
lea    0xec9(%rip),%rsi
mov    $0xf0,%edx
call   1040 <memcpy@plt>
lea    0xfa8(%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    123a <main+0x11a>
movl   $0x0,-0x108(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10c(%rbp)
ff
cmpl   $0xc,-0x108(%rbp)
jge    11e8 <main+0xc8>
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    1196 <main+0x76>
mov    -0x104(%rbp),%esi
add    $0x7d0,%esi
movss  -0x10c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xf11(%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    1174 <main+0x54>
movss  -0x110(%rbp),%xmm0
ff
movss  0xdb6(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xecb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x108(%rbp)
cmpl   $0xc,-0x108(%rbp)
jge    1334 <main+0x214>
movl   $0x0,-0x104(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10c(%rbp)
ff
cmpl   $0x5,-0x104(%rbp)
jge    12fa <main+0x1da>
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    12a8 <main+0x188>
movss  -0x10c(%rbp),%xmm0
ff
movss  0xcf6(%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    1286 <main+0x166>
lea    0xe0d(%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    $0x7d0,%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>
lea    0xf40(%rip),%rdi
call   1040 <puts@plt>
mov    $0xfffffffffffffff4,%rbp
lea    0xefd(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movss  0x30(%r15,%rbp,4),%xmm0
addss  0xdb5(%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  0xd84(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
inc    %rbp
jne    1240 <main+0x110>
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 0x3FF19999A0000000, float 0x3FF3333340000000, float 0x3FF4CCCCC0000000, float 0x3FF6666660000000, float 1.500000e+00, float 0x3FF99999A0000000, float 0x3FFB333340000000, float 0x3FFCCCCCC0000000, float 0x3FFE666660000000, float 0x3FF19999A0000000, float 0x3FF19999A0000000, float 0x3FF19999A0000000], [12 x float] [float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000], [12 x float] [float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000], [12 x float] [float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000], [12 x float] [float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000]]
@.str = [24 x i8] c"YEAR RAINFALL (inches)\0A\00"
@.str.1 = [12 x i8] c"%5d %15.1f\0A\00"
@.str.2 = [38 x i8] c"\0AThe yearly average is %.1f inches.\0A\0A\00"
@.str.3 = [20 x i8] c"MONTHLY AVERAGES:\0A\0A\00"
@.str.4 = [51 x i8] c" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec \0A\00"
@.str.5 = [6 x i8] c"%4.1f\00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x [12 x float]]
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = bitcast [5 x [12 x float]]* %6 to i8*
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %7
store float 0.000000e+00, float* %10
br label %13
13: ; preds = %42, %2
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 5
br i1 %15, label %16, label %45
16: ; preds = %13
store i32 0, i32* %8
store float 0.000000e+00, float* %9
br label %17
17: ; preds = %30, %16
%18 = load i32, i32* %8
%19 = icmp slt i32 %18, 12
br i1 %19, label %20, label %33
20: ; preds = %17
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* %6, i64 0, i64 %22
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [12 x float], [12 x float]* %23, i64 0, i64 %25
%27 = load float, float* %26
%28 = load float, float* %9
%29 = fadd float %28, %27
store float %29, float* %9
br label %30
30: ; preds = %20
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
br label %17
33: ; preds = %17
%34 = load i32, i32* %7
%35 = add nsw i32 2000, %34
%36 = load float, float* %9
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %35, double %37)
%39 = load float, float* %9
%40 = load float, float* %10
%41 = fadd float %40, %39
store float %41, float* %10
br label %42
42: ; preds = %33
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
store i32 %44, i32* %7
br label %13
45: ; preds = %13
%46 = load float, float* %10
%47 = fdiv float %46, 5.000000e+00
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %8
br label %52
52: ; preds = %77, %45
%53 = load i32, i32* %8
%54 = icmp slt i32 %53, 12
br i1 %54, label %55, label %80
55: ; preds = %52
store i32 0, i32* %7
store float 0.000000e+00, float* %9
br label %56
56: ; preds = %69, %55
%57 = load i32, i32* %7
%58 = icmp slt i32 %57, 5
br i1 %58, label %59, label %72
59: ; preds = %56
%60 = load i32, i32* %7
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* %6, i64 0, i64 %61
%63 = load i32, i32* %8
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [12 x float], [12 x float]* %62, i64 0, i64 %64
%66 = load float, float* %65
%67 = load float, float* %9
%68 = fadd float %67, %66
store float %68, float* %9
br label %69
69: ; preds = %59
%70 = load i32, i32* %7
%71 = add nsw i32 %70, 1
store i32 %71, i32* %7
br label %56
72: ; preds = %56
%73 = load float, float* %9
%74 = fdiv float %73, 5.000000e+00
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), double %75)
br label %77
77: ; preds = %72
%78 = load i32, i32* %8
%79 = add nsw i32 %78, 1
store i32 %79, i32* %8
br label %52
80: ; preds = %52
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.rain = [5 x [12 x float]] [[12 x float] [float 0x3FF19999A0000000, float 0x3FF3333340000000, float 0x3FF4CCCCC0000000, float 0x3FF6666660000000, float 1.500000e+00, float 0x3FF99999A0000000, float 0x3FFB333340000000, float 0x3FFCCCCCC0000000, float 0x3FFE666660000000, float 0x3FF19999A0000000, float 0x3FF19999A0000000, float 0x3FF19999A0000000], [12 x float] [float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000, float 0x40019999A0000000], [12 x float] [float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000, float 0x400F333340000000], [12 x float] [float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000, float 0x4013333340000000], [12 x float] [float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000, float 0x4016CCCCC0000000]]
@.str.1 = [12 x i8] c"%5d %15.1f\0A\00"
@.str.2 = [38 x i8] c"\0AThe yearly average is %.1f inches.\0A\0A\00"
@.str.5 = [6 x i8] c"%4.1f\00"
@str = [23 x i8] c"YEAR RAINFALL (inches)\00"
@str.7 = [19 x i8] c"MONTHLY AVERAGES:\0A\00"
@str.8 = [50 x i8] c" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
%5 = phi i64 [ 0, %2 ], [ %48, %4 ]
%6 = phi float [ 0.000000e+00, %2 ], [ %47, %4 ]
%7 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 0
%8 = load float, float* %7
%9 = fadd float %8, 0.000000e+00
%10 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 1
%11 = load float, float* %10
%12 = fadd float %9, %11
%13 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 2
%14 = load float, float* %13
%15 = fadd float %12, %14
%16 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 3
%17 = load float, float* %16
%18 = fadd float %15, %17
%19 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 4
%20 = load float, float* %19
%21 = fadd float %18, %20
%22 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 5
%23 = load float, float* %22
%24 = fadd float %21, %23
%25 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 6
%26 = load float, float* %25
%27 = fadd float %24, %26
%28 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 7
%29 = load float, float* %28
%30 = fadd float %27, %29
%31 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 8
%32 = load float, float* %31
%33 = fadd float %30, %32
%34 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 9
%35 = load float, float* %34
%36 = fadd float %33, %35
%37 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 10
%38 = load float, float* %37
%39 = fadd float %36, %38
%40 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 %5, i64 11
%41 = load float, float* %40
%42 = fadd float %39, %41
%43 = fpext float %42 to double
%44 = trunc i64 %5 to i32
%45 = add i32 %44, 2000
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %45, double %43)
%47 = fadd float %6, %42
%48 = add nuw nsw i64 %5, 1
%49 = icmp eq i64 %48, 5
br i1 %49, label %50, label %4
50: ; preds = %4
%51 = fdiv float %47, 5.000000e+00
%52 = fpext float %51 to double
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %52)
%54 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.7, i64 0, i64 0))
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.8, i64 0, i64 0))
br label %56
56: ; preds = %50, %56
%57 = phi i64 [ 0, %50 ], [ %76, %56 ]
%58 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 0, i64 %57
%59 = load float, float* %58
%60 = fadd float %59, 0.000000e+00
%61 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 1, i64 %57
%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 2, i64 %57
%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 3, i64 %57
%68 = load float, float* %67
%69 = fadd float %66, %68
%70 = getelementptr inbounds [5 x [12 x float]], [5 x [12 x float]]* @__const.main.rain, i64 0, i64 4, i64 %57
%71 = load float, float* %70
%72 = fadd float %69, %71
%73 = fdiv float %72, 5.000000e+00
%74 = fpext float %73 to double
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), double %74)
%76 = add nuw nsw i64 %57, 1
%77 = icmp eq i64 %76, 12
br i1 %77, label %78, label %56
78: ; preds = %56
%79 = tail call i32 @putchar(i32 10)
ret i32 0
}