#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*/ bar(float *, float *, float *);
__attribute__((no)) int main1(float *pb, float *pc) {
  float pa[256] __attribute__((__aligned__(16)));
  int i;
  for (i = 0; i < 256; i++) {
    pa[i] = pb[i] * pc[i];
  }
  bar(pa, pb, pc);
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x414(%rbp)
cmpl   $0x100,-0x414(%rbp)
jge    1181 <main1+0x71>
mov    -0x8(%rbp),%rax
movslq -0x414(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x414(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movslq -0x414(%rbp),%rax
movss  %xmm0,-0x410(%rbp,%rax,4)
ff ff
mov    -0x414(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x414(%rbp)
jmp    112d <main1+0x1d>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
sub    $0x408,%rsp
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xc,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups -0x30(%rsi,%rax,4),%xmm0
movups -0x20(%rsi,%rax,4),%xmm1
movups -0x30(%rdx,%rax,4),%xmm2
mulps  %xmm0,%xmm2
movups -0x20(%rdx,%rax,4),%xmm0
mulps  %xmm1,%xmm0
movaps %xmm2,-0x30(%rsp,%rax,4)
movaps %xmm0,-0x20(%rsp,%rax,4)
movups -0x10(%rsi,%rax,4),%xmm0
movups (%rsi,%rax,4),%xmm1
movups -0x10(%rdx,%rax,4),%xmm2
mulps  %xmm0,%xmm2
movups (%rdx,%rax,4),%xmm0
mulps  %xmm1,%xmm0
movaps %xmm2,-0x10(%rsp,%rax,4)
movaps %xmm0,(%rsp,%rax,4)
add    $0x10,%rax
cmp    $0x10c,%rax
jne    1130 <main1+0x20>
mov    %rsp,%rdi
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x408,%rsp
ret

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

LLVM IR (-O2):
define i32 @main1(float* %0, float* %1) {
%3 = alloca [256 x float]
%4 = bitcast [256 x float]* %3 to i8*
br label %5
5: ; preds = %5, %2
%6 = phi i64 [ 0, %2 ], [ %44, %5 ]
%7 = getelementptr inbounds float, float* %0, i64 %6
%8 = bitcast float* %7 to <4 x float>*
%9 = load <4 x float>, <4 x float>* %8
%10 = getelementptr inbounds float, float* %7, i64 4
%11 = bitcast float* %10 to <4 x float>*
%12 = load <4 x float>, <4 x float>* %11
%13 = getelementptr inbounds float, float* %1, i64 %6
%14 = bitcast float* %13 to <4 x float>*
%15 = load <4 x float>, <4 x float>* %14
%16 = getelementptr inbounds float, float* %13, i64 4
%17 = bitcast float* %16 to <4 x float>*
%18 = load <4 x float>, <4 x float>* %17
%19 = fmul <4 x float> %9, %15
%20 = fmul <4 x float> %12, %18
%21 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %6
%22 = bitcast float* %21 to <4 x float>*
store <4 x float> %19, <4 x float>* %22
%23 = getelementptr inbounds float, float* %21, i64 4
%24 = bitcast float* %23 to <4 x float>*
store <4 x float> %20, <4 x float>* %24
%25 = or i64 %6, 8
%26 = getelementptr inbounds float, float* %0, i64 %25
%27 = bitcast float* %26 to <4 x float>*
%28 = load <4 x float>, <4 x float>* %27
%29 = getelementptr inbounds float, float* %26, i64 4
%30 = bitcast float* %29 to <4 x float>*
%31 = load <4 x float>, <4 x float>* %30
%32 = getelementptr inbounds float, float* %1, i64 %25
%33 = bitcast float* %32 to <4 x float>*
%34 = load <4 x float>, <4 x float>* %33
%35 = getelementptr inbounds float, float* %32, i64 4
%36 = bitcast float* %35 to <4 x float>*
%37 = load <4 x float>, <4 x float>* %36
%38 = fmul <4 x float> %28, %34
%39 = fmul <4 x float> %31, %37
%40 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %25
%41 = bitcast float* %40 to <4 x float>*
store <4 x float> %38, <4 x float>* %41
%42 = getelementptr inbounds float, float* %40, i64 4
%43 = bitcast float* %42 to <4 x float>*
store <4 x float> %39, <4 x float>* %43
%44 = add nuw nsw i64 %6, 16
%45 = icmp eq i64 %44, 256
br i1 %45, label %46, label %5
46: ; preds = %5
%47 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 0
%48 = call i32 @bar(float* %47, float* %0, float* %1)
ret i32 0
}