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

107:                                              ; preds = %5
  %108 = call i32 @SMerror(i32 noundef 744, ptr noundef @.str.26, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.3)
  store i32 %108, ptr %6, align 4
  store i32 1, ptr %29, align 4
  br label %318

109:                                              ; preds = %5
  %110 = load double, ptr %15, align 8, !tbaa !9
  %111 = fcmp olt double %110, 1.000000e-15
  br i1 %111, label %112, label %114

112:                                              ; preds = %109
  %113 = call i32 @SMerror(i32 noundef 745, ptr noundef @.str.26, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.3)
  store i32 %113, ptr %6, align 4
  store i32 1, ptr %29, align 4
  br label %318

114:                                              ; preds = %109
  %115 = load double, ptr %16, align 8, !tbaa !9
  %116 = fcmp olt double %115, 1.000000e-15
  br i1 %116, label %117, label %119

117:                                              ; preds = %114
  %118 = call i32 @SMerror(i32 noundef 746, ptr noundef @.str.26, 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 %29, align 4
  br label %318

119:                                              ; preds = %114
  %120 = load double, ptr %24, align 8, !tbaa !9
  %121 = load double, ptr %28, align 8, !tbaa !9
  %122 = load double, ptr %25, align 8, !tbaa !9
  %123 = load double, ptr %27, align 8, !tbaa !9
  %124 = fmul double %122, %123
  %125 = fneg double %124
  %126 = call double @llvm.fmuladd.f64(double %120, double %121, double %125)
  %127 = load double, ptr %27, align 8, !tbaa !9
  %128 = load double, ptr %28, align 8, !tbaa !9
  %129 = fsub double %127, %128
  %130 = load double, ptr %23, align 8, !tbaa !9
  %131 = call double @llvm.fmuladd.f64(double %129, double %130, double %126)
  %132 = load double, ptr %25, align 8, !tbaa !9
  %133 = load double, ptr %24, align 8, !tbaa !9
  %134 = fsub double %132, %133
  %135 = load double, ptr %26, align 8, !tbaa !9
  %136 = call double @llvm.fmuladd.f64(double %134, double %135, double %131)
  store double %136, ptr %13, align 8, !tbaa !9
  %137 = load double, ptr %27, align 8, !tbaa !9
  %138 = load double, ptr %28, align 8, !tbaa !9
  %139 = fsub double %137, %138
  %140 = load double, ptr %16, align 8, !tbaa !9
  %141 = load double, ptr %15, align 8, !tbaa !9
  %142 = fmul double %140, %141
  %143 = fdiv double %139, %142
  %144 = load double, ptr %13, align 8, !tbaa !9
  %145 = load double, ptr %23, align 8, !tbaa !9
  %146 = load double, ptr %24, align 8, !tbaa !9
  %147 = fsub double %145, %146
  %148 = fmul double %144, %147
  %149 = load double, ptr %22, align 8, !tbaa !9
  %150 = load double, ptr %15, align 8, !tbaa !9
  %151 = fmul double %149, %150
  %152 = fdiv double %148, %151
  %153 = fsub double %143, %152
  %154 = load double, ptr %13, align 8, !tbaa !9
  %155 = load double, ptr %23, align 8, !tbaa !9
  %156 = load double, ptr %25, align 8, !tbaa !9
  %157 = fsub double %155, %156
  %158 = fmul double %154, %157
  %159 = load double, ptr %16, align 8, !tbaa !9
  %160 = load double, ptr %21, align 8, !tbaa !9
  %161 = fmul double %159, %160
  %162 = fdiv double %158, %161
  %163 = fsub double %153, %162
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = getelementptr inbounds ptr, ptr %164, i64 0
  %166 = load ptr, ptr %165, align 8, !tbaa !5
  %167 = getelementptr inbounds double, ptr %166, i64 0
  store double %163, ptr %167, align 8, !tbaa !9
  %168 = load double, ptr %25, align 8, !tbaa !9
  %169 = load double, ptr %24, align 8, !tbaa !9
  %170 = fsub double %168, %169
  %171 = load double, ptr %16, align 8, !tbaa !9
  %172 = load double, ptr %15, align 8, !tbaa !9
  %173 = fmul double %171, %172
  %174 = fdiv double %170, %173
  %175 = load double, ptr %13, align 8, !tbaa !9
  %176 = load double, ptr %26, align 8, !tbaa !9
  %177 = load double, ptr %27, align 8, !tbaa !9
  %178 = fsub double %176, %177
  %179 = fmul double %175, %178
  %180 = load double, ptr %22, align 8, !tbaa !9
  %181 = load double, ptr %15, align 8, !tbaa !9
  %182 = fmul double %180, %181
  %183 = fdiv double %179, %182
  %184 = fsub double %174, %183
  %185 = load double, ptr %13, align 8, !tbaa !9
  %186 = load double, ptr %26, align 8, !tbaa !9
  %187 = load double, ptr %28, align 8, !tbaa !9
  %188 = fsub double %186, %187
  %189 = fmul double %185, %188
  %190 = load double, ptr %16, align 8, !tbaa !9
  %191 = load double, ptr %21, align 8, !tbaa !9
  %192 = fmul double %190, %191
  %193 = fdiv double %189, %192
  %194 = fsub double %184, %193
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = getelementptr inbounds ptr, ptr %195, i64 0
  %197 = load ptr, ptr %196, align 8, !tbaa !5
  %198 = getelementptr inbounds double, ptr %197, i64 1
  store double %194, ptr %198, align 8, !tbaa !9
  %199 = load double, ptr %25, align 8, !tbaa !9
  %200 = load double, ptr %26, align 8, !tbaa !9
  %201 = load double, ptr %23, align 8, !tbaa !9
  %202 = load double, ptr %28, align 8, !tbaa !9
  %203 = fmul double %201, %202
  %204 = fneg double %203
  %205 = call double @llvm.fmuladd.f64(double %199, double %200, double %204)
  %206 = load double, ptr %28, align 8, !tbaa !9
  %207 = load double, ptr %26, align 8, !tbaa !9
  %208 = fsub double %206, %207
  %209 = load double, ptr %24, align 8, !tbaa !9
  %210 = call double @llvm.fmuladd.f64(double %208, double %209, double %205)
  %211 = load double, ptr %23, align 8, !tbaa !9
  %212 = load double, ptr %25, align 8, !tbaa !9
  %213 = fsub double %211, %212
  %214 = load double, ptr %27, align 8, !tbaa !9
  %215 = call double @llvm.fmuladd.f64(double %213, double %214, double %210)
  store double %215, ptr %13, align 8, !tbaa !9
  %216 = load double, ptr %27, align 8, !tbaa !9
  %217 = load double, ptr %28, align 8, !tbaa !9
  %218 = fsub double %216, %217
  %219 = load double, ptr %14, align 8, !tbaa !9
  %220 = load double, ptr %16, align 8, !tbaa !9
  %221 = fmul double %219, %220
  %222 = fdiv double %218, %221
  %223 = load double, ptr %13, align 8, !tbaa !9
  %224 = load double, ptr %23, align 8, !tbaa !9
  %225 = load double, ptr %24, align 8, !tbaa !9
  %226 = fsub double %224, %225
  %227 = fmul double %223, %226
  %228 = load double, ptr %14, align 8, !tbaa !9
  %229 = load double, ptr %22, align 8, !tbaa !9
  %230 = fmul double %228, %229
  %231 = fdiv double %227, %230
  %232 = fsub double %222, %231
  %233 = load ptr, ptr %10, align 8, !tbaa !5
  %234 = getelementptr inbounds ptr, ptr %233, i64 1
  %235 = load ptr, ptr %234, align 8, !tbaa !5
  %236 = getelementptr inbounds double, ptr %235, i64 0
  store double %232, ptr %236, align 8, !tbaa !9
  %237 = load double, ptr %25, align 8, !tbaa !9
  %238 = load double, ptr %24, align 8, !tbaa !9
  %239 = fsub double %237, %238
  %240 = load double, ptr %14, align 8, !tbaa !9
  %241 = load double, ptr %16, align 8, !tbaa !9
  %242 = fmul double %240, %241
  %243 = fdiv double %239, %242
  %244 = load double, ptr %13, align 8, !tbaa !9
  %245 = load double, ptr %26, align 8, !tbaa !9
  %246 = load double, ptr %27, align 8, !tbaa !9
  %247 = fsub double %245, %246
  %248 = fmul double %244, %247
  %249 = load double, ptr %14, align 8, !tbaa !9
  %250 = load double, ptr %22, align 8, !tbaa !9
  %251 = fmul double %249, %250
  %252 = fdiv double %248, %251
  %253 = fsub double %243, %252
  %254 = load ptr, ptr %10, align 8, !tbaa !5
  %255 = getelementptr inbounds ptr, ptr %254, i64 1
  %256 = load ptr, ptr %255, align 8, !tbaa !5
  %257 = getelementptr inbounds double, ptr %256, i64 1
  store double %253, ptr %257, align 8, !tbaa !9
  %258 = load double, ptr %23, align 8, !tbaa !9
  %259 = load double, ptr %27, align 8, !tbaa !9
  %260 = load double, ptr %24, align 8, !tbaa !9
  %261 = load double, ptr %26, align 8, !tbaa !9
  %262 = fmul double %260, %261
  %263 = fneg double %262
  %264 = call double @llvm.fmuladd.f64(double %258, double %259, double %263)
  %265 = load double, ptr %26, align 8, !tbaa !9
  %266 = load double, ptr %27, align 8, !tbaa !9
  %267 = fsub double %265, %266
  %268 = load double, ptr %25, align 8, !tbaa !9
  %269 = call double @llvm.fmuladd.f64(double %267, double %268, double %264)
  %270 = load double, ptr %24, align 8, !tbaa !9
  %271 = load double, ptr %23, align 8, !tbaa !9
  %272 = fsub double %270, %271
  %273 = load double, ptr %28, align 8, !tbaa !9
  %274 = call double @llvm.fmuladd.f64(double %272, double %273, double %269)
  store double %274, ptr %13, align 8, !tbaa !9
  %275 = load double, ptr %27, align 8, !tbaa !9
  %276 = load double, ptr %28, align 8, !tbaa !9
  %277 = fsub double %275, %276
  %278 = load double, ptr %15, align 8, !tbaa !9
  %279 = load double, ptr %14, align 8, !tbaa !9
  %280 = fmul double %278, %279
  %281 = fdiv double %277, %280
  %282 = load double, ptr %13, align 8, !tbaa !9
  %283 = load double, ptr %23, align 8, !tbaa !9
  %284 = load double, ptr %25, align 8, !tbaa !9
  %285 = fsub double %283, %284
  %286 = fmul double %282, %285
  %287 = load double, ptr %21, align 8, !tbaa !9
  %288 = load double, ptr %14, align 8, !tbaa !9
  %289 = fmul double %287, %288
  %290 = fdiv double %286, %289
  %291 = fsub double %281, %290
  %292 = load ptr, ptr %10, align 8, !tbaa !5
  %293 = getelementptr inbounds ptr, ptr %292, i64 2
  %294 = load ptr, ptr %293, align 8, !tbaa !5
  %295 = getelementptr inbounds double, ptr %294, i64 0
  store double %291, ptr %295, align 8, !tbaa !9
  %296 = load double, ptr %25, align 8, !tbaa !9
  %297 = load double, ptr %24, align 8, !tbaa !9
  %298 = fsub double %296, %297
  %299 = load double, ptr %15, align 8, !tbaa !9
  %300 = load double, ptr %14, align 8, !tbaa !9
  %301 = fmul double %299, %300
  %302 = fdiv double %298, %301
  %303 = load double, ptr %13, align 8, !tbaa !9
  %304 = load double, ptr %26, align 8, !tbaa !9
  %305 = load double, ptr %28, align 8, !tbaa !9
  %306 = fsub double %304, %305
  %307 = fmul double %303, %306
  %308 = load double, ptr %21, align 8, !tbaa !9
  %309 = load double, ptr %14, align 8, !tbaa !9
  %310 = fmul double %308, %309
  %311 = fdiv double %307, %310
  %312 = fsub double %302, %311
  %313 = load ptr, ptr %10, align 8, !tbaa !5
  %314 = getelementptr inbounds ptr, ptr %313, i64 2
  %315 = load ptr, ptr %314, align 8, !tbaa !5
  %316 = getelementptr inbounds double, ptr %315, i64 1
  store double %312, ptr %316, align 8, !tbaa !9
  %317 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 3, ptr %317, align 4, !tbaa !11
  store i32 0, ptr %12, align 4, !tbaa !11
  store i32 0, ptr %6, align 4
  store i32 1, ptr %29, align 4
  br label %318

318:                                              ; preds = %119, %117, %112, %107
  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 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %319 = load i32, ptr %6, align 4
  ret i32 %319
}

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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


