#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 sinf(float);
float back_ease_in_out(float p) {
  float f = 0.0f;
  if (p < 0.5f) {
    f = 2.0f * p;
    f = 0.5f * (f * f * f - f * sinf(f * 3.1415926536f));
  } else {
    f = (1.0f - (2.0f * p - 1.0f));
    f = 0.5f * (1.0f - (f * f * f - f * sinf(f * 3.1415926536f))) + 0.5f;
  }
  return f;
}


x86 assembly (clang, -O0):
<back_ease_in_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed3(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    11bf <back_ease_in_out+0xaf>
movss  0xed1(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe94(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
call   1030 <sinf@plt>
movss  -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0xc(%rbp),%xmm0
mulss  %xmm3,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xe4f(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1266 <back_ease_in_out+0x156>
movss  -0x4(%rbp),%xmm1
addss  %xmm1,%xmm1
movss  0xe3c(%rip),%xmm0
addss  %xmm0,%xmm1
movss  0xe28(%rip),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xdf8(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
call   1030 <sinf@plt>
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x18(%rbp),%xmm0
mulss  %xmm3,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xdb7(%rip),%xmm0
subss  %xmm1,%xmm0
movss  0xda7(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<back_ease_in_out>:
push   %rax
movaps %xmm0,%xmm1
movss  0xee4(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    116c <back_ease_in_out+0x5c>
addss  %xmm1,%xmm1
movss  %xmm1,(%rsp)
movaps %xmm1,%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,0x4(%rsp)
movss  0xecd(%rip),%xmm0
mulss  %xmm1,%xmm0
call   1030 <sinf@plt>
movss  (%rsp),%xmm2
mulss  %xmm2,%xmm0
movss  0x4(%rsp),%xmm1
mulss  %xmm2,%xmm1
subss  %xmm0,%xmm1
mulss  0xe99(%rip),%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret
addss  %xmm1,%xmm1
addss  0xe8c(%rip),%xmm1
movss  0xe88(%rip),%xmm2
subss  %xmm1,%xmm2
movss  %xmm2,(%rsp)
movaps %xmm2,%xmm0
mulss  %xmm2,%xmm0
movss  %xmm0,0x4(%rsp)
movss  0xe6e(%rip),%xmm0
mulss  %xmm2,%xmm0
call   1030 <sinf@plt>
movss  (%rsp),%xmm2
mulss  %xmm2,%xmm0
movss  0x4(%rsp),%xmm1
mulss  %xmm2,%xmm1
subss  %xmm0,%xmm1
movss  0xe42(%rip),%xmm0
subss  %xmm1,%xmm0
movss  0xe2e(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @back_ease_in_out(float %0) {
%2 = fcmp olt float %0, 5.000000e-01
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = fmul float %0, 2.000000e+00
%5 = fmul float %4, %4
%6 = fmul float %4, 0x400921FB60000000
%7 = tail call float @sinf(float %6)
%8 = fneg float %4
%9 = fmul float %7, %8
%10 = tail call float @llvm.fmuladd.f32(float %5, float %4, float %9)
%11 = fmul float %10, 5.000000e-01
br label %23
12: ; preds = %1
%13 = tail call float @llvm.fmuladd.f32(float %0, float 2.000000e+00, float -1.000000e+00)
%14 = fsub float 1.000000e+00, %13
%15 = fmul float %14, %14
%16 = fmul float %14, 0x400921FB60000000
%17 = tail call float @sinf(float %16)
%18 = fneg float %14
%19 = fmul float %17, %18
%20 = tail call float @llvm.fmuladd.f32(float %15, float %14, float %19)
%21 = fsub float 1.000000e+00, %20
%22 = tail call float @llvm.fmuladd.f32(float %21, float 5.000000e-01, float 5.000000e-01)
br label %23
23: ; preds = %12, %3
%24 = phi float [ %11, %3 ], [ %22, %12 ]
ret float %24
}