#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 dist_Minkovsky4(float x, float y, float z, float e) {
  (void)e;
  x *= x;
  y *= y;
  z *= z;
  return sqrtf(sqrtf(x * x + y * y + z * z));
}


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

x86 assembly (clang, -O2):
<dist_Minkovsky4>:
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
mulss  %xmm2,%xmm2
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
mulss  %xmm2,%xmm2
addss  %xmm0,%xmm2
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm2
jb     1149 <dist_Minkovsky4+0x39>
xorps  %xmm0,%xmm0
sqrtss %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jae    115e <dist_Minkovsky4+0x4e>
jmp    1030 <sqrtf@plt>
push   %rax
movaps %xmm2,%xmm0
call   1030 <sqrtf@plt>
xorps  %xmm1,%xmm1
add    $0x8,%rsp
ucomiss %xmm1,%xmm0
jb     1144 <dist_Minkovsky4+0x34>
sqrtss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @dist_Minkovsky4(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = load float, float* %5
%11 = load float, float* %5
%12 = fmul float %11, %10
store float %12, float* %5
%13 = load float, float* %6
%14 = load float, float* %6
%15 = fmul float %14, %13
store float %15, float* %6
%16 = load float, float* %7
%17 = load float, float* %7
%18 = fmul float %17, %16
store float %18, float* %7
%19 = load float, float* %5
%20 = load float, float* %5
%21 = load float, float* %6
%22 = load float, float* %6
%23 = fmul float %21, %22
%24 = call float @llvm.fmuladd.f32(float %19, float %20, float %23)
%25 = load float, float* %7
%26 = load float, float* %7
%27 = call float @llvm.fmuladd.f32(float %25, float %26, float %24)
%28 = call float @sqrtf(float %27)
%29 = call float @sqrtf(float %28)
ret float %29
}

LLVM IR (-O2):
define float @dist_Minkovsky4(float %0, float %1, float %2, float %3) {
%5 = fmul float %0, %0
%6 = fmul float %1, %1
%7 = fmul float %2, %2
%8 = fmul float %6, %6
%9 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %8)
%10 = tail call float @llvm.fmuladd.f32(float %7, float %7, float %9)
%11 = tail call float @sqrtf(float %10)
%12 = tail call float @sqrtf(float %11)
ret float %12
}