#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 *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  int i, j, k;
  float a[3][3], x[3], ax[3];
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      scanf("%f", &a[i][j]);
    }
  }
  for (i = 0; i < 3; i++) {
    scanf("%f", &x[i]);
  }
  for (i = 0; i < 3; i++) {
    ax[i] = 0.0;
    for (k = 0; k < 3; k++) {
      ax[i] += (a[i][k] * x[k]);
    }
  }
  for (i = 0; i < 3; i++) {
    printf("%.2f\n", ax[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1198 <main+0x78>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1185 <main+0x65>
movslq -0x8(%rbp),%rax
lea    -0x40(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe8e(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <main+0x27>
jmp    118a <main+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11d2 <main+0xb2>
movslq -0x8(%rbp),%rax
lea    -0x4c(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe41(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119f <main+0x7f>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    125c <main+0x13c>
movslq -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,-0x58(%rbp,%rax,4)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    1249 <main+0x129>
movslq -0x8(%rbp),%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movslq -0x10(%rbp),%rax
movss  -0x4c(%rbp,%rax,4),%xmm2
movslq -0x8(%rbp),%rax
movss  -0x58(%rbp,%rax,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11f7 <main+0xd7>
jmp    124e <main+0x12e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d9 <main+0xb9>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1291 <main+0x171>
movslq -0x8(%rbp),%rax
movss  -0x58(%rbp,%rax,4),%xmm0
lea    0xd85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1263 <main+0x143>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xed4(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x38(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x3c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x34(%rsp),%xmm2
movss  0x38(%rsp),%xmm1
movss  (%rsp),%xmm0
mulss  %xmm2,%xmm0
xorps  %xmm3,%xmm3
addss  %xmm3,%xmm0
movss  0x4(%rsp),%xmm4
mulss  %xmm1,%xmm4
addss  %xmm0,%xmm4
movss  0x3c(%rsp),%xmm6
movss  0x8(%rsp),%xmm0
mulss  %xmm6,%xmm0
addss  %xmm4,%xmm0
movss  0xc(%rsp),%xmm4
mulss  %xmm2,%xmm4
addss  %xmm3,%xmm4
movss  0x10(%rsp),%xmm5
mulss  %xmm1,%xmm5
addss  %xmm4,%xmm5
movss  0x14(%rsp),%xmm4
mulss  %xmm6,%xmm4
mulss  0x18(%rsp),%xmm2
addss  %xmm5,%xmm4
movss  %xmm4,0x30(%rsp)
addss  %xmm3,%xmm2
mulss  0x1c(%rsp),%xmm1
addss  %xmm2,%xmm1
mulss  0x20(%rsp),%xmm6
addss  %xmm1,%xmm6
movss  %xmm6,0x2c(%rsp)
lea    0xda4(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0x30(%rsp),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0x2c(%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [3 x [3 x float]]
%6 = alloca [3 x float]
%7 = alloca [3 x float]
store i32 0, i32* %1
store i32 0, i32* %2
br label %8
8: ; preds = %27, %0
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %30
11: ; preds = %8
store i32 0, i32* %3
br label %12
12: ; preds = %23, %11
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %26
15: ; preds = %12
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %5, i64 0, i64 %17
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 %20
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %21)
br label %23
23: ; preds = %15
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %12
26: ; preds = %12
br label %27
27: ; preds = %26
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
br label %8
30: ; preds = %8
store i32 0, i32* %2
br label %31
31: ; preds = %39, %30
%32 = load i32, i32* %2
%33 = icmp slt i32 %32, 3
br i1 %33, label %34, label %42
34: ; preds = %31
%35 = load i32, i32* %2
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 %36
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %37)
br label %39
39: ; preds = %34
%40 = load i32, i32* %2
%41 = add nsw i32 %40, 1
store i32 %41, i32* %2
br label %31
42: ; preds = %31
store i32 0, i32* %2
br label %43
43: ; preds = %74, %42
%44 = load i32, i32* %2
%45 = icmp slt i32 %44, 3
br i1 %45, label %46, label %77
46: ; preds = %43
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 %48
store float 0.000000e+00, float* %49
store i32 0, i32* %4
br label %50
50: ; preds = %70, %46
%51 = load i32, i32* %4
%52 = icmp slt i32 %51, 3
br i1 %52, label %53, label %73
53: ; preds = %50
%54 = load i32, i32* %2
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %5, i64 0, i64 %55
%57 = load i32, i32* %4
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [3 x float], [3 x float]* %56, i64 0, i64 %58
%60 = load float, float* %59
%61 = load i32, i32* %4
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 %62
%64 = load float, float* %63
%65 = load i32, i32* %2
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 %66
%68 = load float, float* %67
%69 = call float @llvm.fmuladd.f32(float %60, float %64, float %68)
store float %69, float* %67
br label %70
70: ; preds = %53
%71 = load i32, i32* %4
%72 = add nsw i32 %71, 1
store i32 %72, i32* %4
br label %50
73: ; preds = %50
br label %74
74: ; preds = %73
%75 = load i32, i32* %2
%76 = add nsw i32 %75, 1
store i32 %76, i32* %2
br label %43
77: ; preds = %43
store i32 0, i32* %2
br label %78
78: ; preds = %87, %77
%79 = load i32, i32* %2
%80 = icmp slt i32 %79, 3
br i1 %80, label %81, label %90
81: ; preds = %78
%82 = load i32, i32* %2
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 %83
%85 = load float, float* %84
%86 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %85)
br label %87
87: ; preds = %81
%88 = load i32, i32* %2
%89 = add nsw i32 %88, 1
store i32 %89, i32* %2
br label %78
90: ; preds = %78
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca [3 x [3 x float]]
%2 = alloca [3 x float]
%3 = bitcast [3 x [3 x float]]* %1 to i8*
%4 = bitcast [3 x float]* %2 to i8*
%5 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %5)
%7 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %7)
%9 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 0, i64 2
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %9)
%11 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 1, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %11)
%13 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 1, i64 1
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %13)
%15 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 1, i64 2
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %15)
%17 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 2, i64 0
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %17)
%19 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 2, i64 1
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %19)
%21 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 2, i64 2
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %21)
%23 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %23)
%25 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 1
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %25)
%27 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 2
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %27)
%29 = load float, float* %5
%30 = load float, float* %23
%31 = call float @llvm.fmuladd.f32(float %29, float %30, float 0.000000e+00)
%32 = load float, float* %7
%33 = load float, float* %25
%34 = call float @llvm.fmuladd.f32(float %32, float %33, float %31)
%35 = load float, float* %9
%36 = load float, float* %27
%37 = call float @llvm.fmuladd.f32(float %35, float %36, float %34)
%38 = load float, float* %11
%39 = call float @llvm.fmuladd.f32(float %38, float %30, float 0.000000e+00)
%40 = load float, float* %13
%41 = call float @llvm.fmuladd.f32(float %40, float %33, float %39)
%42 = load float, float* %15
%43 = call float @llvm.fmuladd.f32(float %42, float %36, float %41)
%44 = load float, float* %17
%45 = call float @llvm.fmuladd.f32(float %44, float %30, float 0.000000e+00)
%46 = load float, float* %19
%47 = call float @llvm.fmuladd.f32(float %46, float %33, float %45)
%48 = load float, float* %21
%49 = call float @llvm.fmuladd.f32(float %48, float %36, float %47)
%50 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %37)
%51 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %43)
%52 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %49)
ret i32 0
}