; LLVM IR from VT-ICAM/cfem :: cfem (cf_supg_test_function_value)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.cf_convection_s = type { [2 x double], [2 x double], [2 x double] }
%struct.cf_ref_arrays_s = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double }
%struct.cf_local_element_s = type { [3 x double], [3 x double], [4 x double], [2 x double], double, double, ptr }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local void @cf_affine_transformation(ptr noundef, ptr noundef, ptr noundef nonnull align 8, ptr noundef nonnull align 8) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
declare dso_local void @cf_physical_gradients(ptr noundef, ptr noundef, ptr noundef nonnull align 8, ptr noundef nonnull align 8) #1

; Function Attrs: nounwind uwtable
define dso_local void @cf_supg_test_function_value(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.cf_convection_s, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca %struct.cf_convection_s, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %25, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !13
  %28 = mul nsw i32 %24, %27
  %29 = zext i32 %28 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !9
  store i32 %32, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !13
  store i32 %35, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %36 = load i32, ptr %12, align 4, !tbaa !14
  %37 = load i32, ptr %13, align 4, !tbaa !14
  %38 = mul nsw i32 %36, %37
  store i32 %38, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #5
  %39 = load i32, ptr %14, align 4, !tbaa !14
  %40 = zext i32 %39 to i64
  %41 = call ptr @llvm.stacksave.p0()
  store ptr %41, ptr %16, align 8
  %42 = alloca double, i64 %40, align 16
  store i64 %40, ptr %17, align 8
  %43 = load i32, ptr %14, align 4, !tbaa !14
  %44 = zext i32 %43 to i64
  %45 = alloca double, i64 %44, align 16
  store i64 %44, ptr %18, align 8
  %46 = load i32, ptr %12, align 4, !tbaa !14
  %47 = zext i32 %46 to i64
  %48 = alloca double, i64 %47, align 16
  store i64 %47, ptr %19, align 8
  %49 = load i32, ptr %12, align 4, !tbaa !14
  %50 = zext i32 %49 to i64
  %51 = alloca double, i64 %50, align 16
  store i64 %50, ptr %20, align 8
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  call void @cf_affine_transformation(ptr noundef %52, ptr noundef %53, ptr noundef %48, ptr noundef %51)
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  call void @cf_physical_gradients(ptr noundef %54, ptr noundef %55, ptr noundef %42, ptr noundef %45)
  store i32 0, ptr %9, align 4, !tbaa !14
  br label %56

56:                                               ; preds = %115, %4
  %57 = load i32, ptr %9, align 4, !tbaa !14
  %58 = load i32, ptr %12, align 4, !tbaa !14
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %60, label %118

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 48, ptr %21) #5
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = load i32, ptr %9, align 4, !tbaa !14
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds double, ptr %48, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !15
  %66 = load i32, ptr %9, align 4, !tbaa !14
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %51, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !15
  call void %61(ptr dead_on_unwind writable sret(%struct.cf_convection_s) align 8 %21, double noundef %65, double noundef %69)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %21, i64 48, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #5
  store i32 0, ptr %10, align 4, !tbaa !14
  br label %70

70:                                               ; preds = %111, %60
  %71 = load i32, ptr %10, align 4, !tbaa !14
  %72 = load i32, ptr %13, align 4, !tbaa !14
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %114

