#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 float_saturate(float);
float float_aces(float value) {
  float a = 2.51f;
  float b = 0.03f;
  float c = 2.43f;
  float d = 0.59f;
  float e = 0.14f;
  value = (value * (a * value + b)) / (value * (c * value + d) + e);
  return float_saturate(value);
}


x86 assembly (clang, -O0):
<float_aces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xeeb(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xeb8(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xea7(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
movss  -0x14(%rbp),%xmm2
mulss  %xmm4,%xmm3
addss  %xmm2,%xmm3
movss  -0x18(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <float_saturate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_aces>:
movss  0xee8(%rip),%xmm1
mulss  %xmm0,%xmm1
addss  0xee0(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  0xed8(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  0xed0(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  0xec8(%rip),%xmm2
divss  %xmm2,%xmm1
movaps %xmm1,%xmm0
jmp    1030 <float_saturate@plt>

LLVM IR (-O0):
define float @float_aces(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %2
store float 0x4004147AE0000000, float* %3
store float 0x3F9EB851E0000000, float* %4
store float 0x400370A3E0000000, float* %5
store float 0x3FE2E147A0000000, float* %6
store float 0x3FC1EB8520000000, float* %7
%8 = load float, float* %2
%9 = load float, float* %3
%10 = load float, float* %2
%11 = load float, float* %4
%12 = call float @llvm.fmuladd.f32(float %9, float %10, float %11)
%13 = fmul float %8, %12
%14 = load float, float* %2
%15 = load float, float* %5
%16 = load float, float* %2
%17 = load float, float* %6
%18 = call float @llvm.fmuladd.f32(float %15, float %16, float %17)
%19 = load float, float* %7
%20 = call float @llvm.fmuladd.f32(float %14, float %18, float %19)
%21 = fdiv float %13, %20
store float %21, float* %2
%22 = load float, float* %2
%23 = call float @float_saturate(float %22)
ret float %23
}

LLVM IR (-O2):
define float @float_aces(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float 0x4004147AE0000000, float 0x3F9EB851E0000000)
%3 = fmul float %2, %0
%4 = tail call float @llvm.fmuladd.f32(float %0, float 0x400370A3E0000000, float 0x3FE2E147A0000000)
%5 = tail call float @llvm.fmuladd.f32(float %0, float %4, float 0x3FC1EB8520000000)
%6 = fdiv float %3, %5
%7 = tail call float @float_saturate(float %6)
ret float %7
}