void __attribute__((noipa)) f_0(double *restrict a, double *restrict b,
                                double *restrict c, double *restrict d) {
  for (int i = 0; i < (128 * 11 / 64 + 3); ++i) {
    double mb = (0 & 1 ? -b[i] : b[i]);
    double mc = c[i];
    double md = (0 & 2 ? -d[i] : d[i]);
    double fma = __builtin_fma(mb, mc, md);
    double truev = (0 & 4 ? -fma : fma);
    a[i] = b[i] < 10 ? truev : 10.0;
  }
}


x86 assembly (clang, -O0):
<f_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x19,-0x24(%rbp)
jge    11ee <f_0+0xde>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
call   1030 <fma@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  0xe5e(%rip),%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    11bc <f_0+0xac>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    11ce <f_0+0xbe>
movsd  0xe3c(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    11ce <f_0+0xbe>
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112f <f_0+0x1f>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_0>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%r14
mov    $0x2,%ebx
xchg   %ax,%ax
movups -0x10(%r13,%rbx,8),%xmm0
movaps %xmm0,(%rsp)
movups -0x10(%r12,%rbx,8),%xmm1
movaps %xmm1,0x10(%rsp)
movups -0x10(%r15,%rbx,8),%xmm2
movaps %xmm2,0x20(%rsp)
call   1030 <fma@plt>
movaps %xmm0,0x30(%rsp)
movapd (%rsp),%xmm0
unpckhpd %xmm0,%xmm0
movaps 0x10(%rsp),%xmm1
movhlps %xmm1,%xmm1
movaps 0x20(%rsp),%xmm2
movhlps %xmm2,%xmm2
call   1030 <fma@plt>
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd 0xe76(%rip),%xmm0
movapd (%rsp),%xmm1
cmpltpd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movupd %xmm1,-0x10(%r14,%rbx,8)
movups 0x0(%r13,%rbx,8),%xmm0
movaps %xmm0,(%rsp)
movups (%r12,%rbx,8),%xmm1
movaps %xmm1,0x10(%rsp)
movups (%r15,%rbx,8),%xmm2
movaps %xmm2,0x20(%rsp)
call   1030 <fma@plt>
movaps %xmm0,0x30(%rsp)
movapd (%rsp),%xmm0
unpckhpd %xmm0,%xmm0
movaps 0x10(%rsp),%xmm1
movhlps %xmm1,%xmm1
movaps 0x20(%rsp),%xmm2
movhlps %xmm2,%xmm2
call   1030 <fma@plt>
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd 0xe01(%rip),%xmm0
movapd (%rsp),%xmm1
cmpltpd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movupd %xmm1,(%r14,%rbx,8)
add    $0x4,%rbx
cmp    $0x1a,%rbx
jne    1130 <f_0+0x20>
movsd  0xc0(%r13),%xmm0
movsd  0xdd6(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    125c <f_0+0x14c>
movsd  0xc0(%r12),%xmm1
movsd  0xc0(%r15),%xmm2
call   1030 <fma@plt>
movapd %xmm0,%xmm1
movsd  %xmm1,0xc0(%r14)
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @f_0(double* noalias %0, double* noalias %1, double* noalias %2, double* noalias %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
br label %15
15: ; preds = %54, %4
%16 = load i32, i32* %9
%17 = icmp slt i32 %16, 25
br i1 %17, label %18, label %57
18: ; preds = %15
%19 = load double*, double** %6
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %19, i64 %21
%23 = load double, double* %22
store double %23, double* %10
%24 = load double*, double** %7
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
%28 = load double, double* %27
store double %28, double* %11
%29 = load double*, double** %8
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %29, i64 %31
%33 = load double, double* %32
store double %33, double* %12
%34 = load double, double* %10
%35 = load double, double* %11
%36 = load double, double* %12
%37 = call double @llvm.fma.f64(double %34, double %35, double %36)
store double %37, double* %13
%38 = load double, double* %13
store double %38, double* %14
%39 = load double*, double** %6
%40 = load i32, i32* %9
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %39, i64 %41
%43 = load double, double* %42
%44 = fcmp olt double %43, 1.000000e+01
br i1 %44, label %45, label %47
45: ; preds = %18
%46 = load double, double* %14
br label %48
47: ; preds = %18
br label %48
48: ; preds = %47, %45
%49 = phi double [ %46, %45 ], [ 1.000000e+01, %47 ]
%50 = load double*, double** %5
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double %49, double* %53
br label %54
54: ; preds = %48
%55 = load i32, i32* %9
%56 = add nsw i32 %55, 1
store i32 %56, i32* %9
br label %15
57: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @f_0(double* noalias nocapture writeonly %0, double* noalias nocapture %1, double* noalias nocapture %2, double* noalias nocapture %3) {
br label %5
5: ; preds = %5, %4
%6 = phi i64 [ 0, %4 ], [ %36, %5 ]
%7 = getelementptr inbounds double, double* %1, i64 %6
%8 = bitcast double* %7 to <2 x double>*
%9 = load <2 x double>, <2 x double>* %8
%10 = getelementptr inbounds double, double* %2, i64 %6
%11 = bitcast double* %10 to <2 x double>*
%12 = load <2 x double>, <2 x double>* %11
%13 = getelementptr inbounds double, double* %3, i64 %6
%14 = bitcast double* %13 to <2 x double>*
%15 = load <2 x double>, <2 x double>* %14
%16 = call <2 x double> @llvm.fma.v2f64(<2 x double> %9, <2 x double> %12, <2 x double> %15)
%17 = fcmp olt <2 x double> %9, <double 1.000000e+01, double 1.000000e+01>
%18 = select <2 x i1> %17, <2 x double> %16, <2 x double> <double 1.000000e+01, double 1.000000e+01>
%19 = getelementptr inbounds double, double* %0, i64 %6
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> %18, <2 x double>* %20
%21 = or i64 %6, 2
%22 = getelementptr inbounds double, double* %1, i64 %21
%23 = bitcast double* %22 to <2 x double>*
%24 = load <2 x double>, <2 x double>* %23
%25 = getelementptr inbounds double, double* %2, i64 %21
%26 = bitcast double* %25 to <2 x double>*
%27 = load <2 x double>, <2 x double>* %26
%28 = getelementptr inbounds double, double* %3, i64 %21
%29 = bitcast double* %28 to <2 x double>*
%30 = load <2 x double>, <2 x double>* %29
%31 = call <2 x double> @llvm.fma.v2f64(<2 x double> %24, <2 x double> %27, <2 x double> %30)
%32 = fcmp olt <2 x double> %24, <double 1.000000e+01, double 1.000000e+01>
%33 = select <2 x i1> %32, <2 x double> %31, <2 x double> <double 1.000000e+01, double 1.000000e+01>
%34 = getelementptr inbounds double, double* %0, i64 %21
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> %33, <2 x double>* %35
%36 = add nuw nsw i64 %6, 4
%37 = icmp eq i64 %36, 24
br i1 %37, label %38, label %5
38: ; preds = %5
%39 = getelementptr inbounds double, double* %1, i64 24
%40 = load double, double* %39
%41 = getelementptr inbounds double, double* %2, i64 24
%42 = load double, double* %41
%43 = getelementptr inbounds double, double* %3, i64 24
%44 = load double, double* %43
%45 = tail call double @llvm.fma.f64(double %40, double %42, double %44)
%46 = fcmp olt double %40, 1.000000e+01
%47 = select i1 %46, double %45, double 1.000000e+01
%48 = getelementptr inbounds double, double* %0, i64 24
store double %47, double* %48
ret void
}