74:                                               ; preds = %70
  %75 = load i32, ptr %10, align 4, !tbaa !14
  %76 = load i32, ptr %12, align 4, !tbaa !14
  %77 = mul nsw i32 %75, %76
  %78 = load i32, ptr %9, align 4, !tbaa !14
  %79 = add nsw i32 %77, %78
  store i32 %79, ptr %11, align 4, !tbaa !14
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %80, i32 0, i32 5
  %82 = load ptr, ptr %81, align 8, !tbaa !18
  %83 = load i32, ptr %11, align 4, !tbaa !14
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds double, ptr %82, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !15
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.cf_local_element_s, ptr %87, i32 0, i32 5
  %89 = load double, ptr %88, align 8, !tbaa !19
  %90 = getelementptr inbounds %struct.cf_convection_s, ptr %15, i32 0, i32 0
  %91 = getelementptr inbounds [2 x double], ptr %90, i64 0, i64 0
  %92 = load double, ptr %91, align 8, !tbaa !15
  %93 = load i32, ptr %11, align 4, !tbaa !14
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %42, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !15
  %97 = getelementptr inbounds %struct.cf_convection_s, ptr %15, i32 0, i32 0
  %98 = getelementptr inbounds [2 x double], ptr %97, i64 0, i64 1
  %99 = load double, ptr %98, align 8, !tbaa !15
  %100 = load i32, ptr %11, align 4, !tbaa !14
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %45, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !15
  %104 = fmul double %99, %103
  %105 = call double @llvm.fmuladd.f64(double %92, double %96, double %104)
  %106 = call double @llvm.fmuladd.f64(double %89, double %105, double %86)
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load i32, ptr %11, align 4, !tbaa !14
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  store double %106, ptr %110, align 8, !tbaa !15
  br label %111

111:                                              ; preds = %74
  %112 = load i32, ptr %10, align 4, !tbaa !14
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %10, align 4, !tbaa !14
  br label %70, !llvm.loop !21

114:                                              ; preds = %70
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %9, align 4, !tbaa !14
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %9, align 4, !tbaa !14
  br label %56, !llvm.loop !23

118:                                              ; preds = %56
  %119 = load ptr, ptr %16, align 8
  call void @llvm.stackrestore.p0(ptr %119)
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !12, i64 80}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!11, !11, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{i64 0, i64 16, !17, i64 16, i64 16, !17, i64 32, i64 16, !17}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !6, i64 32}
!19 = !{!20, !12, i64 104}
!20 = !{!"", !7, i64 0, !7, i64 24, !7, i64 48, !7, i64 80, !12, i64 96, !12, i64 104, !6, i64 112}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.cf_convection_s = type { [2 x double], [2 x double], [2 x double] }

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local void @cf_affine_transformation(ptr noundef, ptr noundef, ptr noundef nonnull align 8, ptr noundef nonnull align 8) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
declare dso_local void @cf_physical_gradients(ptr noundef, ptr noundef, ptr noundef nonnull align 8, ptr noundef nonnull align 8) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @cf_supg_test_function_value(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef nonnull writeonly align 8 %3) local_unnamed_addr #1 {
  %5 = alloca %struct.cf_convection_s, align 8
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !12
  %.fr40 = freeze i32 %8
  %9 = mul nsw i32 %.fr40, %6
  %10 = zext i32 %9 to i64
  %11 = alloca double, i64 %10, align 16
  %12 = alloca double, i64 %10, align 16
  %13 = zext i32 %6 to i64
  %14 = alloca double, i64 %13, align 16
  %15 = alloca double, i64 %13, align 16
  call void @cf_affine_transformation(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %14, ptr noundef %15)
  call void @cf_physical_gradients(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %11, ptr noundef %12)
  %16 = icmp sgt i32 %6, 0
  br i1 %16, label %.lr.ph38, label %._crit_edge39

.lr.ph38:                                         ; preds = %4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %17 = icmp sgt i32 %.fr40, 0
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  %19 = getelementptr i8, ptr %1, i64 104
  br i1 %17, label %.lr.ph.us.preheader, label %.lr.ph38.split

