#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 */
float sqrtf(float);
float DistanceBetweenPoints(float *arA, float *arB) {
  return sqrtf((arB[0] - arA[0]) * (arB[0] - arA[0]) +
               (arB[1] - arA[1]) * (arB[1] - arA[1]) +
               (arB[2] - arA[2]) * (arB[2] - arA[2]));
}


x86 assembly (clang, -O0):
<DistanceBetweenPoints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
subss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
subss  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm3
mov    -0x8(%rbp),%rax
subss  0x4(%rax),%xmm3
mulss  %xmm3,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
subss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DistanceBetweenPoints>:
movss  (%rsi),%xmm1
movss  0x4(%rsi),%xmm0
subss  (%rdi),%xmm1
subss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rsi),%xmm0
subss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     114d <DistanceBetweenPoints+0x3d>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @DistanceBetweenPoints(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = fsub float %7, %10
%12 = load float*, float** %4
%13 = getelementptr inbounds float, float* %12, i64 0
%14 = load float, float* %13
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 0
%17 = load float, float* %16
%18 = fsub float %14, %17
%19 = load float*, float** %4
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = load float*, float** %3
%23 = getelementptr inbounds float, float* %22, i64 1
%24 = load float, float* %23
%25 = fsub float %21, %24
%26 = load float*, float** %4
%27 = getelementptr inbounds float, float* %26, i64 1
%28 = load float, float* %27
%29 = load float*, float** %3
%30 = getelementptr inbounds float, float* %29, i64 1
%31 = load float, float* %30
%32 = fsub float %28, %31
%33 = fmul float %25, %32
%34 = call float @llvm.fmuladd.f32(float %11, float %18, float %33)
%35 = load float*, float** %4
%36 = getelementptr inbounds float, float* %35, i64 2
%37 = load float, float* %36
%38 = load float*, float** %3
%39 = getelementptr inbounds float, float* %38, i64 2
%40 = load float, float* %39
%41 = fsub float %37, %40
%42 = load float*, float** %4
%43 = getelementptr inbounds float, float* %42, i64 2
%44 = load float, float* %43
%45 = load float*, float** %3
%46 = getelementptr inbounds float, float* %45, i64 2
%47 = load float, float* %46
%48 = fsub float %44, %47
%49 = call float @llvm.fmuladd.f32(float %41, float %48, float %34)
%50 = call float @sqrtf(float %49)
ret float %50
}

LLVM IR (-O2):
define float @DistanceBetweenPoints(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = load float, float* %0
%5 = fsub float %3, %4
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 1
%9 = load float, float* %8
%10 = fsub float %7, %9
%11 = fmul float %10, %10
%12 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %11)
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %0, i64 2
%16 = load float, float* %15
%17 = fsub float %14, %16
%18 = tail call float @llvm.fmuladd.f32(float %17, float %17, float %12)
%19 = tail call float @sqrtf(float %18)
ret float %19
}