#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 atan2(double const, double);
double const cos(double);
double const sin(double);
double warp(const double w, const double a, const double t) {
  double ww, x, y;
  x = w - t;
  y = w + t;
  ww = w + atan2((a * sin(x)), (1.0 - a * cos(x))) +
       atan2((a * sin(y)), (1.0 - a * cos(y)));
  return (ww);
}


x86 assembly (clang, -O0):
<warp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe28(%rip),%xmm2
addsd  %xmm2,%xmm1
call   1030 <atan2@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x48(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xda5(%rip),%xmm2
addsd  %xmm2,%xmm1
call   1030 <atan2@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warp>:
sub    $0x28,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x10(%rsp)
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
addsd  %xmm0,%xmm2
movsd  %xmm2,0x18(%rsp)
movapd %xmm1,%xmm0
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  0xe7d(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
call   1030 <atan2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  0xe34(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
call   1030 <atan2@plt>
addsd  0x10(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @warp(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %4
%11 = load double, double* %6
%12 = fsub double %10, %11
store double %12, double* %8
%13 = load double, double* %4
%14 = load double, double* %6
%15 = fadd double %13, %14
store double %15, double* %9
%16 = load double, double* %4
%17 = load double, double* %5
%18 = load double, double* %8
%19 = call double @sin(double %18)
%20 = fmul double %17, %19
%21 = load double, double* %5
%22 = load double, double* %8
%23 = call double @cos(double %22)
%24 = fneg double %21
%25 = call double @llvm.fmuladd.f64(double %24, double %23, double 1.000000e+00)
%26 = call double @atan2(double %20, double %25)
%27 = fadd double %16, %26
%28 = load double, double* %5
%29 = load double, double* %9
%30 = call double @sin(double %29)
%31 = fmul double %28, %30
%32 = load double, double* %5
%33 = load double, double* %9
%34 = call double @cos(double %33)
%35 = fneg double %32
%36 = call double @llvm.fmuladd.f64(double %35, double %34, double 1.000000e+00)
%37 = call double @atan2(double %31, double %36)
%38 = fadd double %27, %37
store double %38, double* %7
%39 = load double, double* %7
ret double %39
}

LLVM IR (-O2):
define double @warp(double %0, double %1, double %2) {
%4 = fsub double %0, %2
%5 = fadd double %0, %2
%6 = tail call double @sin(double %4)
%7 = fmul double %6, %1
%8 = tail call double @cos(double %4)
%9 = fneg double %1
%10 = tail call double @llvm.fmuladd.f64(double %9, double %8, double 1.000000e+00)
%11 = tail call double @atan2(double %7, double %10)
%12 = fadd double %11, %0
%13 = tail call double @sin(double %5)
%14 = fmul double %13, %1
%15 = tail call double @cos(double %5)
%16 = tail call double @llvm.fmuladd.f64(double %9, double %15, double 1.000000e+00)
%17 = tail call double @atan2(double %14, double %16)
%18 = fadd double %12, %17
ret double %18
}