#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 pow(int, int);
float strict_sigmoid(float x, float inflect) {
  if (x < inflect) {
    return (inflect / 0.25) * pow(x / (2 * inflect), 2);
  } else {
    float omi = (1 - inflect);
    return 1 - (omi / 0.25) * pow((1 - x) / (2 * omi), 2);
  }
}


x86 assembly (clang, -O0):
<strict_sigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1191 <strict_sigmoid+0x81>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xeb4(%rip),%xmm1
mulss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1225 <strict_sigmoid+0x115>
movss  0xe7b(%rip),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe54(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  0xe4f(%rip),%xmm0
subss  -0x8(%rbp),%xmm0
movss  0xe3e(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
cvtss2sd %xmm1,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xde8(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strict_sigmoid>:
push   %rax
ucomiss %xmm0,%xmm1
jbe    1148 <strict_sigmoid+0x38>
cvtss2sd %xmm1,%xmm2
mulsd  0xef6(%rip),%xmm2
movsd  %xmm2,(%rsp)
addss  %xmm1,%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
cvtss2sd %xmm0,%xmm0
mulsd  (%rsp),%xmm0
jmp    119e <strict_sigmoid+0x8e>
movss  0xeb0(%rip),%xmm2
movaps %xmm2,%xmm3
subss  %xmm1,%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
movsd  %xmm1,(%rsp)
subss  %xmm0,%xmm2
addss  %xmm3,%xmm3
divss  %xmm3,%xmm2
cvttss2si %xmm2,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
mulsd  0xe7e(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addsd  0xe72(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @strict_sigmoid(float %0, float %1) {
%3 = fcmp olt float %0, %1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = fpext float %1 to double
%6 = fmul double %5, 4.000000e+00
%7 = fmul float %1, 2.000000e+00
%8 = fdiv float %0, %7
%9 = fptosi float %8 to i32
%10 = tail call float @pow(i32 %9, i32 2)
%11 = fpext float %10 to double
%12 = fmul double %6, %11
br label %24
13: ; preds = %2
%14 = fsub float 1.000000e+00, %1
%15 = fpext float %14 to double
%16 = fsub float 1.000000e+00, %0
%17 = fmul float %14, 2.000000e+00
%18 = fdiv float %16, %17
%19 = fptosi float %18 to i32
%20 = tail call float @pow(i32 %19, i32 2)
%21 = fpext float %20 to double
%22 = fmul double %15, -4.000000e+00
%23 = tail call double @llvm.fmuladd.f64(double %22, double %21, double 1.000000e+00)
br label %24
24: ; preds = %13, %4
%25 = phi double [ %12, %4 ], [ %23, %13 ]
%26 = fptrunc double %25 to float
ret float %26
}