#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 */
double computarOperacao(char, int, double **);
int /*<<< orphan*/ preencherMatriz(double **);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  int colunaDaOperacao;
  char operacao;
  double matriz[12][12];
  scanf("%d\n", &colunaDaOperacao);
  scanf("%c", &operacao);
  preencherMatriz(matriz);
  printf("%.1f\n", computarOperacao(operacao, colunaDaOperacao, matriz));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe99(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x490(%rbp),%rdi
call   1030 <preencherMatriz@plt>
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%esi
lea    -0x490(%rbp),%rdx
movsbl %al,%edi
call   1060 <computarOperacao@plt>
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x490,%rsp
lea    0xeb1(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xea2(%rip),%rdi
lea    0xb(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <preencherMatriz@plt>
movsbl 0xb(%rsp),%edi
mov    0xc(%rsp),%esi
mov    %rbx,%rdx
call   1060 <computarOperacao@plt>
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x490,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca [12 x [12 x double]]
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %4, i64 0, i64 0
%8 = bitcast [12 x double]* %7 to double**
%9 = call i32 @preencherMatriz(double** %8)
%10 = load i8, i8* %3
%11 = load i32, i32* %2
%12 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %4, i64 0, i64 0
%13 = bitcast [12 x double]* %12 to double**
%14 = call double @computarOperacao(i8 signext %10, i32 %11, double** %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [12 x [12 x double]]
%4 = bitcast i32* %1 to i8*
%5 = bitcast [12 x [12 x double]]* %3 to i8*
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%8 = bitcast [12 x [12 x double]]* %3 to double**
%9 = call i32 @preencherMatriz(double** %8)
%10 = load i8, i8* %2
%11 = load i32, i32* %1
%12 = call double @computarOperacao(i8 signext %10, i32 %11, double** %8)
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %12)
ret i32 0
}