#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 const cos(double);
double test_init(const double x, const double y, const double wx,
                 const double wy, const double ax, const double ay) {
  double d2Xfact =
      (2.0 * 3.14159265358979323846 * wx) * (2.0 * 3.14159265358979323846 * wx);
  double d2Yfact =
      (2.0 * 3.14159265358979323846 * wy) * (2.0 * 3.14159265358979323846 * wy);
  return -(cos(2.0 * 3.14159265358979323846 * x * wx) *
           cos(2.0 * 3.14159265358979323846 * y * wy)) /
         (ax * d2Xfact + ay * d2Yfact);
}


x86 assembly (clang, -O0):
<test_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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  0xec2(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xeb5(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe9f(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe92(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe7c(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1030 <cos@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  0xe60(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm2
mulsd  -0x40(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_init>:
sub    $0x48,%rsp
movsd  %xmm5,0x20(%rsp)
movsd  %xmm4,0x28(%rsp)
movsd  %xmm3,(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  0xecd(%rip),%xmm4
mulsd  %xmm4,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm2
mulsd  %xmm2,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm3,%xmm1
mulsd  %xmm4,%xmm1
mulsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
call   1030 <cos@plt>
movapd %xmm0,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xe8c(%rip),%xmm0
mulsd  (%rsp),%xmm0
call   1030 <cos@plt>
movapd 0x30(%rsp),%xmm1
xorpd  0xe84(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm2
mulsd  0x20(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
mulsd  0x28(%rsp),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define double @test_init(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%15 = load double, double* %9
%16 = fmul double 0x401921FB54442D18, %15
%17 = load double, double* %9
%18 = fmul double 0x401921FB54442D18, %17
%19 = fmul double %16, %18
store double %19, double* %13
%20 = load double, double* %10
%21 = fmul double 0x401921FB54442D18, %20
%22 = load double, double* %10
%23 = fmul double 0x401921FB54442D18, %22
%24 = fmul double %21, %23
store double %24, double* %14
%25 = load double, double* %7
%26 = fmul double 0x401921FB54442D18, %25
%27 = load double, double* %9
%28 = fmul double %26, %27
%29 = call double @cos(double %28)
%30 = load double, double* %8
%31 = fmul double 0x401921FB54442D18, %30
%32 = load double, double* %10
%33 = fmul double %31, %32
%34 = call double @cos(double %33)
%35 = fmul double %29, %34
%36 = fneg double %35
%37 = load double, double* %11
%38 = load double, double* %13
%39 = load double, double* %12
%40 = load double, double* %14
%41 = fmul double %39, %40
%42 = call double @llvm.fmuladd.f64(double %37, double %38, double %41)
%43 = fdiv double %36, %42
ret double %43
}

LLVM IR (-O2):
define double @test_init(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %2, 0x401921FB54442D18
%8 = fmul double %7, %7
%9 = fmul double %3, 0x401921FB54442D18
%10 = fmul double %9, %9
%11 = fmul double %0, 0x401921FB54442D18
%12 = fmul double %11, %2
%13 = tail call double @cos(double %12)
%14 = fmul double %1, 0x401921FB54442D18
%15 = fmul double %14, %3
%16 = tail call double @cos(double %15)
%17 = fneg double %13
%18 = fmul double %16, %17
%19 = fmul double %10, %5
%20 = tail call double @llvm.fmuladd.f64(double %4, double %8, double %19)
%21 = fdiv double %18, %20
ret double %21
}