#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 */
float sqrtf(float);
float EaseCircInOut(float t, float b, float c, float d) {
  if ((t /= d / 2.0f) < 1.0f)
    return (-c / 2.0f * (sqrtf(1.0f - t * t) - 1.0f) + b);
  t -= 2.0f;
  return (c / 2.0f * (sqrtf(1.0f - t * t) + 1.0f) + b);
}


x86 assembly (clang, -O0):
<EaseCircInOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xecb(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,-0x8(%rbp)
movss  0xead(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    11d6 <EaseCircInOut+0xc6>
movss  -0x10(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe8e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xe5e(%rip),%xmm1
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm2
movss  -0x18(%rbp),%xmm0
movss  0xe45(%rip),%xmm1
subss  %xmm1,%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1254 <EaseCircInOut+0x144>
movss  -0x8(%rbp),%xmm0
movss  0xe21(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xe0b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xddb(%rip),%xmm1
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm2
movss  -0x1c(%rbp),%xmm0
movss  0xdc2(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseCircInOut>:
sub    $0x18,%rsp
mulss  0xee4(%rip),%xmm3
movaps %xmm0,%xmm4
divss  %xmm3,%xmm4
movss  0xed9(%rip),%xmm0
xor    %eax,%eax
ucomiss %xmm4,%xmm0
seta   %cl
ja     113d <EaseCircInOut+0x2d>
addss  0xecb(%rip),%xmm4
mov    %cl,%al
lea    0xec6(%rip),%rcx
movss  (%rcx,%rax,4),%xmm5
lea    0xec2(%rip),%rcx
mulss  (%rcx,%rax,4),%xmm2
mulss  %xmm4,%xmm4
subss  %xmm4,%xmm0
xorps  %xmm3,%xmm3
ucomiss %xmm3,%xmm0
jb     116d <EaseCircInOut+0x5d>
sqrtss %xmm0,%xmm0
jmp    1196 <EaseCircInOut+0x86>
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm5,0xc(%rsp)
call   1030 <sqrtf@plt>
movss  0xc(%rsp),%xmm5
movss  0x10(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
addss  %xmm5,%xmm0
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
movaps %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @EaseCircInOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
%10 = load float, float* %9
%11 = fdiv float %10, 2.000000e+00
%12 = load float, float* %6
%13 = fdiv float %12, %11
store float %13, float* %6
%14 = fcmp olt float %13, 1.000000e+00
br i1 %14, label %15, label %27
15: ; preds = %4
%16 = load float, float* %8
%17 = fneg float %16
%18 = fdiv float %17, 2.000000e+00
%19 = load float, float* %6
%20 = load float, float* %6
%21 = fneg float %19
%22 = call float @llvm.fmuladd.f32(float %21, float %20, float 1.000000e+00)
%23 = call float @sqrtf(float %22)
%24 = fsub float %23, 1.000000e+00
%25 = load float, float* %7
%26 = call float @llvm.fmuladd.f32(float %18, float %24, float %25)
store float %26, float* %5
br label %40
27: ; preds = %4
%28 = load float, float* %6
%29 = fsub float %28, 2.000000e+00
store float %29, float* %6
%30 = load float, float* %8
%31 = fdiv float %30, 2.000000e+00
%32 = load float, float* %6
%33 = load float, float* %6
%34 = fneg float %32
%35 = call float @llvm.fmuladd.f32(float %34, float %33, float 1.000000e+00)
%36 = call float @sqrtf(float %35)
%37 = fadd float %36, 1.000000e+00
%38 = load float, float* %7
%39 = call float @llvm.fmuladd.f32(float %31, float %37, float %38)
store float %39, float* %5
br label %40
40: ; preds = %27, %15
%41 = load float, float* %5
ret float %41
}

LLVM IR (-O2):
define float @EaseCircInOut(float %0, float %1, float %2, float %3) {
%5 = fmul float %3, 5.000000e-01
%6 = fdiv float %0, %5
%7 = fcmp olt float %6, 1.000000e+00
%8 = fadd float %6, -2.000000e+00
%9 = select i1 %7, float -5.000000e-01, float 5.000000e-01
%10 = select i1 %7, float %6, float %8
%11 = select i1 %7, float -1.000000e+00, float 1.000000e+00
%12 = fmul float %9, %2
%13 = fneg float %10
%14 = tail call float @llvm.fmuladd.f32(float %13, float %10, float 1.000000e+00)
%15 = tail call float @sqrtf(float %14)
%16 = fadd float %15, %11
%17 = tail call float @llvm.fmuladd.f32(float %12, float %16, float %1)
ret float %17
}