#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, double *);
int /*<<< orphan*/ preencherMatriz(double **);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  int linhaDaOperacao;
  char operacao;
  double matriz[12][12];
  scanf("%d\n", &linhaDaOperacao);
  scanf("%c", &operacao);
  preencherMatriz(matriz);
  printf("%.1f\n", computarOperacao(operacao, matriz[linhaDaOperacao]));
  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
movslq -0x8(%rbp),%rcx
lea    -0x490(%rbp),%rsi
imul   $0x60,%rcx,%rcx
add    %rcx,%rsi
movsbl %al,%edi
call   1060 <computarOperacao@plt>
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x498,%rsp
lea    0xeb2(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xea3(%rip),%rdi
lea    0xb(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x10(%rsp),%rdi
call   1030 <preencherMatriz@plt>
movsbl 0xb(%rsp),%edi
movslq 0xc(%rsp),%rax
lea    (%rax,%rax,2),%rax
shl    $0x5,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x10,%rsi
call   1060 <computarOperacao@plt>
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x498,%rsp
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 = sext i32 %11 to i64
%13 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %4, i64 0, i64 %12
%14 = getelementptr inbounds [12 x double], [12 x double]* %13, i64 0, i64 0
%15 = call double @computarOperacao(i8 signext %10, double* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %15)
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 = sext i32 %11 to i64
%13 = getelementptr inbounds [12 x [12 x double]], [12 x [12 x double]]* %3, i64 0, i64 %12, i64 0
%14 = call double @computarOperacao(i8 signext %10, 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
}