#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 */
int M_PI;
double atan(int);
double pow(int /*<<< orphan*/, int);
int /*<<< orphan*/ sin(int);
double sqrt(double);
double f(double x1, double x2, double y1, double y2, double z1, double z2,
         double d) {
  double dist2;
  double rho1, rho2;
  dist2 = (x1 - x2 + d) * (x1 - x2 + d) + (y1 - y2) * (y1 - y2) +
          (z1 - z2) * (z1 - z2);
  double norm = 512. / (9. * (M_PI - 2.));
  rho1 = norm * atan(2. * (x1 - .5)) * pow(sin(M_PI * y1), 4.) *
         pow(sin(M_PI * z1), 4.);
  rho2 = norm * atan(2. * (x2 - .5)) * pow(sin(M_PI * y2), 4.) *
         pow(sin(M_PI * z2), 4.);
  return rho1 * rho2 / sqrt(dist2);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
addsd  -0x38(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x2e14(%rip),%rax
cvtsi2sdl (%rax),%xmm0
movsd  0xe20(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe2c(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe18(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x8(%rbp),%xmm1
movsd  0xded(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xdd9(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <atan@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x2d96(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    0x2d5d(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mulsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xd37(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xd23(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <atan@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x2ce6(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x2cb0(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x60,%rsp
movsd  %xmm5,0x40(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x38(%rsp)
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x30(%rsp)
movapd %xmm0,%xmm7
subsd  %xmm1,%xmm7
addsd  %xmm6,%xmm7
movapd %xmm2,%xmm1
subsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm7,%xmm7
addsd  %xmm1,%xmm7
movapd %xmm4,%xmm2
subsd  %xmm5,%xmm2
mulsd  %xmm2,%xmm2
movapd %xmm2,%xmm3
mov    0x2e4f(%rip),%rbx
xorps  %xmm2,%xmm2
cvtsi2sdl (%rbx),%xmm2
addsd  0xe58(%rip),%xmm2
mulsd  0xe58(%rip),%xmm2
addsd  %xmm7,%xmm3
movsd  %xmm3,0x48(%rsp)
movsd  0xe4e(%rip),%xmm1
divsd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
addsd  0xe44(%rip),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <atan@plt>
xorps  %xmm1,%xmm1
cvtsi2sdl (%rbx),%xmm1
movapd %xmm0,0x50(%rsp)
mulsd  (%rsp),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sdl (%rbx),%xmm1
movapd %xmm0,(%rsp)
mulsd  0x20(%rsp),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
movapd %xmm0,0x20(%rsp)
movsd  0x30(%rsp),%xmm0
addsd  0xdd5(%rip),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <atan@plt>
movapd 0x50(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd 0x10(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl (%rbx),%xmm0
mulpd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
mulsd  0x38(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
movapd (%rsp),%xmm1
unpcklpd %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl (%rbx),%xmm0
mulpd  0x10(%rsp),%xmm1
movapd %xmm1,(%rsp)
mulsd  0x40(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <pow@plt>
movapd 0x20(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  (%rsp),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
xorpd  %xmm0,%xmm0
movsd  0x48(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jb     12fb <f+0x1bb>
sqrtsd %xmm0,%xmm0
jmp    130c <f+0x1cc>
movapd %xmm2,0x10(%rsp)
call   1060 <sqrt@plt>
movapd 0x10(%rsp),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @f(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%19 = load double, double* %8
%20 = load double, double* %9
%21 = fsub double %19, %20
%22 = load double, double* %14
%23 = fadd double %21, %22
%24 = load double, double* %8
%25 = load double, double* %9
%26 = fsub double %24, %25
%27 = load double, double* %14
%28 = fadd double %26, %27
%29 = load double, double* %10
%30 = load double, double* %11
%31 = fsub double %29, %30
%32 = load double, double* %10
%33 = load double, double* %11
%34 = fsub double %32, %33
%35 = fmul double %31, %34
%36 = call double @llvm.fmuladd.f64(double %23, double %28, double %35)
%37 = load double, double* %12
%38 = load double, double* %13
%39 = fsub double %37, %38
%40 = load double, double* %12
%41 = load double, double* %13
%42 = fsub double %40, %41
%43 = call double @llvm.fmuladd.f64(double %39, double %42, double %36)
store double %43, double* %15
%44 = load i32, i32* @M_PI
%45 = sitofp i32 %44 to double
%46 = fsub double %45, 2.000000e+00
%47 = fmul double 9.000000e+00, %46
%48 = fdiv double 5.120000e+02, %47
store double %48, double* %18
%49 = load double, double* %18
%50 = load double, double* %8
%51 = fsub double %50, 5.000000e-01
%52 = fmul double 2.000000e+00, %51
%53 = fptosi double %52 to i32
%54 = call double @atan(i32 %53)
%55 = fmul double %49, %54
%56 = load i32, i32* @M_PI
%57 = sitofp i32 %56 to double
%58 = load double, double* %10
%59 = fmul double %57, %58
%60 = fptosi double %59 to i32
%61 = call i32 @sin(i32 %60)
%62 = call double @pow(i32 %61, i32 4)
%63 = fmul double %55, %62
%64 = load i32, i32* @M_PI
%65 = sitofp i32 %64 to double
%66 = load double, double* %12
%67 = fmul double %65, %66
%68 = fptosi double %67 to i32
%69 = call i32 @sin(i32 %68)
%70 = call double @pow(i32 %69, i32 4)
%71 = fmul double %63, %70
store double %71, double* %16
%72 = load double, double* %18
%73 = load double, double* %9
%74 = fsub double %73, 5.000000e-01
%75 = fmul double 2.000000e+00, %74
%76 = fptosi double %75 to i32
%77 = call double @atan(i32 %76)
%78 = fmul double %72, %77
%79 = load i32, i32* @M_PI
%80 = sitofp i32 %79 to double
%81 = load double, double* %11
%82 = fmul double %80, %81
%83 = fptosi double %82 to i32
%84 = call i32 @sin(i32 %83)
%85 = call double @pow(i32 %84, i32 4)
%86 = fmul double %78, %85
%87 = load i32, i32* @M_PI
%88 = sitofp i32 %87 to double
%89 = load double, double* %13
%90 = fmul double %88, %89
%91 = fptosi double %90 to i32
%92 = call i32 @sin(i32 %91)
%93 = call double @pow(i32 %92, i32 4)
%94 = fmul double %86, %93
store double %94, double* %17
%95 = load double, double* %16
%96 = load double, double* %17
%97 = fmul double %95, %96
%98 = load double, double* %15
%99 = call double @sqrt(double %98)
%100 = fdiv double %97, %99
ret double %100
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @f(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fsub double %0, %1
%9 = fadd double %8, %6
%10 = fsub double %2, %3
%11 = fmul double %10, %10
%12 = tail call double @llvm.fmuladd.f64(double %9, double %9, double %11)
%13 = fsub double %4, %5
%14 = tail call double @llvm.fmuladd.f64(double %13, double %13, double %12)
%15 = load i32, i32* @M_PI
%16 = sitofp i32 %15 to double
%17 = fadd double %16, -2.000000e+00
%18 = fmul double %17, 9.000000e+00
%19 = fdiv double 5.120000e+02, %18
%20 = fadd double %0, -5.000000e-01
%21 = fmul double %20, 2.000000e+00
%22 = fptosi double %21 to i32
%23 = tail call double @atan(i32 %22)
%24 = load i32, i32* @M_PI
%25 = sitofp i32 %24 to double
%26 = fmul double %25, %2
%27 = fptosi double %26 to i32
%28 = tail call i32 @sin(i32 %27)
%29 = tail call double @pow(i32 %28, i32 4)
%30 = load i32, i32* @M_PI
%31 = sitofp i32 %30 to double
%32 = fmul double %31, %4
%33 = fptosi double %32 to i32
%34 = tail call i32 @sin(i32 %33)
%35 = tail call double @pow(i32 %34, i32 4)
%36 = fadd double %1, -5.000000e-01
%37 = fmul double %36, 2.000000e+00
%38 = fptosi double %37 to i32
%39 = tail call double @atan(i32 %38)
%40 = insertelement <2 x double> poison, double %23, i64 0
%41 = insertelement <2 x double> %40, double %39, i64 1
%42 = insertelement <2 x double> poison, double %19, i64 0
%43 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> zeroinitializer
%44 = fmul <2 x double> %41, %43
%45 = load i32, i32* @M_PI
%46 = sitofp i32 %45 to double
%47 = fmul double %46, %3
%48 = fptosi double %47 to i32
%49 = tail call i32 @sin(i32 %48)
%50 = tail call double @pow(i32 %49, i32 4)
%51 = insertelement <2 x double> poison, double %29, i64 0
%52 = insertelement <2 x double> %51, double %50, i64 1
%53 = fmul <2 x double> %52, %44
%54 = load i32, i32* @M_PI
%55 = sitofp i32 %54 to double
%56 = fmul double %55, %5
%57 = fptosi double %56 to i32
%58 = tail call i32 @sin(i32 %57)
%59 = tail call double @pow(i32 %58, i32 4)
%60 = insertelement <2 x double> poison, double %35, i64 0
%61 = insertelement <2 x double> %60, double %59, i64 1
%62 = fmul <2 x double> %53, %61
%63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%64 = fmul <2 x double> %62, %63
%65 = extractelement <2 x double> %64, i64 0
%66 = tail call double @sqrt(double %14)
%67 = fdiv double %65, %66
ret double %67
}