#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(float);
int equal3f(float *v1, float *v2) {
  return ((fabs(v1[0] - v2[0]) < 0.000000001) &&
          (fabs(v1[1] - v2[1]) < 0.000000001) &&
          (fabs(v1[2] - v2[2]) < 0.000000001));
}


x86 assembly (clang, -O0):
<equal3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
xor    %eax,%eax
movsd  0xebe(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jbe    11ac <equal3f+0x9c>
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
xor    %eax,%eax
movsd  0xe8d(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jbe    11ac <equal3f+0x9c>
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x8(%rax),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xe5e(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal3f>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
movss  (%rdi),%xmm0
subss  (%rsi),%xmm0
call   1030 <fabs@plt>
xor    %ebp,%ebp
movsd  0xecf(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1177 <equal3f+0x67>
movss  0x4(%rbx),%xmm0
subss  0x4(%r14),%xmm0
call   1030 <fabs@plt>
movsd  0xeb1(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1177 <equal3f+0x67>
movss  0x8(%rbx),%xmm0
subss  0x8(%r14),%xmm0
call   1030 <fabs@plt>
xor    %ebp,%ebp
movsd  0xe91(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %bpl
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @equal3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = fsub float %7, %10
%12 = call double @fabs(float %11)
%13 = fcmp olt double %12, 1.000000e-09
br i1 %13, label %14, label %34
14: ; preds = %2
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 1
%17 = load float, float* %16
%18 = load float*, float** %4
%19 = getelementptr inbounds float, float* %18, i64 1
%20 = load float, float* %19
%21 = fsub float %17, %20
%22 = call double @fabs(float %21)
%23 = fcmp olt double %22, 1.000000e-09
br i1 %23, label %24, label %34
24: ; preds = %14
%25 = load float*, float** %3
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %4
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fsub float %27, %30
%32 = call double @fabs(float %31)
%33 = fcmp olt double %32, 1.000000e-09
br label %34
34: ; preds = %24, %14, %2
%35 = phi i1 [ false, %14 ], [ false, %2 ], [ %33, %24 ]
%36 = zext i1 %35 to i32
ret i32 %36
}

LLVM IR (-O2):
define i32 @equal3f(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fsub float %3, %4
%6 = tail call double @fabs(float %5)
%7 = fcmp olt double %6, 1.000000e-09
br i1 %7, label %8, label %25
8: ; preds = %2
%9 = getelementptr inbounds float, float* %0, i64 1
%10 = load float, float* %9
%11 = getelementptr inbounds float, float* %1, i64 1
%12 = load float, float* %11
%13 = fsub float %10, %12
%14 = tail call double @fabs(float %13)
%15 = fcmp olt double %14, 1.000000e-09
br i1 %15, label %16, label %25
16: ; preds = %8
%17 = getelementptr inbounds float, float* %0, i64 2
%18 = load float, float* %17
%19 = getelementptr inbounds float, float* %1, i64 2
%20 = load float, float* %19
%21 = fsub float %18, %20
%22 = tail call double @fabs(float %21)
%23 = fcmp olt double %22, 1.000000e-09
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %16, %8, %2
%26 = phi i32 [ 0, %8 ], [ 0, %2 ], [ %24, %16 ]
ret i32 %26
}