#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 /*<<< orphan*/ max(float, float);
float min(int /*<<< orphan*/, float);
float calcQuarterbackRating(float Comp, float Att, float TDs, float Int,
                            float Yards) {
  float a, b, c, d;
  a = (((Comp / Att) * 100.0F) - 30.0F) / 20.0F;
  b = ((TDs / Att) * 100.0F) / 5.0F;
  c = (9.5F - ((Int / Att) * 100.0F)) / 4.0F;
  d = ((Yards / Att) - 3.0F) / 4.0F;
  a = min(max(a, 0.0F), 2.375F);
  b = min(max(b, 0.0F), 2.375F);
  c = min(max(c, 0.0F), 2.375F);
  return (a + b + c + min(max(d, 0.0F), 2.375F)) / .06F;
}


x86 assembly (clang, -O0):
<calcQuarterbackRating>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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
divss  -0x8(%rbp),%xmm0
movss  0xebd(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xec1(%rip),%xmm1
addss  %xmm1,%xmm0
movss  0xeb1(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  0xe8a(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe86(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x10(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe56(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe4e(%rip),%xmm1
addss  %xmm1,%xmm0
movss  0xe36(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  0xe1f(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe0f(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1040 <max@plt>
mov    %eax,%edi
movss  0xdeb(%rip),%xmm0
call   1030 <min@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1040 <max@plt>
mov    %eax,%edi
movss  0xdca(%rip),%xmm0
call   1030 <min@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1040 <max@plt>
mov    %eax,%edi
movss  0xda9(%rip),%xmm0
call   1030 <min@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x24(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1040 <max@plt>
mov    %eax,%edi
movss  0xd74(%rip),%xmm0
call   1030 <min@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  0xd57(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcQuarterbackRating>:
sub    $0x18,%rsp
divss  %xmm1,%xmm0
movss  0xed0(%rip),%xmm5
mulss  %xmm5,%xmm0
addss  0xec8(%rip),%xmm0
divss  0xec4(%rip),%xmm0
divss  %xmm1,%xmm2
mulss  %xmm5,%xmm2
divss  0xeb8(%rip),%xmm2
movss  %xmm2,0x8(%rsp)
divss  %xmm1,%xmm3
mulss  %xmm5,%xmm3
movss  0xea6(%rip),%xmm5
subss  %xmm3,%xmm5
movss  0xe9e(%rip),%xmm2
mulss  %xmm2,%xmm5
movss  %xmm5,0xc(%rsp)
divss  %xmm1,%xmm4
addss  0xe8c(%rip),%xmm4
mulss  %xmm4,%xmm2
movss  %xmm2,0x14(%rsp)
xorps  %xmm1,%xmm1
call   1040 <max@plt>
movss  0xe76(%rip),%xmm0
mov    %eax,%edi
call   1030 <min@plt>
movss  %xmm0,0x10(%rsp)
xorps  %xmm1,%xmm1
movss  0x8(%rsp),%xmm0
call   1040 <max@plt>
mov    %eax,%edi
movss  0xe51(%rip),%xmm0
call   1030 <min@plt>
movss  %xmm0,0x8(%rsp)
xorps  %xmm1,%xmm1
movss  0xc(%rsp),%xmm0
call   1040 <max@plt>
mov    %eax,%edi
movss  0xe2e(%rip),%xmm0
call   1030 <min@plt>
movss  0x8(%rsp),%xmm1
addss  0x10(%rsp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,0xc(%rsp)
xorps  %xmm1,%xmm1
movss  0x14(%rsp),%xmm0
call   1040 <max@plt>
mov    %eax,%edi
movss  0xdfb(%rip),%xmm0
call   1030 <min@plt>
addss  0xc(%rsp),%xmm0
divss  0xdec(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @calcQuarterbackRating(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
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = 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
%15 = load float, float* %6
%16 = load float, float* %7
%17 = fdiv float %15, %16
%18 = call float @llvm.fmuladd.f32(float %17, float 1.000000e+02, float -3.000000e+01)
%19 = fdiv float %18, 2.000000e+01
store float %19, float* %11
%20 = load float, float* %8
%21 = load float, float* %7
%22 = fdiv float %20, %21
%23 = fmul float %22, 1.000000e+02
%24 = fdiv float %23, 5.000000e+00
store float %24, float* %12
%25 = load float, float* %9
%26 = load float, float* %7
%27 = fdiv float %25, %26
%28 = fneg float %27
%29 = call float @llvm.fmuladd.f32(float %28, float 1.000000e+02, float 9.500000e+00)
%30 = fdiv float %29, 4.000000e+00
store float %30, float* %13
%31 = load float, float* %10
%32 = load float, float* %7
%33 = fdiv float %31, %32
%34 = fsub float %33, 3.000000e+00
%35 = fdiv float %34, 4.000000e+00
store float %35, float* %14
%36 = load float, float* %11
%37 = call i32 @max(float %36, float 0.000000e+00)
%38 = call float @min(i32 %37, float 2.375000e+00)
store float %38, float* %11
%39 = load float, float* %12
%40 = call i32 @max(float %39, float 0.000000e+00)
%41 = call float @min(i32 %40, float 2.375000e+00)
store float %41, float* %12
%42 = load float, float* %13
%43 = call i32 @max(float %42, float 0.000000e+00)
%44 = call float @min(i32 %43, float 2.375000e+00)
store float %44, float* %13
%45 = load float, float* %11
%46 = load float, float* %12
%47 = fadd float %45, %46
%48 = load float, float* %13
%49 = fadd float %47, %48
%50 = load float, float* %14
%51 = call i32 @max(float %50, float 0.000000e+00)
%52 = call float @min(i32 %51, float 2.375000e+00)
%53 = fadd float %49, %52
%54 = fdiv float %53, 0x3FAEB851E0000000
ret float %54
}

LLVM IR (-O2):
define float @calcQuarterbackRating(float %0, float %1, float %2, float %3, float %4) {
%6 = fdiv float %0, %1
%7 = tail call float @llvm.fmuladd.f32(float %6, float 1.000000e+02, float -3.000000e+01)
%8 = fdiv float %7, 2.000000e+01
%9 = fdiv float %2, %1
%10 = fmul float %9, 1.000000e+02
%11 = fdiv float %10, 5.000000e+00
%12 = fneg float %3
%13 = fdiv float %12, %1
%14 = tail call float @llvm.fmuladd.f32(float %13, float 1.000000e+02, float 9.500000e+00)
%15 = fmul float %14, 2.500000e-01
%16 = fdiv float %4, %1
%17 = fadd float %16, -3.000000e+00
%18 = fmul float %17, 2.500000e-01
%19 = tail call i32 @max(float %8, float 0.000000e+00)
%20 = tail call float @min(i32 %19, float 2.375000e+00)
%21 = tail call i32 @max(float %11, float 0.000000e+00)
%22 = tail call float @min(i32 %21, float 2.375000e+00)
%23 = tail call i32 @max(float %15, float 0.000000e+00)
%24 = tail call float @min(i32 %23, float 2.375000e+00)
%25 = fadd float %20, %22
%26 = fadd float %25, %24
%27 = tail call i32 @max(float %18, float 0.000000e+00)
%28 = tail call float @min(i32 %27, float 2.375000e+00)
%29 = fadd float %26, %28
%30 = fdiv float %29, 0x3FAEB851E0000000
ret float %30
}