#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 CubicBezierP0(float, float);
float CubicBezierP1(float, float);
float CubicBezierP2(float, float);
float CubicBezierP3(float, float);
float cubicBezier(float t, float p0, float p1, float p2, float p3) {
  return CubicBezierP0(t, p0) + CubicBezierP1(t, p1) + CubicBezierP2(t, p2) +
         CubicBezierP3(t, p3);
}


x86 assembly (clang, -O0):
<cubicBezier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <CubicBezierP0@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1050 <CubicBezierP1@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <CubicBezierP2@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
call   1060 <CubicBezierP3@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubicBezier>:
sub    $0x18,%rsp
movss  %xmm4,0x14(%rsp)
movss  %xmm3,0x8(%rsp)
movss  %xmm2,0x4(%rsp)
movss  %xmm0,0xc(%rsp)
call   1040 <CubicBezierP0@plt>
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1050 <CubicBezierP1@plt>
addss  0x10(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1030 <CubicBezierP2@plt>
addss  0x4(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0xc(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
call   1060 <CubicBezierP3@plt>
addss  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @cubicBezier(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %6
%12 = load float, float* %7
%13 = call float @CubicBezierP0(float %11, float %12)
%14 = load float, float* %6
%15 = load float, float* %8
%16 = call float @CubicBezierP1(float %14, float %15)
%17 = fadd float %13, %16
%18 = load float, float* %6
%19 = load float, float* %9
%20 = call float @CubicBezierP2(float %18, float %19)
%21 = fadd float %17, %20
%22 = load float, float* %6
%23 = load float, float* %10
%24 = call float @CubicBezierP3(float %22, float %23)
%25 = fadd float %21, %24
ret float %25
}

LLVM IR (-O2):
define float @cubicBezier(float %0, float %1, float %2, float %3, float %4) {
%6 = tail call float @CubicBezierP0(float %0, float %1)
%7 = tail call float @CubicBezierP1(float %0, float %2)
%8 = fadd float %6, %7
%9 = tail call float @CubicBezierP2(float %0, float %3)
%10 = fadd float %8, %9
%11 = tail call float @CubicBezierP3(float %0, float %4)
%12 = fadd float %10, %11
ret float %12
}