#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*/ check(float *, float *);
int /*<<< orphan*/ init(float *, float *);
int /*<<< orphan*/ vec_mult(float *, float *, float *);
int /*<<< orphan*/ vec_mult_ref(float *, float *, float *);
int main() {
  float p1[100000], p2[100000];
  float v1[100000], v2[100000];
  init(v1, v2);
  vec_mult_ref(p1, v1, v2);
  vec_mult(p2, v1, v2);
  check(p1, p2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186a10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x124f90(%rbp),%rdi
lea    -0x186a10(%rbp),%rsi
call   1030 <init@plt>
lea    -0x61a90(%rbp),%rdi
lea    -0x124f90(%rbp),%rsi
lea    -0x186a10(%rbp),%rdx
call   1040 <vec_mult_ref@plt>
lea    -0xc3510(%rbp),%rdi
lea    -0x124f90(%rbp),%rsi
lea    -0x186a10(%rbp),%rdx
call   1060 <vec_mult@plt>
lea    -0x61a90(%rbp),%rdi
lea    -0xc3510(%rbp),%rsi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x186a10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x186a08,%rsp
lea    0x61a80(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <init@plt>
lea    0x124f80(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <vec_mult_ref@plt>
lea    0xc3500(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1060 <vec_mult@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x186a08,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100000 x float]
%3 = alloca [100000 x float]
%4 = alloca [100000 x float]
%5 = alloca [100000 x float]
store i32 0, i32* %1
%6 = getelementptr inbounds [100000 x float], [100000 x float]* %4, i64 0, i64 0
%7 = getelementptr inbounds [100000 x float], [100000 x float]* %5, i64 0, i64 0
%8 = call i32 @init(float* %6, float* %7)
%9 = getelementptr inbounds [100000 x float], [100000 x float]* %2, i64 0, i64 0
%10 = getelementptr inbounds [100000 x float], [100000 x float]* %4, i64 0, i64 0
%11 = getelementptr inbounds [100000 x float], [100000 x float]* %5, i64 0, i64 0
%12 = call i32 @vec_mult_ref(float* %9, float* %10, float* %11)
%13 = getelementptr inbounds [100000 x float], [100000 x float]* %3, i64 0, i64 0
%14 = getelementptr inbounds [100000 x float], [100000 x float]* %4, i64 0, i64 0
%15 = getelementptr inbounds [100000 x float], [100000 x float]* %5, i64 0, i64 0
%16 = call i32 @vec_mult(float* %13, float* %14, float* %15)
%17 = getelementptr inbounds [100000 x float], [100000 x float]* %2, i64 0, i64 0
%18 = getelementptr inbounds [100000 x float], [100000 x float]* %3, i64 0, i64 0
%19 = call i32 @check(float* %17, float* %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100000 x float]
%2 = alloca [100000 x float]
%3 = alloca [100000 x float]
%4 = alloca [100000 x float]
%5 = bitcast [100000 x float]* %1 to i8*
%6 = bitcast [100000 x float]* %2 to i8*
%7 = bitcast [100000 x float]* %3 to i8*
%8 = bitcast [100000 x float]* %4 to i8*
%9 = getelementptr inbounds [100000 x float], [100000 x float]* %3, i64 0, i64 0
%10 = getelementptr inbounds [100000 x float], [100000 x float]* %4, i64 0, i64 0
%11 = call i32 @init(float* %9, float* %10)
%12 = getelementptr inbounds [100000 x float], [100000 x float]* %1, i64 0, i64 0
%13 = call i32 @vec_mult_ref(float* %12, float* %9, float* %10)
%14 = getelementptr inbounds [100000 x float], [100000 x float]* %2, i64 0, i64 0
%15 = call i32 @vec_mult(float* %14, float* %9, float* %10)
%16 = call i32 @check(float* %12, float* %14)
ret i32 0
}