#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 atan(int);
int sqrt(float);
float r5(float t, float Tr, float Ts) {
  float p1;
  p1 = (4 * (2 * t + Tr - 4 * Ts) * sqrt(-((t - 2 * Ts) * (t - Tr - 2 * Ts))) +
        3.14159265358979323846 * Tr * (-4 * t + Tr + 8 * Ts) +
        2 * Tr * (-4 * t + Tr + 8 * Ts) *
            atan((-2 * t + Tr + 4 * Ts) /
                 (2. * sqrt((t - 2 * Ts) * (-t + Tr + 2 * Ts))))) /
       16.;
  return p1;
}


x86 assembly (clang, -O0):
<r5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
movss  0xeca(%rip),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xeb2(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  %xmm1,%xmm1
subss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
addss  %xmm2,%xmm2
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1040 <sqrt@plt>
movss  -0x2c(%rbp),%xmm0
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe40(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x4(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
movss  0xe3a(%rip),%xmm4
mulss  %xmm4,%xmm3
addss  %xmm2,%xmm3
movss  -0xc(%rbp),%xmm2
movss  0xe21(%rip),%xmm4
mulss  %xmm4,%xmm2
addss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  0xe08(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
movss  0xded(%rip),%xmm3
mulss  %xmm3,%xmm2
addss  %xmm1,%xmm2
movss  -0xc(%rbp),%xmm1
movss  0xdd4(%rip),%xmm3
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
addss  %xmm0,%xmm0
subss  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
movss  0xda0(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  %xmm1,%xmm1
subss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
addss  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
addss  %xmm1,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0x28(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  0xd2f(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <atan@plt>
movss  -0x1c(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  0xcf4(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r5>:
sub    $0x38,%rsp
movaps %xmm1,%xmm3
movaps %xmm0,%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
addss  %xmm3,%xmm1
movaps %xmm3,%xmm4
movss  %xmm3,0x10(%rsp)
movss  %xmm2,0x18(%rsp)
movaps %xmm2,%xmm3
mulss  0xeae(%rip),%xmm3
addss  %xmm1,%xmm3
mulss  0xea6(%rip),%xmm3
movss  %xmm3,(%rsp)
movss  0xe9d(%rip),%xmm3
mulss  %xmm2,%xmm3
movss  %xmm0,0x14(%rsp)
movaps %xmm0,%xmm1
subss  %xmm4,%xmm1
addss  %xmm3,%xmm1
addss  %xmm0,%xmm3
movaps %xmm3,0x20(%rsp)
movaps 0xe80(%rip),%xmm0
xorps  %xmm3,%xmm0
mulss  %xmm1,%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x10(%rsp),%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
mulsd  0xe5f(%rip),%xmm1
movss  0x14(%rsp),%xmm6
movss  0xe31(%rip),%xmm2
mulss  %xmm6,%xmm2
addss  %xmm3,%xmm2
movaps %xmm2,%xmm5
movss  0xe2a(%rip),%xmm2
movss  0x18(%rsp),%xmm4
mulss  %xmm4,%xmm2
addss  %xmm5,%xmm2
xorps  %xmm5,%xmm5
cvtss2sd %xmm2,%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm0,%xmm5
movsd  %xmm5,(%rsp)
movaps %xmm3,%xmm0
addss  %xmm3,%xmm0
mulss  %xmm2,%xmm0
movss  %xmm0,0x1c(%rsp)
movaps %xmm3,%xmm0
subss  0x8(%rsp),%xmm0
movss  0xdde(%rip),%xmm1
mulss  %xmm4,%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
subss  %xmm6,%xmm3
movaps %xmm4,%xmm0
addss  %xmm4,%xmm0
addss  %xmm3,%xmm0
mulss  0x20(%rsp),%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <atan@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  (%rsp),%xmm0
mulsd  0xd97(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define float @r5(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %8, float %9)
%11 = load float, float* %6
%12 = call float @llvm.fmuladd.f32(float -4.000000e+00, float %11, float %10)
%13 = fmul float 4.000000e+00, %12
%14 = load float, float* %4
%15 = load float, float* %6
%16 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %15, float %14)
%17 = load float, float* %4
%18 = load float, float* %5
%19 = fsub float %17, %18
%20 = load float, float* %6
%21 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %20, float %19)
%22 = fmul float %16, %21
%23 = fneg float %22
%24 = call i32 @sqrt(float %23)
%25 = sitofp i32 %24 to float
%26 = fmul float %13, %25
%27 = fpext float %26 to double
%28 = load float, float* %5
%29 = fpext float %28 to double
%30 = fmul double 0x400921FB54442D18, %29
%31 = load float, float* %4
%32 = load float, float* %5
%33 = call float @llvm.fmuladd.f32(float -4.000000e+00, float %31, float %32)
%34 = load float, float* %6
%35 = call float @llvm.fmuladd.f32(float 8.000000e+00, float %34, float %33)
%36 = fpext float %35 to double
%37 = call double @llvm.fmuladd.f64(double %30, double %36, double %27)
%38 = load float, float* %5
%39 = fmul float 2.000000e+00, %38
%40 = load float, float* %4
%41 = load float, float* %5
%42 = call float @llvm.fmuladd.f32(float -4.000000e+00, float %40, float %41)
%43 = load float, float* %6
%44 = call float @llvm.fmuladd.f32(float 8.000000e+00, float %43, float %42)
%45 = fmul float %39, %44
%46 = load float, float* %4
%47 = load float, float* %5
%48 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %46, float %47)
%49 = load float, float* %6
%50 = call float @llvm.fmuladd.f32(float 4.000000e+00, float %49, float %48)
%51 = fpext float %50 to double
%52 = load float, float* %4
%53 = load float, float* %6
%54 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %53, float %52)
%55 = load float, float* %4
%56 = fneg float %55
%57 = load float, float* %5
%58 = fadd float %56, %57
%59 = load float, float* %6
%60 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %59, float %58)
%61 = fmul float %54, %60
%62 = call i32 @sqrt(float %61)
%63 = sitofp i32 %62 to double
%64 = fmul double 2.000000e+00, %63
%65 = fdiv double %51, %64
%66 = fptosi double %65 to i32
%67 = call i32 @atan(i32 %66)
%68 = sitofp i32 %67 to float
%69 = fmul float %45, %68
%70 = fpext float %69 to double
%71 = fadd double %37, %70
%72 = fdiv double %71, 1.600000e+01
%73 = fptrunc double %72 to float
store float %73, float* %7
%74 = load float, float* %7
ret float %74
}

LLVM IR (-O2):
define float @r5(float %0, float %1, float %2) {
%4 = tail call float @llvm.fmuladd.f32(float %0, float 2.000000e+00, float %1)
%5 = tail call float @llvm.fmuladd.f32(float %2, float -4.000000e+00, float %4)
%6 = fmul float %5, 4.000000e+00
%7 = tail call float @llvm.fmuladd.f32(float %2, float -2.000000e+00, float %0)
%8 = fsub float %0, %1
%9 = tail call float @llvm.fmuladd.f32(float %2, float -2.000000e+00, float %8)
%10 = fneg float %7
%11 = fmul float %9, %10
%12 = tail call i32 @sqrt(float %11)
%13 = sitofp i32 %12 to float
%14 = fmul float %6, %13
%15 = fpext float %14 to double
%16 = fpext float %1 to double
%17 = fmul double %16, 0x400921FB54442D18
%18 = tail call float @llvm.fmuladd.f32(float %0, float -4.000000e+00, float %1)
%19 = tail call float @llvm.fmuladd.f32(float %2, float 8.000000e+00, float %18)
%20 = fpext float %19 to double
%21 = tail call double @llvm.fmuladd.f64(double %17, double %20, double %15)
%22 = fmul float %1, 2.000000e+00
%23 = fmul float %22, %19
%24 = tail call float @llvm.fmuladd.f32(float %0, float -2.000000e+00, float %1)
%25 = tail call float @llvm.fmuladd.f32(float %2, float 4.000000e+00, float %24)
%26 = fpext float %25 to double
%27 = fsub float %1, %0
%28 = tail call float @llvm.fmuladd.f32(float %2, float 2.000000e+00, float %27)
%29 = fmul float %7, %28
%30 = tail call i32 @sqrt(float %29)
%31 = sitofp i32 %30 to double
%32 = fmul double %31, 2.000000e+00
%33 = fdiv double %26, %32
%34 = fptosi double %33 to i32
%35 = tail call i32 @atan(i32 %34)
%36 = sitofp i32 %35 to float
%37 = fmul float %23, %36
%38 = fpext float %37 to double
%39 = fadd double %21, %38
%40 = fmul double %39, 6.250000e-02
%41 = fptrunc double %40 to float
ret float %41
}