#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 *, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  double M[12][12], soma = 0, cont_n = 0;
  int i, j, L;
  char T;
  scanf(" %c", &T);
  for (i = 0; i < 12; i++) {
    for (j = 0; j < 12; j++) {
      scanf(" %lf", &M[i][j]);
      if (j > 11 - i) {
        soma += M[i][j];
        cont_n++;
      }
    }
  }
  switch (T) {
  case 'S':
    printf("%0.1lf\n", soma);
    break;
  case 'M':
    printf("%0.1lf\n", soma / cont_n);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4c0,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x498(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x4a0(%rbp)
ff
lea    0xeb9(%rip),%rdi
lea    -0x4ad(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x4a4(%rbp)
cmpl   $0xc,-0x4a4(%rbp)
jge    1250 <main+0x130>
movl   $0x0,-0x4a8(%rbp)
cmpl   $0xc,-0x4a8(%rbp)
jge    1237 <main+0x117>
movslq -0x4a4(%rbp),%rax
lea    -0x490(%rbp),%rsi
imul   $0x60,%rax,%rax
add    %rax,%rsi
movslq -0x4a8(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4a8(%rbp),%eax
mov    $0xb,%ecx
sub    -0x4a4(%rbp),%ecx
cmp    %ecx,%eax
jle    121e <main+0xfe>
movslq -0x4a4(%rbp),%rcx
lea    -0x490(%rbp),%rax
imul   $0x60,%rcx,%rcx
add    %rcx,%rax
movslq -0x4a8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x498(%rbp),%xmm0
ff
movsd  %xmm0,-0x498(%rbp)
ff
movsd  0xdf2(%rip),%xmm0
addsd  -0x4a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x4a0(%rbp)
ff
jmp    1223 <main+0x103>
mov    -0x4a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4a8(%rbp)
jmp    117e <main+0x5e>
jmp    123c <main+0x11c>
mov    -0x4a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4a4(%rbp)
jmp    1167 <main+0x47>
movsbl -0x4ad(%rbp),%eax
mov    %eax,-0x4b4(%rbp)
sub    $0x4d,%eax
je     1298 <main+0x178>
jmp    126b <main+0x14b>
mov    -0x4b4(%rbp),%eax
sub    $0x53,%eax
jne    12b4 <main+0x194>
jmp    127f <main+0x15f>
movsd  -0x498(%rbp),%xmm0
ff
lea    0xd83(%rip),%rdi
call   1030 <printf@plt>
jmp    12b4 <main+0x194>
movsd  -0x498(%rbp),%xmm0
ff
divsd  -0x4a0(%rbp),%xmm0
ff
lea    0xd62(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x4c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x4a8,%rsp
lea    0xedb(%rip),%rdi
lea    0xf(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
xorpd  %xmm1,%xmm1
lea    0xec8(%rip),%r14
xor    %r15d,%r15d
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rsi
add    $0x20,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%r15,1),%rsi
add    $0x28,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x420,%r15
jne    11d0 <main+0xb0>
movapd 0xe65(%rip),%xmm0
movhpd 0x28(%rsp,%r15,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x30,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
jmp    11fb <main+0xdb>
nopl   0x0(%rax)
lea    (%r12,%r12,2),%rbx
shl    $0x5,%rbx
lea    (%rsp,%r15,1),%rsi
add    $0x30,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xa,%r12
jb     13f0 <main+0x2d0>
add    %rsp,%rbx
add    $0x30,%rbx
movapd 0xdfd(%rip),%xmm0
movhpd (%rbx),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x38,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm1
movapd 0xdc6(%rip),%xmm0
movhpd (%rbx),%xmm0
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x40,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0xd9b(%rip),%xmm0
movhpd (%rbx),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x48,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm1
movapd 0xd64(%rip),%xmm0
movhpd (%rbx),%xmm0
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x50,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0xd39(%rip),%xmm0
movhpd (%rbx),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x58,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm1
movapd 0xd02(%rip),%xmm0
movhpd (%rbx),%xmm0
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x60,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0xcd7(%rip),%xmm0
movhpd (%rbx),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x68,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm1
movapd 0xca0(%rip),%xmm0
movhpd (%rbx),%xmm0
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x70,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0xc75(%rip),%xmm0
movhpd (%rbx),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%r15,1),%rbx
add    $0x78,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm1
movapd 0xc3e(%rip),%xmm0
movhpd (%rbx),%xmm0
addpd  %xmm0,%xmm1
add    $0x1,%r12
add    $0x60,%r15
cmp    $0x480,%r15
jne    1160 <main+0x40>
jmp    154a <main+0x42a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rsp,%r15,1),%rsi
add    $0x38,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x360,%r15
jne    1417 <main+0x2f7>
add    %rsp,%rbx
add    $0x38,%rbx
jmp    122c <main+0x10c>
lea    (%rsp,%r15,1),%rsi
add    $0x40,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x8,%r12
jb     143b <main+0x31b>
add    %rsp,%rbx
add    $0x40,%rbx
jmp    125d <main+0x13d>
lea    (%rsp,%r15,1),%rsi
add    $0x48,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x2a0,%r15
jne    1462 <main+0x342>
add    %rsp,%rbx
add    $0x48,%rbx
jmp    128e <main+0x16e>
lea    (%rsp,%r15,1),%rsi
add    $0x50,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x6,%r12
jb     1486 <main+0x366>
add    %rsp,%rbx
add    $0x50,%rbx
jmp    12bf <main+0x19f>
lea    (%rsp,%r15,1),%rsi
add    $0x58,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x1e0,%r15
jne    14ad <main+0x38d>
add    %rsp,%rbx
add    $0x58,%rbx
jmp    12f0 <main+0x1d0>
lea    (%rsp,%r15,1),%rsi
add    $0x60,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x4,%r12
jb     14d1 <main+0x3b1>
add    %rsp,%rbx
add    $0x60,%rbx
jmp    1321 <main+0x201>
lea    (%rsp,%r15,1),%rsi
add    $0x68,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x120,%r15
jne    14f8 <main+0x3d8>
add    %rsp,%rbx
add    $0x68,%rbx
jmp    1352 <main+0x232>
lea    (%rsp,%r15,1),%rsi
add    $0x70,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x2,%r12
jb     151c <main+0x3fc>
add    %rsp,%rbx
add    $0x70,%rbx
jmp    1383 <main+0x263>
lea    (%rsp,%r15,1),%rsi
add    $0x78,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
test   %r15,%r15
je     153f <main+0x41f>
add    %rsp,%rbx
add    $0x78,%rbx
jmp    13b4 <main+0x294>
movapd 0x10(%rsp),%xmm1
jmp    13ca <main+0x2aa>
movsbl 0xf(%rsp),%eax
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
cmp    $0x53,%eax
je     1565 <main+0x445>
cmp    $0x4d,%eax
jne    1571 <main+0x451>
divsd  %xmm1,%xmm0
lea    0xaad(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x4a8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %c\00"
@.str.1 = [5 x i8] c" %lf\00"
@.str.2 = [8 x i8] c"%0.1lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x [12 x double]]
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 0, i32* %1
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
store i32 0, i32* %5
br label %10
10: ; preds = %46, %0
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 12
br i1 %12, label %13, label %49
13: ; preds = %10
store i32 0, i32* %6
br label %14
14: ; preds = %42, %13
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 12
br i1 %16, label %17, label %45
17: ; preds = %14
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %2, i64 0, i64 %19
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [12 x double], [12 x double]* %20, i64 0, i64 %22
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %23)
%25 = load i32, i32* %6
%26 = load i32, i32* %5
%27 = sub nsw i32 11, %26
%28 = icmp sgt i32 %25, %27
br i1 %28, label %29, label %41
29: ; preds = %17
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %2, i64 0, i64 %31
%33 = load i32, i32* %6
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [12 x double], [12 x double]* %32, i64 0, i64 %34
%36 = load double, double* %35
%37 = load double, double* %3
%38 = fadd double %37, %36
store double %38, double* %3
%39 = load double, double* %4
%40 = fadd double %39, 1.000000e+00
store double %40, double* %4
br label %41
41: ; preds = %29, %17
br label %42
42: ; preds = %41
%43 = load i32, i32* %6
%44 = add nsw i32 %43, 1
store i32 %44, i32* %6
br label %14
45: ; preds = %14
br label %46
46: ; preds = %45
%47 = load i32, i32* %5
%48 = add nsw i32 %47, 1
store i32 %48, i32* %5
br label %10
49: ; preds = %10
%50 = load i8, i8* %8
%51 = sext i8 %50 to i32
switch i32 %51, label %60 [
i32 83, label %52
i32 77, label %55
]
52: ; preds = %49
%53 = load double, double* %3
%54 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %53)
br label %60
55: ; preds = %49
%56 = load double, double* %3
%57 = load double, double* %4
%58 = fdiv double %56, %57
%59 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %58)
br label %60
60: ; preds = %49, %55, %52
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c" %c\00"
@.str.1 = [5 x i8] c" %lf\00"
@.str.2 = [8 x i8] c"%0.1lf\0A\00"
define i32 @main() {
%1 = alloca [12 x [12 x double]]
%2 = alloca i8
%3 = bitcast [12 x [12 x double]]* %1 to i8*
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %5
5: ; preds = %137, %0
%6 = phi i64 [ 0, %0 ], [ %139, %137 ]
%7 = phi <2 x double> [ zeroinitializer, %0 ], [ %138, %137 ]
%8 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 0
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %8)
%10 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 1
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %10)
%12 = icmp eq i64 %6, 11
br i1 %12, label %13, label %19
13: ; preds = %5
%14 = load double, double* %10
%15 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %14, i64 1
%16 = fadd <2 x double> %7, %15
%17 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 2
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %17)
br label %23
19: ; preds = %5
%20 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 2
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %20)
%22 = icmp ugt i64 %6, 9
br i1 %22, label %23, label %31
23: ; preds = %19, %13
%24 = phi double* [ %17, %13 ], [ %20, %19 ]
%25 = phi <2 x double> [ %16, %13 ], [ %7, %19 ]
%26 = load double, double* %24
%27 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %26, i64 1
%28 = fadd <2 x double> %25, %27
%29 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 3
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %29)
br label %35
31: ; preds = %19
%32 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 3
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %32)
%34 = icmp eq i64 %6, 9
br i1 %34, label %35, label %43
35: ; preds = %31, %23
%36 = phi double* [ %29, %23 ], [ %32, %31 ]
%37 = phi <2 x double> [ %28, %23 ], [ %7, %31 ]
%38 = load double, double* %36
%39 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %38, i64 1
%40 = fadd <2 x double> %37, %39
%41 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 4
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %41)
br label %47
43: ; preds = %31
%44 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 4
%45 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %44)
%46 = icmp ugt i64 %6, 7
br i1 %46, label %47, label %55
47: ; preds = %43, %35
%48 = phi double* [ %41, %35 ], [ %44, %43 ]
%49 = phi <2 x double> [ %40, %35 ], [ %7, %43 ]
%50 = load double, double* %48
%51 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %50, i64 1
%52 = fadd <2 x double> %49, %51
%53 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 5
%54 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %53)
br label %59
55: ; preds = %43
%56 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 5
%57 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %56)
%58 = icmp eq i64 %6, 7
br i1 %58, label %59, label %67
59: ; preds = %55, %47
%60 = phi double* [ %53, %47 ], [ %56, %55 ]
%61 = phi <2 x double> [ %52, %47 ], [ %7, %55 ]
%62 = load double, double* %60
%63 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %62, i64 1
%64 = fadd <2 x double> %61, %63
%65 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 6
%66 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %65)
br label %71
67: ; preds = %55
%68 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 6
%69 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %68)
%70 = icmp ugt i64 %6, 5
br i1 %70, label %71, label %79
71: ; preds = %67, %59
%72 = phi double* [ %65, %59 ], [ %68, %67 ]
%73 = phi <2 x double> [ %64, %59 ], [ %7, %67 ]
%74 = load double, double* %72
%75 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %74, i64 1
%76 = fadd <2 x double> %73, %75
%77 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 7
%78 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %77)
br label %83
79: ; preds = %67
%80 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 7
%81 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %80)
%82 = icmp eq i64 %6, 5
br i1 %82, label %83, label %91
83: ; preds = %79, %71
%84 = phi double* [ %77, %71 ], [ %80, %79 ]
%85 = phi <2 x double> [ %76, %71 ], [ %7, %79 ]
%86 = load double, double* %84
%87 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %86, i64 1
%88 = fadd <2 x double> %85, %87
%89 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 8
%90 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %89)
br label %95
91: ; preds = %79
%92 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 8
%93 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %92)
%94 = icmp ugt i64 %6, 3
br i1 %94, label %95, label %103
95: ; preds = %91, %83
%96 = phi double* [ %89, %83 ], [ %92, %91 ]
%97 = phi <2 x double> [ %88, %83 ], [ %7, %91 ]
%98 = load double, double* %96
%99 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %98, i64 1
%100 = fadd <2 x double> %97, %99
%101 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 9
%102 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %101)
br label %107
103: ; preds = %91
%104 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 9
%105 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %104)
%106 = icmp eq i64 %6, 3
br i1 %106, label %107, label %115
107: ; preds = %103, %95
%108 = phi double* [ %101, %95 ], [ %104, %103 ]
%109 = phi <2 x double> [ %100, %95 ], [ %7, %103 ]
%110 = load double, double* %108
%111 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %110, i64 1
%112 = fadd <2 x double> %109, %111
%113 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 10
%114 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %113)
br label %119
115: ; preds = %103
%116 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 10
%117 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %116)
%118 = icmp ugt i64 %6, 1
br i1 %118, label %119, label %127
119: ; preds = %115, %107
%120 = phi double* [ %113, %107 ], [ %116, %115 ]
%121 = phi <2 x double> [ %112, %107 ], [ %7, %115 ]
%122 = load double, double* %120
%123 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %122, i64 1
%124 = fadd <2 x double> %121, %123
%125 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 11
%126 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %125)
br label %131
127: ; preds = %115
%128 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 11
%129 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %128)
%130 = icmp eq i64 %6, 0
br i1 %130, label %137, label %131
131: ; preds = %119, %127
%132 = phi double* [ %125, %119 ], [ %128, %127 ]
%133 = phi <2 x double> [ %124, %119 ], [ %7, %127 ]
%134 = load double, double* %132
%135 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %134, i64 1
%136 = fadd <2 x double> %133, %135
br label %137
137: ; preds = %131, %127
%138 = phi <2 x double> [ %136, %131 ], [ %7, %127 ]
%139 = add nuw nsw i64 %6, 1
%140 = icmp eq i64 %139, 12
br i1 %140, label %141, label %5
141: ; preds = %137
%142 = load i8, i8* %2
%143 = sext i8 %142 to i32
%144 = extractelement <2 x double> %138, i64 1
switch i32 %143, label %151 [
i32 83, label %148
i32 77, label %145
]
145: ; preds = %141
%146 = extractelement <2 x double> %138, i64 0
%147 = fdiv double %144, %146
br label %148
148: ; preds = %141, %145
%149 = phi double [ %147, %145 ], [ %144, %141 ]
%150 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %149)
br label %151
151: ; preds = %148, %141
ret i32 0
}