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

; 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 }
%struct.__SMactive = type { i32, i32, ptr, double }

@.str.1 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 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 @SMformPDGrammian(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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %21

19:                                               ; preds = %1
  %20 = call i32 @SMerror(i32 noundef 48, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %20, ptr %2, align 4
  store i32 1, ptr %16, align 4
  br label %197

21:                                               ; preds = %1
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.__SMoptimal, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !9
  store i32 %24, ptr %9, align 4, !tbaa !13
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.__SMoptimal, ptr %25, i32 0, i32 14
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  %28 = getelementptr inbounds %struct.__SMactive, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !15
  store i32 %29, ptr %10, align 4, !tbaa !13
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.__SMoptimal, ptr %30, i32 0, i32 14
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = getelementptr inbounds %struct.__SMactive, ptr %32, i32 0, i32 2
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  store ptr %34, ptr %11, align 8, !tbaa !5
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.__SMoptimal, ptr %35, i32 0, i32 25
  %37 = getelementptr inbounds [3 x i32], ptr %36, i64 0, i64 0
  store ptr %37, ptr %12, align 8, !tbaa !5
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.__SMoptimal, ptr %38, i32 0, i32 23
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  store ptr %40, ptr %14, align 8, !tbaa !5
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.__SMoptimal, ptr %41, i32 0, i32 24
  %43 = load ptr, ptr %42, align 8, !tbaa !19
  store ptr %43, ptr %15, align 8, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !13
  br label %44

44:                                               ; preds = %71, %21
  %45 = load i32, ptr %5, align 4, !tbaa !13
  %46 = load i32, ptr %10, align 4, !tbaa !13
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %48, label %74

48:                                               ; preds = %44
  store i32 0, ptr %6, align 4, !tbaa !13
  br label %49

49:                                               ; preds = %67, %48
  %50 = load i32, ptr %6, align 4, !tbaa !13
  %51 = load i32, ptr %10, align 4, !tbaa !13
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %70

53:                                               ; preds = %49
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = load i32, ptr %5, align 4, !tbaa !13
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !13
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds double, ptr %58, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !20
  %63 = fcmp oeq double %62, -1.000000e+00
  br i1 %63, label %64, label %66

64:                                               ; preds = %53
  %65 = call i32 @SMerror(i32 noundef 61, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 58, i32 noundef 0, ptr noundef @.str.5)
  store i32 %65, ptr %2, align 4
  store i32 1, ptr %16, align 4
  br label %197

66:                                               ; preds = %53
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %6, align 4, !tbaa !13
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %6, align 4, !tbaa !13
  br label %49, !llvm.loop !21

70:                                               ; preds = %49
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %5, align 4, !tbaa !13
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %5, align 4, !tbaa !13
  br label %44, !llvm.loop !23

74:                                               ; preds = %44
  store i32 0, ptr %8, align 4, !tbaa !13
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = getelementptr inbounds ptr, ptr %75, i64 0
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %77, i64 0
  %79 = load double, ptr %78, align 8, !tbaa !20
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = getelementptr inbounds ptr, ptr %80, i64 0
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = getelementptr inbounds double, ptr %82, i64 0
  store double %79, ptr %83, align 8, !tbaa !20
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds i32, ptr %84, i64 0
  %86 = load i32, ptr %85, align 4, !tbaa !13
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = getelementptr inbounds i32, ptr %87, i64 0
  store i32 %86, ptr %88, align 4, !tbaa !13
  store i32 1, ptr %7, align 4, !tbaa !13
  store i32 1, ptr %5, align 4, !tbaa !13
  br label %89

89:                                               ; preds = %190, %74
  %90 = load i32, ptr %7, align 4, !tbaa !13
  %91 = load i32, ptr %9, align 4, !tbaa !13
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %93, label %97

93:                                               ; preds = %89
  %94 = load i32, ptr %5, align 4, !tbaa !13
  %95 = load i32, ptr %10, align 4, !tbaa !13
  %96 = icmp slt i32 %94, %95
  br label %97

97:                                               ; preds = %93, %89
  %98 = phi i1 [ false, %89 ], [ %96, %93 ]
  br i1 %98, label %99, label %193

99:                                               ; preds = %97
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = getelementptr inbounds ptr, ptr %100, i64 0
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !13
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !20
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  %108 = load i32, ptr %7, align 4, !tbaa !13
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds ptr, ptr %107, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds double, ptr %111, i64 0
  store double %106, ptr %112, align 8, !tbaa !20
  %113 = load ptr, ptr %15, align 8, !tbaa !5
  %114 = getelementptr inbounds ptr, ptr %113, i64 0
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = load i32, ptr %7, align 4, !tbaa !13
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds double, ptr %115, i64 %117
  store double %106, ptr %118, align 8, !tbaa !20
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  %120 = load i32, ptr %5, align 4, !tbaa !13
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = load i32, ptr %5, align 4, !tbaa !13
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds double, ptr %123, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !20
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = load i32, ptr %7, align 4, !tbaa !13
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = load i32, ptr %7, align 4, !tbaa !13
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds double, ptr %132, i64 %134
  store double %127, ptr %135, align 8, !tbaa !20
  %136 = load i32, ptr %7, align 4, !tbaa !13
  %137 = icmp eq i32 %136, 2
  br i1 %137, label %138, label %160

138:                                              ; preds = %99
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  %140 = load i32, ptr %8, align 4, !tbaa !13
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds ptr, ptr %139, i64 %141
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = load i32, ptr %5, align 4, !tbaa !13
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %143, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !20
  %148 = load ptr, ptr %15, align 8, !tbaa !5
  %149 = load i32, ptr %7, align 4, !tbaa !13
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds ptr, ptr %148, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = getelementptr inbounds double, ptr %152, i64 1
  store double %147, ptr %153, align 8, !tbaa !20
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = getelementptr inbounds ptr, ptr %154, i64 1
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = load i32, ptr %7, align 4, !tbaa !13
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds double, ptr %156, i64 %158
  store double %147, ptr %159, align 8, !tbaa !20
  br label %160

160:                                              ; preds = %138, %99
  %161 = load i32, ptr %7, align 4, !tbaa !13
  %162 = add nsw i32 %161, 1
  %163 = load ptr, ptr %15, align 8, !tbaa !5
  %164 = call i32 @SMsingularTest(i32 noundef %162, ptr noundef %163, ptr noundef %13)
  store i32 %164, ptr %4, align 4, !tbaa !13
  %165 = load i32, ptr %4, align 4, !tbaa !13
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %170

167:                                              ; preds = %160
  %168 = load i32, ptr %4, align 4, !tbaa !13
  %169 = call i32 @SMerror(i32 noundef 78, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %168, i32 noundef 0, ptr noundef null)
  store i32 %169, ptr %2, align 4
  store i32 1, ptr %16, align 4
  br label %197

170:                                              ; preds = %160
  %171 = load i32, ptr %13, align 4, !tbaa !13
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %190, label %173

173:                                              ; preds = %170
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = load i32, ptr %5, align 4, !tbaa !13
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds i32, ptr %174, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !13
  %179 = load ptr, ptr %12, align 8, !tbaa !5
  %180 = load i32, ptr %7, align 4, !tbaa !13
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i32, ptr %179, i64 %181
  store i32 %178, ptr %182, align 4, !tbaa !13
  %183 = load i32, ptr %7, align 4, !tbaa !13
  %184 = icmp eq i32 %183, 1
  br i1 %184, label %185, label %187

185:                                              ; preds = %173
  %186 = load i32, ptr %5, align 4, !tbaa !13
  store i32 %186, ptr %8, align 4, !tbaa !13
  br label %187

187:                                              ; preds = %185, %173
  %188 = load i32, ptr %7, align 4, !tbaa !13
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %7, align 4, !tbaa !13
  br label %190

190:                                              ; preds = %187, %170
  %191 = load i32, ptr %5, align 4, !tbaa !13
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %5, align 4, !tbaa !13
  br label %89, !llvm.loop !24

193:                                              ; preds = %97
  %194 = load i32, ptr %7, align 4, !tbaa !13
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.__SMoptimal, ptr %195, i32 0, i32 26
  store i32 %194, ptr %196, align 4, !tbaa !25
  store i32 0, ptr %4, align 4, !tbaa !13
  store i32 0, ptr %2, align 4
  store i32 1, ptr %16, align 4
  br label %197

197:                                              ; preds = %193, %167, %64, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %198 = load i32, ptr %2, align 4
  ret i32 %198
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMsingularTest(i32 noundef, ptr noundef, ptr noundef) #2

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 = { 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 = !{!"__SMoptimal", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !7, i64 112, !12, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !7, i64 184, !11, i64 196}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 80}
!15 = !{!16, !11, i64 0}
!16 = !{!"__SMactive", !11, i64 0, !11, i64 4, !6, i64 8, !12, i64 16}
!17 = !{!16, !6, i64 8}
!18 = !{!10, !6, i64 168}
!19 = !{!10, !6, i64 176}
!20 = !{!12, !12, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = !{!10, !11, 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 [108 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: mustprogress 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) local_unnamed_addr #1

; 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
define dso_local i32 @SMformPDGrammian(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %6

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

6:                                                ; preds = %1
  %7 = load i32, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 80
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = load i32, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %9, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %0, i64 184
  %14 = getelementptr inbounds i8, ptr %0, i64 168
  %15 = load ptr, ptr %14, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %0, i64 176
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = icmp sgt i32 %10, 0
  br i1 %18, label %.preheader.us.preheader, label %._crit_edge72

.preheader.us.preheader:                          ; preds = %6
  %wide.trip.count81 = zext nneg i32 %10 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv78 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next79, %._crit_edge.us ]
  %19 = getelementptr inbounds ptr, ptr %15, i64 %indvars.iv78
  %20 = load ptr, ptr %19, align 8, !tbaa !18
  br label %22

21:                                               ; preds = %22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count81
  br i1 %exitcond.not, label %._crit_edge.us, label %22, !llvm.loop !19

22:                                               ; preds = %.preheader.us, %21
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %21 ]
  %23 = getelementptr inbounds double, ptr %20, i64 %indvars.iv
  %24 = load double, ptr %23, align 8, !tbaa !21
  %25 = fcmp oeq double %24, -1.000000e+00
  br i1 %25, label %.split.us, label %21

._crit_edge.us:                                   ; preds = %21
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %._crit_edge72, label %.preheader.us, !llvm.loop !22

.split.us:                                        ; preds = %22
  %26 = tail call i32 @SMerror(i32 noundef 61, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 58, i32 noundef 0, ptr noundef nonnull @.str.5) #3
  br label %78

._crit_edge72:                                    ; preds = %._crit_edge.us, %6
  %27 = load ptr, ptr %15, align 8, !tbaa !18
  %28 = load double, ptr %27, align 8, !tbaa !21
  %29 = load ptr, ptr %17, align 8, !tbaa !18
  store double %28, ptr %29, align 8, !tbaa !21
  %30 = load i32, ptr %12, align 4, !tbaa !23
  store i32 %30, ptr %13, align 4, !tbaa !23
  %31 = icmp sgt i32 %7, 1
  %32 = icmp sgt i32 %10, 1
  %33 = and i1 %31, %32
  br i1 %33, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %._crit_edge72
  %34 = getelementptr inbounds i8, ptr %17, i64 8
  %35 = zext nneg i32 %10 to i64
  br label %36

36:                                               ; preds = %.lr.ph, %73
  %indvars.iv83 = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next84, %73 ]
  %.06074 = phi i32 [ 1, %.lr.ph ], [ %.161, %73 ]
  %.06273 = phi i32 [ 0, %.lr.ph ], [ %.2, %73 ]
  %37 = load ptr, ptr %15, align 8, !tbaa !18
  %38 = getelementptr inbounds double, ptr %37, i64 %indvars.iv83
  %39 = load double, ptr %38, align 8, !tbaa !21
  %40 = sext i32 %.06074 to i64
  %41 = getelementptr inbounds ptr, ptr %17, i64 %40
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  store double %39, ptr %42, align 8, !tbaa !21
  %43 = load ptr, ptr %17, align 8, !tbaa !18
  %44 = getelementptr inbounds double, ptr %43, i64 %40
  store double %39, ptr %44, align 8, !tbaa !21
  %45 = getelementptr inbounds ptr, ptr %15, i64 %indvars.iv83
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = getelementptr inbounds double, ptr %46, i64 %indvars.iv83
  %48 = load double, ptr %47, align 8, !tbaa !21
  %49 = getelementptr inbounds double, ptr %42, i64 %40
  store double %48, ptr %49, align 8, !tbaa !21
  %50 = icmp eq i32 %.06074, 2
  br i1 %50, label %51, label %60

51:                                               ; preds = %36
  %52 = sext i32 %.06273 to i64
  %53 = getelementptr inbounds ptr, ptr %15, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = getelementptr inbounds double, ptr %54, i64 %indvars.iv83
  %56 = load double, ptr %55, align 8, !tbaa !21
  %57 = getelementptr inbounds i8, ptr %42, i64 8
  store double %56, ptr %57, align 8, !tbaa !21
  %58 = load ptr, ptr %34, align 8, !tbaa !18
  %59 = getelementptr inbounds double, ptr %58, i64 %40
  store double %56, ptr %59, align 8, !tbaa !21
  br label %60

60:                                               ; preds = %51, %36
  %61 = add nsw i32 %.06074, 1
  %62 = call i32 @SMsingularTest(i32 noundef %61, ptr noundef nonnull %17, ptr noundef nonnull %2)
  %.not = icmp eq i32 %62, 0
  br i1 %.not, label %65, label %63

63:                                               ; preds = %60
  %64 = call i32 @SMerror(i32 noundef 78, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %62, i32 noundef 0, ptr noundef null) #3
  br label %78

65:                                               ; preds = %60
  %66 = load i32, ptr %2, align 4, !tbaa !23
  %.not68 = icmp eq i32 %66, 0
  br i1 %.not68, label %67, label %73

67:                                               ; preds = %65
  %68 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv83
  %69 = load i32, ptr %68, align 4, !tbaa !23
  %70 = getelementptr inbounds i32, ptr %13, i64 %40
  store i32 %69, ptr %70, align 4, !tbaa !23
  %71 = icmp eq i32 %.06074, 1
  %72 = trunc nuw nsw i64 %indvars.iv83 to i32
  %spec.select = select i1 %71, i32 %72, i32 %.06273
  br label %73

73:                                               ; preds = %67, %65
  %.2 = phi i32 [ %.06273, %65 ], [ %spec.select, %67 ]
  %.161 = phi i32 [ %.06074, %65 ], [ %61, %67 ]
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %74 = icmp slt i32 %.161, %7
  %75 = icmp ult i64 %indvars.iv.next84, %35
  %76 = select i1 %74, i1 %75, i1 false
  br i1 %76, label %36, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %73, %._crit_edge72
  %.060.lcssa = phi i32 [ 1, %._crit_edge72 ], [ %.161, %73 ]
  %77 = getelementptr inbounds i8, ptr %0, i64 196
  store i32 %.060.lcssa, ptr %77, align 4, !tbaa !25
  br label %78

78:                                               ; preds = %._crit_edge, %63, %.split.us, %4
  %.0 = phi i32 [ %5, %4 ], [ %26, %.split.us ], [ %64, %63 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMsingularTest(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress 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 = { 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 = !{!"__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, !11, i64 80}
!13 = !{!14, !7, i64 0}
!14 = !{!"__SMactive", !7, i64 0, !7, i64 4, !11, i64 8, !10, i64 16}
!15 = !{!14, !11, i64 8}
!16 = !{!6, !11, i64 168}
!17 = !{!6, !11, i64 176}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !10, i64 0}
!22 = distinct !{!22, !20}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !20}
!25 = !{!6, !7, i64 196}


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