#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 _sinc(double);
double cos(double);
double _raised_cosine(double x, double b, double t) {
  if (x == 0)
    return (1.0);
  return (_sinc(x / t) *
          (cos(M_PI * b * x / t) / (1.0 - (4.0 * b * b * x * x / (t * t)))));
}


x86 assembly (clang, -O0):
<_raised_cosine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1161 <_raised_cosine+0x41>
jp     1161 <_raised_cosine+0x41>
movsd  0xea9(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11df <_raised_cosine+0xbf>
movsd  -0x10(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1040 <_sinc@plt>
movsd  %xmm0,-0x28(%rbp)
mov    0x2e6c(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  0xe64(%rip),%xmm3
mulsd  -0x18(%rbp),%xmm3
mulsd  -0x18(%rbp),%xmm3
mulsd  -0x10(%rbp),%xmm3
mulsd  -0x10(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm2
mulsd  -0x20(%rbp),%xmm2
divsd  %xmm2,%xmm3
movsd  0xe32(%rip),%xmm2
subsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_raised_cosine>:
sub    $0x28,%rsp
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
jne    1141 <_raised_cosine+0x21>
jp     1141 <_raised_cosine+0x21>
movsd  0xec4(%rip),%xmm0
add    $0x28,%rsp
ret
movapd %xmm3,%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm2,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1040 <_sinc@plt>
movsd  %xmm0,0x20(%rsp)
mov    0x2e7b(%rip),%rax
movsd  (%rax),%xmm0
mulsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
call   1030 <cos@plt>
movsd  0xe78(%rip),%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm1
addsd  0xe3e(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @_raised_cosine(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %5
%9 = fcmp oeq double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %3
store double 1.000000e+00, double* %4
br label %39
11: ; preds = %3
%12 = load double, double* %5
%13 = load double, double* %7
%14 = fdiv double %12, %13
%15 = call double @_sinc(double %14)
%16 = load double, double* @M_PI
%17 = load double, double* %6
%18 = fmul double %16, %17
%19 = load double, double* %5
%20 = fmul double %18, %19
%21 = load double, double* %7
%22 = fdiv double %20, %21
%23 = call double @cos(double %22)
%24 = load double, double* %6
%25 = fmul double 4.000000e+00, %24
%26 = load double, double* %6
%27 = fmul double %25, %26
%28 = load double, double* %5
%29 = fmul double %27, %28
%30 = load double, double* %5
%31 = fmul double %29, %30
%32 = load double, double* %7
%33 = load double, double* %7
%34 = fmul double %32, %33
%35 = fdiv double %31, %34
%36 = fsub double 1.000000e+00, %35
%37 = fdiv double %23, %36
%38 = fmul double %15, %37
store double %38, double* %4
br label %39
39: ; preds = %11, %10
%40 = load double, double* %4
ret double %40
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @_raised_cosine(double %0, double %1, double %2) {
%4 = fcmp oeq double %0, 0.000000e+00
br i1 %4, label %22, label %5
5: ; preds = %3
%6 = fdiv double %0, %2
%7 = tail call double @_sinc(double %6)
%8 = load double, double* @M_PI
%9 = fmul double %8, %1
%10 = fmul double %9, %0
%11 = fdiv double %10, %2
%12 = tail call double @cos(double %11)
%13 = fmul double %1, 4.000000e+00
%14 = fmul double %13, %1
%15 = fmul double %14, %0
%16 = fmul double %15, %0
%17 = fmul double %2, %2
%18 = fdiv double %16, %17
%19 = fsub double 1.000000e+00, %18
%20 = fdiv double %12, %19
%21 = fmul double %7, %20
br label %22
22: ; preds = %3, %5
%23 = phi double [ %21, %5 ], [ 1.000000e+00, %3 ]
ret double %23
}