void fillNoteIndex(float noteIndex[][12]) {
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 12; j++) {
      noteIndex[i][j] = i + 3 + (float)j / 100;
    }
  }
  return;
}


x86 assembly (clang, -O0):
<fillNoteIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1182 <fillNoteIndex+0x82>
movl   $0x0,-0x10(%rbp)
cmpl   $0xc,-0x10(%rbp)
jge    116f <fillNoteIndex+0x6f>
mov    -0xc(%rbp),%eax
add    $0x3,%eax
cvtsi2ss %eax,%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
movss  0xebf(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <fillNoteIndex+0x20>
jmp    1174 <fillNoteIndex+0x74>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <fillNoteIndex+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillNoteIndex>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movaps 0xf04(%rip),%xmm0
movups %xmm0,0x20(%rdi)
movaps 0xf09(%rip),%xmm0
movups %xmm0,0x30(%rdi)
movaps 0xf0e(%rip),%xmm0
movups %xmm0,0x40(%rdi)
movaps 0xf13(%rip),%xmm0
movups %xmm0,0x50(%rdi)
movaps 0xf18(%rip),%xmm0
movups %xmm0,0x60(%rdi)
movaps 0xf1d(%rip),%xmm0
movups %xmm0,0x70(%rdi)
movaps 0xf22(%rip),%xmm0
movups %xmm0,0x80(%rdi)
movaps 0xf24(%rip),%xmm0
movups %xmm0,0x90(%rdi)
movaps 0xf26(%rip),%xmm0
movups %xmm0,0xa0(%rdi)
movaps 0xf28(%rip),%xmm0
movups %xmm0,0xb0(%rdi)
ret

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

LLVM IR (-O2):
define void @fillNoteIndex([12 x float]* nocapture writeonly %0) {
%2 = bitcast [12 x float]* %0 to <4 x float>*
store <4 x float> <float 3.000000e+00, float 0x4008147AE0000000, float 0x400828F5C0000000, float 0x40083D70A0000000>, <4 x float>* %2
%3 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 0, i64 4
%4 = bitcast float* %3 to <4 x float>*
store <4 x float> <float 0x400851EB80000000, float 0x4008666660000000, float 0x40087AE140000000, float 0x40088F5C20000000>, <4 x float>* %4
%5 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 0, i64 8
%6 = bitcast float* %5 to <4 x float>*
store <4 x float> <float 0x4008A3D700000000, float 0x4008B851E0000000, float 0x4008CCCCC0000000, float 0x4008E147A0000000>, <4 x float>* %6
%7 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 1, i64 0
%8 = bitcast float* %7 to <4 x float>*
store <4 x float> <float 4.000000e+00, float 0x40100A3D80000000, float 0x4010147AE0000000, float 0x40101EB860000000>, <4 x float>* %8
%9 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 1, i64 4
%10 = bitcast float* %9 to <4 x float>*
store <4 x float> <float 0x401028F5C0000000, float 0x4010333340000000, float 0x40103D70A0000000, float 0x401047AE20000000>, <4 x float>* %10
%11 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 1, i64 8
%12 = bitcast float* %11 to <4 x float>*
store <4 x float> <float 0x401051EB80000000, float 0x40105C2900000000, float 0x4010666660000000, float 0x401070A3E0000000>, <4 x float>* %12
%13 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 2, i64 0
%14 = bitcast float* %13 to <4 x float>*
store <4 x float> <float 5.000000e+00, float 0x40140A3D80000000, float 0x4014147AE0000000, float 0x40141EB860000000>, <4 x float>* %14
%15 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 2, i64 4
%16 = bitcast float* %15 to <4 x float>*
store <4 x float> <float 0x401428F5C0000000, float 0x4014333340000000, float 0x40143D70A0000000, float 0x401447AE20000000>, <4 x float>* %16
%17 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 2, i64 8
%18 = bitcast float* %17 to <4 x float>*
store <4 x float> <float 0x401451EB80000000, float 0x40145C2900000000, float 0x4014666660000000, float 0x401470A3E0000000>, <4 x float>* %18
%19 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 3, i64 0
%20 = bitcast float* %19 to <4 x float>*
store <4 x float> <float 6.000000e+00, float 0x40180A3D80000000, float 0x4018147AE0000000, float 0x40181EB860000000>, <4 x float>* %20
%21 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 3, i64 4
%22 = bitcast float* %21 to <4 x float>*
store <4 x float> <float 0x401828F5C0000000, float 0x4018333340000000, float 0x40183D70A0000000, float 0x401847AE20000000>, <4 x float>* %22
%23 = getelementptr inbounds [12 x float], [12 x float]* %0, i64 3, i64 8
%24 = bitcast float* %23 to <4 x float>*
store <4 x float> <float 0x401851EB80000000, float 0x40185C2900000000, float 0x4018666660000000, float 0x401870A3E0000000>, <4 x float>* %24
ret void
}