#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
jge    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  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
lea    0xec2(%rip),%r15
xor    %ebx,%ebx
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
lea    (%rsp,%rbx,1),%rsi
add    $0x20,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x420,%rbx
jne    11a0 <main+0x80>
lea    (%rsp,%rbx,1),%rsi
add    $0x28,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
jmp    1420 <main+0x300>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd 0xe58(%rip),%xmm0
movhpd 0x20(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x28,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xa,%r12
jae    1420 <main+0x300>
movapd 0xe1e(%rip),%xmm0
movhpd 0x28(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x30,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x360,%rbx
je     1432 <main+0x312>
movapd 0xde1(%rip),%xmm0
movhpd 0x30(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x38,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x8,%r12
jae    1444 <main+0x324>
movapd 0xda7(%rip),%xmm0
movhpd 0x38(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x40,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x2a0,%rbx
je     1456 <main+0x336>
movapd 0xd6a(%rip),%xmm0
movhpd 0x40(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x48,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x6,%r12
jae    1468 <main+0x348>
movapd 0xd30(%rip),%xmm0
movhpd 0x48(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x50,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x1e0,%rbx
je     147a <main+0x35a>
movapd 0xcf3(%rip),%xmm0
movhpd 0x50(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x58,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x4,%r12
jae    148c <main+0x36c>
movapd 0xcb9(%rip),%xmm0
movhpd 0x58(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x60,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x120,%rbx
je     149e <main+0x37e>
movapd 0xc7c(%rip),%xmm0
movhpd 0x60(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%rsi
add    $0x68,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x2,%r12
jae    14b0 <main+0x390>
movapd 0xc42(%rip),%xmm0
movhpd 0x68(%rsp,%rbx,1),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    (%rsp,%rbx,1),%r14
add    $0x70,%r14
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
test   %rbx,%rbx
jne    14c2 <main+0x3a2>
movapd 0xc06(%rip),%xmm0
movhpd (%r14),%xmm0
movapd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
jmp    14c2 <main+0x3a2>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rsp,%rbx,1),%rsi
add    $0x30,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x38,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x40,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x48,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x50,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x58,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x60,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x68,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x70,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x78,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%r12
add    $0x60,%rbx
cmp    $0x480,%rbx
jne    1160 <main+0x40>
movsbl 0xf(%rsp),%eax
movapd 0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
cmp    $0x53,%eax
je     150a <main+0x3ea>
cmp    $0x4d,%eax
jne    1516 <main+0x3f6>
divsd  %xmm1,%xmm0
lea    0xb08(%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 slt 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 = %0, %124
%6 = phi i64 [ 0, %0 ], [ %128, %124 ]
%7 = phi <2 x double> [ zeroinitializer, %0 ], [ %125, %124 ]
%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 = icmp eq i64 %6, 11
br i1 %10, label %11, label %14
11: ; preds = %5
%12 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 1
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %12)
br label %21
14: ; preds = %5
%15 = load double, double* %8
%16 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %15, i64 1
%17 = fadd <2 x double> %7, %16
%18 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 1
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %18)
%20 = icmp ult i64 %6, 10
br i1 %20, label %25, label %21
21: ; preds = %11, %14
%22 = phi <2 x double> [ %7, %11 ], [ %17, %14 ]
%23 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 2
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %23)
br label %32
25: ; preds = %14
%26 = load double, double* %18
%27 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %26, i64 1
%28 = fadd <2 x double> %17, %27
%29 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 2
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %29)
%31 = icmp eq i64 %6, 9
br i1 %31, label %32, label %36
32: ; preds = %21, %25
%33 = phi <2 x double> [ %22, %21 ], [ %28, %25 ]
%34 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 3
%35 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %34)
br label %43
36: ; preds = %25
%37 = load double, double* %29
%38 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %37, i64 1
%39 = fadd <2 x double> %28, %38
%40 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 3
%41 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %40)
%42 = icmp ult i64 %6, 8
br i1 %42, label %47, label %43
43: ; preds = %32, %36
%44 = phi <2 x double> [ %33, %32 ], [ %39, %36 ]
%45 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 4
%46 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %45)
br label %54
47: ; preds = %36
%48 = load double, double* %40
%49 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %48, i64 1
%50 = fadd <2 x double> %39, %49
%51 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 4
%52 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %51)
%53 = icmp eq i64 %6, 7
br i1 %53, label %54, label %58
54: ; preds = %43, %47
%55 = phi <2 x double> [ %44, %43 ], [ %50, %47 ]
%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)
br label %65
58: ; preds = %47
%59 = load double, double* %51
%60 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %59, i64 1
%61 = fadd <2 x double> %50, %60
%62 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 5
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %62)
%64 = icmp ult i64 %6, 6
br i1 %64, label %69, label %65
65: ; preds = %54, %58
%66 = phi <2 x double> [ %55, %54 ], [ %61, %58 ]
%67 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 6
%68 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %67)
br label %76
69: ; preds = %58
%70 = load double, double* %62
%71 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %70, i64 1
%72 = fadd <2 x double> %61, %71
%73 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 6
%74 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %73)
%75 = icmp eq i64 %6, 5
br i1 %75, label %76, label %80
76: ; preds = %65, %69
%77 = phi <2 x double> [ %66, %65 ], [ %72, %69 ]
%78 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 7
%79 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %78)
br label %87
80: ; preds = %69
%81 = load double, double* %73
%82 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %81, i64 1
%83 = fadd <2 x double> %72, %82
%84 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 7
%85 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %84)
%86 = icmp ult i64 %6, 4
br i1 %86, label %91, label %87
87: ; preds = %76, %80
%88 = phi <2 x double> [ %77, %76 ], [ %83, %80 ]
%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 %98
91: ; preds = %80
%92 = load double, double* %84
%93 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %92, i64 1
%94 = fadd <2 x double> %83, %93
%95 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 8
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %95)
%97 = icmp eq i64 %6, 3
br i1 %97, label %98, label %102
98: ; preds = %87, %91
%99 = phi <2 x double> [ %88, %87 ], [ %94, %91 ]
%100 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 9
%101 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %100)
br label %109
102: ; preds = %91
%103 = load double, double* %95
%104 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %103, i64 1
%105 = fadd <2 x double> %94, %104
%106 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 9
%107 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %106)
%108 = icmp ult i64 %6, 2
br i1 %108, label %113, label %109
109: ; preds = %98, %102
%110 = phi <2 x double> [ %99, %98 ], [ %105, %102 ]
%111 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 10
%112 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %111)
br label %124
113: ; preds = %102
%114 = load double, double* %106
%115 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %114, i64 1
%116 = fadd <2 x double> %105, %115
%117 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 10
%118 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %117)
%119 = icmp eq i64 %6, 0
br i1 %119, label %120, label %124
120: ; preds = %113
%121 = load double, double* %117
%122 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %121, i64 1
%123 = fadd <2 x double> %116, %122
br label %124
124: ; preds = %113, %120, %109
%125 = phi <2 x double> [ %123, %120 ], [ %116, %113 ], [ %110, %109 ]
%126 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %1, i64 0, i64 %6, i64 11
%127 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %126)
%128 = add nuw nsw i64 %6, 1
%129 = icmp eq i64 %128, 12
br i1 %129, label %130, label %5
130: ; preds = %124
%131 = load i8, i8* %2
%132 = sext i8 %131 to i32
%133 = extractelement <2 x double> %125, i64 1
switch i32 %132, label %140 [
i32 83, label %137
i32 77, label %134
]
134: ; preds = %130
%135 = extractelement <2 x double> %125, i64 0
%136 = fdiv double %133, %135
br label %137
137: ; preds = %130, %134
%138 = phi double [ %136, %134 ], [ %133, %130 ]
%139 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %138)
br label %140
140: ; preds = %137, %130
ret i32 0
}