#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 */
double fabs(double);
double vdot(double *, double *);
int /*<<< orphan*/ vnorm2(double *, double *);
int vparallel(double v1[3], double v2[3], double t) {
  double tv1[3], tv2[3];
  vnorm2(v1, tv1);
  vnorm2(v2, tv2);
  return fabs(fabs(vdot(tv1, tv2)) - 1.0) <= t;
}


x86 assembly (clang, -O0):
<vparallel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <vnorm2@plt>
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <vnorm2@plt>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <vdot@plt>
movaps %xmm0,%xmm1
movaps 0xe9a(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe9e(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xe83(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vparallel>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rsi,%rbx
lea    0x30(%rsp),%r14
mov    %r14,%rsi
call   1030 <vnorm2@plt>
lea    0x10(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <vnorm2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <vdot@plt>
movapd 0xe9e(%rip),%xmm1
andpd  %xmm1,%xmm0
addsd  0xea2(%rip),%xmm0
andpd  %xmm1,%xmm0
xor    %eax,%eax
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @vparallel(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
%7 = alloca [3 x double]
%8 = alloca [3 x double]
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%9 = load double*, double** %4
%10 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%11 = call i32 @vnorm2(double* %9, double* %10)
%12 = load double*, double** %5
%13 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%14 = call i32 @vnorm2(double* %12, double* %13)
%15 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%16 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%17 = call double @vdot(double* %15, double* %16)
%18 = call double @llvm.fabs.f64(double %17)
%19 = fsub double %18, 1.000000e+00
%20 = call double @llvm.fabs.f64(double %19)
%21 = load double, double* %6
%22 = fcmp ole double %20, %21
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @vparallel(double* %0, double* %1, double %2) {
%4 = alloca [3 x double]
%5 = alloca [3 x double]
%6 = bitcast [3 x double]* %4 to i8*
%7 = bitcast [3 x double]* %5 to i8*
%8 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%9 = call i32 @vnorm2(double* %0, double* %8)
%10 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%11 = call i32 @vnorm2(double* %1, double* %10)
%12 = call double @vdot(double* %8, double* %10)
%13 = call double @llvm.fabs.f64(double %12)
%14 = fadd double %13, -1.000000e+00
%15 = call double @llvm.fabs.f64(double %14)
%16 = fcmp ole double %15, %2
%17 = zext i1 %16 to i32
ret i32 %17
}