#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 sin(float);
float calculate_sod_factor_alt(float urgency, float complexity,
                               float importance, float skill, float frequency) {
  float step_1 = urgency + complexity + importance;
  float step_2 = 10.0f - skill;
  float step_3 = (step_1 * step_2) / 20.0f;
  float step_4 = frequency / 10.0f;
  float step_5 = sin(step_4);
  float step_6 = 1 / step_5;
  float step_7 = (step_3 * 0.7) * step_6;
  return step_7 / 10.0f;
}


x86 assembly (clang, -O0):
<calculate_sod_factor_alt>:
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
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xeb3(%rip),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  0xe9f(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xe81(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
call   1030 <sin@plt>
movss  %xmm0,-0x28(%rbp)
movss  0xe65(%rip),%xmm0
divss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe56(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
movss  0xe1f(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_sod_factor_alt>:
push   %rax
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
movss  0xedf(%rip),%xmm1
movaps %xmm1,%xmm2
subss  %xmm3,%xmm2
mulss  %xmm0,%xmm2
divss  0xed0(%rip),%xmm2
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm4
movaps %xmm4,%xmm0
call   1030 <sin@plt>
movss  0xeba(%rip),%xmm1
divss  %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeac(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
divss  0xe85(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @calculate_sod_factor_alt(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
%15 = alloca float
%16 = alloca float
%17 = 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
%18 = load float, float* %6
%19 = load float, float* %7
%20 = fadd float %18, %19
%21 = load float, float* %8
%22 = fadd float %20, %21
store float %22, float* %11
%23 = load float, float* %9
%24 = fsub float 1.000000e+01, %23
store float %24, float* %12
%25 = load float, float* %11
%26 = load float, float* %12
%27 = fmul float %25, %26
%28 = fdiv float %27, 2.000000e+01
store float %28, float* %13
%29 = load float, float* %10
%30 = fdiv float %29, 1.000000e+01
store float %30, float* %14
%31 = load float, float* %14
%32 = call float @sin(float %31)
store float %32, float* %15
%33 = load float, float* %15
%34 = fdiv float 1.000000e+00, %33
store float %34, float* %16
%35 = load float, float* %13
%36 = fpext float %35 to double
%37 = fmul double %36, 0x3FE6666666666666
%38 = load float, float* %16
%39 = fpext float %38 to double
%40 = fmul double %37, %39
%41 = fptrunc double %40 to float
store float %41, float* %17
%42 = load float, float* %17
%43 = fdiv float %42, 1.000000e+01
ret float %43
}

LLVM IR (-O2):
define float @calculate_sod_factor_alt(float %0, float %1, float %2, float %3, float %4) {
%6 = fadd float %0, %1
%7 = fadd float %6, %2
%8 = fsub float 1.000000e+01, %3
%9 = fmul float %7, %8
%10 = fdiv float %9, 2.000000e+01
%11 = fdiv float %4, 1.000000e+01
%12 = tail call float @sin(float %11)
%13 = fdiv float 1.000000e+00, %12
%14 = fpext float %10 to double
%15 = fmul double %14, 0x3FE6666666666666
%16 = fpext float %13 to double
%17 = fmul double %15, %16
%18 = fptrunc double %17 to float
%19 = fdiv float %18, 1.000000e+01
ret float %19
}