#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 fabsf(float);
float powf(float, float);
float dist_Minkovsky(float x, float y, float z, float e) {
  return powf(powf(fabsf(x), e) + powf(fabsf(y), e) + powf(fabsf(z), e),
              1.0f / e);
}


x86 assembly (clang, -O0):
<dist_Minkovsky>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xed8(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <powf@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movaps 0xeb9(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <powf@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movaps 0xe8e(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <powf@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  0xe5c(%rip),%xmm1
divss  -0x10(%rbp),%xmm1
call   1030 <powf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist_Minkovsky>:
sub    $0x38,%rsp
movss  %xmm3,0x8(%rsp)
movaps %xmm2,0x20(%rsp)
movaps %xmm1,0x10(%rsp)
andps  0xed5(%rip),%xmm0
movaps %xmm3,%xmm1
call   1030 <powf@plt>
movss  %xmm0,0xc(%rsp)
movaps 0x10(%rsp),%xmm0
andps  0xebb(%rip),%xmm0
movss  0x8(%rsp),%xmm1
call   1030 <powf@plt>
addss  0xc(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movaps 0x20(%rsp),%xmm0
andps  0xe98(%rip),%xmm0
movss  0x8(%rsp),%xmm1
call   1030 <powf@plt>
addss  0x10(%rsp),%xmm0
movss  0xe8f(%rip),%xmm1
divss  0x8(%rsp),%xmm1
add    $0x38,%rsp
jmp    1030 <powf@plt>

LLVM IR (-O0):
define float @dist_Minkovsky(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* %5
%10 = call float @llvm.fabs.f32(float %9)
%11 = load float, float* %8
%12 = call float @powf(float %10, float %11)
%13 = load float, float* %6
%14 = call float @llvm.fabs.f32(float %13)
%15 = load float, float* %8
%16 = call float @powf(float %14, float %15)
%17 = fadd float %12, %16
%18 = load float, float* %7
%19 = call float @llvm.fabs.f32(float %18)
%20 = load float, float* %8
%21 = call float @powf(float %19, float %20)
%22 = fadd float %17, %21
%23 = load float, float* %8
%24 = fdiv float 1.000000e+00, %23
%25 = call float @powf(float %22, float %24)
ret float %25
}

LLVM IR (-O2):
define float @dist_Minkovsky(float %0, float %1, float %2, float %3) {
%5 = tail call float @llvm.fabs.f32(float %0)
%6 = tail call float @powf(float %5, float %3)
%7 = tail call float @llvm.fabs.f32(float %1)
%8 = tail call float @powf(float %7, float %3)
%9 = fadd float %6, %8
%10 = tail call float @llvm.fabs.f32(float %2)
%11 = tail call float @powf(float %10, float %3)
%12 = fadd float %9, %11
%13 = fdiv float 1.000000e+00, %3
%14 = tail call float @powf(float %12, float %13)
ret float %14
}