#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 f3x3matrixAeqScalar(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):
<f3x3matrixAeqScalar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    117b <f3x3matrixAeqScalar+0x7b>
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    1168 <f3x3matrixAeqScalar+0x68>
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1138 <f3x3matrixAeqScalar+0x38>
jmp    116d <f3x3matrixAeqScalar+0x6d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1114 <f3x3matrixAeqScalar+0x14>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f3x3matrixAeqScalar([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 = %28, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %31
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 = %24, %11
%18 = load i32, i32* %7
%19 = icmp slt i32 %18, 3
br i1 %19, label %20, label %27
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
store float %21, float* %22
br label %24
24: ; preds = %20
%25 = load i32, i32* %7
%26 = add nsw i32 %25, 1
store i32 %26, i32* %7
br label %17
27: ; preds = %17
br label %28
28: ; preds = %27
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %8
31: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @f3x3matrixAeqScalar([3 x float]* nocapture writeonly %0, float %1) {
%3 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 1
%4 = insertelement <4 x float> poison, float %1, i64 0
%5 = shufflevector <4 x float> %4, <4 x float> poison, <4 x i32> zeroinitializer
%6 = bitcast [3 x float]* %0 to <4 x float>*
store <4 x float> %5, <4 x float>* %6
%7 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 2
%8 = bitcast float* %3 to <4 x float>*
store <4 x float> %5, <4 x float>* %8
store float %1, float* %7
ret void
}