void propagate(float *input, float *output) {
  output[0] = ((((((input[0]) > 0.f) ? 1.f : -1.f) * 0.125 +
                 (((input[1]) > 0.f) ? 1.f : -1.f) * 0.5) > 0.f)
                   ? 1.f
                   : -1.f) *
                  -0.125 +
              ((((((input[0]) > 0.f) ? 1.f : -1.f) * -0.5 +
                 (((input[1]) > 0.f) ? 1.f : -1.f) * -0.5) > 0.f)
                   ? 1.f
                   : -1.f) *
                  -1 +
              ((((((input[0]) > 0.f) ? 1.f : -1.f) * 1 +
                 (((input[1]) > 0.f) ? 1.f : -1.f) * 0) > 0.f)
                   ? 1.f
                   : -1.f) *
                  -0.875;
}


x86 assembly (clang, -O0):
<propagate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
movss  0xf0c(%rip),%xmm3
movss  0xf08(%rip),%xmm2
xorps  %xmm0,%xmm0
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm2
movss  0xedb(%rip),%xmm4
movss  0xed7(%rip),%xmm3
xorps  %xmm0,%xmm0
cmpltss %xmm2,%xmm0
movaps %xmm0,%xmm2
andps  %xmm4,%xmm2
andnps %xmm3,%xmm0
orps   %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeab(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xe97(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm2,%xmm2
movss  0xe94(%rip),%xmm0
movss  0xe90(%rip),%xmm3
movss  %xmm3,-0x18(%rbp)
ucomisd %xmm2,%xmm1
movss  %xmm0,-0x14(%rbp)
ja     11ba <propagate+0xba>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
movss  0xe50(%rip),%xmm3
movss  0xe4c(%rip),%xmm2
xorps  %xmm0,%xmm0
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm2
movss  0xe1f(%rip),%xmm4
movss  0xe1b(%rip),%xmm3
xorps  %xmm0,%xmm0
cmpltss %xmm2,%xmm0
movaps %xmm0,%xmm2
andps  %xmm4,%xmm2
andnps %xmm3,%xmm0
orps   %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xddf(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xdd3(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm2,%xmm2
movss  0xdd8(%rip),%xmm0
movss  0xdd4(%rip),%xmm3
movss  %xmm3,-0x20(%rbp)
ucomisd %xmm2,%xmm1
movss  %xmm0,-0x1c(%rbp)
ja     1276 <propagate+0x176>
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movsd  -0x28(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
movss  0xda4(%rip),%xmm2
mulss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd70(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  0xd78(%rip),%xmm4
movss  0xd74(%rip),%xmm3
xorps  %xmm2,%xmm2
cmpltss %xmm0,%xmm2
movaps %xmm2,%xmm0
andps  %xmm4,%xmm0
andnps %xmm3,%xmm2
orps   %xmm0,%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm3
movss  0xd4b(%rip),%xmm5
movss  0xd47(%rip),%xmm4
xorps  %xmm0,%xmm0
cmpltss %xmm3,%xmm0
movaps %xmm0,%xmm3
andps  %xmm5,%xmm3
andnps %xmm4,%xmm0
orps   %xmm3,%xmm0
xorps  %xmm3,%xmm3
mulss  %xmm3,%xmm0
addss  %xmm0,%xmm2
movss  0xd1c(%rip),%xmm4
movss  0xd18(%rip),%xmm3
xorps  %xmm0,%xmm0
cmpltss %xmm2,%xmm0
movaps %xmm0,%xmm2
andps  %xmm4,%xmm2
andnps %xmm3,%xmm0
orps   %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xccc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<propagate>:
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
cmpltss (%rdi),%xmm3
movss  0xeed(%rip),%xmm1
movaps %xmm3,%xmm4
andps  %xmm1,%xmm4
movss  0xee3(%rip),%xmm2
andnps %xmm2,%xmm3
orps   %xmm4,%xmm3
xorps  %xmm4,%xmm4
cmpltss 0x4(%rdi),%xmm4
cvtss2sd %xmm3,%xmm5
movaps %xmm4,%xmm6
andps  %xmm1,%xmm6
andnps %xmm2,%xmm4
orps   %xmm6,%xmm4
xorps  %xmm6,%xmm6
cvtss2sd %xmm4,%xmm6
movlhps %xmm6,%xmm6
mulpd  0xebe(%rip),%xmm6
movlhps %xmm5,%xmm5
mulpd  0xec3(%rip),%xmm5
addpd  %xmm6,%xmm5
xorpd  %xmm6,%xmm6
cmpltpd %xmm5,%xmm6
movmskpd %xmm6,%eax
mov    %eax,%ecx
shr    %cl
movzbl %cl,%ecx
lea    0xeb4(%rip),%rdx
movsd  (%rdx,%rcx,8),%xmm5
and    $0x1,%eax
lea    0xeb5(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm5
mulss  %xmm0,%xmm4
addss  %xmm3,%xmm4
cmpltss %xmm4,%xmm0
andps  %xmm0,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe9e(%rip),%xmm0
addsd  %xmm5,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @propagate(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = fcmp ogt float %7, 0.000000e+00
%9 = zext i1 %8 to i64
%10 = select i1 %8, float 1.000000e+00, float -1.000000e+00
%11 = fpext float %10 to double
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fcmp ogt float %14, 0.000000e+00
%16 = zext i1 %15 to i64
%17 = select i1 %15, float 1.000000e+00, float -1.000000e+00
%18 = fpext float %17 to double
%19 = fmul double %18, 5.000000e-01
%20 = call double @llvm.fmuladd.f64(double %11, double 1.250000e-01, double %19)
%21 = fcmp ogt double %20, 0.000000e+00
%22 = zext i1 %21 to i64
%23 = select i1 %21, float 1.000000e+00, float -1.000000e+00
%24 = fpext float %23 to double
%25 = load float*, float** %3
%26 = getelementptr inbounds float, float* %25, i64 0
%27 = load float, float* %26
%28 = fcmp ogt float %27, 0.000000e+00
%29 = zext i1 %28 to i64
%30 = select i1 %28, float 1.000000e+00, float -1.000000e+00
%31 = fpext float %30 to double
%32 = load float*, float** %3
%33 = getelementptr inbounds float, float* %32, i64 1
%34 = load float, float* %33
%35 = fcmp ogt float %34, 0.000000e+00
%36 = zext i1 %35 to i64
%37 = select i1 %35, float 1.000000e+00, float -1.000000e+00
%38 = fpext float %37 to double
%39 = fmul double %38, -5.000000e-01
%40 = call double @llvm.fmuladd.f64(double %31, double -5.000000e-01, double %39)
%41 = fcmp ogt double %40, 0.000000e+00
%42 = zext i1 %41 to i64
%43 = select i1 %41, float 1.000000e+00, float -1.000000e+00
%44 = fmul float %43, -1.000000e+00
%45 = fpext float %44 to double
%46 = call double @llvm.fmuladd.f64(double %24, double -1.250000e-01, double %45)
%47 = load float*, float** %3
%48 = getelementptr inbounds float, float* %47, i64 0
%49 = load float, float* %48
%50 = fcmp ogt float %49, 0.000000e+00
%51 = zext i1 %50 to i64
%52 = select i1 %50, float 1.000000e+00, float -1.000000e+00
%53 = load float*, float** %3
%54 = getelementptr inbounds float, float* %53, i64 1
%55 = load float, float* %54
%56 = fcmp ogt float %55, 0.000000e+00
%57 = zext i1 %56 to i64
%58 = select i1 %56, float 1.000000e+00, float -1.000000e+00
%59 = fmul float %58, 0.000000e+00
%60 = call float @llvm.fmuladd.f32(float %52, float 1.000000e+00, float %59)
%61 = fcmp ogt float %60, 0.000000e+00
%62 = zext i1 %61 to i64
%63 = select i1 %61, float 1.000000e+00, float -1.000000e+00
%64 = fpext float %63 to double
%65 = call double @llvm.fmuladd.f64(double %64, double -8.750000e-01, double %46)
%66 = fptrunc double %65 to float
%67 = load float*, float** %4
%68 = getelementptr inbounds float, float* %67, i64 0
store float %66, float* %68
ret void
}

LLVM IR (-O2):
define void @propagate(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = fcmp ogt float %3, 0.000000e+00
%5 = select i1 %4, float 1.000000e+00, float -1.000000e+00
%6 = fpext float %5 to double
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = fcmp ogt float %8, 0.000000e+00
%10 = select i1 %9, float 1.000000e+00, float -1.000000e+00
%11 = fpext float %10 to double
%12 = insertelement <2 x double> poison, double %11, i64 0
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> zeroinitializer
%14 = fmul <2 x double> %13, <double -5.000000e-01, double 5.000000e-01>
%15 = insertelement <2 x double> poison, double %6, i64 0
%16 = shufflevector <2 x double> %15, <2 x double> poison, <2 x i32> zeroinitializer
%17 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> <double -5.000000e-01, double 1.250000e-01>, <2 x double> %14)
%18 = fcmp ogt <2 x double> %17, zeroinitializer
%19 = extractelement <2 x i1> %18, i64 1
%20 = select i1 %19, double 1.000000e+00, double -1.000000e+00
%21 = extractelement <2 x i1> %18, i64 0
%22 = select i1 %21, double -1.000000e+00, double 1.000000e+00
%23 = tail call double @llvm.fmuladd.f64(double %20, double -1.250000e-01, double %22)
%24 = fmul float %10, 0.000000e+00
%25 = fadd float %5, %24
%26 = fcmp ogt float %25, 0.000000e+00
%27 = select i1 %26, float 1.000000e+00, float -1.000000e+00
%28 = fpext float %27 to double
%29 = tail call double @llvm.fmuladd.f64(double %28, double -8.750000e-01, double %23)
%30 = fptrunc double %29 to float
store float %30, float* %1
ret void
}