#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 */
typedef int int8_t;

/* Variables and functions */
void f3x3matrixAeqAxScalar(float A[][3], float Scalar) {
  float *pAij;
  int8_t i, j;
  for (i = 0; i < 3; i++) {
    pAij = A[i];
    for (j = 0; j < 3; j++) {
      *(pAij++) *= Scalar;
    }
  }
}


x86 assembly (clang, -O0):
<f3x3matrixAeqAxScalar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    117f <f3x3matrixAeqAxScalar+0x7f>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jge    116c <f3x3matrixAeqAxScalar+0x6c>
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
mulss  (%rax),%xmm0
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1138 <f3x3matrixAeqAxScalar+0x38>
jmp    1171 <f3x3matrixAeqAxScalar+0x71>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1114 <f3x3matrixAeqAxScalar+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3x3matrixAeqAxScalar>:
movaps %xmm0,%xmm1
shufps $0x0,%xmm0,%xmm1
movups (%rdi),%xmm2
movups 0x10(%rdi),%xmm3
mulps  %xmm1,%xmm2
movups %xmm2,(%rdi)
mulps  %xmm1,%xmm3
movups %xmm3,0x10(%rdi)
mulss  0x20(%rdi),%xmm0
movss  %xmm0,0x20(%rdi)
ret

LLVM IR (-O0):
define void @f3x3matrixAeqAxScalar([3 x float]* %0, float %1) {
%3 = alloca [3 x float]*
%4 = alloca float
%5 = alloca float*
%6 = alloca i32
%7 = alloca i32
store [3 x float]* %0, [3 x float]** %3
store float %1, float* %4
store i32 0, i32* %6
br label %8
8: ; preds = %30, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %33
11: ; preds = %8
%12 = load [3 x float]*, [3 x float]** %3
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3 x float], [3 x float]* %12, i64 %14
%16 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 0, i64 0
store float* %16, float** %5
store i32 0, i32* %7
br label %17
17: ; preds = %26, %11
%18 = load i32, i32* %7
%19 = icmp slt i32 %18, 3
br i1 %19, label %20, label %29
20: ; preds = %17
%21 = load float, float* %4
%22 = load float*, float** %5
%23 = getelementptr inbounds float, float* %22, i32 1
store float* %23, float** %5
%24 = load float, float* %22
%25 = fmul float %24, %21
store float %25, float* %22
br label %26
26: ; preds = %20
%27 = load i32, i32* %7
%28 = add nsw i32 %27, 1
store i32 %28, i32* %7
br label %17
29: ; preds = %17
br label %30
30: ; preds = %29
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %8
33: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @f3x3matrixAeqAxScalar([3 x float]* nocapture %0, float %1) {
%3 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 1
%4 = bitcast [3 x float]* %0 to <4 x float>*
%5 = load <4 x float>, <4 x float>* %4
%6 = insertelement <4 x float> poison, float %1, i64 0
%7 = shufflevector <4 x float> %6, <4 x float> poison, <4 x i32> zeroinitializer
%8 = fmul <4 x float> %5, %7
%9 = bitcast [3 x float]* %0 to <4 x float>*
store <4 x float> %8, <4 x float>* %9
%10 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 2
%11 = bitcast float* %3 to <4 x float>*
%12 = load <4 x float>, <4 x float>* %11
%13 = fmul <4 x float> %12, %7
%14 = bitcast float* %3 to <4 x float>*
store <4 x float> %13, <4 x float>* %14
%15 = load float, float* %10
%16 = fmul float %15, %1
store float %16, float* %10
ret void
}