; LLVM IR from sourceryinstitute/MORFEUS-Source :: src/FV/src/mesh_optimize/OptMS (SMoptimize)

; 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.__SMoptimal = type { i32, i32, i32, i32, i32, i32, i32, double, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, [3 x double], double, double, ptr, ptr, ptr, ptr, [3 x i32], i32 }

@.str.1 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1

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

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

; 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
define dso_local i32 @SMgetGradientProjections(ptr noundef %0) #2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %12

10:                                               ; preds = %1
  %11 = call i32 @SMerror(i32 noundef 716, ptr noundef @.str.7, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %11, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %156

12:                                               ; preds = %1
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %152, %12
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.__SMoptimal, ptr %15, i32 0, i32 9
  %17 = load i32, ptr %16, align 4, !tbaa !11
  %18 = icmp slt i32 %14, %17
  br i1 %18, label %19, label %155

19:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.__SMoptimal, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !14
  %23 = icmp eq i32 %22, 2
  br i1 %23, label %24, label %59

24:                                               ; preds = %19
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.__SMoptimal, ptr %25, i32 0, i32 11
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds ptr, ptr %27, i64 %29
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %31, i64 0
  %33 = load double, ptr %32, align 8, !tbaa !16
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.__SMoptimal, ptr %34, i32 0, i32 18
  %36 = getelementptr inbounds [3 x double], ptr %35, i64 0, i64 0
  %37 = load double, ptr %36, align 8, !tbaa !16
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.__SMoptimal, ptr %38, i32 0, i32 11
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds ptr, ptr %40, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds double, ptr %44, i64 1
  %46 = load double, ptr %45, align 8, !tbaa !16
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.__SMoptimal, ptr %47, i32 0, i32 18
  %49 = getelementptr inbounds [3 x double], ptr %48, i64 0, i64 1
  %50 = load double, ptr %49, align 8, !tbaa !16
  %51 = fmul double %46, %50
  %52 = call double @llvm.fmuladd.f64(double %33, double %37, double %51)
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.__SMoptimal, ptr %53, i32 0, i32 21
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %55, i64 %57
  store double %52, ptr %58, align 8, !tbaa !16
  br label %151

59:                                               ; preds = %19
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.__SMoptimal, ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 8, !tbaa !14
  %63 = icmp eq i32 %62, 3
  br i1 %63, label %64, label %113

64:                                               ; preds = %59
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.__SMoptimal, ptr %65, i32 0, i32 11
  %67 = load ptr, ptr %66, align 8, !tbaa !15
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds ptr, ptr %67, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds double, ptr %71, i64 0
  %73 = load double, ptr %72, align 8, !tbaa !16
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.__SMoptimal, ptr %74, i32 0, i32 18
  %76 = getelementptr inbounds [3 x double], ptr %75, i64 0, i64 0
  %77 = load double, ptr %76, align 8, !tbaa !16
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.__SMoptimal, ptr %78, i32 0, i32 11
  %80 = load ptr, ptr %79, align 8, !tbaa !15
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %84, i64 1
  %86 = load double, ptr %85, align 8, !tbaa !16
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.__SMoptimal, ptr %87, i32 0, i32 18
  %89 = getelementptr inbounds [3 x double], ptr %88, i64 0, i64 1
  %90 = load double, ptr %89, align 8, !tbaa !16
  %91 = fmul double %86, %90
  %92 = call double @llvm.fmuladd.f64(double %73, double %77, double %91)
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.__SMoptimal, ptr %93, i32 0, i32 11
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  %96 = load i32, ptr %5, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds double, ptr %99, i64 2
  %101 = load double, ptr %100, align 8, !tbaa !16
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.__SMoptimal, ptr %102, i32 0, i32 18
  %104 = getelementptr inbounds [3 x double], ptr %103, i64 0, i64 2
  %105 = load double, ptr %104, align 8, !tbaa !16
  %106 = call double @llvm.fmuladd.f64(double %101, double %105, double %92)
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.__SMoptimal, ptr %107, i32 0, i32 21
  %109 = load ptr, ptr %108, align 8, !tbaa !17
  %110 = load i32, ptr %5, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  store double %106, ptr %112, align 8, !tbaa !16
  br label %150

113:                                              ; preds = %59
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %146, %113
  %115 = load i32, ptr %7, align 4, !tbaa !9
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.__SMoptimal, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !14
  %119 = icmp slt i32 %115, %118
  br i1 %119, label %120, label %149

120:                                              ; preds = %114
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.__SMoptimal, ptr %121, i32 0, i32 11
  %123 = load ptr, ptr %122, align 8, !tbaa !15
  %124 = load i32, ptr %5, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds ptr, ptr %123, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !5
  %128 = load i32, ptr %7, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %127, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !16
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.__SMoptimal, ptr %132, i32 0, i32 18
  %134 = load i32, ptr %7, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [3 x double], ptr %133, i64 0, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !16
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.__SMoptimal, ptr %138, i32 0, i32 21
  %140 = load ptr, ptr %139, align 8, !tbaa !17
  %141 = load i32, ptr %5, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !16
  %145 = call double @llvm.fmuladd.f64(double %131, double %137, double %144)
  store double %145, ptr %143, align 8, !tbaa !16
  br label %146

146:                                              ; preds = %120
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %7, align 4, !tbaa !9
  br label %114, !llvm.loop !18

149:                                              ; preds = %114
  br label %150

150:                                              ; preds = %149, %64
  br label %151

151:                                              ; preds = %150, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %5, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %5, align 4, !tbaa !9
  br label %13, !llvm.loop !20

155:                                              ; preds = %13
  store i32 0, ptr %4, align 4, !tbaa !9
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %156

156:                                              ; preds = %155, %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %157 = load i32, ptr %2, align 4
  ret i32 %157
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 44}
!12 = !{!"__SMoptimal", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !13, i64 32, !10, i64 40, !10, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !10, i64 104, !7, i64 112, !13, i64 136, !13, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !7, i64 184, !10, i64 196}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !10, i64 0}
!15 = !{!12, !6, i64 56}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !6, i64 152}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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"

@.str.1 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @SMgetGradientProjections(ptr noundef readonly %0) local_unnamed_addr #1 {
  %2 = icmp eq ptr %0, null
  br i1 %2, label %76, label %.preheader39

.preheader39:                                     ; preds = %1
  %3 = getelementptr inbounds i8, ptr %0, i64 44
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph44, label %.loopexit40

.lr.ph44:                                         ; preds = %.preheader39
  %6 = load i32, ptr %0, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %0, i64 112
  %8 = getelementptr inbounds i8, ptr %0, i64 120
  %9 = getelementptr inbounds i8, ptr %0, i64 128
  %10 = getelementptr inbounds i8, ptr %0, i64 56
  %11 = getelementptr inbounds i8, ptr %0, i64 152
  switch i32 %6, label %.lr.ph44.split [
    i32 2, label %.lr.ph44.split.us
    i32 3, label %.lr.ph44.split.us45
  ]

.lr.ph44.split.us:                                ; preds = %.lr.ph44
  %12 = load ptr, ptr %10, align 8, !tbaa !13
  %13 = load ptr, ptr %11, align 8, !tbaa !14
  %wide.trip.count56 = zext nneg i32 %4 to i64
  %xtraiter = and i64 %wide.trip.count56, 1
  %14 = icmp eq i32 %4, 1
  br i1 %14, label %.loopexit40.loopexit72.unr-lcssa, label %.lr.ph44.split.us.new

.lr.ph44.split.us.new:                            ; preds = %.lr.ph44.split.us
  %unroll_iter = and i64 %wide.trip.count56, 2147483646
  br label %15

15:                                               ; preds = %15, %.lr.ph44.split.us.new
  %indvars.iv53 = phi i64 [ 0, %.lr.ph44.split.us.new ], [ %indvars.iv.next54.1, %15 ]
  %niter = phi i64 [ 0, %.lr.ph44.split.us.new ], [ %niter.next.1, %15 ]
  %16 = getelementptr inbounds ptr, ptr %12, i64 %indvars.iv53
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = load double, ptr %17, align 8, !tbaa !16
  %19 = load double, ptr %7, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %17, i64 8
  %21 = load double, ptr %20, align 8, !tbaa !16
  %22 = load double, ptr %8, align 8, !tbaa !16
  %23 = fmul double %21, %22
  %24 = tail call double @llvm.fmuladd.f64(double %18, double %19, double %23)
  %25 = getelementptr inbounds double, ptr %13, i64 %indvars.iv53
  store double %24, ptr %25, align 8, !tbaa !16
  %indvars.iv.next54 = or disjoint i64 %indvars.iv53, 1
  %26 = getelementptr inbounds ptr, ptr %12, i64 %indvars.iv.next54
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = load double, ptr %27, align 8, !tbaa !16
  %29 = load double, ptr %7, align 8, !tbaa !16
  %30 = getelementptr inbounds i8, ptr %27, i64 8
  %31 = load double, ptr %30, align 8, !tbaa !16
  %32 = load double, ptr %8, align 8, !tbaa !16
  %33 = fmul double %31, %32
  %34 = tail call double @llvm.fmuladd.f64(double %28, double %29, double %33)
  %35 = getelementptr inbounds double, ptr %13, i64 %indvars.iv.next54
  store double %34, ptr %35, align 8, !tbaa !16
  %indvars.iv.next54.1 = add nuw nsw i64 %indvars.iv53, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit40.loopexit72.unr-lcssa, label %15, !llvm.loop !17

.lr.ph44.split.us45:                              ; preds = %.lr.ph44
  %36 = load ptr, ptr %10, align 8, !tbaa !13
  %37 = load ptr, ptr %11, align 8, !tbaa !14
  %wide.trip.count = zext nneg i32 %4 to i64
  br label %38

38:                                               ; preds = %38, %.lr.ph44.split.us45
  %indvars.iv = phi i64 [ %indvars.iv.next, %38 ], [ 0, %.lr.ph44.split.us45 ]
  %39 = getelementptr inbounds ptr, ptr %36, i64 %indvars.iv
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  %41 = load double, ptr %40, align 8, !tbaa !16
  %42 = load double, ptr %7, align 8, !tbaa !16
  %43 = getelementptr inbounds i8, ptr %40, i64 8
  %44 = load double, ptr %43, align 8, !tbaa !16
  %45 = load double, ptr %8, align 8, !tbaa !16
  %46 = fmul double %44, %45
  %47 = tail call double @llvm.fmuladd.f64(double %41, double %42, double %46)
  %48 = getelementptr inbounds i8, ptr %40, i64 16
  %49 = load double, ptr %48, align 8, !tbaa !16
  %50 = load double, ptr %9, align 8, !tbaa !16
  %51 = tail call double @llvm.fmuladd.f64(double %49, double %50, double %47)
  %52 = getelementptr inbounds double, ptr %37, i64 %indvars.iv
  store double %51, ptr %52, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit40, label %38, !llvm.loop !17

.lr.ph44.split:                                   ; preds = %.lr.ph44
  %53 = icmp sgt i32 %6, 0
  br i1 %53, label %.lr.ph44.split.split.us, label %.loopexit40

.lr.ph44.split.split.us:                          ; preds = %.lr.ph44.split
  %54 = load ptr, ptr %10, align 8, !tbaa !13
  %55 = load ptr, ptr %11, align 8, !tbaa !14
  %wide.trip.count66 = zext nneg i32 %4 to i64
  %wide.trip.count61 = zext nneg i32 %6 to i64
  %xtraiter75 = and i64 %wide.trip.count61, 1
  %56 = icmp eq i32 %6, 1
  %unroll_iter77 = and i64 %wide.trip.count61, 2147483646
  %lcmp.mod76.not = icmp eq i64 %xtraiter75, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %..loopexit_crit_edge.us, %.lr.ph44.split.split.us
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %..loopexit_crit_edge.us ], [ 0, %.lr.ph44.split.split.us ]
  %57 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv63
  %58 = load ptr, ptr %57, align 8, !tbaa !15
  %59 = getelementptr inbounds double, ptr %55, i64 %indvars.iv63
  %.promoted.us = load double, ptr %59, align 8, !tbaa !16
  br i1 %56, label %..loopexit_crit_edge.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv58 = phi i64 [ %indvars.iv.next59.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %60 = phi double [ %70, %.preheader.us.new ], [ %.promoted.us, %.preheader.us ]
  %niter78 = phi i64 [ %niter78.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %61 = getelementptr inbounds double, ptr %58, i64 %indvars.iv58
  %62 = load double, ptr %61, align 8, !tbaa !16
  %63 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 %indvars.iv58
  %64 = load double, ptr %63, align 8, !tbaa !16
  %65 = tail call double @llvm.fmuladd.f64(double %62, double %64, double %60)
  store double %65, ptr %59, align 8, !tbaa !16
  %indvars.iv.next59 = or disjoint i64 %indvars.iv58, 1
  %66 = getelementptr inbounds double, ptr %58, i64 %indvars.iv.next59
  %67 = load double, ptr %66, align 8, !tbaa !16
  %68 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 %indvars.iv.next59
  %69 = load double, ptr %68, align 8, !tbaa !16
  %70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double %65)
  store double %70, ptr %59, align 8, !tbaa !16
  %indvars.iv.next59.1 = add nuw nsw i64 %indvars.iv58, 2
  %niter78.next.1 = add i64 %niter78, 2
  %niter78.ncmp.1 = icmp eq i64 %niter78.next.1, %unroll_iter77
  br i1 %niter78.ncmp.1, label %..loopexit_crit_edge.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !19

..loopexit_crit_edge.us.unr-lcssa:                ; preds = %.preheader.us.new, %.preheader.us
  %indvars.iv58.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next59.1, %.preheader.us.new ]
  %.unr = phi double [ %.promoted.us, %.preheader.us ], [ %70, %.preheader.us.new ]
  br i1 %lcmp.mod76.not, label %..loopexit_crit_edge.us, label %..loopexit_crit_edge.us.epilog-lcssa

