; 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.20 = external hidden unnamed_addr constant [22 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
define dso_local i32 @SMcomputeCosGradients(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 i32, align 4
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = 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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 3, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %32, i64 0
  %34 = load double, ptr %33, align 8, !tbaa !11
  store double %34, ptr %15, align 8, !tbaa !11
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds double, ptr %35, i64 0
  %37 = load double, ptr %36, align 8, !tbaa !11
  store double %37, ptr %16, align 8, !tbaa !11
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds double, ptr %38, i64 0
  %40 = load double, ptr %39, align 8, !tbaa !11
  store double %40, ptr %17, align 8, !tbaa !11
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %41, i64 1
  %43 = load double, ptr %42, align 8, !tbaa !11
  store double %43, ptr %18, align 8, !tbaa !11
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds double, ptr %44, i64 1
  %46 = load double, ptr %45, align 8, !tbaa !11
  store double %46, ptr %19, align 8, !tbaa !11
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds double, ptr %47, i64 1
  %49 = load double, ptr %48, align 8, !tbaa !11
  store double %49, ptr %20, align 8, !tbaa !11
  %50 = load double, ptr %16, align 8, !tbaa !11
  %51 = load double, ptr %15, align 8, !tbaa !11
  %52 = fsub double %50, %51
  %53 = load double, ptr %16, align 8, !tbaa !11
  %54 = load double, ptr %15, align 8, !tbaa !11
  %55 = fsub double %53, %54
  %56 = load double, ptr %19, align 8, !tbaa !11
  %57 = load double, ptr %18, align 8, !tbaa !11
  %58 = fsub double %56, %57
  %59 = load double, ptr %19, align 8, !tbaa !11
  %60 = load double, ptr %18, align 8, !tbaa !11
  %61 = fsub double %59, %60
  %62 = fmul double %58, %61
  %63 = call double @llvm.fmuladd.f64(double %52, double %55, double %62)
  store double %63, ptr %24, align 8, !tbaa !11
  %64 = load double, ptr %15, align 8, !tbaa !11
  %65 = load double, ptr %17, align 8, !tbaa !11
  %66 = fsub double %64, %65
  %67 = load double, ptr %15, align 8, !tbaa !11
  %68 = load double, ptr %17, align 8, !tbaa !11
  %69 = fsub double %67, %68
  %70 = load double, ptr %18, align 8, !tbaa !11
  %71 = load double, ptr %20, align 8, !tbaa !11
  %72 = fsub double %70, %71
  %73 = load double, ptr %18, align 8, !tbaa !11
  %74 = load double, ptr %20, align 8, !tbaa !11
  %75 = fsub double %73, %74
  %76 = fmul double %72, %75
  %77 = call double @llvm.fmuladd.f64(double %66, double %69, double %76)
  store double %77, ptr %25, align 8, !tbaa !11
  %78 = load double, ptr %17, align 8, !tbaa !11
  %79 = load double, ptr %16, align 8, !tbaa !11
  %80 = fsub double %78, %79
  %81 = load double, ptr %17, align 8, !tbaa !11
  %82 = load double, ptr %16, align 8, !tbaa !11
  %83 = fsub double %81, %82
  %84 = load double, ptr %20, align 8, !tbaa !11
  %85 = load double, ptr %19, align 8, !tbaa !11
  %86 = fsub double %84, %85
  %87 = load double, ptr %20, align 8, !tbaa !11
  %88 = load double, ptr %19, align 8, !tbaa !11
  %89 = fsub double %87, %88
  %90 = fmul double %86, %89
  %91 = call double @llvm.fmuladd.f64(double %80, double %83, double %90)
  store double %91, ptr %26, align 8, !tbaa !11
  %92 = load double, ptr %24, align 8, !tbaa !11
  %93 = call double @sqrt(double noundef %92) #5
  store double %93, ptr %21, align 8, !tbaa !11
  %94 = load double, ptr %25, align 8, !tbaa !11
  %95 = call double @sqrt(double noundef %94) #5
  store double %95, ptr %22, align 8, !tbaa !11
  %96 = load double, ptr %26, align 8, !tbaa !11
  %97 = call double @sqrt(double noundef %96) #5
  store double %97, ptr %23, align 8, !tbaa !11
  %98 = load double, ptr %21, align 8, !tbaa !11
  %99 = fcmp olt double %98, 1.000000e-15
  br i1 %99, label %100, label %102

100:                                              ; preds = %5
  %101 = call i32 @SMerror(i32 noundef 506, ptr noundef @.str.20, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.3)
  store i32 %101, ptr %6, align 4
  store i32 1, ptr %31, align 4
  br label %228

102:                                              ; preds = %5
  %103 = load double, ptr %22, align 8, !tbaa !11
  %104 = fcmp olt double %103, 1.000000e-15
  br i1 %104, label %105, label %107

105:                                              ; preds = %102
  %106 = call i32 @SMerror(i32 noundef 507, ptr noundef @.str.20, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.3)
  store i32 %106, ptr %6, align 4
  store i32 1, ptr %31, align 4
  br label %228

107:                                              ; preds = %102
  %108 = load double, ptr %23, align 8, !tbaa !11
  %109 = fcmp olt double %108, 1.000000e-15
  br i1 %109, label %110, label %112

110:                                              ; preds = %107
  %111 = call i32 @SMerror(i32 noundef 508, ptr noundef @.str.20, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.3)
  store i32 %111, ptr %6, align 4
  store i32 1, ptr %31, align 4
  br label %228

112:                                              ; preds = %107
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %222, %112
  %114 = load i32, ptr %13, align 4, !tbaa !9
  %115 = load i32, ptr %14, align 4, !tbaa !9
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %117, label %225

117:                                              ; preds = %113
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %120, label %147

120:                                              ; preds = %117
  %121 = load double, ptr %24, align 8, !tbaa !11
  %122 = load double, ptr %26, align 8, !tbaa !11
  %123 = fadd double %121, %122
  %124 = load double, ptr %25, align 8, !tbaa !11
  %125 = fsub double %123, %124
  %126 = load double, ptr %24, align 8, !tbaa !11
  %127 = fmul double 2.000000e+00, %126
  %128 = load double, ptr %22, align 8, !tbaa !11
  %129 = fmul double %127, %128
  %130 = fdiv double %125, %129
  %131 = load double, ptr %21, align 8, !tbaa !11
  %132 = fdiv double 1.000000e+00, %131
  %133 = fmul double %130, %132
  store double %133, ptr %29, align 8, !tbaa !11
  %134 = load double, ptr %25, align 8, !tbaa !11
  %135 = load double, ptr %26, align 8, !tbaa !11
  %136 = fadd double %134, %135
  %137 = load double, ptr %24, align 8, !tbaa !11
  %138 = fsub double %136, %137
  %139 = load double, ptr %21, align 8, !tbaa !11
  %140 = fmul double 2.000000e+00, %139
  %141 = load double, ptr %25, align 8, !tbaa !11
  %142 = fmul double %140, %141
  %143 = fdiv double %138, %142
  %144 = load double, ptr %22, align 8, !tbaa !11
  %145 = fdiv double 1.000000e+00, %144
  %146 = fmul double %143, %145
  store double %146, ptr %30, align 8, !tbaa !11
  br label %187

147:                                              ; preds = %117
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = icmp eq i32 %148, 1
  br i1 %149, label %150, label %168

150:                                              ; preds = %147
  %151 = load double, ptr %24, align 8, !tbaa !11
  %152 = load double, ptr %25, align 8, !tbaa !11
  %153 = fadd double %151, %152
  %154 = load double, ptr %26, align 8, !tbaa !11
  %155 = fsub double %153, %154
  %156 = load double, ptr %24, align 8, !tbaa !11
  %157 = fmul double 2.000000e+00, %156
  %158 = load double, ptr %23, align 8, !tbaa !11
  %159 = fmul double %157, %158
  %160 = fdiv double %155, %159
  %161 = load double, ptr %21, align 8, !tbaa !11
  %162 = fdiv double 1.000000e+00, %161
  %163 = fmul double %160, %162
  store double %163, ptr %29, align 8, !tbaa !11
  %164 = load double, ptr %21, align 8, !tbaa !11
  %165 = load double, ptr %23, align 8, !tbaa !11
  %166 = fmul double %164, %165
  %167 = fdiv double -1.000000e+00, %166
  store double %167, ptr %30, align 8, !tbaa !11
  br label %186

168:                                              ; preds = %147
  %169 = load double, ptr %22, align 8, !tbaa !11
  %170 = load double, ptr %23, align 8, !tbaa !11
  %171 = fmul double %169, %170
  %172 = fdiv double -1.000000e+00, %171
  store double %172, ptr %29, align 8, !tbaa !11
  %173 = load double, ptr %25, align 8, !tbaa !11
  %174 = load double, ptr %24, align 8, !tbaa !11
  %175 = fadd double %173, %174
  %176 = load double, ptr %26, align 8, !tbaa !11
  %177 = fsub double %175, %176
  %178 = load double, ptr %25, align 8, !tbaa !11
  %179 = fmul double 2.000000e+00, %178
  %180 = load double, ptr %23, align 8, !tbaa !11
  %181 = fmul double %179, %180
  %182 = fdiv double %177, %181
  %183 = load double, ptr %22, align 8, !tbaa !11
  %184 = fdiv double 1.000000e+00, %183
  %185 = fmul double %182, %184
  store double %185, ptr %30, align 8, !tbaa !11
  br label %186

186:                                              ; preds = %168, %150
  br label %187

187:                                              ; preds = %186, %120
  %188 = load double, ptr %29, align 8, !tbaa !11
  %189 = load double, ptr %15, align 8, !tbaa !11
  %190 = load double, ptr %16, align 8, !tbaa !11
  %191 = fsub double %189, %190
  %192 = load double, ptr %30, align 8, !tbaa !11
  %193 = load double, ptr %15, align 8, !tbaa !11
  %194 = load double, ptr %17, align 8, !tbaa !11
  %195 = fsub double %193, %194
  %196 = fmul double %192, %195
  %197 = call double @llvm.fmuladd.f64(double %188, double %191, double %196)
  store double %197, ptr %27, align 8, !tbaa !11
  %198 = load double, ptr %29, align 8, !tbaa !11
  %199 = load double, ptr %18, align 8, !tbaa !11
  %200 = load double, ptr %19, align 8, !tbaa !11
  %201 = fsub double %199, %200
  %202 = load double, ptr %30, align 8, !tbaa !11
  %203 = load double, ptr %18, align 8, !tbaa !11
  %204 = load double, ptr %20, align 8, !tbaa !11
  %205 = fsub double %203, %204
  %206 = fmul double %202, %205
  %207 = call double @llvm.fmuladd.f64(double %198, double %201, double %206)
  store double %207, ptr %28, align 8, !tbaa !11
  %208 = load double, ptr %27, align 8, !tbaa !11
  %209 = load ptr, ptr %10, align 8, !tbaa !5
  %210 = load i32, ptr %13, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds ptr, ptr %209, i64 %211
  %213 = load ptr, ptr %212, align 8, !tbaa !5
  %214 = getelementptr inbounds double, ptr %213, i64 0
  store double %208, ptr %214, align 8, !tbaa !11
  %215 = load double, ptr %28, align 8, !tbaa !11
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds ptr, ptr %216, i64 %218
  %220 = load ptr, ptr %219, align 8, !tbaa !5
  %221 = getelementptr inbounds double, ptr %220, i64 1
  store double %215, ptr %221, align 8, !tbaa !11
  br label %222

222:                                              ; preds = %187
  %223 = load i32, ptr %13, align 4, !tbaa !9
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %13, align 4, !tbaa !9
  br label %113, !llvm.loop !13

225:                                              ; preds = %113
  %226 = load i32, ptr %14, align 4, !tbaa !9
  %227 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %226, ptr %227, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %31, align 4
  br label %228

228:                                              ; preds = %225, %110, %105, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %229 = load i32, ptr %6, align 4
  ret i32 %229
}

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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.20 = external hidden unnamed_addr constant [22 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: nounwind uwtable
define dso_local i32 @SMcomputeCosGradients(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #2 {
  %6 = load <2 x double>, ptr %0, align 8, !tbaa !5
  %7 = load <2 x double>, ptr %1, align 8, !tbaa !5
  %8 = load <2 x double>, ptr %2, align 8, !tbaa !5
  %9 = fsub <2 x double> %6, %8
  %10 = fmul <2 x double> %9, %9
  %11 = extractelement <2 x double> %10, i64 1
  %12 = extractelement <2 x double> %9, i64 0
  %13 = tail call double @llvm.fmuladd.f64(double %12, double %12, double %11)
  %sqrt95 = tail call double @llvm.sqrt.f64(double %13)
  %14 = shufflevector <2 x double> %7, <2 x double> %8, <2 x i32> <i32 0, i32 2>
  %15 = shufflevector <2 x double> %6, <2 x double> %7, <2 x i32> <i32 0, i32 2>
  %16 = fsub <2 x double> %14, %15
  %17 = shufflevector <2 x double> %7, <2 x double> %8, <2 x i32> <i32 1, i32 3>
  %18 = shufflevector <2 x double> %6, <2 x double> %7, <2 x i32> <i32 1, i32 3>
  %19 = fsub <2 x double> %17, %18
  %20 = fmul <2 x double> %19, %19
  %21 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> %16, <2 x double> %20)
  %22 = tail call <2 x double> @llvm.sqrt.v2f64(<2 x double> %21)
  %23 = extractelement <2 x double> %22, i64 0
  %24 = fcmp olt double %23, 1.000000e-15
  br i1 %24, label %25, label %27

25:                                               ; preds = %5
  %26 = tail call i32 @SMerror(i32 noundef 506, ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #4
  br label %94

27:                                               ; preds = %5
  %28 = fcmp olt double %sqrt95, 1.000000e-15
  br i1 %28, label %29, label %31

29:                                               ; preds = %27
  %30 = tail call i32 @SMerror(i32 noundef 507, ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #4
  br label %94

31:                                               ; preds = %27
  %32 = extractelement <2 x double> %22, i64 1
  %33 = fcmp olt double %32, 1.000000e-15
  br i1 %33, label %34, label %36

34:                                               ; preds = %31
  %35 = tail call i32 @SMerror(i32 noundef 508, ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #4
  br label %94

36:                                               ; preds = %31
  %37 = fsub <2 x double> %6, %7
  %38 = extractelement <2 x double> %21, i64 0
  %39 = fadd double %38, %13
  %40 = extractelement <2 x double> %21, i64 1
  %41 = fsub double %39, %40
  %42 = fmul double %38, 2.000000e+00
  %43 = extractelement <2 x double> %22, i64 1
  %44 = fmul double %42, %43
  %45 = fdiv double %41, %44
  %46 = extractelement <2 x double> %22, i64 0
  %47 = fdiv double 1.000000e+00, %46
  %48 = fmul double %47, %45
  %49 = fmul double %23, %32
  %50 = fdiv double -1.000000e+00, %49
  %51 = fmul double %sqrt95, %32
  %52 = fdiv double -1.000000e+00, %51
  %53 = fmul double %13, 2.000000e+00
  %54 = fmul double %53, %32
  %55 = fdiv double %41, %54
  %56 = fadd double %13, %40
  %57 = fsub double %56, %38
  %58 = fmul double %23, 2.000000e+00
  %59 = fmul double %13, %58
  %60 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %57, i64 1
  %61 = insertelement <2 x double> poison, double %sqrt95, i64 0
  %62 = insertelement <2 x double> %61, double %59, i64 1
  %63 = fdiv <2 x double> %60, %62
  %64 = extractelement <2 x double> %63, i64 0
  %65 = fmul double %64, %55
  %shift = shufflevector <2 x double> %63, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %66 = fmul <2 x double> %63, %shift
  %67 = fadd double %38, %40
  %68 = fsub double %67, %13
  %69 = fmul double %42, %sqrt95
  %70 = fdiv double %68, %69
  %71 = fmul double %47, %70
  %72 = load ptr, ptr %3, align 8, !tbaa !9
  %73 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> zeroinitializer
  %74 = fmul <2 x double> %9, %73
  %75 = insertelement <2 x double> poison, double %71, i64 0
  %76 = shufflevector <2 x double> %75, <2 x double> poison, <2 x i32> zeroinitializer
  %77 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %76, <2 x double> %37, <2 x double> %74)
  store <2 x double> %77, ptr %72, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %3, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = insertelement <2 x double> poison, double %50, i64 0
  %81 = shufflevector <2 x double> %80, <2 x double> poison, <2 x i32> zeroinitializer
  %82 = fmul <2 x double> %9, %81
  %83 = insertelement <2 x double> poison, double %48, i64 0
  %84 = shufflevector <2 x double> %83, <2 x double> poison, <2 x i32> zeroinitializer
  %85 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %84, <2 x double> %37, <2 x double> %82)
  store <2 x double> %85, ptr %79, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %3, i64 16
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = insertelement <2 x double> poison, double %65, i64 0
  %89 = shufflevector <2 x double> %88, <2 x double> poison, <2 x i32> zeroinitializer
  %90 = fmul <2 x double> %9, %89
  %91 = insertelement <2 x double> poison, double %52, i64 0
  %92 = shufflevector <2 x double> %91, <2 x double> poison, <2 x i32> zeroinitializer
  %93 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %92, <2 x double> %37, <2 x double> %90)
  store <2 x double> %93, ptr %87, align 8, !tbaa !5
  store i32 3, ptr %4, align 4, !tbaa !11
  br label %94

94:                                               ; preds = %36, %34, %29, %25
  %.090 = phi i32 [ %26, %25 ], [ %30, %29 ], [ %35, %34 ], [ 0, %36 ]
  ret i32 %.090
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.sqrt.v2f64(<2 x double>) #3

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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass