#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*/ p_add_f32(float *, float *, float *, int);
int main() {
  float a[16], b[16], c[16];
  int i;
  for (i = 0; i < 16; i++) {
    a[i] = (float)i;
    b[i] = (float)i;
    ;
  }
  p_add_f32(a, b, c, 16);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xd4(%rbp)
cmpl   $0x10,-0xd4(%rbp)
jge    117a <main+0x6a>
cvtsi2ssl -0xd4(%rbp),%xmm0
ff
movslq -0xd4(%rbp),%rax
movss  %xmm0,-0x50(%rbp,%rax,4)
cvtsi2ssl -0xd4(%rbp),%xmm0
ff
movslq -0xd4(%rbp),%rax
movss  %xmm0,-0x90(%rbp,%rax,4)
ff ff
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    112c <main+0x1c>
lea    -0x50(%rbp),%rdi
lea    -0x90(%rbp),%rsi
lea    -0xd0(%rbp),%rdx
mov    $0x10,%ecx
call   1030 <p_add_f32@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xc8,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x10(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x20(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x30(%rsp)
lea    0x40(%rsp),%rdi
mov    %rsp,%rsi
lea    0x80(%rsp),%rdx
mov    $0x10,%ecx
call   1030 <p_add_f32@plt>
xor    %eax,%eax
add    $0xc8,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [16 x float]
%2 = alloca [16 x float]
%3 = alloca [16 x float]
%4 = bitcast [16 x float]* %1 to i8*
%5 = bitcast [16 x float]* %2 to i8*
%6 = bitcast [16 x float]* %3 to i8*
%7 = getelementptr inbounds [16 x float], [16 x float]* %1, i64 0, i64 0
%8 = getelementptr inbounds [16 x float], [16 x float]* %2, i64 0, i64 0
%9 = bitcast [16 x float]* %1 to <4 x float>*
store <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, <4 x float>* %9
%10 = bitcast [16 x float]* %2 to <4 x float>*
store <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, <4 x float>* %10
%11 = getelementptr inbounds [16 x float], [16 x float]* %1, i64 0, i64 4
%12 = getelementptr inbounds [16 x float], [16 x float]* %2, i64 0, i64 4
%13 = bitcast float* %11 to <4 x float>*
store <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, <4 x float>* %13
%14 = bitcast float* %12 to <4 x float>*
store <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, <4 x float>* %14
%15 = getelementptr inbounds [16 x float], [16 x float]* %1, i64 0, i64 8
%16 = getelementptr inbounds [16 x float], [16 x float]* %2, i64 0, i64 8
%17 = bitcast float* %15 to <4 x float>*
store <4 x float> <float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01>, <4 x float>* %17
%18 = bitcast float* %16 to <4 x float>*
store <4 x float> <float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01>, <4 x float>* %18
%19 = getelementptr inbounds [16 x float], [16 x float]* %1, i64 0, i64 12
%20 = getelementptr inbounds [16 x float], [16 x float]* %2, i64 0, i64 12
%21 = bitcast float* %19 to <4 x float>*
store <4 x float> <float 1.200000e+01, float 1.300000e+01, float 1.400000e+01, float 1.500000e+01>, <4 x float>* %21
%22 = bitcast float* %20 to <4 x float>*
store <4 x float> <float 1.200000e+01, float 1.300000e+01, float 1.400000e+01, float 1.500000e+01>, <4 x float>* %22
%23 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 0
%24 = call i32 @p_add_f32(float* %7, float* %8, float* %23, i32 16)
ret i32 0
}