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

; 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.__SMlocal_mesh = type { i32, i32, i32, [3 x double], [3 x double], [3 x double], ptr, ptr, ptr, i32, double, ptr, double, i32, i32, i32, ptr, ptr, ptr }
%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 [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [48 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 @SMinitMaxStepLength(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
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca [3 x double], align 16
  %11 = alloca [3 x double], align 16
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %1
  %16 = call i32 @SMerror(i32 noundef 484, ptr noundef @.str.27, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %16, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %152

17:                                               ; preds = %1
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %18, i32 0, i32 6
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %24

22:                                               ; preds = %17
  %23 = call i32 @SMerror(i32 noundef 485, ptr noundef @.str.27, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %23, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %152

24:                                               ; preds = %17
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %25, i32 0, i32 16
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %31

29:                                               ; preds = %24
  %30 = call i32 @SMerror(i32 noundef 486, ptr noundef @.str.27, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %30, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %152

31:                                               ; preds = %24
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %31
  %37 = call i32 @SMerror(i32 noundef 487, ptr noundef @.str.27, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 58, i32 noundef 0, ptr noundef @.str.28)
  store i32 %37, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %152

38:                                               ; preds = %31
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !16
  %42 = icmp ne i32 %41, 2
  br i1 %42, label %43, label %50

43:                                               ; preds = %38
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !16
  %47 = icmp ne i32 %46, 3
  br i1 %47, label %48, label %50

48:                                               ; preds = %43
  %49 = call i32 @SMerror(i32 noundef 489, ptr noundef @.str.27, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 58, i32 noundef 0, ptr noundef @.str.29)
  store i32 %49, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %152

50:                                               ; preds = %43, %38
  store i32 0, ptr %5, align 4, !tbaa !17
  br label %51

51:                                               ; preds = %135, %50
  %52 = load i32, ptr %5, align 4, !tbaa !17
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !15
  %56 = icmp slt i32 %52, %55
  br i1 %56, label %57, label %138

57:                                               ; preds = %51
  %58 = load i32, ptr %5, align 4, !tbaa !17
  store i32 %58, ptr %6, align 4, !tbaa !17
  br label %59

59:                                               ; preds = %131, %57
  %60 = load i32, ptr %6, align 4, !tbaa !17
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = icmp slt i32 %60, %63
  br i1 %64, label %65, label %134

65:                                               ; preds = %59
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !17
  br label %66

66:                                               ; preds = %121, %65
  %67 = load i32, ptr %7, align 4, !tbaa !17
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !16
  %71 = icmp slt i32 %67, %70
  br i1 %71, label %72, label %124

72:                                               ; preds = %66
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %73, i32 0, i32 6
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = load i32, ptr %5, align 4, !tbaa !17
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds ptr, ptr %75, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = load i32, ptr %7, align 4, !tbaa !17
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = load i32, ptr %7, align 4, !tbaa !17
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 %85
  store double %83, ptr %86, align 8, !tbaa !9
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %87, i32 0, i32 6
  %89 = load ptr, ptr %88, align 8, !tbaa !11
  %90 = load i32, ptr %6, align 4, !tbaa !17
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !17
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = load i32, ptr %7, align 4, !tbaa !17
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [3 x double], ptr %11, i64 0, i64 %99
  store double %97, ptr %100, align 8, !tbaa !9
  %101 = load i32, ptr %7, align 4, !tbaa !17
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = load i32, ptr %7, align 4, !tbaa !17
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [3 x double], ptr %11, i64 0, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !9
  %109 = fsub double %104, %108
  %110 = load i32, ptr %7, align 4, !tbaa !17
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !9
  %114 = load i32, ptr %7, align 4, !tbaa !17
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [3 x double], ptr %11, i64 0, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !9
  %118 = fsub double %113, %117
  %119 = load double, ptr %9, align 8, !tbaa !9
  %120 = call double @llvm.fmuladd.f64(double %109, double %118, double %119)
  store double %120, ptr %9, align 8, !tbaa !9
  br label %121

121:                                              ; preds = %72
  %122 = load i32, ptr %7, align 4, !tbaa !17
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %7, align 4, !tbaa !17
  br label %66, !llvm.loop !18

124:                                              ; preds = %66
  %125 = load double, ptr %8, align 8, !tbaa !9
  %126 = load double, ptr %9, align 8, !tbaa !9
  %127 = fcmp olt double %125, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %124
  %129 = load double, ptr %9, align 8, !tbaa !9
  store double %129, ptr %8, align 8, !tbaa !9
  br label %130

130:                                              ; preds = %128, %124
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %6, align 4, !tbaa !17
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %6, align 4, !tbaa !17
  br label %59, !llvm.loop !20

134:                                              ; preds = %59
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %5, align 4, !tbaa !17
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %5, align 4, !tbaa !17
  br label %51, !llvm.loop !21

138:                                              ; preds = %51
  %139 = load double, ptr %8, align 8, !tbaa !9
  %140 = call double @sqrt(double noundef %139) #5
  store double %140, ptr %8, align 8, !tbaa !9
  %141 = load double, ptr %8, align 8, !tbaa !9
  %142 = fcmp oeq double %141, 0.000000e+00
  br i1 %142, label %143, label %145

143:                                              ; preds = %138
  %144 = call i32 @SMerror(i32 noundef 507, ptr noundef @.str.27, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.30)
  store i32 %144, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %152

145:                                              ; preds = %138
  %146 = load double, ptr %8, align 8, !tbaa !9
  %147 = fdiv double %146, 1.000000e+02
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %148, i32 0, i32 16
  %150 = load ptr, ptr %149, align 8, !tbaa !14
  %151 = getelementptr inbounds %struct.__SMoptimal, ptr %150, i32 0, i32 20
  store double %147, ptr %151, align 8, !tbaa !22
  store i32 0, ptr %4, align 4, !tbaa !17
  store i32 0, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %152

152:                                              ; preds = %145, %143, %48, %36, %29, %22, %15
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %153 = load i32, ptr %2, align 4
  ret i32 %153
}

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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 "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 #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, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 88}
!12 = !{!"__SMlocal_mesh", !13, i64 0, !13, i64 4, !13, i64 8, !7, i64 16, !7, i64 40, !7, i64 64, !6, i64 88, !6, i64 96, !6, i64 104, !13, i64 112, !10, i64 120, !6, i64 128, !10, i64 136, !13, i64 144, !13, i64 148, !13, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !6, i64 160}
!15 = !{!12, !13, i64 4}
!16 = !{!12, !13, i64 0}
!17 = !{!13, !13, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = !{!23, !10, i64 144}
!23 = !{!"__SMoptimal", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !10, i64 32, !13, i64 40, !13, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !13, i64 104, !7, i64 112, !10, i64 136, !10, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !7, i64 184, !13, i64 196}


; 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 [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [48 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 @SMinitMaxStepLength(ptr noundef readonly %0) local_unnamed_addr #1 {
  %2 = icmp eq ptr %0, null
  br i1 %2, label %3, label %5

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

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 88
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %11

9:                                                ; preds = %5
  %10 = tail call i32 @SMerror(i32 noundef 485, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #4
  br label %76

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %0, i64 160
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %11
  %16 = tail call i32 @SMerror(i32 noundef 486, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #4
  br label %76

17:                                               ; preds = %11
  %18 = getelementptr inbounds i8, ptr %0, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !13
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %23

21:                                               ; preds = %17
  %22 = tail call i32 @SMerror(i32 noundef 487, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 58, i32 noundef 0, ptr noundef nonnull @.str.28) #4
  br label %76

23:                                               ; preds = %17
  %24 = load i32, ptr %0, align 8, !tbaa !14
  %25 = and i32 %24, -2
  %switch = icmp eq i32 %25, 2
  br i1 %switch, label %.preheader46, label %66

.preheader46:                                     ; preds = %23
  %26 = icmp sgt i32 %19, 0
  br i1 %26, label %.preheader45.us.preheader, label %._crit_edge

.preheader45.us.preheader:                        ; preds = %.preheader46
  %27 = zext nneg i32 %19 to i64
  %wide.trip.count63 = zext nneg i32 %19 to i64
  %wide.trip.count = zext nneg i32 %24 to i64
  %28 = add nsw i64 %wide.trip.count, -1
  %29 = icmp ult i64 %28, 3
  %lcmp.mod.not = icmp eq i32 %24, 0
  br label %.preheader45.us

.preheader45.us:                                  ; preds = %.preheader45.us.preheader, %.split.us.us
  %indvars.iv57 = phi i64 [ 0, %.preheader45.us.preheader ], [ %indvars.iv.next58, %.split.us.us ]
  %.03652.us = phi double [ 0.000000e+00, %.preheader45.us.preheader ], [ %.2.us.us, %.split.us.us ]
  %30 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv57
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  br label %.preheader.us.us

.preheader.us.us:                                 ; preds = %._crit_edge.us.us, %.preheader45.us
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %._crit_edge.us.us ], [ %indvars.iv57, %.preheader45.us ]
  %.150.us.us = phi double [ %.2.us.us, %._crit_edge.us.us ], [ %.03652.us, %.preheader45.us ]
  %32 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv59
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  br i1 %29, label %._crit_edge.us.us.unr-lcssa, label %.preheader.us.us.new

.preheader.us.us.new:                             ; preds = %.preheader.us.us, %.preheader.us.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.preheader.us.us.new ], [ 0, %.preheader.us.us ]
  %.048.us.us = phi double [ %57, %.preheader.us.us.new ], [ 0.000000e+00, %.preheader.us.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us.us.new ], [ 0, %.preheader.us.us ]
  %34 = getelementptr inbounds double, ptr %31, i64 %indvars.iv
  %35 = load double, ptr %34, align 8, !tbaa !16
  %36 = getelementptr inbounds double, ptr %33, i64 %indvars.iv
  %37 = load double, ptr %36, align 8, !tbaa !16
  %38 = fsub double %35, %37
  %39 = tail call double @llvm.fmuladd.f64(double %38, double %38, double %.048.us.us)
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %40 = getelementptr inbounds double, ptr %31, i64 %indvars.iv.next
  %41 = load double, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next
  %43 = load double, ptr %42, align 8, !tbaa !16
  %44 = fsub double %41, %43
  %45 = tail call double @llvm.fmuladd.f64(double %44, double %44, double %39)
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %46 = getelementptr inbounds double, ptr %31, i64 %indvars.iv.next.1
  %47 = load double, ptr %46, align 8, !tbaa !16
  %48 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next.1
  %49 = load double, ptr %48, align 8, !tbaa !16
  %50 = fsub double %47, %49
  %51 = tail call double @llvm.fmuladd.f64(double %50, double %50, double %45)
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %52 = getelementptr inbounds double, ptr %31, i64 %indvars.iv.next.2
  %53 = load double, ptr %52, align 8, !tbaa !16
  %54 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next.2
  %55 = load double, ptr %54, align 8, !tbaa !16
  %56 = fsub double %53, %55
  %57 = tail call double @llvm.fmuladd.f64(double %56, double %56, double %51)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, 0
  br i1 %niter.ncmp.3, label %._crit_edge.us.us.unr-lcssa, label %.preheader.us.us.new, !llvm.loop !17

._crit_edge.us.us.unr-lcssa:                      ; preds = %.preheader.us.us.new, %.preheader.us.us
  %.lcssa.ph = phi double [ poison, %.preheader.us.us ], [ %57, %.preheader.us.us.new ]
  %indvars.iv.unr = phi i64 [ 0, %.preheader.us.us ], [ %indvars.iv.next.3, %.preheader.us.us.new ]
  %.048.us.us.unr = phi double [ 0.000000e+00, %.preheader.us.us ], [ %57, %.preheader.us.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.us.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.us.us.unr-lcssa ]
  %.048.us.us.epil = phi double [ %63, %.epil.preheader ], [ %.048.us.us.unr, %._crit_edge.us.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.us.unr-lcssa ]
  %58 = getelementptr inbounds double, ptr %31, i64 %indvars.iv.epil
  %59 = load double, ptr %58, align 8, !tbaa !16
  %60 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.epil
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = fsub double %59, %61
  %63 = tail call double @llvm.fmuladd.f64(double %62, double %62, double %.048.us.us.epil)
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %wide.trip.count
  br i1 %epil.iter.cmp.not, label %._crit_edge.us.us, label %.epil.preheader, !llvm.loop !19

._crit_edge.us.us:                                ; preds = %.epil.preheader, %._crit_edge.us.us.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.us.us.unr-lcssa ], [ %63, %.epil.preheader ]
  %64 = fcmp olt double %.150.us.us, %.lcssa
  %.2.us.us = select i1 %64, double %.lcssa, double %.150.us.us
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %65 = icmp ult i64 %indvars.iv.next60, %27
  br i1 %65, label %.preheader.us.us, label %.split.us.us, !llvm.loop !21

.split.us.us:                                     ; preds = %._crit_edge.us.us
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %exitcond64.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count63
  br i1 %exitcond64.not, label %._crit_edge, label %.preheader45.us, !llvm.loop !22

66:                                               ; preds = %23
  %67 = tail call i32 @SMerror(i32 noundef 489, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 58, i32 noundef 0, ptr noundef nonnull @.str.29) #4
  br label %76

._crit_edge:                                      ; preds = %.split.us.us, %.preheader46
  %.036.lcssa = phi double [ 0.000000e+00, %.preheader46 ], [ %.2.us.us, %.split.us.us ]
  %68 = tail call double @sqrt(double noundef %.036.lcssa) #4
  %69 = fcmp oeq double %68, 0.000000e+00
  br i1 %69, label %70, label %72

70:                                               ; preds = %._crit_edge
  %71 = tail call i32 @SMerror(i32 noundef 507, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.30) #4
  br label %76

72:                                               ; preds = %._crit_edge
  %73 = fdiv double %68, 1.000000e+02
  %74 = load ptr, ptr %12, align 8, !tbaa !12
  %75 = getelementptr inbounds i8, ptr %74, i64 144
  store double %73, ptr %75, align 8, !tbaa !23
  br label %76

76:                                               ; preds = %72, %70, %66, %21, %15, %9, %3
  %.040 = phi i32 [ %4, %3 ], [ %10, %9 ], [ %16, %15 ], [ %22, %21 ], [ %67, %66 ], [ %71, %70 ], [ 0, %72 ]
  ret i32 %.040
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

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 = { mustprogress nofree nounwind willreturn memory(write) "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 #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, !10, i64 88}
!6 = !{!"__SMlocal_mesh", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 16, !8, i64 40, !8, i64 64, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !11, i64 120, !10, i64 128, !11, i64 136, !7, i64 144, !7, i64 148, !7, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!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, !10, i64 160}
!13 = !{!6, !7, i64 4}
!14 = !{!6, !7, i64 0}
!15 = !{!10, !10, i64 0}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}
!23 = !{!24, !11, i64 144}
!24 = !{!"__SMoptimal", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !11, i64 32, !7, i64 40, !7, i64 44, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !7, i64 104, !8, i64 112, !11, i64 136, !11, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !8, i64 184, !7, i64 196}


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