.lr.ph.us.preheader:                              ; preds = %.lr.ph38
  %wide.trip.count46 = zext nneg i32 %.fr40 to i64
  %20 = add nuw nsw i64 %13, %wide.trip.count46
  %21 = shl nuw nsw i64 %20, 3
  %22 = add nsw i64 %21, -8
  %scevgep = getelementptr i8, ptr %3, i64 %22
  %scevgep57 = getelementptr i8, ptr %1, i64 112
  %scevgep58 = getelementptr i8, ptr %11, i64 %22
  %scevgep59 = getelementptr i8, ptr %12, i64 %22
  %min.iters.check = icmp ugt i32 %.fr40, 5
  %ident.check.not = icmp eq i32 %6, 1
  %or.cond = select i1 %min.iters.check, i1 %ident.check.not, i1 false
  %bound060 = icmp ugt ptr %scevgep57, %3
  %bound161 = icmp ult ptr %19, %scevgep
  %found.conflict62 = and i1 %bound060, %bound161
  %bound063 = icmp ugt ptr %scevgep58, %3
  %bound164 = icmp ult ptr %11, %scevgep
  %found.conflict65 = and i1 %bound063, %bound164
  %bound067 = icmp ugt ptr %scevgep59, %3
  %bound168 = icmp ult ptr %12, %scevgep
  %found.conflict69 = and i1 %bound067, %bound168
  %n.vec = and i64 %wide.trip.count46, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count46
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv48 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next49, %._crit_edge.us ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  %23 = getelementptr inbounds double, ptr %14, i64 %indvars.iv48
  %24 = load double, ptr %23, align 8, !tbaa !13
  %25 = getelementptr inbounds double, ptr %15, i64 %indvars.iv48
  %26 = load double, ptr %25, align 8, !tbaa !13
  call void %2(ptr dead_on_unwind nonnull writable sret(%struct.cf_convection_s) align 8 %5, double noundef %24, double noundef %26) #4
  %.sroa.0.0.copyload.us = load double, ptr %5, align 8
  %.sroa.4.0.copyload.us = load double, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  %27 = load ptr, ptr %18, align 8, !tbaa !15
  br i1 %or.cond, label %vector.memcheck, label %scalar.ph.preheader

vector.memcheck:                                  ; preds = %.lr.ph.us
  %28 = add nuw i64 %indvars.iv48, %wide.trip.count46
  %29 = shl i64 %28, 3
  %30 = shl nuw nsw i64 %indvars.iv48, 3
  %scevgep55 = getelementptr i8, ptr %27, i64 %30
  %scevgep56 = getelementptr i8, ptr %27, i64 %29
  %bound0 = icmp ugt ptr %scevgep56, %3
  %bound1 = icmp ult ptr %scevgep55, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %conflict.rdx = or i1 %found.conflict, %found.conflict62
  %conflict.rdx66 = or i1 %conflict.rdx, %found.conflict65
  %conflict.rdx70 = or i1 %conflict.rdx66, %found.conflict69
  br i1 %conflict.rdx70, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %broadcast.splatinsert = insertelement <2 x double> poison, double %.sroa.4.0.copyload.us, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert76 = insertelement <2 x double> poison, double %.sroa.0.0.copyload.us, i64 0
  %broadcast.splat77 = shufflevector <2 x double> %broadcast.splatinsert76, <2 x double> poison, <2 x i32> zeroinitializer
  %31 = load double, ptr %19, align 8, !tbaa !16, !alias.scope !18
  %broadcast.splatinsert80 = insertelement <2 x double> poison, double %31, i64 0
  %broadcast.splat81 = shufflevector <2 x double> %broadcast.splatinsert80, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %32 = add nuw nsw i64 %index, %indvars.iv48
  %33 = getelementptr inbounds double, ptr %27, i64 %32
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %wide.load = load <2 x double>, ptr %33, align 8, !tbaa !13, !alias.scope !21
  %wide.load71 = load <2 x double>, ptr %34, align 8, !tbaa !13, !alias.scope !21
  %35 = getelementptr inbounds double, ptr %11, i64 %32
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %wide.load72 = load <2 x double>, ptr %35, align 8, !tbaa !13, !alias.scope !23
  %wide.load73 = load <2 x double>, ptr %36, align 8, !tbaa !13, !alias.scope !23
  %37 = getelementptr inbounds double, ptr %12, i64 %32
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load74 = load <2 x double>, ptr %37, align 8, !tbaa !13, !alias.scope !25
  %wide.load75 = load <2 x double>, ptr %38, align 8, !tbaa !13, !alias.scope !25
  %39 = fmul <2 x double> %broadcast.splat, %wide.load74
  %40 = fmul <2 x double> %broadcast.splat, %wide.load75
  %41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat77, <2 x double> %wide.load72, <2 x double> %39)
  %42 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat77, <2 x double> %wide.load73, <2 x double> %40)
  %43 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat81, <2 x double> %41, <2 x double> %wide.load)
  %44 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat81, <2 x double> %42, <2 x double> %wide.load71)
  %45 = getelementptr inbounds double, ptr %3, i64 %32
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  store <2 x double> %43, ptr %45, align 8, !tbaa !13, !alias.scope !27, !noalias !29
  store <2 x double> %44, ptr %46, align 8, !tbaa !13, !alias.scope !27, !noalias !29
  %index.next = add nuw i64 %index, 4
  %47 = icmp eq i64 %index.next, %n.vec
  br i1 %47, label %middle.block, label %vector.body, !llvm.loop !30

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph.us
  %indvars.iv43.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv43 = phi i64 [ %indvars.iv.next44, %scalar.ph ], [ %indvars.iv43.ph, %scalar.ph.preheader ]
  %48 = mul nuw nsw i64 %indvars.iv43, %13
  %49 = add nuw nsw i64 %48, %indvars.iv48
  %50 = getelementptr inbounds double, ptr %27, i64 %49
  %51 = load double, ptr %50, align 8, !tbaa !13
  %52 = load double, ptr %19, align 8, !tbaa !16
  %53 = getelementptr inbounds double, ptr %11, i64 %49
  %54 = load double, ptr %53, align 8, !tbaa !13
  %55 = getelementptr inbounds double, ptr %12, i64 %49
  %56 = load double, ptr %55, align 8, !tbaa !13
  %57 = fmul double %.sroa.4.0.copyload.us, %56
  %58 = call double @llvm.fmuladd.f64(double %.sroa.0.0.copyload.us, double %54, double %57)
  %59 = call double @llvm.fmuladd.f64(double %52, double %58, double %51)
  %60 = getelementptr inbounds double, ptr %3, i64 %49
  store double %59, ptr %60, align 8, !tbaa !13
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond47.not = icmp eq i64 %indvars.iv.next44, %wide.trip.count46
  br i1 %exitcond47.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !34

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %exitcond52.not = icmp eq i64 %indvars.iv.next49, %13
  br i1 %exitcond52.not, label %._crit_edge39, label %.lr.ph.us, !llvm.loop !35