; 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.26 = external hidden unnamed_addr constant [33 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 @SMcomputeScaledJacobianGradients(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 = extractelement <2 x double> %7, i64 0
  %10 = extractelement <2 x double> %8, i64 0
  %11 = fsub <2 x double> %7, %8
  %12 = extractelement <2 x double> %11, i64 0
  %13 = extractelement <2 x double> %7, i64 1
  %14 = extractelement <2 x double> %8, i64 1
  %15 = fsub double %13, %14
  %16 = fmul double %15, %15
  %17 = tail call double @llvm.fmuladd.f64(double %12, double %12, double %16)
  %sqrt147 = tail call double @llvm.sqrt.f64(double %17)
  %18 = fsub <2 x double> %6, %8
  %19 = fmul <2 x double> %18, %18
  %20 = extractelement <2 x double> %19, i64 1
  %21 = extractelement <2 x double> %18, i64 0
  %22 = tail call double @llvm.fmuladd.f64(double %21, double %21, double %20)
  %sqrt146 = tail call double @llvm.sqrt.f64(double %22)
  %23 = fmul double %22, %sqrt146
  %24 = extractelement <2 x double> %6, i64 0
  %25 = fsub <2 x double> %7, %6
  %26 = extractelement <2 x double> %25, i64 0
  %27 = extractelement <2 x double> %6, i64 1
  %28 = fsub double %13, %27
  %29 = fmul double %28, %28
  %30 = tail call double @llvm.fmuladd.f64(double %26, double %26, double %29)
  %sqrt = tail call double @llvm.sqrt.f64(double %30)
  %31 = fmul double %30, %sqrt
  %32 = fcmp olt double %sqrt147, 1.000000e-15
  br i1 %32, label %33, label %35

33:                                               ; preds = %5
  %34 = tail call i32 @SMerror(i32 noundef 744, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #4
  br label %113

35:                                               ; preds = %5
  %36 = fcmp olt double %sqrt146, 1.000000e-15
  br i1 %36, label %37, label %39

37:                                               ; preds = %35
  %38 = tail call i32 @SMerror(i32 noundef 745, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #4
  br label %113

39:                                               ; preds = %35
  %40 = fcmp olt double %sqrt, 1.000000e-15
  br i1 %40, label %41, label %43

41:                                               ; preds = %39
  %42 = tail call i32 @SMerror(i32 noundef 746, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #4
  br label %113

43:                                               ; preds = %39
  %44 = fneg double %10
  %45 = fmul double %13, %44
  %46 = tail call double @llvm.fmuladd.f64(double %9, double %14, double %45)
  %47 = tail call double @llvm.fmuladd.f64(double %15, double %24, double %46)
  %48 = fsub <2 x double> %8, %7
  %49 = extractelement <2 x double> %48, i64 0
  %50 = tail call double @llvm.fmuladd.f64(double %49, double %27, double %47)
  %51 = fmul double %sqrt, %sqrt146
  %52 = fsub <2 x double> %6, %7
  %53 = fmul double %31, %sqrt146
  %54 = fmul double %sqrt, %23
  %55 = load ptr, ptr %3, align 8, !tbaa !9
  %56 = insertelement <2 x double> poison, double %15, i64 0
  %57 = shufflevector <2 x double> %56, <2 x double> %48, <2 x i32> <i32 0, i32 2>
  %58 = insertelement <2 x double> poison, double %51, i64 0
  %59 = shufflevector <2 x double> %58, <2 x double> poison, <2 x i32> zeroinitializer
  %60 = fdiv <2 x double> %57, %59
  %61 = insertelement <2 x double> poison, double %50, i64 0
  %62 = shufflevector <2 x double> %61, <2 x double> poison, <2 x i32> zeroinitializer
  %63 = fmul <2 x double> %52, %62
  %64 = insertelement <2 x double> poison, double %53, i64 0
  %65 = shufflevector <2 x double> %64, <2 x double> poison, <2 x i32> zeroinitializer
  %66 = fdiv <2 x double> %63, %65
  %67 = fsub <2 x double> %60, %66
  %68 = fmul <2 x double> %18, %62
  %69 = insertelement <2 x double> poison, double %54, i64 0
  %70 = shufflevector <2 x double> %69, <2 x double> poison, <2 x i32> zeroinitializer
  %71 = fdiv <2 x double> %68, %70
  %72 = fsub <2 x double> %67, %71
  store <2 x double> %72, ptr %55, align 8, !tbaa !5
  %73 = fneg double %24
  %74 = fmul double %14, %73
  %75 = tail call double @llvm.fmuladd.f64(double %10, double %27, double %74)
  %76 = fsub double %14, %27
  %77 = tail call double @llvm.fmuladd.f64(double %76, double %9, double %75)
  %78 = tail call double @llvm.fmuladd.f64(double %21, double %13, double %77)
  %79 = fmul double %sqrt, %sqrt147
  %80 = fmul double %31, %sqrt147
  %81 = getelementptr inbounds i8, ptr %3, i64 8
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = insertelement <2 x double> poison, double %79, i64 0
  %84 = shufflevector <2 x double> %83, <2 x double> poison, <2 x i32> zeroinitializer
  %85 = fdiv <2 x double> %57, %84
  %86 = insertelement <2 x double> poison, double %78, i64 0
  %87 = shufflevector <2 x double> %86, <2 x double> poison, <2 x i32> zeroinitializer
  %88 = fmul <2 x double> %52, %87
  %89 = insertelement <2 x double> poison, double %80, i64 0
  %90 = shufflevector <2 x double> %89, <2 x double> poison, <2 x i32> zeroinitializer
  %91 = fdiv <2 x double> %88, %90
  %92 = fsub <2 x double> %85, %91
  store <2 x double> %92, ptr %82, align 8, !tbaa !5
  %93 = fneg double %9
  %94 = fmul double %27, %93
  %95 = tail call double @llvm.fmuladd.f64(double %24, double %13, double %94)
  %96 = extractelement <2 x double> %52, i64 1
  %97 = tail call double @llvm.fmuladd.f64(double %96, double %10, double %95)
  %98 = tail call double @llvm.fmuladd.f64(double %26, double %14, double %97)
  %99 = fmul double %sqrt146, %sqrt147
  %100 = fmul double %sqrt147, %23
  %101 = getelementptr inbounds i8, ptr %3, i64 16
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = insertelement <2 x double> poison, double %99, i64 0
  %104 = shufflevector <2 x double> %103, <2 x double> poison, <2 x i32> zeroinitializer
  %105 = fdiv <2 x double> %57, %104
  %106 = insertelement <2 x double> poison, double %98, i64 0
  %107 = shufflevector <2 x double> %106, <2 x double> poison, <2 x i32> zeroinitializer
  %108 = fmul <2 x double> %18, %107
  %109 = insertelement <2 x double> poison, double %100, i64 0
  %110 = shufflevector <2 x double> %109, <2 x double> poison, <2 x i32> zeroinitializer
  %111 = fdiv <2 x double> %108, %110
  %112 = fsub <2 x double> %105, %111
  store <2 x double> %112, ptr %102, align 8, !tbaa !5
  store i32 3, ptr %4, align 4, !tbaa !11
  br label %113

113:                                              ; preds = %43, %41, %37, %33
  %.0 = phi i32 [ %34, %33 ], [ %38, %37 ], [ %42, %41 ], [ 0, %43 ]
  ret i32 %.0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(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,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass,VectorCombinePass