#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 */
int M_PI;
int sin(int);
double t1_f_cutoff(double rij) {
  if (rij < 3.0 - 0.2) {
    return 1;
  } else if ((rij > 3.0 - 0.2) && (rij < 3.0 + 0.2)) {
    return 1 / 2 - 1 / 2 * sin(M_PI / 2 * (rij - 3.0) / 0.2);
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<t1_f_cutoff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1142 <t1_f_cutoff+0x32>
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c8 <t1_f_cutoff+0xb8>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11c0 <t1_f_cutoff+0xb0>
movsd  0xea7(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11c0 <t1_f_cutoff+0xb0>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe8a(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe72(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
imul   $0x0,%eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c8 <t1_f_cutoff+0xb8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_f_cutoff>:
push   %rax
movsd  0xeef(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1129 <t1_f_cutoff+0x19>
movsd  0xed9(%rip),%xmm2
jmp    117d <t1_f_cutoff+0x6d>
ucomisd 0xed7(%rip),%xmm0
xorps  %xmm2,%xmm2
jbe    117d <t1_f_cutoff+0x6d>
movsd  0xed2(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    117d <t1_f_cutoff+0x6d>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
addsd  0xeb3(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  0xeaf(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @t1_f_cutoff(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 2.800000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %2
br label %27
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp ogt double %8, 2.800000e+00
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load double, double* %3
%12 = fcmp olt double %11, 3.200000e+00
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load i32, i32* @M_PI
%15 = sdiv i32 %14, 2
%16 = sitofp i32 %15 to double
%17 = load double, double* %3
%18 = fsub double %17, 3.000000e+00
%19 = fmul double %16, %18
%20 = fdiv double %19, 2.000000e-01
%21 = fptosi double %20 to i32
%22 = call i32 @sin(i32 %21)
%23 = mul nsw i32 0, %22
%24 = sub nsw i32 0, %23
%25 = sitofp i32 %24 to double
store double %25, double* %2
br label %27
26: ; preds = %10, %7
store double 0.000000e+00, double* %2
br label %27
27: ; preds = %26, %13, %6
%28 = load double, double* %2
ret double %28
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @t1_f_cutoff(double %0) {
%2 = fcmp olt double %0, 2.800000e+00
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = fcmp ogt double %0, 2.800000e+00
%5 = fcmp olt double %0, 3.200000e+00
%6 = and i1 %4, %5
br i1 %6, label %7, label %16
7: ; preds = %3
%8 = load i32, i32* @M_PI
%9 = sdiv i32 %8, 2
%10 = sitofp i32 %9 to double
%11 = fadd double %0, -3.000000e+00
%12 = fmul double %11, %10
%13 = fdiv double %12, 2.000000e-01
%14 = fptosi double %13 to i32
%15 = tail call i32 @sin(i32 %14)
br label %16
16: ; preds = %3, %1, %7
%17 = phi double [ 0.000000e+00, %7 ], [ 1.000000e+00, %1 ], [ 0.000000e+00, %3 ]
ret double %17
}