#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 *);
main() {
  int i, j, k;
  float a[3][3], x[3][1], ax[3][1];
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      scanf("%f", &a[i][j]);
      scanf("%f", &x[j][1]);
    }
    ax[i][1] = 0;
    for (k = 0; k < 3; k++) {
      ax[i][1] += a[i][k] * x[k][1];
    }
    printf("%.2f\n", ax[i][1]);
  }
  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    122e <main+0x10e>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    11a4 <main+0x84>
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>
movslq -0xc(%rbp),%rax
lea    -0x4c(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
add    $0x4,%rsi
lea    0xe6f(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <main+0x27>
movslq -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp,%rax,4)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    120a <main+0xea>
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  -0x48(%rbp,%rax,4),%xmm2
movslq -0x8(%rbp),%rax
movss  -0x54(%rbp,%rax,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11b8 <main+0x98>
movslq -0x8(%rbp),%rax
movss  -0x54(%rbp,%rax,4),%xmm0
lea    0xde8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
lea    0xed0(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
mulss  0x8(%rsp),%xmm0
xorps  %xmm2,%xmm2
addss  %xmm2,%xmm0
mulss  0xc(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  0x18(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
addss  %xmm1,%xmm0
lea    0xe42(%rip),%r13
mov    %r13,%rdi
call   1030 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
mulss  0x8(%rsp),%xmm0
addss  0xdd1(%rip),%xmm0
mulss  0xc(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  0x24(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
addss  %xmm1,%xmm0
mov    %r13,%rdi
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
movss  0x28(%rsp),%xmm0
movss  0x2c(%rsp),%xmm1
mulss  0x8(%rsp),%xmm0
addss  0xd4d(%rip),%xmm0
mulss  0xc(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  0x30(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
addss  %xmm1,%xmm0
mov    %r13,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
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 [1 x float]]
%7 = alloca [3 x [1 x float]]
store i32 0, i32* %1
store i32 0, i32* %2
br label %8
8: ; preds = %68, %0
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %71
11: ; preds = %8
store i32 0, i32* %3
br label %12
12: ; preds = %28, %11
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %31
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)
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [3 x [1 x float]], [3 x [1 x float]]* %6, i64 0, i64 %24
%26 = getelementptr inbounds [1 x float], [1 x float]* %25, i64 0, i64 1
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %26)
br label %28
28: ; preds = %15
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %12
31: ; preds = %12
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [3 x [1 x float]], [3 x [1 x float]]* %7, i64 0, i64 %33
%35 = getelementptr inbounds [1 x float], [1 x float]* %34, i64 0, i64 1
store float 0.000000e+00, float* %35
store i32 0, i32* %4
br label %36
36: ; preds = %58, %31
%37 = load i32, i32* %4
%38 = icmp slt i32 %37, 3
br i1 %38, label %39, label %61
39: ; preds = %36
%40 = load i32, i32* %2
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %5, i64 0, i64 %41
%43 = load i32, i32* %4
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [3 x float], [3 x float]* %42, i64 0, i64 %44
%46 = load float, float* %45
%47 = load i32, i32* %4
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3 x [1 x float]], [3 x [1 x float]]* %6, i64 0, i64 %48
%50 = getelementptr inbounds [1 x float], [1 x float]* %49, i64 0, i64 1
%51 = load float, float* %50
%52 = load i32, i32* %2
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [3 x [1 x float]], [3 x [1 x float]]* %7, i64 0, i64 %53
%55 = getelementptr inbounds [1 x float], [1 x float]* %54, i64 0, i64 1
%56 = load float, float* %55
%57 = call float @llvm.fmuladd.f32(float %46, float %51, float %56)
store float %57, float* %55
br label %58
58: ; preds = %39
%59 = load i32, i32* %4
%60 = add nsw i32 %59, 1
store i32 %60, i32* %4
br label %36
61: ; preds = %36
%62 = load i32, i32* %2
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [3 x [1 x float]], [3 x [1 x float]]* %7, i64 0, i64 %63
%65 = getelementptr inbounds [1 x float], [1 x float]* %64, i64 0, i64 1
%66 = load float, float* %65
%67 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %66)
br label %68
68: ; preds = %61
%69 = load i32, i32* %2
%70 = add nsw i32 %69, 1
store i32 %70, i32* %2
br label %8
71: ; preds = %8
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 [1 x float]]
%3 = bitcast [3 x [3 x float]]* %1 to i8*
%4 = bitcast [3 x [1 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 [1 x float]], [3 x [1 x float]]* %2, 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 1
%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 [1 x float]], [3 x [1 x float]]* %2, i64 0, i64 1, i64 1
%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 0, i64 2
%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 [1 x float]], [3 x [1 x float]]* %2, i64 0, i64 2, i64 1
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %15)
%17 = load float, float* %5
%18 = load float, float* %7
%19 = call float @llvm.fmuladd.f32(float %17, float %18, float 0.000000e+00)
%20 = load float, float* %9
%21 = load float, float* %11
%22 = call float @llvm.fmuladd.f32(float %20, float %21, float %19)
%23 = load float, float* %13
%24 = load float, float* %15
%25 = call float @llvm.fmuladd.f32(float %23, float %24, float %22)
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %25)
%27 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 1, i64 0
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %27)
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %7)
%30 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 1, i64 1
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %30)
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %11)
%33 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 1, i64 2
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %33)
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %15)
%36 = load float, float* %27
%37 = load float, float* %7
%38 = call float @llvm.fmuladd.f32(float %36, float %37, float 0.000000e+00)
%39 = load float, float* %30
%40 = load float, float* %11
%41 = call float @llvm.fmuladd.f32(float %39, float %40, float %38)
%42 = load float, float* %33
%43 = load float, float* %15
%44 = call float @llvm.fmuladd.f32(float %42, float %43, float %41)
%45 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %44)
%46 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 2, i64 0
%47 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %46)
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %7)
%49 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 2, i64 1
%50 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %49)
%51 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %11)
%52 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 2, i64 2
%53 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %52)
%54 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %15)
%55 = load float, float* %46
%56 = load float, float* %7
%57 = call float @llvm.fmuladd.f32(float %55, float %56, float 0.000000e+00)
%58 = load float, float* %49
%59 = load float, float* %11
%60 = call float @llvm.fmuladd.f32(float %58, float %59, float %57)
%61 = load float, float* %52
%62 = load float, float* %15
%63 = call float @llvm.fmuladd.f32(float %61, float %62, float %60)
%64 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %63)
ret i32 0
}