#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;
float cos(float);
int fabs(float);
float sin(float);
double sinc(double);
double root_raised_cosine_time(double time, double alpha) {
  float opap, omap, at4, omat4sq;
  if (fabs(alpha) < 1e-8)
    return sinc(time);
  if (fabs(time) < 1e-8)
    return ((4.0 / M_PI) - 1.0) * alpha + 1.0;
  opap = (1.0 + alpha) * M_PI;
  omap = (1.0 - alpha) * M_PI;
  at4 = alpha * time * 4;
  omat4sq = 1 - at4 * at4;
  if (fabs(omat4sq) < 1e-8)
    return ((4.0 * alpha) * cos(opap * time) - at4 * opap * sin(opap * time) +
            omap * cos(omap * time)) /
           (1 - 3 * at4 * at4) * (1.0 / M_PI);
  return (4.0 / M_PI) * alpha / omat4sq *
         (cos(opap * time) + sin(omap * time) / at4);
}


x86 assembly (clang, -O0):
<root_raised_cosine_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe94(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    118a <root_raised_cosine_time+0x4a>
movsd  -0x10(%rbp),%xmm0
call   1050 <sinc@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1441 <root_raised_cosine_time+0x301>
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe5c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ec <root_raised_cosine_time+0xac>
movsd  0xe52(%rip),%xmm0
mov    0x2e2b(%rip),%rax
divsd  (%rax),%xmm0
movsd  0xe47(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe32(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1441 <root_raised_cosine_time+0x301>
movsd  0xe1c(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
mov    0x2de8(%rip),%rax
mulsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movsd  0xdfb(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    0x2dc7(%rip),%rax
mulsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xdc8(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xda8(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xd71(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    13c1 <root_raised_cosine_time+0x281>
movsd  0xd67(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <cos@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movss  -0x24(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
movss  -0x4c(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x40(%rbp),%xmm0
mulss  %xmm3,%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <cos@plt>
movss  -0x34(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
movss  0xcab(%rip),%xmm1
mulss  -0x24(%rbp),%xmm1
movss  -0x24(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xc84(%rip),%xmm2
addss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
movsd  0xc68(%rip),%xmm1
mov    0x2c39(%rip),%rax
divsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1441 <root_raised_cosine_time+0x301>
movsd  0xc3f(%rip),%xmm0
mov    0x2c18(%rip),%rax
divsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <cos@plt>
movss  %xmm0,-0x5c(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
movss  -0x5c(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
divss  -0x24(%rbp),%xmm2
addss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<root_raised_cosine_time>:
push   %rbx
sub    $0x30,%rsp
movsd  %xmm0,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    1278 <root_raised_cosine_time+0x138>
movsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    1288 <root_raised_cosine_time+0x148>
movsd  0xe7c(%rip),%xmm0
movsd  0x10(%rsp),%xmm3
movapd %xmm3,%xmm1
addsd  %xmm0,%xmm1
mov    0x2e4f(%rip),%rbx
movsd  (%rbx),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0xc(%rsp)
subsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  %xmm3,%xmm0
mulsd  0xe39(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2c(%rsp)
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0xe30(%rip),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x24(%rsp)
call   1030 <fabs@plt>
test   %eax,%eax
jle    12b6 <root_raised_cosine_time+0x176>
movsd  0xe01(%rip),%xmm1
divsd  (%rbx),%xmm1
mulsd  0x10(%rsp),%xmm1
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <cos@plt>
movss  %xmm0,0xc(%rsp)
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
divss  0x2c(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0x10(%rsp),%xmm0
jmp    139e <root_raised_cosine_time+0x25e>
movsd  0x18(%rsp),%xmm0
add    $0x30,%rsp
pop    %rbx
jmp    1050 <sinc@plt>
mov    0x2d59(%rip),%rax
movsd  0xd71(%rip),%xmm0
divsd  (%rax),%xmm0
addsd  0xd6d(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0xd4f(%rip),%xmm0
jmp    139e <root_raised_cosine_time+0x25e>
movsd  0x10(%rsp),%xmm0
mulsd  0xd44(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x24(%rsp)
call   1060 <cos@plt>
cvtss2sd %xmm0,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
mulss  0x2c(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movss  0x24(%rsp),%xmm0
call   1040 <sin@plt>
mulss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <cos@plt>
mulss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x10(%rsp),%xmm0
movss  0xcbb(%rip),%xmm1
movss  0x2c(%rsp),%xmm2
mulss  %xmm2,%xmm1
mulss  %xmm2,%xmm1
addss  0xca1(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
movapd 0xc9d(%rip),%xmm2
unpcklpd %xmm0,%xmm2
movsd  (%rbx),%xmm0
movlhps %xmm1,%xmm0
divpd  %xmm0,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @root_raised_cosine_time(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store double %0, double* %4
store double %1, double* %5
%10 = load double, double* %5
%11 = fptrunc double %10 to float
%12 = call i32 @fabs(float %11)
%13 = sitofp i32 %12 to double
%14 = fcmp olt double %13, 1.000000e-08
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = load double, double* %4
%17 = call double @sinc(double %16)
store double %17, double* %3
br label %122
18: ; preds = %2
%19 = load double, double* %4
%20 = fptrunc double %19 to float
%21 = call i32 @fabs(float %20)
%22 = sitofp i32 %21 to double
%23 = fcmp olt double %22, 1.000000e-08
br i1 %23, label %24, label %30
24: ; preds = %18
%25 = load double, double* @M_PI
%26 = fdiv double 4.000000e+00, %25
%27 = fsub double %26, 1.000000e+00
%28 = load double, double* %5
%29 = call double @llvm.fmuladd.f64(double %27, double %28, double 1.000000e+00)
store double %29, double* %3
br label %122
30: ; preds = %18
%31 = load double, double* %5
%32 = fadd double 1.000000e+00, %31
%33 = load double, double* @M_PI
%34 = fmul double %32, %33
%35 = fptrunc double %34 to float
store float %35, float* %6
%36 = load double, double* %5
%37 = fsub double 1.000000e+00, %36
%38 = load double, double* @M_PI
%39 = fmul double %37, %38
%40 = fptrunc double %39 to float
store float %40, float* %7
%41 = load double, double* %5
%42 = load double, double* %4
%43 = fmul double %41, %42
%44 = fmul double %43, 4.000000e+00
%45 = fptrunc double %44 to float
store float %45, float* %8
%46 = load float, float* %8
%47 = load float, float* %8
%48 = fneg float %46
%49 = call float @llvm.fmuladd.f32(float %48, float %47, float 1.000000e+00)
store float %49, float* %9
%50 = load float, float* %9
%51 = call i32 @fabs(float %50)
%52 = sitofp i32 %51 to double
%53 = fcmp olt double %52, 1.000000e-08
br i1 %53, label %54, label %97
54: ; preds = %30
%55 = load double, double* %5
%56 = fmul double 4.000000e+00, %55
%57 = load float, float* %6
%58 = fpext float %57 to double
%59 = load double, double* %4
%60 = fmul double %58, %59
%61 = fptrunc double %60 to float
%62 = call float @cos(float %61)
%63 = fpext float %62 to double
%64 = load float, float* %8
%65 = load float, float* %6
%66 = fmul float %64, %65
%67 = load float, float* %6
%68 = fpext float %67 to double
%69 = load double, double* %4
%70 = fmul double %68, %69
%71 = fptrunc double %70 to float
%72 = call float @sin(float %71)
%73 = fmul float %66, %72
%74 = fpext float %73 to double
%75 = fneg double %74
%76 = call double @llvm.fmuladd.f64(double %56, double %63, double %75)
%77 = load float, float* %7
%78 = load float, float* %7
%79 = fpext float %78 to double
%80 = load double, double* %4
%81 = fmul double %79, %80
%82 = fptrunc double %81 to float
%83 = call float @cos(float %82)
%84 = fmul float %77, %83
%85 = fpext float %84 to double
%86 = fadd double %76, %85
%87 = load float, float* %8
%88 = fmul float 3.000000e+00, %87
%89 = load float, float* %8
%90 = fneg float %88
%91 = call float @llvm.fmuladd.f32(float %90, float %89, float 1.000000e+00)
%92 = fpext float %91 to double
%93 = fdiv double %86, %92
%94 = load double, double* @M_PI
%95 = fdiv double 1.000000e+00, %94
%96 = fmul double %93, %95
store double %96, double* %3
br label %122
97: ; preds = %30
%98 = load double, double* @M_PI
%99 = fdiv double 4.000000e+00, %98
%100 = load double, double* %5
%101 = fmul double %99, %100
%102 = load float, float* %9
%103 = fpext float %102 to double
%104 = fdiv double %101, %103
%105 = load float, float* %6
%106 = fpext float %105 to double
%107 = load double, double* %4
%108 = fmul double %106, %107
%109 = fptrunc double %108 to float
%110 = call float @cos(float %109)
%111 = load float, float* %7
%112 = fpext float %111 to double
%113 = load double, double* %4
%114 = fmul double %112, %113
%115 = fptrunc double %114 to float
%116 = call float @sin(float %115)
%117 = load float, float* %8
%118 = fdiv float %116, %117
%119 = fadd float %110, %118
%120 = fpext float %119 to double
%121 = fmul double %104, %120
store double %121, double* %3
br label %122
122: ; preds = %97, %54, %24, %15
%123 = load double, double* %3
ret double %123
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @root_raised_cosine_time(double %0, double %1) {
%3 = fptrunc double %1 to float
%4 = tail call i32 @fabs(float %3)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call double @sinc(double %0)
br label %81
8: ; preds = %2
%9 = fptrunc double %0 to float
%10 = tail call i32 @fabs(float %9)
%11 = icmp slt i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load double, double* @M_PI
%14 = fdiv double 4.000000e+00, %13
%15 = fadd double %14, -1.000000e+00
%16 = tail call double @llvm.fmuladd.f64(double %15, double %1, double 1.000000e+00)
br label %81
17: ; preds = %8
%18 = fadd double %1, 1.000000e+00
%19 = load double, double* @M_PI
%20 = fmul double %18, %19
%21 = fptrunc double %20 to float
%22 = fsub double 1.000000e+00, %1
%23 = fmul double %22, %19
%24 = fptrunc double %23 to float
%25 = fmul double %0, %1
%26 = fmul double %25, 4.000000e+00
%27 = fptrunc double %26 to float
%28 = fneg float %27
%29 = tail call float @llvm.fmuladd.f32(float %28, float %27, float 1.000000e+00)
%30 = tail call i32 @fabs(float %29)
%31 = icmp slt i32 %30, 1
br i1 %31, label %32, label %63
32: ; preds = %17
%33 = fmul double %1, 4.000000e+00
%34 = fpext float %21 to double
%35 = fmul double %34, %0
%36 = fptrunc double %35 to float
%37 = tail call float @cos(float %36)
%38 = fpext float %37 to double
%39 = fmul float %27, %21
%40 = tail call float @sin(float %36)
%41 = fmul float %39, %40
%42 = fpext float %41 to double
%43 = fneg double %42
%44 = tail call double @llvm.fmuladd.f64(double %33, double %38, double %43)
%45 = fpext float %24 to double
%46 = fmul double %45, %0
%47 = fptrunc double %46 to float
%48 = tail call float @cos(float %47)
%49 = fmul float %48, %24
%50 = fpext float %49 to double
%51 = fadd double %44, %50
%52 = fmul float %27, -3.000000e+00
%53 = tail call float @llvm.fmuladd.f32(float %52, float %27, float 1.000000e+00)
%54 = fpext float %53 to double
%55 = load double, double* @M_PI
%56 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %51, i64 1
%57 = insertelement <2 x double> poison, double %55, i64 0
%58 = insertelement <2 x double> %57, double %54, i64 1
%59 = fdiv <2 x double> %56, %58
%60 = shufflevector <2 x double> %59, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%61 = fmul <2 x double> %59, %60
%62 = extractelement <2 x double> %61, i64 0
br label %81
63: ; preds = %17
%64 = load double, double* @M_PI
%65 = fdiv double 4.000000e+00, %64
%66 = fmul double %65, %1
%67 = fpext float %29 to double
%68 = fdiv double %66, %67
%69 = fpext float %21 to double
%70 = fmul double %69, %0
%71 = fptrunc double %70 to float
%72 = tail call float @cos(float %71)
%73 = fpext float %24 to double
%74 = fmul double %73, %0
%75 = fptrunc double %74 to float
%76 = tail call float @sin(float %75)
%77 = fdiv float %76, %27
%78 = fadd float %72, %77
%79 = fpext float %78 to double
%80 = fmul double %68, %79
br label %81
81: ; preds = %63, %32, %12, %6
%82 = phi double [ %7, %6 ], [ %16, %12 ], [ %62, %32 ], [ %80, %63 ]
ret double %82
}