#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_phi_time(double Lt, double Phi, double Rho, double a_phit,
                  double a_rhot, double phi_t, double rho_t, double t) {
  return M_PI * Phi * a_rhot * rho_t * cos(M_PI * a_rhot * t / Lt) / Lt -
         M_PI * Rho * a_phit * phi_t * sin(M_PI * a_phit * t / Lt) / Lt;
}


x86 assembly (clang, -O0):
<Q_phi_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%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  %xmm7,-0x40(%rbp)
mov    0x2e91(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x2e72(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x2e3d(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x2e1e(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x40(%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    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_phi_time>:
push   %rbx
sub    $0xa0,%rsp
movsd  %xmm7,0x18(%rsp)
movaps %xmm6,(%rsp)
movaps %xmm5,0x90(%rsp)
movapd %xmm4,0x40(%rsp)
movaps %xmm3,0x70(%rsp)
movaps %xmm2,0x60(%rsp)
movaps %xmm1,0x50(%rsp)
movapd %xmm0,%xmm1
movapd %xmm0,0x20(%rsp)
mov    0x2e88(%rip),%rbx
movsd  (%rbx),%xmm0
movapd %xmm0,0x30(%rsp)
mulsd  %xmm4,%xmm0
mulsd  %xmm7,%xmm0
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
movapd %xmm0,0x80(%rsp)
movsd  (%rbx),%xmm0
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd 0x50(%rsp),%xmm1
unpcklpd 0x60(%rsp),%xmm1
mulpd  %xmm2,%xmm1
movapd %xmm1,%xmm3
movapd 0x70(%rsp),%xmm2
movapd 0x40(%rsp),%xmm1
unpcklpd %xmm2,%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm1,%xmm3
movapd (%rsp),%xmm1
unpcklpd 0x90(%rsp),%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm1,(%rsp)
mulsd  %xmm2,%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
movapd 0x80(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  (%rsp),%xmm1
movapd 0x20(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @Q_phi_time(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%17 = load double, double* @M_PI
%18 = load double, double* %10
%19 = fmul double %17, %18
%20 = load double, double* %13
%21 = fmul double %19, %20
%22 = load double, double* %15
%23 = fmul double %21, %22
%24 = load double, double* @M_PI
%25 = load double, double* %13
%26 = fmul double %24, %25
%27 = load double, double* %16
%28 = fmul double %26, %27
%29 = load double, double* %9
%30 = fdiv double %28, %29
%31 = call double @cos(double %30)
%32 = fmul double %23, %31
%33 = load double, double* %9
%34 = fdiv double %32, %33
%35 = load double, double* @M_PI
%36 = load double, double* %11
%37 = fmul double %35, %36
%38 = load double, double* %12
%39 = fmul double %37, %38
%40 = load double, double* %14
%41 = fmul double %39, %40
%42 = load double, double* @M_PI
%43 = load double, double* %12
%44 = fmul double %42, %43
%45 = load double, double* %16
%46 = fmul double %44, %45
%47 = load double, double* %9
%48 = fdiv double %46, %47
%49 = call double @sin(double %48)
%50 = fmul double %41, %49
%51 = load double, double* %9
%52 = fdiv double %50, %51
%53 = fsub double %34, %52
ret double %53
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @Q_phi_time(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = load double, double* @M_PI
%10 = fmul double %9, %4
%11 = fmul double %10, %7
%12 = fdiv double %11, %0
%13 = tail call double @cos(double %12)
%14 = load double, double* @M_PI
%15 = insertelement <2 x double> poison, double %9, i64 0
%16 = insertelement <2 x double> %15, double %14, i64 1
%17 = insertelement <2 x double> poison, double %1, i64 0
%18 = insertelement <2 x double> %17, double %2, i64 1
%19 = fmul <2 x double> %16, %18
%20 = insertelement <2 x double> poison, double %4, i64 0
%21 = insertelement <2 x double> %20, double %3, i64 1
%22 = fmul <2 x double> %19, %21
%23 = insertelement <2 x double> poison, double %6, i64 0
%24 = insertelement <2 x double> %23, double %5, i64 1
%25 = fmul <2 x double> %22, %24
%26 = fmul double %14, %3
%27 = fmul double %26, %7
%28 = fdiv double %27, %0
%29 = tail call double @sin(double %28)
%30 = insertelement <2 x double> poison, double %13, i64 0
%31 = insertelement <2 x double> %30, double %29, i64 1
%32 = fmul <2 x double> %31, %25
%33 = insertelement <2 x double> poison, double %0, i64 0
%34 = shufflevector <2 x double> %33, <2 x double> poison, <2 x i32> zeroinitializer
%35 = fdiv <2 x double> %32, %34
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%37 = fsub <2 x double> %35, %36
%38 = extractelement <2 x double> %37, i64 0
ret double %38
}