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

@.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.8 = external hidden unnamed_addr constant [15 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 @SMcomputeAlpha(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 ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, 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) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %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 738, ptr noundef @.str.8, 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 %179

21:                                               ; preds = %1
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.__SMoptimal, ptr %22, i32 0, i32 9
  %24 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %24, ptr %9, align 4, !tbaa !13
  store double 1.000000e+300, ptr %15, align 8, !tbaa !14
  %25 = load i32, ptr %9, align 4, !tbaa !13
  %26 = sext i32 %25 to i64
  %27 = mul i64 4, %26
  %28 = icmp eq i64 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %21
  store ptr null, ptr %10, align 8, !tbaa !5
  br label %40

30:                                               ; preds = %21
  %31 = load i32, ptr %9, align 4, !tbaa !13
  %32 = sext i32 %31 to i64
  %33 = mul i64 4, %32
  %34 = call noalias ptr @malloc(i64 noundef %33) #7
  store ptr %34, ptr %10, align 8, !tbaa !5
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %39

37:                                               ; preds = %30
  %38 = call i32 @SMerror(i32 noundef 743, ptr noundef @.str.8, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %38, ptr %2, align 4
  store i32 1, ptr %16, align 4
  br label %179

39:                                               ; preds = %30
  br label %40

40:                                               ; preds = %39, %29
  store i32 0, ptr %5, align 4, !tbaa !13
  br label %41

41:                                               ; preds = %50, %40
  %42 = load i32, ptr %5, align 4, !tbaa !13
  %43 = load i32, ptr %9, align 4, !tbaa !13
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %45, label %53

45:                                               ; preds = %41
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !13
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %46, i64 %48
  store i32 0, ptr %49, align 4, !tbaa !13
  br label %50

50:                                               ; preds = %45
  %51 = load i32, ptr %5, align 4, !tbaa !13
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %5, align 4, !tbaa !13
  br label %41, !llvm.loop !15

53:                                               ; preds = %41
  store i32 0, ptr %6, align 4, !tbaa !13
  br label %54

54:                                               ; preds = %76, %53
  %55 = load i32, ptr %6, align 4, !tbaa !13
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.__SMoptimal, ptr %56, i32 0, i32 14
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds %struct.__SMactive, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !18
  %61 = icmp slt i32 %55, %60
  br i1 %61, label %62, label %79

62:                                               ; preds = %54
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.__SMoptimal, ptr %63, i32 0, i32 14
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = getelementptr inbounds %struct.__SMactive, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  %68 = load i32, ptr %6, align 4, !tbaa !13
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %67, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !13
  store i32 %71, ptr %8, align 4, !tbaa !13
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = load i32, ptr %8, align 4, !tbaa !13
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %72, i64 %74
  store i32 1, ptr %75, align 4, !tbaa !13
  br label %76

76:                                               ; preds = %62
  %77 = load i32, ptr %6, align 4, !tbaa !13
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !13
  br label %54, !llvm.loop !21

79:                                               ; preds = %54
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.__SMoptimal, ptr %80, i32 0, i32 10
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  store ptr %82, ptr %11, align 8, !tbaa !5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.__SMoptimal, ptr %83, i32 0, i32 17
  %85 = load i32, ptr %84, align 8, !tbaa !23
  store i32 %85, ptr %7, align 4, !tbaa !13
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = load i32, ptr %7, align 4, !tbaa !13
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %86, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !14
  store double %90, ptr %12, align 8, !tbaa !14
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.__SMoptimal, ptr %91, i32 0, i32 21
  %93 = load ptr, ptr %92, align 8, !tbaa !24
  %94 = load i32, ptr %7, align 4, !tbaa !13
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !14
  store double %97, ptr %13, align 8, !tbaa !14
  store i32 0, ptr %5, align 4, !tbaa !13
  br label %98

98:                                               ; preds = %158, %79
  %99 = load i32, ptr %5, align 4, !tbaa !13
  %100 = load i32, ptr %9, align 4, !tbaa !13
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %102, label %161

102:                                              ; preds = %98
  %103 = load i32, ptr %5, align 4, !tbaa !13
  %104 = load i32, ptr %7, align 4, !tbaa !13
  %105 = icmp ne i32 %103, %104
  br i1 %105, label %106, label %157

106:                                              ; preds = %102
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = load i32, ptr %5, align 4, !tbaa !13
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !14
  %112 = load double, ptr %12, align 8, !tbaa !14
  %113 = fsub double %111, %112
  store double %113, ptr %14, align 8, !tbaa !14
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.__SMoptimal, ptr %114, i32 0, i32 21
  %116 = load ptr, ptr %115, align 8, !tbaa !24
  %117 = load i32, ptr %7, align 4, !tbaa !13
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds double, ptr %116, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !14
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.__SMoptimal, ptr %121, i32 0, i32 21
  %123 = load ptr, ptr %122, align 8, !tbaa !24
  %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 !14
  %128 = fsub double %120, %127
  %129 = call double @llvm.fabs.f64(double %128)
  %130 = fcmp ogt double %129, 1.000000e-13
  br i1 %130, label %131, label %143

131:                                              ; preds = %106
  %132 = load double, ptr %14, align 8, !tbaa !14
  %133 = load double, ptr %13, align 8, !tbaa !14
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.__SMoptimal, ptr %134, i32 0, i32 21
  %136 = load ptr, ptr %135, align 8, !tbaa !24
  %137 = load i32, ptr %5, align 4, !tbaa !13
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !14
  %141 = fsub double %133, %140
  %142 = fdiv double %132, %141
  store double %142, ptr %14, align 8, !tbaa !14
  br label %144

143:                                              ; preds = %106
  store double 0.000000e+00, ptr %14, align 8, !tbaa !14
  br label %144

144:                                              ; preds = %143, %131
  %145 = load double, ptr %14, align 8, !tbaa !14
  %146 = fcmp ogt double %145, 0.000000e+00
  br i1 %146, label %147, label %156

147:                                              ; preds = %144
  %148 = load double, ptr %14, align 8, !tbaa !14
  %149 = call double @llvm.fabs.f64(double %148)
  %150 = load double, ptr %15, align 8, !tbaa !14
  %151 = call double @llvm.fabs.f64(double %150)
  %152 = fcmp olt double %149, %151
  br i1 %152, label %153, label %156

153:                                              ; preds = %147
  %154 = load double, ptr %14, align 8, !tbaa !14
  %155 = call double @llvm.fabs.f64(double %154)
  store double %155, ptr %15, align 8, !tbaa !14
  br label %156

156:                                              ; preds = %153, %147, %144
  br label %157

157:                                              ; preds = %156, %102
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %5, align 4, !tbaa !13
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %5, align 4, !tbaa !13
  br label %98, !llvm.loop !25

161:                                              ; preds = %98
  %162 = load double, ptr %15, align 8, !tbaa !14
  %163 = fcmp oeq double %162, 1.000000e+300
  br i1 %163, label %164, label %168

164:                                              ; preds = %161
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.__SMoptimal, ptr %165, i32 0, i32 20
  %167 = load double, ptr %166, align 8, !tbaa !26
  store double %167, ptr %15, align 8, !tbaa !14
  br label %168

168:                                              ; preds = %164, %161
  %169 = load double, ptr %15, align 8, !tbaa !14
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.__SMoptimal, ptr %170, i32 0, i32 19
  store double %169, ptr %171, align 8, !tbaa !27
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = icmp eq ptr %172, null
  br i1 %173, label %174, label %176

174:                                              ; preds = %168
  %175 = call i32 @SMerror(i32 noundef 784, ptr noundef @.str.8, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %175, ptr %2, align 4
  store i32 1, ptr %16, align 4
  br label %179

176:                                              ; preds = %168
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %177) #6
  br label %178

178:                                              ; preds = %176
  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 %179

179:                                              ; preds = %178, %174, %37, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %180 = load i32, ptr %2, align 4
  ret i32 %180
}

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

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 allocsize(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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 44}
!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 = !{!12, !12, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!10, !6, i64 80}
!18 = !{!19, !11, i64 0}
!19 = !{!"__SMactive", !11, i64 0, !11, i64 4, !6, i64 8, !12, i64 16}
!20 = !{!19, !6, i64 8}
!21 = distinct !{!21, !16}
!22 = !{!10, !6, i64 48}
!23 = !{!10, !11, i64 104}
!24 = !{!10, !6, i64 152}
!25 = distinct !{!25, !16}
!26 = !{!10, !12, i64 144}
!27 = !{!10, !12, i64 136}


; 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.8 = external hidden unnamed_addr constant [15 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 @SMcomputeAlpha(ptr noundef %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 738, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #6
  br label %86

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 44
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %.preheader, label %9

9:                                                ; preds = %5
  %10 = sext i32 %7 to i64
  %11 = shl nsw i64 %10, 2
  %12 = tail call noalias ptr @malloc(i64 noundef %11) #7
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %16

14:                                               ; preds = %9
  %15 = tail call i32 @SMerror(i32 noundef 743, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #6
  br label %86

16:                                               ; preds = %9
  %17 = icmp sgt i32 %7, 0
  br i1 %17, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %16
  %18 = zext nneg i32 %7 to i64
  %19 = shl nuw nsw i64 %18, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %12, i8 0, i64 %19, i1 false), !tbaa !12
  br label %.preheader

.preheader:                                       ; preds = %5, %.lr.ph.preheader, %16
  %20 = phi i1 [ true, %.lr.ph.preheader ], [ false, %16 ], [ false, %5 ]
  %.05478 = phi ptr [ %12, %.lr.ph.preheader ], [ %12, %16 ], [ null, %5 ]
  %21 = getelementptr inbounds i8, ptr %0, i64 80
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = load i32, ptr %22, align 8, !tbaa !14
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph65, label %._crit_edge

.lr.ph65:                                         ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %22, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = zext nneg i32 %23 to i64
  %xtraiter = and i64 %27, 3
  %28 = icmp ult i32 %23, 4
  br i1 %28, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph65.new

.lr.ph65.new:                                     ; preds = %.lr.ph65
  %unroll_iter = and i64 %27, 2147483644
  br label %29

29:                                               ; preds = %29, %.lr.ph65.new
  %indvars.iv = phi i64 [ 0, %.lr.ph65.new ], [ %indvars.iv.next.3, %29 ]
  %niter = phi i64 [ 0, %.lr.ph65.new ], [ %niter.next.3, %29 ]
  %30 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv
  %31 = load i32, ptr %30, align 4, !tbaa !12
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr %.05478, i64 %32
  store i32 1, ptr %33, align 4, !tbaa !12
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %34 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next
  %35 = load i32, ptr %34, align 4, !tbaa !12
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %.05478, i64 %36
  store i32 1, ptr %37, align 4, !tbaa !12
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %38 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next.1
  %39 = load i32, ptr %38, align 4, !tbaa !12
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %.05478, i64 %40
  store i32 1, ptr %41, align 4, !tbaa !12
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %42 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next.2
  %43 = load i32, ptr %42, align 4, !tbaa !12
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %.05478, i64 %44
  store i32 1, ptr %45, align 4, !tbaa !12
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3.not = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3.not, label %._crit_edge.loopexit.unr-lcssa, label %29, !llvm.loop !17

._crit_edge.loopexit.unr-lcssa:                   ; preds = %29, %.lr.ph65
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph65 ], [ %indvars.iv.next.3, %29 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %46 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.epil
  %47 = load i32, ptr %46, align 4, !tbaa !12
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %.05478, i64 %48
  store i32 1, ptr %49, align 4, !tbaa !12
  %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, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !19

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.preheader
  %50 = getelementptr inbounds i8, ptr %0, i64 48
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = getelementptr inbounds i8, ptr %0, i64 104
  %53 = load i32, ptr %52, align 8, !tbaa !22
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds double, ptr %51, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %0, i64 152
  %58 = load ptr, ptr %57, align 8, !tbaa !24
  %59 = getelementptr inbounds double, ptr %58, i64 %54
  %60 = load double, ptr %59, align 8, !tbaa !23
  br i1 %20, label %.lr.ph69.preheader, label %._crit_edge70.thread

.lr.ph69.preheader:                               ; preds = %._crit_edge
  %61 = zext i32 %53 to i64
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %.lr.ph69

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %.thread
  %indvars.iv73 = phi i64 [ 0, %.lr.ph69.preheader ], [ %indvars.iv.next74, %.thread ]
  %.067 = phi double [ 1.000000e+300, %.lr.ph69.preheader ], [ %.1, %.thread ]
  %.not = icmp eq i64 %indvars.iv73, %61
  br i1 %.not, label %.thread, label %62

62:                                               ; preds = %.lr.ph69
  %63 = getelementptr inbounds double, ptr %58, i64 %indvars.iv73
  %64 = load double, ptr %63, align 8, !tbaa !23
  %65 = fsub double %60, %64
  %66 = tail call double @llvm.fabs.f64(double %65)
  %67 = fcmp ogt double %66, 1.000000e-13
  br i1 %67, label %68, label %.thread

68:                                               ; preds = %62
  %69 = getelementptr inbounds double, ptr %51, i64 %indvars.iv73
  %70 = load double, ptr %69, align 8, !tbaa !23
  %71 = fsub double %70, %56
  %72 = fdiv double %71, %65
  %73 = fcmp ogt double %72, 0.000000e+00
  %74 = tail call double @llvm.fabs.f64(double %.067)
  %75 = fcmp olt double %72, %74
  %or.cond = select i1 %73, i1 %75, i1 false
  br i1 %or.cond, label %76, label %.thread

76:                                               ; preds = %68
  br label %.thread

.thread:                                          ; preds = %62, %.lr.ph69, %76, %68
  %.1 = phi double [ %72, %76 ], [ %.067, %68 ], [ %.067, %.lr.ph69 ], [ %.067, %62 ]
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next74, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge70, label %.lr.ph69, !llvm.loop !25

._crit_edge70:                                    ; preds = %.thread
  %77 = fcmp oeq double %.1, 1.000000e+300
  br i1 %77, label %._crit_edge70.thread, label %80

._crit_edge70.thread:                             ; preds = %._crit_edge, %._crit_edge70
  %78 = getelementptr inbounds i8, ptr %0, i64 144
  %79 = load double, ptr %78, align 8, !tbaa !26
  br label %80

80:                                               ; preds = %._crit_edge70.thread, %._crit_edge70
  %.2 = phi double [ %79, %._crit_edge70.thread ], [ %.1, %._crit_edge70 ]
  %81 = getelementptr inbounds i8, ptr %0, i64 136
  store double %.2, ptr %81, align 8, !tbaa !27
  %82 = icmp eq ptr %.05478, null
  br i1 %82, label %83, label %85

83:                                               ; preds = %80
  %84 = tail call i32 @SMerror(i32 noundef 784, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #6
  br label %86

85:                                               ; preds = %80
  tail call void @free(ptr noundef nonnull %.05478) #6
  br label %86

86:                                               ; preds = %85, %83, %14, %3
  %.050 = phi i32 [ %4, %3 ], [ %84, %83 ], [ 0, %85 ], [ %15, %14 ]
  ret i32 %.050
}

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!13 = !{!6, !11, i64 80}
!14 = !{!15, !7, i64 0}
!15 = !{!"__SMactive", !7, i64 0, !7, i64 4, !11, i64 8, !10, i64 16}
!16 = !{!15, !11, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = !{!6, !11, i64 48}
!22 = !{!6, !7, i64 104}
!23 = !{!10, !10, i64 0}
!24 = !{!6, !11, i64 152}
!25 = distinct !{!25, !18}
!26 = !{!6, !10, i64 144}
!27 = !{!6, !10, i64 136}


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