.lr.ph38.split:                                   ; preds = %.lr.ph38, %.lr.ph38.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph38.split ], [ 0, %.lr.ph38 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  %61 = getelementptr inbounds double, ptr %14, i64 %indvars.iv
  %62 = load double, ptr %61, align 8, !tbaa !13
  %63 = getelementptr inbounds double, ptr %15, i64 %indvars.iv
  %64 = load double, ptr %63, align 8, !tbaa !13
  call void %2(ptr dead_on_unwind nonnull writable sret(%struct.cf_convection_s) align 8 %5, double noundef %62, double noundef %64) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %13
  br i1 %exitcond.not, label %._crit_edge39, label %.lr.ph38.split, !llvm.loop !35

._crit_edge39:                                    ; preds = %.lr.ph38.split, %._crit_edge.us, %4
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !11, i64 80}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!11, !11, i64 0}
!14 = !{!8, !8, i64 0}
!15 = !{!6, !10, i64 32}
!16 = !{!17, !11, i64 104}
!17 = !{!"", !8, i64 0, !8, i64 24, !8, i64 48, !8, i64 80, !11, i64 96, !11, i64 104, !10, i64 112}
!18 = !{!19}
!19 = distinct !{!19, !20}
!20 = distinct !{!20, !"LVerDomain"}
!21 = !{!22}
!22 = distinct !{!22, !20}
!23 = !{!24}
!24 = distinct !{!24, !20}
!25 = !{!26}
!26 = distinct !{!26, !20}
!27 = !{!28}
!28 = distinct !{!28, !20}
!29 = !{!22, !19, !24, !26}
!30 = distinct !{!30, !31, !32, !33}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!"llvm.loop.isvectorized", i32 1}
!33 = !{!"llvm.loop.unroll.runtime.disable"}
!34 = distinct !{!34, !31, !32}
!35 = distinct !{!35, !31}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass