#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 */
double M_PI;
double cos(double);
double sin(double);
double Q_et_gradp(double L, double P, double U, double V, double W, double a_px,
                  double a_py, double a_pz, double a_ux, double a_vy,
                  double a_wz, double p_x, double p_y, double p_z, double u_x,
                  double v_y, double w_z, double x, double y, double z) {
  return M_PI * P *
             (a_ux * u_x * cos(M_PI * a_ux * x / L) +
              a_vy * v_y * cos(M_PI * a_vy * y / L) -
              a_wz * w_z * sin(M_PI * a_wz * z / L)) /
             L +
         M_PI * V * a_py * p_y * cos(M_PI * a_py * y / L) / L -
         M_PI * U * a_px * p_x * sin(M_PI * a_px * x / L) / L -
         M_PI * W * a_pz * p_z * sin(M_PI * a_pz * z / L) / L;
}


x86 assembly (clang, -O0):
<Q_et_gradp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  0x68(%rbp),%xmm8
movsd  0x60(%rbp),%xmm8
movsd  0x58(%rbp),%xmm8
movsd  0x50(%rbp),%xmm8
movsd  0x48(%rbp),%xmm8
movsd  0x40(%rbp),%xmm8
movsd  0x38(%rbp),%xmm8
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
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  %xmm7,-0x40(%rbp)
mov    0x2e46(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0x10(%rbp),%xmm0
mulsd  0x40(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    0x2e1f(%rip),%rax
movsd  (%rax),%xmm0
mulsd  0x10(%rbp),%xmm0
mulsd  0x58(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0x18(%rbp),%xmm0
mulsd  0x48(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x2de6(%rip),%rax
movsd  (%rax),%xmm0
mulsd  0x18(%rbp),%xmm0
mulsd  0x60(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0x20(%rbp),%xmm0
mulsd  0x50(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x2d89(%rip),%rax
movsd  (%rax),%xmm0
mulsd  0x20(%rbp),%xmm0
mulsd  0x68(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x78(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x2d28(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  0x30(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x2d09(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  0x60(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x70(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x2ccb(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x2cac(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  0x58(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x60(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  -0x8(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x2c6e(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x2c4f(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  0x68(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x50(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  -0x8(%rbp),%xmm1
subsd  %xmm1,%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_et_gradp>:
push   %rbx
sub    $0xb0,%rsp
movaps %xmm7,0xa0(%rsp)
movsd  %xmm6,0x50(%rsp)
movaps %xmm5,0x30(%rsp)
movaps %xmm4,0x90(%rsp)
movaps %xmm3,0x40(%rsp)
movaps %xmm2,0x80(%rsp)
movaps %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
movapd %xmm0,0x20(%rsp)
movsd  0xc0(%rsp),%xmm0
mov    0x2e79(%rip),%rbx
movsd  (%rbx),%xmm2
movapd %xmm2,0x70(%rsp)
movsd  0xf0(%rsp),%xmm3
mulsd  %xmm0,%xmm3
movsd  %xmm3,(%rsp)
mulsd  %xmm2,%xmm0
mulsd  0x108(%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  %xmm0,0x68(%rsp)
movsd  0xf8(%rsp),%xmm1
movsd  0xc8(%rsp),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
mulsd  (%rbx),%xmm0
mulsd  0x110(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x60(%rsp),%xmm0
movsd  0x68(%rsp),%xmm1
mulsd  (%rsp),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm0,(%rsp)
movsd  (%rbx),%xmm0
mulsd  0xd0(%rsp),%xmm0
mulsd  0x118(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
movsd  0xd0(%rsp),%xmm1
mulsd  0x100(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd (%rsp),%xmm0
subsd  %xmm1,%xmm0
movapd %xmm0,(%rsp)
movsd  (%rbx),%xmm0
movapd 0x40(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x50(%rsp),%xmm2
mulsd  %xmm2,%xmm1
movapd 0x70(%rsp),%xmm3
unpcklpd %xmm1,%xmm3
movapd 0x10(%rsp),%xmm1
movhpd 0xe0(%rsp),%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm1,0x10(%rsp)
mulsd  %xmm2,%xmm0
mulsd  0x110(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1040 <cos@plt>
movapd (%rsp),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  0x10(%rsp),%xmm2
movapd 0x20(%rsp),%xmm1
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
divpd  %xmm0,%xmm2
movapd %xmm2,(%rsp)
movsd  (%rbx),%xmm0
movapd %xmm0,0x40(%rsp)
mulsd  0x30(%rsp),%xmm0
mulsd  0x108(%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
movapd %xmm0,0x50(%rsp)
movsd  (%rbx),%xmm0
movapd 0x40(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd 0x80(%rsp),%xmm1
unpcklpd 0x90(%rsp),%xmm1
mulpd  %xmm2,%xmm1
movapd %xmm1,%xmm3
movapd 0xa0(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm1,%xmm2
mulpd  %xmm3,%xmm2
movsd  0xd8(%rsp),%xmm3
movhpd 0xe8(%rsp),%xmm3
mulpd  %xmm2,%xmm3
movapd %xmm3,0x30(%rsp)
mulsd  %xmm1,%xmm0
mulsd  0x118(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
movapd 0x50(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  0x30(%rsp),%xmm2
divpd  0x10(%rsp),%xmm2
movapd (%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
unpckhpd %xmm2,%xmm2
subsd  %xmm2,%xmm0
add    $0xb0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @Q_et_gradp(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, double %17, double %18, double %19) {
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
store double %0, double* %21
store double %1, double* %22
store double %2, double* %23
store double %3, double* %24
store double %4, double* %25
store double %5, double* %26
store double %6, double* %27
store double %7, double* %28
store double %8, double* %29
store double %9, double* %30
store double %10, double* %31
store double %11, double* %32
store double %12, double* %33
store double %13, double* %34
store double %14, double* %35
store double %15, double* %36
store double %16, double* %37
store double %17, double* %38
store double %18, double* %39
store double %19, double* %40
%41 = load double, double* @M_PI
%42 = load double, double* %22
%43 = fmul double %41, %42
%44 = load double, double* %29
%45 = load double, double* %35
%46 = fmul double %44, %45
%47 = load double, double* @M_PI
%48 = load double, double* %29
%49 = fmul double %47, %48
%50 = load double, double* %38
%51 = fmul double %49, %50
%52 = load double, double* %21
%53 = fdiv double %51, %52
%54 = call double @cos(double %53)
%55 = load double, double* %30
%56 = load double, double* %36
%57 = fmul double %55, %56
%58 = load double, double* @M_PI
%59 = load double, double* %30
%60 = fmul double %58, %59
%61 = load double, double* %39
%62 = fmul double %60, %61
%63 = load double, double* %21
%64 = fdiv double %62, %63
%65 = call double @cos(double %64)
%66 = fmul double %57, %65
%67 = call double @llvm.fmuladd.f64(double %46, double %54, double %66)
%68 = load double, double* %31
%69 = load double, double* %37
%70 = fmul double %68, %69
%71 = load double, double* @M_PI
%72 = load double, double* %31
%73 = fmul double %71, %72
%74 = load double, double* %40
%75 = fmul double %73, %74
%76 = load double, double* %21
%77 = fdiv double %75, %76
%78 = call double @sin(double %77)
%79 = fneg double %70
%80 = call double @llvm.fmuladd.f64(double %79, double %78, double %67)
%81 = fmul double %43, %80
%82 = load double, double* %21
%83 = fdiv double %81, %82
%84 = load double, double* @M_PI
%85 = load double, double* %24
%86 = fmul double %84, %85
%87 = load double, double* %27
%88 = fmul double %86, %87
%89 = load double, double* %33
%90 = fmul double %88, %89
%91 = load double, double* @M_PI
%92 = load double, double* %27
%93 = fmul double %91, %92
%94 = load double, double* %39
%95 = fmul double %93, %94
%96 = load double, double* %21
%97 = fdiv double %95, %96
%98 = call double @cos(double %97)
%99 = fmul double %90, %98
%100 = load double, double* %21
%101 = fdiv double %99, %100
%102 = fadd double %83, %101
%103 = load double, double* @M_PI
%104 = load double, double* %23
%105 = fmul double %103, %104
%106 = load double, double* %26
%107 = fmul double %105, %106
%108 = load double, double* %32
%109 = fmul double %107, %108
%110 = load double, double* @M_PI
%111 = load double, double* %26
%112 = fmul double %110, %111
%113 = load double, double* %38
%114 = fmul double %112, %113
%115 = load double, double* %21
%116 = fdiv double %114, %115
%117 = call double @sin(double %116)
%118 = fmul double %109, %117
%119 = load double, double* %21
%120 = fdiv double %118, %119
%121 = fsub double %102, %120
%122 = load double, double* @M_PI
%123 = load double, double* %25
%124 = fmul double %122, %123
%125 = load double, double* %28
%126 = fmul double %124, %125
%127 = load double, double* %34
%128 = fmul double %126, %127
%129 = load double, double* @M_PI
%130 = load double, double* %28
%131 = fmul double %129, %130
%132 = load double, double* %40
%133 = fmul double %131, %132
%134 = load double, double* %21
%135 = fdiv double %133, %134
%136 = call double @sin(double %135)
%137 = fmul double %128, %136
%138 = load double, double* %21
%139 = fdiv double %137, %138
%140 = fsub double %121, %139
ret double %140
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @Q_et_gradp(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, double %17, double %18, double %19) {
%21 = load double, double* @M_PI
%22 = fmul double %8, %14
%23 = fmul double %21, %8
%24 = fmul double %23, %17
%25 = fdiv double %24, %0
%26 = tail call double @cos(double %25)
%27 = fmul double %9, %15
%28 = load double, double* @M_PI
%29 = fmul double %28, %9
%30 = fmul double %29, %18
%31 = fdiv double %30, %0
%32 = tail call double @cos(double %31)
%33 = fmul double %27, %32
%34 = tail call double @llvm.fmuladd.f64(double %22, double %26, double %33)
%35 = load double, double* @M_PI
%36 = fmul double %35, %10
%37 = fmul double %36, %19
%38 = fdiv double %37, %0
%39 = tail call double @sin(double %38)
%40 = fneg double %10
%41 = fmul double %40, %16
%42 = tail call double @llvm.fmuladd.f64(double %41, double %39, double %34)
%43 = load double, double* @M_PI
%44 = fmul double %43, %3
%45 = fmul double %44, %6
%46 = insertelement <2 x double> poison, double %21, i64 0
%47 = insertelement <2 x double> %46, double %45, i64 1
%48 = insertelement <2 x double> poison, double %1, i64 0
%49 = insertelement <2 x double> %48, double %12, i64 1
%50 = fmul <2 x double> %47, %49
%51 = fmul double %43, %6
%52 = fmul double %51, %18
%53 = fdiv double %52, %0
%54 = tail call double @cos(double %53)
%55 = insertelement <2 x double> poison, double %42, i64 0
%56 = insertelement <2 x double> %55, double %54, i64 1
%57 = fmul <2 x double> %50, %56
%58 = insertelement <2 x double> poison, double %0, i64 0
%59 = shufflevector <2 x double> %58, <2 x double> poison, <2 x i32> zeroinitializer
%60 = fdiv <2 x double> %57, %59
%61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%62 = fadd <2 x double> %60, %61
%63 = load double, double* @M_PI
%64 = fmul double %63, %5
%65 = fmul double %64, %17
%66 = fdiv double %65, %0
%67 = tail call double @sin(double %66)
%68 = load double, double* @M_PI
%69 = insertelement <2 x double> poison, double %63, i64 0
%70 = insertelement <2 x double> %69, double %68, i64 1
%71 = insertelement <2 x double> poison, double %2, i64 0
%72 = insertelement <2 x double> %71, double %4, i64 1
%73 = fmul <2 x double> %70, %72
%74 = insertelement <2 x double> poison, double %5, i64 0
%75 = insertelement <2 x double> %74, double %7, i64 1
%76 = fmul <2 x double> %73, %75
%77 = insertelement <2 x double> poison, double %11, i64 0
%78 = insertelement <2 x double> %77, double %13, i64 1
%79 = fmul <2 x double> %76, %78
%80 = fmul double %68, %7
%81 = fmul double %80, %19
%82 = fdiv double %81, %0
%83 = tail call double @sin(double %82)
%84 = insertelement <2 x double> poison, double %67, i64 0
%85 = insertelement <2 x double> %84, double %83, i64 1
%86 = fmul <2 x double> %85, %79
%87 = fdiv <2 x double> %86, %59
%88 = fsub <2 x double> %62, %87
%89 = shufflevector <2 x double> %87, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%90 = fsub <2 x double> %88, %89
%91 = extractelement <2 x double> %90, i64 0
ret double %91
}