#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 atan(double);
double tan(double);
void prewarp(double *a0, double *a1, double *a2, double fc, double fs) {
  double wp, pi;
  pi = 4.0 * atan(1.0);
  wp = 2.0 * fs * tan(pi * fc / fs);
  *a2 = (*a2) / (wp * wp);
  *a1 = (*a1) / wp;
}


x86 assembly (clang, -O0):
<prewarp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  0xeca(%rip),%xmm0
call   1030 <atan@plt>
movaps %xmm0,%xmm1
movsd  0xeb2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe99(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1040 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prewarp>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %rdx,%rbx
mov    %rsi,%r14
movsd  0xebf(%rip),%xmm0
call   1030 <atan@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xeb4(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm1,%xmm0
addsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
call   1040 <tan@plt>
mulsd  0x8(%rsp),%xmm0
movsd  (%rbx),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rbx)
movsd  (%r14),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @prewarp(double* %0, double* %1, double* %2, double %3, double %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store double %3, double* %9
store double %4, double* %10
%13 = call double @atan(double 1.000000e+00)
%14 = fmul double 4.000000e+00, %13
store double %14, double* %12
%15 = load double, double* %10
%16 = fmul double 2.000000e+00, %15
%17 = load double, double* %12
%18 = load double, double* %9
%19 = fmul double %17, %18
%20 = load double, double* %10
%21 = fdiv double %19, %20
%22 = call double @tan(double %21)
%23 = fmul double %16, %22
store double %23, double* %11
%24 = load double*, double** %8
%25 = load double, double* %24
%26 = load double, double* %11
%27 = load double, double* %11
%28 = fmul double %26, %27
%29 = fdiv double %25, %28
%30 = load double*, double** %8
store double %29, double* %30
%31 = load double*, double** %7
%32 = load double, double* %31
%33 = load double, double* %11
%34 = fdiv double %32, %33
%35 = load double*, double** %7
store double %34, double* %35
ret void
}

LLVM IR (-O2):
define void @prewarp(double* nocapture readnone %0, double* nocapture %1, double* nocapture %2, double %3, double %4) {
%6 = tail call double @atan(double 1.000000e+00)
%7 = fmul double %4, 2.000000e+00
%8 = fmul double %3, 0x400921FB54442D18
%9 = fdiv double %8, %4
%10 = tail call double @tan(double %9)
%11 = fmul double %7, %10
%12 = load double, double* %2
%13 = fmul double %11, %11
%14 = fdiv double %12, %13
store double %14, double* %2
%15 = load double, double* %1
%16 = fdiv double %15, %11
store double %16, double* %1
ret void
}