#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(int n) {
  int i;
  float a[256] __attribute__((__aligned__(16)));
  float b[256] __attribute__((__aligned__(16))) = {0,  3,  6,  9,  12, 15, 18,
                                                   21, 24, 27, 30, 33, 36, 39,
                                                   42, 45, 48, 51, 54, 57};
  float c[256] __attribute__((__aligned__(16))) = {
      0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
  float *pa = a;
  float *pb = b;
  float *pc = c;
  for (i = 0; i < n; i++) {
    pa[i] = pb[i] * pc[i];
  }
  bar(pa, pb, pc);
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x810(%rbp),%rdi
lea    0xec4(%rip),%rsi
mov    $0x400,%edx
call   1040 <memcpy@plt>
lea    -0xc10(%rbp),%rdi
lea    0x12ac(%rip),%rsi
mov    $0x400,%edx
call   1040 <memcpy@plt>
lea    -0x410(%rbp),%rax
mov    %rax,-0xc18(%rbp)
lea    -0x810(%rbp),%rax
mov    %rax,-0xc20(%rbp)
lea    -0xc10(%rbp),%rax
mov    %rax,-0xc28(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11d9 <main1+0xb9>
mov    -0xc20(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0xc28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
mov    -0xc18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <main1+0x6f>
mov    -0xc18(%rbp),%rdi
mov    -0xc20(%rbp),%rsi
mov    -0xc28(%rbp),%rdx
call   1030 <bar@plt>
xor    %eax,%eax
add    $0xc30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
push   %rbx
sub    $0xc00,%rsp
mov    %edi,%ebx
lea    0xecf(%rip),%rsi
lea    0x400(%rsp),%rdi
mov    $0x400,%edx
call   1040 <memcpy@plt>
lea    0x12b6(%rip),%rsi
mov    %rsp,%rdi
mov    $0x400,%edx
call   1040 <memcpy@plt>
test   %ebx,%ebx
jle    1290 <main1+0x170>
movl   $0x0,0x800(%rsp)
cmp    $0x1,%ebx
je     1290 <main1+0x170>
mov    %ebx,%eax
lea    -0x1(%rax),%rdx
mov    $0x1,%ecx
cmp    $0x8,%rdx
jb     1270 <main1+0x150>
mov    %rdx,%rcx
and    $0xfffffffffffffff8,%rcx
lea    -0x8(%rcx),%rsi
mov    %rsi,%rbx
shr    $0x3,%rbx
add    $0x1,%rbx
test   %rsi,%rsi
je     12b3 <main1+0x193>
mov    %rbx,%rdi
and    $0xfffffffffffffffe,%rdi
mov    $0x1,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups 0x400(%rsp,%rsi,4),%xmm0
movups 0x410(%rsp,%rsi,4),%xmm1
movups 0x420(%rsp,%rsi,4),%xmm2
movups 0x430(%rsp,%rsi,4),%xmm3
movups (%rsp,%rsi,4),%xmm4
mulps  %xmm0,%xmm4
movups 0x10(%rsp,%rsi,4),%xmm0
mulps  %xmm1,%xmm0
movups 0x20(%rsp,%rsi,4),%xmm1
mulps  %xmm2,%xmm1
movups 0x30(%rsp,%rsi,4),%xmm2
mulps  %xmm3,%xmm2
movups %xmm4,0x800(%rsp,%rsi,4)
movups %xmm0,0x810(%rsp,%rsi,4)
movups %xmm1,0x820(%rsp,%rsi,4)
movups %xmm2,0x830(%rsp,%rsi,4)
add    $0x10,%rsi
add    $0xfffffffffffffffe,%rdi
jne    11c0 <main1+0xa0>
test   $0x1,%bl
je     125d <main1+0x13d>
movups 0x400(%rsp,%rsi,4),%xmm0
movups 0x410(%rsp,%rsi,4),%xmm1
movups (%rsp,%rsi,4),%xmm2
mulps  %xmm0,%xmm2
movups 0x10(%rsp,%rsi,4),%xmm0
mulps  %xmm1,%xmm0
movups %xmm2,0x800(%rsp,%rsi,4)
movups %xmm0,0x810(%rsp,%rsi,4)
cmp    %rcx,%rdx
je     1290 <main1+0x170>
or     $0x1,%rcx
cs nopw 0x0(%rax,%rax,1)
movss  0x400(%rsp,%rcx,4),%xmm0
mulss  (%rsp,%rcx,4),%xmm0
movss  %xmm0,0x800(%rsp,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1270 <main1+0x150>
lea    0x800(%rsp),%rdi
lea    0x400(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <bar@plt>
xor    %eax,%eax
add    $0xc00,%rsp
pop    %rbx
ret
mov    $0x1,%esi
test   $0x1,%bl
jne    122e <main1+0x10e>
jmp    125d <main1+0x13d>

LLVM IR (-O0):
@__const.main1.b = <{ [20 x float], [236 x float] }> <{ [20 x float] [float 0.000000e+00, float 3.000000e+00, float 6.000000e+00, float 9.000000e+00, float 1.200000e+01, float 1.500000e+01, float 1.800000e+01, float 2.100000e+01, float 2.400000e+01, float 2.700000e+01, float 3.000000e+01, float 3.300000e+01, float 3.600000e+01, float 3.900000e+01, float 4.200000e+01, float 4.500000e+01, float 4.800000e+01, float 5.100000e+01, float 5.400000e+01, float 5.700000e+01], [236 x float] zeroinitializer }>
@__const.main1.c = <{ [20 x float], [236 x float] }> <{ [20 x float] [float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01, float 1.200000e+01, float 1.300000e+01, float 1.400000e+01, float 1.500000e+01, float 1.600000e+01, float 1.700000e+01, float 1.800000e+01, float 1.900000e+01], [236 x float] zeroinitializer }>
define i32 @main1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [256 x float]
%5 = alloca [256 x float]
%6 = alloca [256 x float]
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
store i32 %0, i32* %2
%10 = bitcast [256 x float]* %5 to i8*
%11 = bitcast [256 x float]* %6 to i8*
%12 = getelementptr inbounds [256 x float], [256 x float]* %4, i64 0, i64 0
store float* %12, float** %7
%13 = getelementptr inbounds [256 x float], [256 x float]* %5, i64 0, i64 0
store float* %13, float** %8
%14 = getelementptr inbounds [256 x float], [256 x float]* %6, i64 0, i64 0
store float* %14, float** %9
store i32 0, i32* %3
br label %15
15: ; preds = %35, %1
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %38
19: ; preds = %15
%20 = load float*, float** %8
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds float, float* %20, i64 %22
%24 = load float, float* %23
%25 = load float*, float** %9
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds float, float* %25, i64 %27
%29 = load float, float* %28
%30 = fmul float %24, %29
%31 = load float*, float** %7
%32 = load i32, i32* %3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds float, float* %31, i64 %33
store float %30, float* %34
br label %35
35: ; preds = %19
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
br label %15
38: ; preds = %15
%39 = load float*, float** %7
%40 = load float*, float** %8
%41 = load float*, float** %9
%42 = call i32 @bar(float* %39, float* %40, float* %41)
ret i32 0
}

LLVM IR (-O2):
@__const.main1.b = <{ [20 x float], [236 x float] }> <{ [20 x float] [float 0.000000e+00, float 3.000000e+00, float 6.000000e+00, float 9.000000e+00, float 1.200000e+01, float 1.500000e+01, float 1.800000e+01, float 2.100000e+01, float 2.400000e+01, float 2.700000e+01, float 3.000000e+01, float 3.300000e+01, float 3.600000e+01, float 3.900000e+01, float 4.200000e+01, float 4.500000e+01, float 4.800000e+01, float 5.100000e+01, float 5.400000e+01, float 5.700000e+01], [236 x float] zeroinitializer }>
@__const.main1.c = <{ [20 x float], [236 x float] }> <{ [20 x float] [float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01, float 1.200000e+01, float 1.300000e+01, float 1.400000e+01, float 1.500000e+01, float 1.600000e+01, float 1.700000e+01, float 1.800000e+01, float 1.900000e+01], [236 x float] zeroinitializer }>
define i32 @main1(i32 %0) {
%2 = alloca [256 x float]
%3 = alloca [256 x float]
%4 = alloca [256 x float]
%5 = bitcast [256 x float]* %2 to i8*
%6 = bitcast [256 x float]* %3 to i8*
%7 = bitcast [256 x float]* %4 to i8*
%8 = icmp sgt i32 %0, 0
br i1 %8, label %9, label %108
9: ; preds = %1
%10 = zext i32 %0 to i64
%11 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 0
store float 0.000000e+00, float* %11
%12 = icmp eq i32 %0, 1
br i1 %12, label %108, label %13
13: ; preds = %9
%14 = add nsw i64 %10, -1
%15 = icmp ult i64 %14, 8
br i1 %15, label %96, label %16
16: ; preds = %13
%17 = and i64 %14, -8
%18 = or i64 %17, 1
%19 = add nsw i64 %17, -8
%20 = lshr exact i64 %19, 3
%21 = add nuw nsw i64 %20, 1
%22 = and i64 %21, 1
%23 = icmp eq i64 %19, 0
br i1 %23, label %72, label %24
24: ; preds = %16
%25 = and i64 %21, 4611686018427387902
br label %26
26: ; preds = %26, %24
%27 = phi i64 [ 0, %24 ], [ %67, %26 ]
%28 = phi i64 [ 0, %24 ], [ %68, %26 ]
%29 = or i64 %27, 1
%30 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %29
%31 = bitcast float* %30 to <4 x float>*
%32 = load <4 x float>, <4 x float>* %31
%33 = getelementptr inbounds float, float* %30, i64 4
%34 = bitcast float* %33 to <4 x float>*
%35 = load <4 x float>, <4 x float>* %34
%36 = getelementptr inbounds [256 x float], [256 x float]* %4, i64 0, i64 %29
%37 = bitcast float* %36 to <4 x float>*
%38 = load <4 x float>, <4 x float>* %37
%39 = getelementptr inbounds float, float* %36, i64 4
%40 = bitcast float* %39 to <4 x float>*
%41 = load <4 x float>, <4 x float>* %40
%42 = fmul <4 x float> %32, %38
%43 = fmul <4 x float> %35, %41
%44 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %29
%45 = bitcast float* %44 to <4 x float>*
store <4 x float> %42, <4 x float>* %45
%46 = getelementptr inbounds float, float* %44, i64 4
%47 = bitcast float* %46 to <4 x float>*
store <4 x float> %43, <4 x float>* %47
%48 = or i64 %27, 9
%49 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %48
%50 = bitcast float* %49 to <4 x float>*
%51 = load <4 x float>, <4 x float>* %50
%52 = getelementptr inbounds float, float* %49, i64 4
%53 = bitcast float* %52 to <4 x float>*
%54 = load <4 x float>, <4 x float>* %53
%55 = getelementptr inbounds [256 x float], [256 x float]* %4, i64 0, i64 %48
%56 = bitcast float* %55 to <4 x float>*
%57 = load <4 x float>, <4 x float>* %56
%58 = getelementptr inbounds float, float* %55, i64 4
%59 = bitcast float* %58 to <4 x float>*
%60 = load <4 x float>, <4 x float>* %59
%61 = fmul <4 x float> %51, %57
%62 = fmul <4 x float> %54, %60
%63 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %48
%64 = bitcast float* %63 to <4 x float>*
store <4 x float> %61, <4 x float>* %64
%65 = getelementptr inbounds float, float* %63, i64 4
%66 = bitcast float* %65 to <4 x float>*
store <4 x float> %62, <4 x float>* %66
%67 = add nuw i64 %27, 16
%68 = add i64 %28, 2
%69 = icmp eq i64 %68, %25
br i1 %69, label %70, label %26
70: ; preds = %26
%71 = or i64 %67, 1
br label %72
72: ; preds = %70, %16
%73 = phi i64 [ 1, %16 ], [ %71, %70 ]
%74 = icmp eq i64 %22, 0
br i1 %74, label %94, label %75
75: ; preds = %72
%76 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %73
%77 = bitcast float* %76 to <4 x float>*
%78 = load <4 x float>, <4 x float>* %77
%79 = getelementptr inbounds float, float* %76, i64 4
%80 = bitcast float* %79 to <4 x float>*
%81 = load <4 x float>, <4 x float>* %80
%82 = getelementptr inbounds [256 x float], [256 x float]* %4, i64 0, i64 %73
%83 = bitcast float* %82 to <4 x float>*
%84 = load <4 x float>, <4 x float>* %83
%85 = getelementptr inbounds float, float* %82, i64 4
%86 = bitcast float* %85 to <4 x float>*
%87 = load <4 x float>, <4 x float>* %86
%88 = fmul <4 x float> %78, %84
%89 = fmul <4 x float> %81, %87
%90 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %73
%91 = bitcast float* %90 to <4 x float>*
store <4 x float> %88, <4 x float>* %91
%92 = getelementptr inbounds float, float* %90, i64 4
%93 = bitcast float* %92 to <4 x float>*
store <4 x float> %89, <4 x float>* %93
br label %94
94: ; preds = %72, %75
%95 = icmp eq i64 %14, %17
br i1 %95, label %108, label %96
96: ; preds = %13, %94
%97 = phi i64 [ 1, %13 ], [ %18, %94 ]
br label %98
98: ; preds = %96, %98
%99 = phi i64 [ %106, %98 ], [ %97, %96 ]
%100 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %99
%101 = load float, float* %100
%102 = getelementptr inbounds [256 x float], [256 x float]* %4, i64 0, i64 %99
%103 = load float, float* %102
%104 = fmul float %101, %103
%105 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %99
store float %104, float* %105
%106 = add nuw nsw i64 %99, 1
%107 = icmp eq i64 %106, %10
br i1 %107, label %108, label %98
108: ; preds = %98, %9, %94, %1
%109 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 0
%110 = getelementptr inbounds [256 x float], [256 x float]* %4, i64 0, i64 0
%111 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 0
%112 = call i32 @bar(float* %109, float* %111, float* %110)
ret i32 0
}