..loopexit_crit_edge.us.epilog-lcssa:             ; preds = %..loopexit_crit_edge.us.unr-lcssa
  %71 = getelementptr inbounds double, ptr %58, i64 %indvars.iv58.unr
  %72 = load double, ptr %71, align 8, !tbaa !16
  %73 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 %indvars.iv58.unr
  %74 = load double, ptr %73, align 8, !tbaa !16
  %75 = tail call double @llvm.fmuladd.f64(double %72, double %74, double %.unr)
  store double %75, ptr %59, align 8, !tbaa !16
  br label %..loopexit_crit_edge.us

..loopexit_crit_edge.us:                          ; preds = %..loopexit_crit_edge.us.unr-lcssa, %..loopexit_crit_edge.us.epilog-lcssa
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count66
  br i1 %exitcond67.not, label %.loopexit40, label %.preheader.us, !llvm.loop !17

76:                                               ; preds = %1
  %77 = tail call i32 @SMerror(i32 noundef 716, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit40

.loopexit40.loopexit72.unr-lcssa:                 ; preds = %15, %.lr.ph44.split.us
  %indvars.iv53.unr = phi i64 [ 0, %.lr.ph44.split.us ], [ %indvars.iv.next54.1, %15 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit40, label %.loopexit40.loopexit72.epilog-lcssa

.loopexit40.loopexit72.epilog-lcssa:              ; preds = %.loopexit40.loopexit72.unr-lcssa
  %78 = getelementptr inbounds ptr, ptr %12, i64 %indvars.iv53.unr
  %79 = load ptr, ptr %78, align 8, !tbaa !15
  %80 = load double, ptr %79, align 8, !tbaa !16
  %81 = load double, ptr %7, align 8, !tbaa !16
  %82 = getelementptr inbounds i8, ptr %79, i64 8
  %83 = load double, ptr %82, align 8, !tbaa !16
  %84 = load double, ptr %8, align 8, !tbaa !16
  %85 = fmul double %83, %84
  %86 = tail call double @llvm.fmuladd.f64(double %80, double %81, double %85)
  %87 = getelementptr inbounds double, ptr %13, i64 %indvars.iv53.unr
  store double %86, ptr %87, align 8, !tbaa !16
  br label %.loopexit40

.loopexit40:                                      ; preds = %38, %.loopexit40.loopexit72.epilog-lcssa, %.loopexit40.loopexit72.unr-lcssa, %..loopexit_crit_edge.us, %.lr.ph44.split, %.preheader39, %76
  %.036 = phi i32 [ %77, %76 ], [ 0, %.preheader39 ], [ 0, %.lr.ph44.split ], [ 0, %..loopexit_crit_edge.us ], [ 0, %.loopexit40.loopexit72.unr-lcssa ], [ 0, %.loopexit40.loopexit72.epilog-lcssa ], [ 0, %38 ]
  ret i32 %.036
}

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

attributes #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 #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 = { 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 44}
!6 = !{!"__SMoptimal", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !7, i64 40, !7, i64 44, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !8, i64 112, !10, i64 136, !10, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !8, i64 184, !7, i64 196}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !11, i64 56}
!14 = !{!6, !11, i64 152}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass