; LLVM IR from VT-ICAM/cfem :: cfem (cf_physical_hessian)

; 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.cf_ref_arrays_s = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double }
%struct.cf_local_element_s = type { [3 x double], [3 x double], [4 x double], [2 x double], double, double, ptr }

; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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

; Function Attrs: nounwind uwtable
define dso_local void @cf_physical_hessian(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 %2, ptr noundef nonnull align 8 %3, ptr noundef nonnull align 8 %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, 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
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !9
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = mul nsw i32 %27, %30
  %32 = zext i32 %31 to i64
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !9
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = mul nsw i32 %35, %38
  %40 = zext i32 %39 to i64
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !9
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = mul nsw i32 %43, %46
  %48 = zext i32 %47 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !13
  store i32 %51, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !9
  store i32 %54, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.cf_local_element_s, ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds [4 x double], ptr %56, i64 0, i64 0
  store ptr %57, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i64 0
  %60 = load double, ptr %59, align 8, !tbaa !15
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %61, i64 3
  %63 = load double, ptr %62, align 8, !tbaa !15
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %64, i64 1
  %66 = load double, ptr %65, align 8, !tbaa !15
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %67, i64 2
  %69 = load double, ptr %68, align 8, !tbaa !15
  %70 = fmul double %66, %69
  %71 = fneg double %70
  %72 = call double @llvm.fmuladd.f64(double %60, double %63, double %71)
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 0
  %75 = load double, ptr %74, align 8, !tbaa !15
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = getelementptr inbounds double, ptr %76, i64 3
  %78 = load double, ptr %77, align 8, !tbaa !15
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = getelementptr inbounds double, ptr %79, i64 1
  %81 = load double, ptr %80, align 8, !tbaa !15
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = getelementptr inbounds double, ptr %82, i64 2
  %84 = load double, ptr %83, align 8, !tbaa !15
  %85 = fmul double %81, %84
  %86 = fneg double %85
  %87 = call double @llvm.fmuladd.f64(double %75, double %78, double %86)
  %88 = fmul double %72, %87
  store double %88, ptr %15, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = getelementptr inbounds double, ptr %89, i64 3
  %91 = load double, ptr %90, align 8, !tbaa !15
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds double, ptr %92, i64 3
  %94 = load double, ptr %93, align 8, !tbaa !15
  %95 = fmul double %91, %94
  %96 = load double, ptr %15, align 8, !tbaa !15
  %97 = fdiv double %95, %96
  store double %97, ptr %16, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %98, i64 2
  %100 = load double, ptr %99, align 8, !tbaa !15
  %101 = fmul double -2.000000e+00, %100
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = getelementptr inbounds double, ptr %102, i64 3
  %104 = load double, ptr %103, align 8, !tbaa !15
  %105 = fmul double %101, %104
  %106 = load double, ptr %15, align 8, !tbaa !15
  %107 = fdiv double %105, %106
  store double %107, ptr %17, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = getelementptr inbounds double, ptr %108, i64 2
  %110 = load double, ptr %109, align 8, !tbaa !15
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = getelementptr inbounds double, ptr %111, i64 2
  %113 = load double, ptr %112, align 8, !tbaa !15
  %114 = fmul double %110, %113
  %115 = load double, ptr %15, align 8, !tbaa !15
  %116 = fdiv double %114, %115
  store double %116, ptr %18, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds double, ptr %117, i64 1
  %119 = load double, ptr %118, align 8, !tbaa !15
  %120 = fmul double -1.000000e+00, %119
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = getelementptr inbounds double, ptr %121, i64 3
  %123 = load double, ptr %122, align 8, !tbaa !15
  %124 = fmul double %120, %123
  %125 = load double, ptr %15, align 8, !tbaa !15
  %126 = fdiv double %124, %125
  store double %126, ptr %19, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = getelementptr inbounds double, ptr %127, i64 0
  %129 = load double, ptr %128, align 8, !tbaa !15
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  %131 = getelementptr inbounds double, ptr %130, i64 3
  %132 = load double, ptr %131, align 8, !tbaa !15
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = getelementptr inbounds double, ptr %133, i64 1
  %135 = load double, ptr %134, align 8, !tbaa !15
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds double, ptr %136, i64 2
  %138 = load double, ptr %137, align 8, !tbaa !15
  %139 = fmul double %135, %138
  %140 = call double @llvm.fmuladd.f64(double %129, double %132, double %139)
  %141 = load double, ptr %15, align 8, !tbaa !15
  %142 = fdiv double %140, %141
  store double %142, ptr %20, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = getelementptr inbounds double, ptr %143, i64 0
  %145 = load double, ptr %144, align 8, !tbaa !15
  %146 = fmul double -1.000000e+00, %145
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = getelementptr inbounds double, ptr %147, i64 2
  %149 = load double, ptr %148, align 8, !tbaa !15
  %150 = fmul double %146, %149
  %151 = load double, ptr %15, align 8, !tbaa !15
  %152 = fdiv double %150, %151
  store double %152, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = getelementptr inbounds double, ptr %153, i64 1
  %155 = load double, ptr %154, align 8, !tbaa !15
  %156 = load ptr, ptr %14, align 8, !tbaa !5
  %157 = getelementptr inbounds double, ptr %156, i64 1
  %158 = load double, ptr %157, align 8, !tbaa !15
  %159 = fmul double %155, %158
  %160 = load double, ptr %15, align 8, !tbaa !15
  %161 = fdiv double %159, %160
  store double %161, ptr %22, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  %163 = getelementptr inbounds double, ptr %162, i64 0
  %164 = load double, ptr %163, align 8, !tbaa !15
  %165 = fmul double -2.000000e+00, %164
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = getelementptr inbounds double, ptr %166, i64 1
  %168 = load double, ptr %167, align 8, !tbaa !15
  %169 = fmul double %165, %168
  %170 = load double, ptr %15, align 8, !tbaa !15
  %171 = fdiv double %169, %170
  store double %171, ptr %23, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %172 = load ptr, ptr %14, align 8, !tbaa !5
  %173 = getelementptr inbounds double, ptr %172, i64 0
  %174 = load double, ptr %173, align 8, !tbaa !15
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  %176 = getelementptr inbounds double, ptr %175, i64 0
  %177 = load double, ptr %176, align 8, !tbaa !15
  %178 = fmul double %174, %177
  %179 = load double, ptr %15, align 8, !tbaa !15
  %180 = fdiv double %178, %179
  store double %180, ptr %24, align 8, !tbaa !15
  store i32 0, ptr %11, align 4, !tbaa !14
  br label %181

181:                                              ; preds = %281, %5
  %182 = load i32, ptr %11, align 4, !tbaa !14
  %183 = load i32, ptr %13, align 4, !tbaa !14
  %184 = load i32, ptr %12, align 4, !tbaa !14
  %185 = mul nsw i32 %183, %184
  %186 = icmp slt i32 %182, %185
  br i1 %186, label %187, label %284

187:                                              ; preds = %181
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %188, i32 0, i32 8
  %190 = load ptr, ptr %189, align 8, !tbaa !16
  %191 = load i32, ptr %11, align 4, !tbaa !14
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds double, ptr %190, i64 %192
  %194 = load double, ptr %193, align 8, !tbaa !15
  %195 = load double, ptr %16, align 8, !tbaa !15
  %196 = load ptr, ptr %6, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %196, i32 0, i32 9
  %198 = load ptr, ptr %197, align 8, !tbaa !17
  %199 = load i32, ptr %11, align 4, !tbaa !14
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds double, ptr %198, i64 %200
  %202 = load double, ptr %201, align 8, !tbaa !15
  %203 = load double, ptr %17, align 8, !tbaa !15
  %204 = fmul double %202, %203
  %205 = call double @llvm.fmuladd.f64(double %194, double %195, double %204)
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %206, i32 0, i32 10
  %208 = load ptr, ptr %207, align 8, !tbaa !18
  %209 = load i32, ptr %11, align 4, !tbaa !14
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds double, ptr %208, i64 %210
  %212 = load double, ptr %211, align 8, !tbaa !15
  %213 = load double, ptr %18, align 8, !tbaa !15
  %214 = call double @llvm.fmuladd.f64(double %212, double %213, double %205)
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  %216 = load i32, ptr %11, align 4, !tbaa !14
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds double, ptr %215, i64 %217
  store double %214, ptr %218, align 8, !tbaa !15
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %219, i32 0, i32 8
  %221 = load ptr, ptr %220, align 8, !tbaa !16
  %222 = load i32, ptr %11, align 4, !tbaa !14
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds double, ptr %221, i64 %223
  %225 = load double, ptr %224, align 8, !tbaa !15
  %226 = load double, ptr %19, align 8, !tbaa !15
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %227, i32 0, i32 9
  %229 = load ptr, ptr %228, align 8, !tbaa !17
  %230 = load i32, ptr %11, align 4, !tbaa !14
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds double, ptr %229, i64 %231
  %233 = load double, ptr %232, align 8, !tbaa !15
  %234 = load double, ptr %20, align 8, !tbaa !15
  %235 = fmul double %233, %234
  %236 = call double @llvm.fmuladd.f64(double %225, double %226, double %235)
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %237, i32 0, i32 10
  %239 = load ptr, ptr %238, align 8, !tbaa !18
  %240 = load i32, ptr %11, align 4, !tbaa !14
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds double, ptr %239, i64 %241
  %243 = load double, ptr %242, align 8, !tbaa !15
  %244 = load double, ptr %21, align 8, !tbaa !15
  %245 = call double @llvm.fmuladd.f64(double %243, double %244, double %236)
  %246 = load ptr, ptr %9, align 8, !tbaa !5
  %247 = load i32, ptr %11, align 4, !tbaa !14
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds double, ptr %246, i64 %248
  store double %245, ptr %249, align 8, !tbaa !15
  %250 = load ptr, ptr %6, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %250, i32 0, i32 8
  %252 = load ptr, ptr %251, align 8, !tbaa !16
  %253 = load i32, ptr %11, align 4, !tbaa !14
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds double, ptr %252, i64 %254
  %256 = load double, ptr %255, align 8, !tbaa !15
  %257 = load double, ptr %22, align 8, !tbaa !15
  %258 = load ptr, ptr %6, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %258, i32 0, i32 9
  %260 = load ptr, ptr %259, align 8, !tbaa !17
  %261 = load i32, ptr %11, align 4, !tbaa !14
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds double, ptr %260, i64 %262
  %264 = load double, ptr %263, align 8, !tbaa !15
  %265 = load double, ptr %23, align 8, !tbaa !15
  %266 = fmul double %264, %265
  %267 = call double @llvm.fmuladd.f64(double %256, double %257, double %266)
  %268 = load ptr, ptr %6, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %268, i32 0, i32 10
  %270 = load ptr, ptr %269, align 8, !tbaa !18
  %271 = load i32, ptr %11, align 4, !tbaa !14
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds double, ptr %270, i64 %272
  %274 = load double, ptr %273, align 8, !tbaa !15
  %275 = load double, ptr %24, align 8, !tbaa !15
  %276 = call double @llvm.fmuladd.f64(double %274, double %275, double %267)
  %277 = load ptr, ptr %10, align 8, !tbaa !5
  %278 = load i32, ptr %11, align 4, !tbaa !14
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds double, ptr %277, i64 %279
  store double %276, ptr %280, align 8, !tbaa !15
  br label %281

281:                                              ; preds = %187
  %282 = load i32, ptr %11, align 4, !tbaa !14
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %11, align 4, !tbaa !14
  br label %181, !llvm.loop !19

284:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !12, i64 80}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!11, !11, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!10, !6, i64 56}
!17 = !{!10, !6, i64 64}
!18 = !{!10, !6, i64 72}
!19 = distinct !{!19, !20}
!20 = !{!"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"

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

; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local void @cf_physical_hessian(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef nonnull writeonly align 8 %2, ptr nocapture noundef nonnull writeonly align 8 %3, ptr nocapture noundef nonnull writeonly align 8 %4) local_unnamed_addr #1 {
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !12
  %9 = mul i32 %8, %6
  %10 = getelementptr inbounds i8, ptr %1, i64 48
  %11 = load double, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %1, i64 72
  %13 = load double, ptr %12, align 8, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %1, i64 56
  %15 = load double, ptr %14, align 8, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %1, i64 64
  %17 = load double, ptr %16, align 8, !tbaa !13
  %18 = fmul double %15, %17
  %19 = fneg double %18
  %20 = tail call double @llvm.fmuladd.f64(double %11, double %13, double %19)
  %21 = fmul double %20, %20
  %22 = fmul double %13, %13
  %23 = fdiv double %22, %21
  %24 = fmul double %17, -2.000000e+00
  %25 = fmul double %13, %24
  %26 = fdiv double %25, %21
  %27 = fmul double %17, %17
  %28 = fdiv double %27, %21
  %29 = fneg double %15
  %30 = fmul double %13, %29
  %31 = fdiv double %30, %21
  %32 = tail call double @llvm.fmuladd.f64(double %11, double %13, double %18)
  %33 = fdiv double %32, %21
  %34 = fneg double %11
  %35 = fmul double %17, %34
  %36 = fdiv double %35, %21
  %37 = fmul double %15, %15
  %38 = fdiv double %37, %21
  %39 = fmul double %11, -2.000000e+00
  %40 = fmul double %39, %15
  %41 = fdiv double %40, %21
  %42 = fmul double %11, %11
  %43 = fdiv double %42, %21
  %44 = icmp sgt i32 %9, 0
  br i1 %44, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %45 = getelementptr inbounds i8, ptr %0, i64 56
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %0, i64 64
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = getelementptr inbounds i8, ptr %0, i64 72
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %wide.trip.count = zext nneg i32 %9 to i64
  %min.iters.check = icmp ult i32 %9, 12
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %51 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep = getelementptr i8, ptr %2, i64 %51
  %scevgep84 = getelementptr i8, ptr %3, i64 %51
  %scevgep85 = getelementptr i8, ptr %4, i64 %51
  %scevgep86 = getelementptr i8, ptr %46, i64 %51
  %scevgep87 = getelementptr i8, ptr %48, i64 %51
  %scevgep88 = getelementptr i8, ptr %50, i64 %51
  %52 = insertelement <4 x ptr> poison, ptr %scevgep84, i64 0
  %53 = insertelement <4 x ptr> %52, ptr %scevgep85, i64 1
  %54 = insertelement <4 x ptr> %53, ptr %scevgep86, i64 2
  %55 = insertelement <4 x ptr> %54, ptr %scevgep87, i64 3
  %56 = insertelement <4 x ptr> poison, ptr %2, i64 0
  %57 = shufflevector <4 x ptr> %56, <4 x ptr> poison, <4 x i32> zeroinitializer
  %58 = icmp ugt <4 x ptr> %55, %57
  %59 = insertelement <4 x ptr> poison, ptr %scevgep, i64 0
  %60 = shufflevector <4 x ptr> %59, <4 x ptr> poison, <4 x i32> zeroinitializer
  %61 = insertelement <4 x ptr> poison, ptr %3, i64 0
  %62 = insertelement <4 x ptr> %61, ptr %4, i64 1
  %63 = insertelement <4 x ptr> %62, ptr %46, i64 2
  %64 = insertelement <4 x ptr> %63, ptr %48, i64 3
  %65 = icmp ugt <4 x ptr> %60, %64
  %66 = and <4 x i1> %58, %65
  %bound0100 = icmp ugt ptr %scevgep88, %2
  %bound1101 = icmp ult ptr %50, %scevgep
  %found.conflict102 = and i1 %bound0100, %bound1101
  %67 = insertelement <4 x ptr> poison, ptr %scevgep85, i64 0
  %68 = insertelement <4 x ptr> %67, ptr %scevgep86, i64 1
  %69 = insertelement <4 x ptr> %68, ptr %scevgep87, i64 2
  %70 = insertelement <4 x ptr> %69, ptr %scevgep88, i64 3
  %71 = shufflevector <4 x ptr> %61, <4 x ptr> poison, <4 x i32> zeroinitializer
  %72 = icmp ugt <4 x ptr> %70, %71
  %73 = shufflevector <4 x ptr> %52, <4 x ptr> poison, <4 x i32> zeroinitializer
  %74 = insertelement <4 x ptr> poison, ptr %4, i64 0
  %75 = insertelement <4 x ptr> %74, ptr %46, i64 1
  %76 = insertelement <4 x ptr> %75, ptr %48, i64 2
  %77 = insertelement <4 x ptr> %76, ptr %50, i64 3
  %78 = icmp ugt <4 x ptr> %73, %77
  %79 = and <4 x i1> %72, %78
  %bound0120 = icmp ugt ptr %scevgep86, %4
  %bound1121 = icmp ult ptr %46, %scevgep85
  %found.conflict122 = and i1 %bound0120, %bound1121
  %bound0124 = icmp ugt ptr %scevgep87, %4
  %bound1125 = icmp ult ptr %48, %scevgep85
  %found.conflict126 = and i1 %bound0124, %bound1125
  %bound0128 = icmp ugt ptr %scevgep88, %4
  %bound1129 = icmp ult ptr %50, %scevgep85
  %found.conflict130 = and i1 %bound0128, %bound1129
  %80 = or <4 x i1> %66, %79
  %81 = bitcast <4 x i1> %80 to i4
  %op.rdx = icmp ne i4 %81, 0
  %op.rdx156 = or i1 %op.rdx, %found.conflict102
  %op.rdx157 = or i1 %found.conflict122, %found.conflict126
  %op.rdx158 = or i1 %op.rdx156, %op.rdx157
  %op.rdx159 = or i1 %op.rdx158, %found.conflict130
  br i1 %op.rdx159, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %26, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert133 = insertelement <2 x double> poison, double %23, i64 0
  %broadcast.splat134 = shufflevector <2 x double> %broadcast.splatinsert133, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert136 = insertelement <2 x double> poison, double %28, i64 0
  %broadcast.splat137 = shufflevector <2 x double> %broadcast.splatinsert136, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert140 = insertelement <2 x double> poison, double %33, i64 0
  %broadcast.splat141 = shufflevector <2 x double> %broadcast.splatinsert140, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert142 = insertelement <2 x double> poison, double %31, i64 0
  %broadcast.splat143 = shufflevector <2 x double> %broadcast.splatinsert142, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert145 = insertelement <2 x double> poison, double %36, i64 0
  %broadcast.splat146 = shufflevector <2 x double> %broadcast.splatinsert145, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert149 = insertelement <2 x double> poison, double %41, i64 0
  %broadcast.splat150 = shufflevector <2 x double> %broadcast.splatinsert149, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert151 = insertelement <2 x double> poison, double %38, i64 0
  %broadcast.splat152 = shufflevector <2 x double> %broadcast.splatinsert151, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert154 = insertelement <2 x double> poison, double %43, i64 0
  %broadcast.splat155 = shufflevector <2 x double> %broadcast.splatinsert154, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %82 = getelementptr inbounds double, ptr %46, i64 %index
  %wide.load = load <2 x double>, ptr %82, align 8, !tbaa !13, !alias.scope !17
  %83 = getelementptr inbounds double, ptr %48, i64 %index
  %wide.load132 = load <2 x double>, ptr %83, align 8, !tbaa !13, !alias.scope !20
  %84 = fmul <2 x double> %broadcast.splat, %wide.load132
  %85 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat134, <2 x double> %84)
  %86 = getelementptr inbounds double, ptr %50, i64 %index
  %wide.load135 = load <2 x double>, ptr %86, align 8, !tbaa !13, !alias.scope !22
  %87 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load135, <2 x double> %broadcast.splat137, <2 x double> %85)
  %88 = getelementptr inbounds double, ptr %2, i64 %index
  store <2 x double> %87, ptr %88, align 8, !tbaa !13, !alias.scope !24, !noalias !26
  %wide.load138 = load <2 x double>, ptr %82, align 8, !tbaa !13, !alias.scope !17
  %wide.load139 = load <2 x double>, ptr %83, align 8, !tbaa !13, !alias.scope !20
  %89 = fmul <2 x double> %broadcast.splat141, %wide.load139
  %90 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load138, <2 x double> %broadcast.splat143, <2 x double> %89)
  %wide.load144 = load <2 x double>, ptr %86, align 8, !tbaa !13, !alias.scope !22
  %91 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load144, <2 x double> %broadcast.splat146, <2 x double> %90)
  %92 = getelementptr inbounds double, ptr %3, i64 %index
  store <2 x double> %91, ptr %92, align 8, !tbaa !13, !alias.scope !29, !noalias !30
  %wide.load147 = load <2 x double>, ptr %82, align 8, !tbaa !13, !alias.scope !17
  %wide.load148 = load <2 x double>, ptr %83, align 8, !tbaa !13, !alias.scope !20
  %93 = fmul <2 x double> %broadcast.splat150, %wide.load148
  %94 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load147, <2 x double> %broadcast.splat152, <2 x double> %93)
  %wide.load153 = load <2 x double>, ptr %86, align 8, !tbaa !13, !alias.scope !22
  %95 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load153, <2 x double> %broadcast.splat155, <2 x double> %94)
  %96 = getelementptr inbounds double, ptr %4, i64 %index
  store <2 x double> %95, ptr %96, align 8, !tbaa !13, !alias.scope !31, !noalias !32
  %index.next = add nuw i64 %index, 2
  %97 = icmp eq i64 %index.next, %n.vec
  br i1 %97, label %middle.block, label %vector.body, !llvm.loop !33

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %98 = getelementptr inbounds double, ptr %46, i64 %indvars.iv
  %99 = load double, ptr %98, align 8, !tbaa !13
  %100 = getelementptr inbounds double, ptr %48, i64 %indvars.iv
  %101 = load double, ptr %100, align 8, !tbaa !13
  %102 = fmul double %26, %101
  %103 = tail call double @llvm.fmuladd.f64(double %99, double %23, double %102)
  %104 = getelementptr inbounds double, ptr %50, i64 %indvars.iv
  %105 = load double, ptr %104, align 8, !tbaa !13
  %106 = tail call double @llvm.fmuladd.f64(double %105, double %28, double %103)
  %107 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  store double %106, ptr %107, align 8, !tbaa !13
  %108 = load double, ptr %98, align 8, !tbaa !13
  %109 = load double, ptr %100, align 8, !tbaa !13
  %110 = fmul double %33, %109
  %111 = tail call double @llvm.fmuladd.f64(double %108, double %31, double %110)
  %112 = load double, ptr %104, align 8, !tbaa !13
  %113 = tail call double @llvm.fmuladd.f64(double %112, double %36, double %111)
  %114 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  store double %113, ptr %114, align 8, !tbaa !13
  %115 = load double, ptr %98, align 8, !tbaa !13
  %116 = load double, ptr %100, align 8, !tbaa !13
  %117 = fmul double %41, %116
  %118 = tail call double @llvm.fmuladd.f64(double %115, double %38, double %117)
  %119 = load double, ptr %104, align 8, !tbaa !13
  %120 = tail call double @llvm.fmuladd.f64(double %119, double %43, double %118)
  %121 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  store double %120, ptr %121, align 8, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !37

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %5
  ret void
}

; 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>) #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !11, i64 80}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!11, !11, i64 0}
!14 = !{!6, !10, i64 56}
!15 = !{!6, !10, i64 64}
!16 = !{!6, !10, i64 72}
!17 = !{!18}
!18 = distinct !{!18, !19}
!19 = distinct !{!19, !"LVerDomain"}
!20 = !{!21}
!21 = distinct !{!21, !19}
!22 = !{!23}
!23 = distinct !{!23, !19}
!24 = !{!25}
!25 = distinct !{!25, !19}
!26 = !{!27, !28, !18, !21, !23}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}
!29 = !{!27}
!30 = !{!28, !18, !21, !23}
!31 = !{!28}
!32 = !{!18, !21, !23}
!33 = distinct !{!33, !34, !35, !36}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!"llvm.loop.isvectorized", i32 1}
!36 = !{!"llvm.loop.unroll.runtime.disable"}
!37 = distinct !{!37, !34, !35}


; Effective O3 passes: EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass