#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 */
scalar_t__ pow(float, double);
float sqrt(scalar_t__);
float dist_pontos(float *x, float *y, float *z) {
  return sqrt(pow(x[0] - x[1], 2.0) + (pow(y[0] - y[1], 2.0)) +
              (pow(z[0] - z[1], 2.0)));
}


x86 assembly (clang, -O0):
<dist_pontos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subss  0x4(%rax),%xmm0
movsd  0xeb3(%rip),%xmm1
call   1030 <pow@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm0
movsd  0xe91(%rip),%xmm1
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  0x4(%rax),%xmm0
movsd  0xe65(%rip),%xmm1
call   1030 <pow@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist_pontos>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
movss  (%rdi),%xmm0
subss  0x4(%rdi),%xmm0
movsd  0xec4(%rip),%xmm1
call   1030 <pow@plt>
mov    %rax,%rbx
movss  (%r15),%xmm0
subss  0x4(%r15),%xmm0
movsd  0xea9(%rip),%xmm1
call   1030 <pow@plt>
add    %rax,%rbx
movss  (%r14),%xmm0
subss  0x4(%r14),%xmm0
movsd  0xe8e(%rip),%xmm1
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define float @dist_pontos(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = call i64 @pow(float %13, double 2.000000e+00)
%15 = load float*, float** %5
%16 = getelementptr inbounds float, float* %15, i64 0
%17 = load float, float* %16
%18 = load float*, float** %5
%19 = getelementptr inbounds float, float* %18, i64 1
%20 = load float, float* %19
%21 = fsub float %17, %20
%22 = call i64 @pow(float %21, double 2.000000e+00)
%23 = add nsw i64 %14, %22
%24 = load float*, float** %6
%25 = getelementptr inbounds float, float* %24, i64 0
%26 = load float, float* %25
%27 = load float*, float** %6
%28 = getelementptr inbounds float, float* %27, i64 1
%29 = load float, float* %28
%30 = fsub float %26, %29
%31 = call i64 @pow(float %30, double 2.000000e+00)
%32 = add nsw i64 %23, %31
%33 = call float @sqrt(i64 %32)
ret float %33
}

LLVM IR (-O2):
define float @dist_pontos(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fsub float %4, %6
%8 = tail call i64 @pow(float %7, double 2.000000e+00)
%9 = load float, float* %1
%10 = getelementptr inbounds float, float* %1, i64 1
%11 = load float, float* %10
%12 = fsub float %9, %11
%13 = tail call i64 @pow(float %12, double 2.000000e+00)
%14 = add nsw i64 %13, %8
%15 = load float, float* %2
%16 = getelementptr inbounds float, float* %2, i64 1
%17 = load float, float* %16
%18 = fsub float %15, %17
%19 = tail call i64 @pow(float %18, double 2.000000e+00)
%20 = add nsw i64 %14, %19
%21 = tail call float @sqrt(i64 %20)
ret float %21
}