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

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

@.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.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.24 = 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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @SMcomputeInteriorSineGradients(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #4 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !9
  %21 = load i32, ptr %19, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = mul i64 8, %22
  %24 = icmp eq i64 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %5
  store ptr null, ptr %17, align 8, !tbaa !5
  br label %36

26:                                               ; preds = %5
  %27 = load i32, ptr %19, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = mul i64 8, %28
  %30 = call noalias ptr @malloc(i64 noundef %29) #7
  store ptr %30, ptr %17, align 8, !tbaa !5
  %31 = load ptr, ptr %17, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %35

33:                                               ; preds = %26
  %34 = call i32 @SMerror(i32 noundef 652, ptr noundef @.str.24, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %34, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

35:                                               ; preds = %26
  br label %36

36:                                               ; preds = %35, %25
  %37 = load i32, ptr %19, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = mul i64 8, %38
  %40 = icmp eq i64 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %36
  store ptr null, ptr %18, align 8, !tbaa !5
  br label %52

42:                                               ; preds = %36
  %43 = load i32, ptr %19, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = mul i64 8, %44
  %46 = call noalias ptr @malloc(i64 noundef %45) #7
  store ptr %46, ptr %18, align 8, !tbaa !5
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %51

49:                                               ; preds = %42
  %50 = call i32 @SMerror(i32 noundef 653, ptr noundef @.str.24, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %50, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

51:                                               ; preds = %42
  br label %52

52:                                               ; preds = %51, %41
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %72, %52
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = load i32, ptr %19, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %75

57:                                               ; preds = %53
  %58 = call noalias ptr @malloc(i64 noundef 16) #7
  %59 = load ptr, ptr %18, align 8, !tbaa !5
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds ptr, ptr %59, i64 %61
  store ptr %58, ptr %62, align 8, !tbaa !5
  %63 = load ptr, ptr %18, align 8, !tbaa !5
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = icmp eq ptr %67, null
  br i1 %68, label %69, label %71

69:                                               ; preds = %57
  %70 = call i32 @SMerror(i32 noundef 655, ptr noundef @.str.24, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %70, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

71:                                               ; preds = %57
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %13, align 4, !tbaa !9
  br label %53, !llvm.loop !11

75:                                               ; preds = %53
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = call i32 @SMcomputeInteriorTriCosines(ptr noundef %76, ptr noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef %80)
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = call i32 @SMcomputeInteriorCosGradients(ptr noundef %82, ptr noundef %83, ptr noundef %84, ptr noundef %85, ptr noundef %86)
  %88 = load ptr, ptr %17, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %88, i64 0
  %90 = load double, ptr %89, align 8, !tbaa !13
  %91 = load ptr, ptr %17, align 8, !tbaa !5
  %92 = getelementptr inbounds double, ptr %91, i64 0
  %93 = load double, ptr %92, align 8, !tbaa !13
  %94 = fneg double %90
  %95 = call double @llvm.fmuladd.f64(double %94, double %93, double 1.000000e+00)
  %96 = call double @sqrt(double noundef %95) #6
  store double %96, ptr %14, align 8, !tbaa !13
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = getelementptr inbounds double, ptr %97, i64 1
  %99 = load double, ptr %98, align 8, !tbaa !13
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = getelementptr inbounds double, ptr %100, i64 1
  %102 = load double, ptr %101, align 8, !tbaa !13
  %103 = fneg double %99
  %104 = call double @llvm.fmuladd.f64(double %103, double %102, double 1.000000e+00)
  %105 = call double @sqrt(double noundef %104) #6
  store double %105, ptr %15, align 8, !tbaa !13
  %106 = load ptr, ptr %17, align 8, !tbaa !5
  %107 = getelementptr inbounds double, ptr %106, i64 2
  %108 = load double, ptr %107, align 8, !tbaa !13
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = getelementptr inbounds double, ptr %109, i64 2
  %111 = load double, ptr %110, align 8, !tbaa !13
  %112 = fneg double %108
  %113 = call double @llvm.fmuladd.f64(double %112, double %111, double 1.000000e+00)
  %114 = call double @sqrt(double noundef %113) #6
  store double %114, ptr %16, align 8, !tbaa !13
  %115 = load double, ptr %14, align 8, !tbaa !13
  %116 = fcmp olt double %115, 1.000000e-15
  br i1 %116, label %117, label %119

117:                                              ; preds = %75
  %118 = call i32 @SMerror(i32 noundef 665, ptr noundef @.str.24, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.3)
  store i32 %118, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

119:                                              ; preds = %75
  %120 = load double, ptr %14, align 8, !tbaa !13
  %121 = fdiv double -1.000000e+00, %120
  %122 = load ptr, ptr %17, align 8, !tbaa !5
  %123 = getelementptr inbounds double, ptr %122, i64 0
  %124 = load double, ptr %123, align 8, !tbaa !13
  %125 = fmul double %121, %124
  %126 = load ptr, ptr %18, align 8, !tbaa !5
  %127 = getelementptr inbounds ptr, ptr %126, i64 0
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds double, ptr %128, i64 0
  %130 = load double, ptr %129, align 8, !tbaa !13
  %131 = fmul double %125, %130
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  %133 = getelementptr inbounds ptr, ptr %132, i64 0
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds double, ptr %134, i64 0
  store double %131, ptr %135, align 8, !tbaa !13
  %136 = load double, ptr %14, align 8, !tbaa !13
  %137 = fdiv double -1.000000e+00, %136
  %138 = load ptr, ptr %17, align 8, !tbaa !5
  %139 = getelementptr inbounds double, ptr %138, i64 0
  %140 = load double, ptr %139, align 8, !tbaa !13
  %141 = fmul double %137, %140
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  %143 = getelementptr inbounds ptr, ptr %142, i64 0
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 1
  %146 = load double, ptr %145, align 8, !tbaa !13
  %147 = fmul double %141, %146
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds ptr, ptr %148, i64 0
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds double, ptr %150, i64 1
  store double %147, ptr %151, align 8, !tbaa !13
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %172, %119
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = load i32, ptr %19, align 4, !tbaa !9
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %156, label %175

156:                                              ; preds = %152
  %157 = load ptr, ptr %18, align 8, !tbaa !5
  %158 = load i32, ptr %13, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds ptr, ptr %157, i64 %159
  %161 = load ptr, ptr %160, align 8, !tbaa !5
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %165

163:                                              ; preds = %156
  %164 = call i32 @SMerror(i32 noundef 670, ptr noundef @.str.24, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %164, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

165:                                              ; preds = %156
  %166 = load ptr, ptr %18, align 8, !tbaa !5
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds ptr, ptr %166, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  call void @free(ptr noundef %170) #6
  br label %171

171:                                              ; preds = %165
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %13, align 4, !tbaa !9
  br label %152, !llvm.loop !15

175:                                              ; preds = %152
  %176 = load ptr, ptr %17, align 8, !tbaa !5
  %177 = icmp eq ptr %176, null
  br i1 %177, label %178, label %180

178:                                              ; preds = %175
  %179 = call i32 @SMerror(i32 noundef 671, ptr noundef @.str.24, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %179, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

180:                                              ; preds = %175
  %181 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %181) #6
  br label %182

182:                                              ; preds = %180
  %183 = load ptr, ptr %18, align 8, !tbaa !5
  %184 = icmp eq ptr %183, null
  br i1 %184, label %185, label %187

185:                                              ; preds = %182
  %186 = call i32 @SMerror(i32 noundef 671, ptr noundef @.str.24, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %186, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

187:                                              ; preds = %182
  %188 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %188) #6
  br label %189

189:                                              ; preds = %187
  %190 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 1, ptr %190, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %191

191:                                              ; preds = %189, %185, %178, %163, %117, %69, %49, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  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 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %192 = load i32, ptr %6, align 4
  ret i32 %192
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { "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 "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 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12}


; 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.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #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 nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMcomputeInteriorTriCosines(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

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

; Function Attrs: nounwind uwtable
define dso_local i32 @SMcomputeInteriorSineGradients(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #6
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %10

8:                                                ; preds = %5
  %9 = tail call i32 @SMerror(i32 noundef 652, ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #7
  br label %55

10:                                               ; preds = %5
  %11 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #6
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %15

13:                                               ; preds = %10
  %14 = tail call i32 @SMerror(i32 noundef 653, ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #7
  br label %55

15:                                               ; preds = %10
  %16 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #6
  store ptr %16, ptr %11, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %.critedge

18:                                               ; preds = %15
  %19 = tail call i32 @SMerror(i32 noundef 655, ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #7
  br label %55

.critedge:                                        ; preds = %15
  %20 = tail call i32 @SMcomputeInteriorTriCosines(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %6, ptr noundef %4)
  %21 = tail call i32 @SMcomputeInteriorCosGradients(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %11, ptr noundef %4)
  %22 = load double, ptr %6, align 8, !tbaa !9
  %23 = fneg double %22
  %24 = tail call double @llvm.fmuladd.f64(double %23, double %22, double 1.000000e+00)
  %25 = tail call double @sqrt(double noundef %24) #7
  %26 = getelementptr inbounds i8, ptr %6, i64 8
  %27 = load double, ptr %26, align 8, !tbaa !9
  %28 = fneg double %27
  %29 = tail call double @llvm.fmuladd.f64(double %28, double %27, double 1.000000e+00)
  %30 = fcmp olt double %29, 0.000000e+00
  br i1 %30, label %cdce.call, label %cdce.end, !prof !11

cdce.call:                                        ; preds = %.critedge
  %31 = tail call double @sqrt(double noundef %29) #7
  br label %cdce.end

cdce.end:                                         ; preds = %.critedge, %cdce.call
  %32 = getelementptr inbounds i8, ptr %6, i64 16
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = fneg double %33
  %35 = tail call double @llvm.fmuladd.f64(double %34, double %33, double 1.000000e+00)
  %36 = fcmp olt double %35, 0.000000e+00
  br i1 %36, label %cdce.call59, label %cdce.end60, !prof !11

cdce.call59:                                      ; preds = %cdce.end
  %37 = tail call double @sqrt(double noundef %35) #7
  br label %cdce.end60

cdce.end60:                                       ; preds = %cdce.end, %cdce.call59
  %38 = fcmp olt double %25, 1.000000e-15
  br i1 %38, label %39, label %41

39:                                               ; preds = %cdce.end60
  %40 = tail call i32 @SMerror(i32 noundef 665, ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #7
  br label %55

41:                                               ; preds = %cdce.end60
  %42 = fdiv double -1.000000e+00, %25
  %43 = load double, ptr %6, align 8, !tbaa !9
  %44 = fmul double %42, %43
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = load double, ptr %45, align 8, !tbaa !9
  %47 = fmul double %44, %46
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  store double %47, ptr %48, align 8, !tbaa !9
  %49 = load double, ptr %6, align 8, !tbaa !9
  %50 = fmul double %42, %49
  %51 = getelementptr inbounds i8, ptr %45, i64 8
  %52 = load double, ptr %51, align 8, !tbaa !9
  %53 = fmul double %50, %52
  %54 = getelementptr inbounds i8, ptr %48, i64 8
  store double %53, ptr %54, align 8, !tbaa !9
  tail call void @free(ptr noundef %45) #7
  tail call void @free(ptr noundef nonnull %6) #7
  tail call void @free(ptr noundef nonnull %11) #7
  store i32 1, ptr %4, align 4, !tbaa !12
  br label %55

55:                                               ; preds = %41, %39, %18, %13, %8
  %.0 = phi i32 [ %19, %18 ], [ %40, %39 ], [ 0, %41 ], [ %14, %13 ], [ %9, %8 ]
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #3 = { 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 #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 = { 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 #6 = { nounwind allocsize(0) }
attributes #7 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LibCallsShrinkWrapPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass