; LLVM IR from microsoft/LightAIMD :: src (molecular_integral)

; 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.basis_func = type { i64, i64, i64, i64, ptr, ptr, ptr, double, double, double, double }

; 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

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @cg_electron_repulsion_integral_dwrt_nuc(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca [3 x i64], align 16
  %16 = alloca double, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  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 i64 %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %21

21:                                               ; preds = %236, %6
  %22 = load i64, ptr %13, align 8, !tbaa !9
  %23 = icmp ult i64 %22, 3
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %239

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 24, i1 false)
  %26 = load i64, ptr %13, align 8, !tbaa !9
  %27 = getelementptr inbounds [3 x i64], ptr %15, i64 0, i64 %26
  store i64 1, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %28

28:                                               ; preds = %228, %25
  %29 = load i64, ptr %17, align 8, !tbaa !9
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.basis_func, ptr %30, i32 0, i32 3
  %32 = load i64, ptr %31, align 8, !tbaa !13
  %33 = icmp ult i64 %29, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %231

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %224, %35
  %37 = load i64, ptr %18, align 8, !tbaa !9
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.basis_func, ptr %38, i32 0, i32 3
  %40 = load i64, ptr %39, align 8, !tbaa !13
  %41 = icmp ult i64 %37, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %227

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %220, %43
  %45 = load i64, ptr %19, align 8, !tbaa !9
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.basis_func, ptr %46, i32 0, i32 3
  %48 = load i64, ptr %47, align 8, !tbaa !13
  %49 = icmp ult i64 %45, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %44
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %223

51:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %216, %51
  %53 = load i64, ptr %20, align 8, !tbaa !9
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.basis_func, ptr %54, i32 0, i32 3
  %56 = load i64, ptr %55, align 8, !tbaa !13
  %57 = icmp ult i64 %53, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %52
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %219

59:                                               ; preds = %52
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.basis_func, ptr %60, i32 0, i32 6
  %62 = load ptr, ptr %61, align 8, !tbaa !15
  %63 = load i64, ptr %17, align 8, !tbaa !9
  %64 = getelementptr inbounds double, ptr %62, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !11
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.basis_func, ptr %66, i32 0, i32 6
  %68 = load ptr, ptr %67, align 8, !tbaa !15
  %69 = load i64, ptr %18, align 8, !tbaa !9
  %70 = getelementptr inbounds double, ptr %68, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !11
  %72 = fmul double %65, %71
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.basis_func, ptr %73, i32 0, i32 6
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = load i64, ptr %19, align 8, !tbaa !9
  %77 = getelementptr inbounds double, ptr %75, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !11
  %79 = fmul double %72, %78
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.basis_func, ptr %80, i32 0, i32 6
  %82 = load ptr, ptr %81, align 8, !tbaa !15
  %83 = load i64, ptr %20, align 8, !tbaa !9
  %84 = getelementptr inbounds double, ptr %82, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !11
  %86 = fmul double %79, %85
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.basis_func, ptr %87, i32 0, i32 5
  %89 = load ptr, ptr %88, align 8, !tbaa !16
  %90 = load i64, ptr %17, align 8, !tbaa !9
  %91 = getelementptr inbounds double, ptr %89, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = fmul double %86, %92
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.basis_func, ptr %94, i32 0, i32 5
  %96 = load ptr, ptr %95, align 8, !tbaa !16
  %97 = load i64, ptr %18, align 8, !tbaa !9
  %98 = getelementptr inbounds double, ptr %96, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !11
  %100 = fmul double %93, %99
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.basis_func, ptr %101, i32 0, i32 5
  %103 = load ptr, ptr %102, align 8, !tbaa !16
  %104 = load i64, ptr %19, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = fmul double %100, %106
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.basis_func, ptr %108, i32 0, i32 5
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  %111 = load i64, ptr %20, align 8, !tbaa !9
  %112 = getelementptr inbounds double, ptr %110, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !11
  %114 = fmul double %107, %113
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.basis_func, ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !17
  %118 = load i64, ptr %17, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.basis_func, ptr %121, i32 0, i32 0
  %123 = load i64, ptr %122, align 8, !tbaa !18
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.basis_func, ptr %124, i32 0, i32 1
  %126 = load i64, ptr %125, align 8, !tbaa !19
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.basis_func, ptr %127, i32 0, i32 2
  %129 = load i64, ptr %128, align 8, !tbaa !20
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.basis_func, ptr %130, i32 0, i32 8
  %132 = load double, ptr %131, align 8, !tbaa !21
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.basis_func, ptr %133, i32 0, i32 9
  %135 = load double, ptr %134, align 8, !tbaa !22
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.basis_func, ptr %136, i32 0, i32 10
  %138 = load double, ptr %137, align 8, !tbaa !23
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.basis_func, ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !17
  %142 = load i64, ptr %18, align 8, !tbaa !9
  %143 = getelementptr inbounds double, ptr %141, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !11
  %145 = load ptr, ptr %8, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.basis_func, ptr %145, i32 0, i32 0
  %147 = load i64, ptr %146, align 8, !tbaa !18
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.basis_func, ptr %148, i32 0, i32 1
  %150 = load i64, ptr %149, align 8, !tbaa !19
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.basis_func, ptr %151, i32 0, i32 2
  %153 = load i64, ptr %152, align 8, !tbaa !20
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.basis_func, ptr %154, i32 0, i32 8
  %156 = load double, ptr %155, align 8, !tbaa !21
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.basis_func, ptr %157, i32 0, i32 9
  %159 = load double, ptr %158, align 8, !tbaa !22
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.basis_func, ptr %160, i32 0, i32 10
  %162 = load double, ptr %161, align 8, !tbaa !23
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.basis_func, ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !17
  %166 = load i64, ptr %19, align 8, !tbaa !9
  %167 = getelementptr inbounds double, ptr %165, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !11
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.basis_func, ptr %169, i32 0, i32 0
  %171 = load i64, ptr %170, align 8, !tbaa !18
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.basis_func, ptr %172, i32 0, i32 1
  %174 = load i64, ptr %173, align 8, !tbaa !19
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.basis_func, ptr %175, i32 0, i32 2
  %177 = load i64, ptr %176, align 8, !tbaa !20
  %178 = load ptr, ptr %9, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.basis_func, ptr %178, i32 0, i32 8
  %180 = load double, ptr %179, align 8, !tbaa !21
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.basis_func, ptr %181, i32 0, i32 9
  %183 = load double, ptr %182, align 8, !tbaa !22
  %184 = load ptr, ptr %9, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.basis_func, ptr %184, i32 0, i32 10
  %186 = load double, ptr %185, align 8, !tbaa !23
  %187 = load ptr, ptr %10, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.basis_func, ptr %187, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !17
  %190 = load i64, ptr %20, align 8, !tbaa !9
  %191 = getelementptr inbounds double, ptr %189, i64 %190
  %192 = load double, ptr %191, align 8, !tbaa !11
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.basis_func, ptr %193, i32 0, i32 0
  %195 = load i64, ptr %194, align 8, !tbaa !18
  %196 = load ptr, ptr %10, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.basis_func, ptr %196, i32 0, i32 1
  %198 = load i64, ptr %197, align 8, !tbaa !19
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.basis_func, ptr %199, i32 0, i32 2
  %201 = load i64, ptr %200, align 8, !tbaa !20
  %202 = load ptr, ptr %10, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.basis_func, ptr %202, i32 0, i32 8
  %204 = load double, ptr %203, align 8, !tbaa !21
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.basis_func, ptr %205, i32 0, i32 9
  %207 = load double, ptr %206, align 8, !tbaa !22
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.basis_func, ptr %208, i32 0, i32 10
  %210 = load double, ptr %209, align 8, !tbaa !23
  %211 = getelementptr inbounds [3 x i64], ptr %15, i64 0, i64 0
  %212 = load i64, ptr %11, align 8, !tbaa !9
  %213 = call double @pg_electron_repulsion_integral_dwrt_nuc(double noundef %120, i64 noundef %123, i64 noundef %126, i64 noundef %129, double noundef %132, double noundef %135, double noundef %138, double noundef %144, i64 noundef %147, i64 noundef %150, i64 noundef %153, double noundef %156, double noundef %159, double noundef %162, double noundef %168, i64 noundef %171, i64 noundef %174, i64 noundef %177, double noundef %180, double noundef %183, double noundef %186, double noundef %192, i64 noundef %195, i64 noundef %198, i64 noundef %201, double noundef %204, double noundef %207, double noundef %210, ptr noundef %211, i64 noundef %212)
  %214 = load double, ptr %16, align 8, !tbaa !11
  %215 = call double @llvm.fmuladd.f64(double %114, double %213, double %214)
  store double %215, ptr %16, align 8, !tbaa !11
  br label %216

216:                                              ; preds = %59
  %217 = load i64, ptr %20, align 8, !tbaa !9
  %218 = add i64 %217, 1
  store i64 %218, ptr %20, align 8, !tbaa !9
  br label %52, !llvm.loop !24

219:                                              ; preds = %58
  br label %220

220:                                              ; preds = %219
  %221 = load i64, ptr %19, align 8, !tbaa !9
  %222 = add i64 %221, 1
  store i64 %222, ptr %19, align 8, !tbaa !9
  br label %44, !llvm.loop !26

223:                                              ; preds = %50
  br label %224

224:                                              ; preds = %223
  %225 = load i64, ptr %18, align 8, !tbaa !9
  %226 = add i64 %225, 1
  store i64 %226, ptr %18, align 8, !tbaa !9
  br label %36, !llvm.loop !27

227:                                              ; preds = %42
  br label %228

228:                                              ; preds = %227
  %229 = load i64, ptr %17, align 8, !tbaa !9
  %230 = add i64 %229, 1
  store i64 %230, ptr %17, align 8, !tbaa !9
  br label %28, !llvm.loop !28

231:                                              ; preds = %34
  %232 = load double, ptr %16, align 8, !tbaa !11
  %233 = load ptr, ptr %12, align 8, !tbaa !5
  %234 = load i64, ptr %13, align 8, !tbaa !9
  %235 = getelementptr inbounds double, ptr %233, i64 %234
  store double %232, ptr %235, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %236

236:                                              ; preds = %231
  %237 = load i64, ptr %13, align 8, !tbaa !9
  %238 = add i64 %237, 1
  store i64 %238, ptr %13, align 8, !tbaa !9
  br label %21, !llvm.loop !29

239:                                              ; preds = %24
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden double @pg_electron_repulsion_integral_dwrt_nuc(double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, ptr noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"basis_func", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80}
!15 = !{!14, !6, i64 48}
!16 = !{!14, !6, i64 40}
!17 = !{!14, !6, i64 32}
!18 = !{!14, !10, i64 0}
!19 = !{!14, !10, i64 8}
!20 = !{!14, !10, i64 16}
!21 = !{!14, !12, i64 64}
!22 = !{!14, !12, i64 72}
!23 = !{!14, !12, i64 80}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}


; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @cg_electron_repulsion_integral_dwrt_nuc(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, i64 noundef %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #3 {
  %7 = alloca [3 x i64], align 16
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = getelementptr inbounds i8, ptr %1, i64 24
  %10 = getelementptr inbounds i8, ptr %2, i64 24
  %11 = getelementptr inbounds i8, ptr %3, i64 24
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  %13 = getelementptr inbounds i8, ptr %1, i64 48
  %14 = getelementptr inbounds i8, ptr %2, i64 48
  %15 = getelementptr inbounds i8, ptr %3, i64 48
  %16 = getelementptr inbounds i8, ptr %0, i64 40
  %17 = getelementptr inbounds i8, ptr %1, i64 40
  %18 = getelementptr inbounds i8, ptr %2, i64 40
  %19 = getelementptr inbounds i8, ptr %3, i64 40
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  %24 = getelementptr inbounds i8, ptr %0, i64 72
  %25 = getelementptr inbounds i8, ptr %0, i64 80
  %26 = getelementptr inbounds i8, ptr %1, i64 32
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = getelementptr inbounds i8, ptr %1, i64 16
  %29 = getelementptr inbounds i8, ptr %1, i64 64
  %30 = getelementptr inbounds i8, ptr %1, i64 72
  %31 = getelementptr inbounds i8, ptr %1, i64 80
  %32 = getelementptr inbounds i8, ptr %2, i64 32
  %33 = getelementptr inbounds i8, ptr %2, i64 8
  %34 = getelementptr inbounds i8, ptr %2, i64 16
  %35 = getelementptr inbounds i8, ptr %2, i64 64
  %36 = getelementptr inbounds i8, ptr %2, i64 72
  %37 = getelementptr inbounds i8, ptr %2, i64 80
  %38 = getelementptr inbounds i8, ptr %3, i64 32
  %39 = getelementptr inbounds i8, ptr %3, i64 8
  %40 = getelementptr inbounds i8, ptr %3, i64 16
  %41 = getelementptr inbounds i8, ptr %3, i64 64
  %42 = getelementptr inbounds i8, ptr %3, i64 72
  %43 = getelementptr inbounds i8, ptr %3, i64 80
  %44 = load i64, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i64 %44, 0
  br i1 %.not, label %.split.us.preheader, label %.split

.split.us.preheader:                              ; preds = %6
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false), !tbaa !12
  br label %.split94.us

.split94.us:                                      ; preds = %._crit_edge89, %.split.us.preheader
  ret void

.split:                                           ; preds = %6, %._crit_edge89
  %45 = phi i64 [ %53, %._crit_edge89 ], [ %44, %6 ]
  %46 = phi i64 [ %54, %._crit_edge89 ], [ %44, %6 ]
  %.07192 = phi i64 [ %56, %._crit_edge89 ], [ 0, %6 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  %47 = getelementptr inbounds [3 x i64], ptr %7, i64 0, i64 %.07192
  store i64 1, ptr %47, align 8, !tbaa !13
  %.not95 = icmp eq i64 %46, 0
  br i1 %.not95, label %._crit_edge89, label %.preheader73.lr.ph

.preheader73.lr.ph:                               ; preds = %.split
  %48 = load i64, ptr %9, align 8, !tbaa !5
  %.not96 = icmp eq i64 %48, 0
  br i1 %.not96, label %._crit_edge89, label %.preheader73

.preheader73:                                     ; preds = %.preheader73.lr.ph, %._crit_edge83
  %49 = phi i64 [ %61, %._crit_edge83 ], [ %45, %.preheader73.lr.ph ]
  %50 = phi i64 [ %62, %._crit_edge83 ], [ %48, %.preheader73.lr.ph ]
  %51 = phi i64 [ %63, %._crit_edge83 ], [ %48, %.preheader73.lr.ph ]
  %.06987 = phi i64 [ %64, %._crit_edge83 ], [ 0, %.preheader73.lr.ph ]
  %.07086 = phi double [ %.1.lcssa, %._crit_edge83 ], [ 0.000000e+00, %.preheader73.lr.ph ]
  %.not97 = icmp eq i64 %51, 0
  br i1 %.not97, label %._crit_edge83, label %.preheader72.lr.ph

.preheader72.lr.ph:                               ; preds = %.preheader73
  %52 = load i64, ptr %10, align 8, !tbaa !5
  %.not98 = icmp eq i64 %52, 0
  br i1 %.not98, label %._crit_edge83, label %.preheader72

._crit_edge89:                                    ; preds = %._crit_edge83, %.preheader73.lr.ph, %.split
  %53 = phi i64 [ %45, %.split ], [ %45, %.preheader73.lr.ph ], [ %61, %._crit_edge83 ]
  %54 = phi i64 [ 0, %.split ], [ %46, %.preheader73.lr.ph ], [ %61, %._crit_edge83 ]
  %.070.lcssa = phi double [ 0.000000e+00, %.split ], [ 0.000000e+00, %.preheader73.lr.ph ], [ %.1.lcssa, %._crit_edge83 ]
  %55 = getelementptr inbounds double, ptr %5, i64 %.07192
  store double %.070.lcssa, ptr %55, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  %56 = add nuw nsw i64 %.07192, 1
  %exitcond.not = icmp eq i64 %56, 3
  br i1 %exitcond.not, label %.split94.us, label %.split, !llvm.loop !14

.preheader72:                                     ; preds = %.preheader72.lr.ph, %._crit_edge78
  %57 = phi i64 [ %68, %._crit_edge78 ], [ %50, %.preheader72.lr.ph ]
  %58 = phi i64 [ %69, %._crit_edge78 ], [ %52, %.preheader72.lr.ph ]
  %59 = phi i64 [ %70, %._crit_edge78 ], [ %52, %.preheader72.lr.ph ]
  %.06881 = phi i64 [ %71, %._crit_edge78 ], [ 0, %.preheader72.lr.ph ]
  %.180 = phi double [ %.2.lcssa, %._crit_edge78 ], [ %.07086, %.preheader72.lr.ph ]
  %.not99 = icmp eq i64 %59, 0
  br i1 %.not99, label %._crit_edge78, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader72
  %60 = load i64, ptr %11, align 8, !tbaa !5
  %.not100 = icmp eq i64 %60, 0
  br i1 %.not100, label %._crit_edge78, label %.preheader

._crit_edge83.loopexit103:                        ; preds = %._crit_edge78
  %.pre108 = load i64, ptr %8, align 8, !tbaa !5
  br label %._crit_edge83

._crit_edge83:                                    ; preds = %.preheader72.lr.ph, %._crit_edge83.loopexit103, %.preheader73
  %61 = phi i64 [ %49, %.preheader73 ], [ %.pre108, %._crit_edge83.loopexit103 ], [ %49, %.preheader72.lr.ph ]
  %62 = phi i64 [ %50, %.preheader73 ], [ %68, %._crit_edge83.loopexit103 ], [ %50, %.preheader72.lr.ph ]
  %63 = phi i64 [ 0, %.preheader73 ], [ %68, %._crit_edge83.loopexit103 ], [ %51, %.preheader72.lr.ph ]
  %.1.lcssa = phi double [ %.07086, %.preheader73 ], [ %.2.lcssa, %._crit_edge83.loopexit103 ], [ %.07086, %.preheader72.lr.ph ]
  %64 = add nuw i64 %.06987, 1
  %65 = icmp ult i64 %64, %61
  br i1 %65, label %.preheader73, label %._crit_edge89, !llvm.loop !17

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %66 = phi i64 [ %73, %._crit_edge ], [ %58, %.preheader.lr.ph ]
  %67 = phi i64 [ %74, %._crit_edge ], [ 1, %.preheader.lr.ph ]
  %.06777 = phi i64 [ %75, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.276 = phi double [ %.3.lcssa, %._crit_edge ], [ %.180, %.preheader.lr.ph ]
  %.not101 = icmp eq i64 %67, 0
  br i1 %.not101, label %._crit_edge, label %.lr.ph

._crit_edge78.loopexit102:                        ; preds = %._crit_edge
  %.pre107 = load i64, ptr %9, align 8, !tbaa !5
  br label %._crit_edge78

._crit_edge78:                                    ; preds = %.preheader.lr.ph, %._crit_edge78.loopexit102, %.preheader72
  %68 = phi i64 [ %57, %.preheader72 ], [ %.pre107, %._crit_edge78.loopexit102 ], [ %57, %.preheader.lr.ph ]
  %69 = phi i64 [ %58, %.preheader72 ], [ %73, %._crit_edge78.loopexit102 ], [ %58, %.preheader.lr.ph ]
  %70 = phi i64 [ 0, %.preheader72 ], [ %73, %._crit_edge78.loopexit102 ], [ %59, %.preheader.lr.ph ]
  %.2.lcssa = phi double [ %.180, %.preheader72 ], [ %.3.lcssa, %._crit_edge78.loopexit102 ], [ %.180, %.preheader.lr.ph ]
  %71 = add nuw i64 %.06881, 1
  %72 = icmp ult i64 %71, %68
  br i1 %72, label %.preheader72, label %._crit_edge83.loopexit103, !llvm.loop !18

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i64, ptr %10, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %73 = phi i64 [ %66, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %74 = phi i64 [ 0, %.preheader ], [ %147, %._crit_edge.loopexit ]
  %.3.lcssa = phi double [ %.276, %.preheader ], [ %145, %._crit_edge.loopexit ]
  %75 = add nuw i64 %.06777, 1
  %76 = icmp ult i64 %75, %73
  br i1 %76, label %.preheader, label %._crit_edge78.loopexit102, !llvm.loop !19

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.075 = phi i64 [ %146, %.lr.ph ], [ 0, %.preheader ]
  %.374 = phi double [ %145, %.lr.ph ], [ %.276, %.preheader ]
  %77 = load ptr, ptr %12, align 8, !tbaa !20
  %78 = getelementptr inbounds double, ptr %77, i64 %.06987
  %79 = load double, ptr %78, align 8, !tbaa !12
  %80 = load ptr, ptr %13, align 8, !tbaa !20
  %81 = getelementptr inbounds double, ptr %80, i64 %.06881
  %82 = load double, ptr %81, align 8, !tbaa !12
  %83 = fmul double %79, %82
  %84 = load ptr, ptr %14, align 8, !tbaa !20
  %85 = getelementptr inbounds double, ptr %84, i64 %.06777
  %86 = load double, ptr %85, align 8, !tbaa !12
  %87 = fmul double %83, %86
  %88 = load ptr, ptr %15, align 8, !tbaa !20
  %89 = getelementptr inbounds double, ptr %88, i64 %.075
  %90 = load double, ptr %89, align 8, !tbaa !12
  %91 = fmul double %87, %90
  %92 = load ptr, ptr %16, align 8, !tbaa !21
  %93 = getelementptr inbounds double, ptr %92, i64 %.06987
  %94 = load double, ptr %93, align 8, !tbaa !12
  %95 = fmul double %91, %94
  %96 = load ptr, ptr %17, align 8, !tbaa !21
  %97 = getelementptr inbounds double, ptr %96, i64 %.06881
  %98 = load double, ptr %97, align 8, !tbaa !12
  %99 = fmul double %95, %98
  %100 = load ptr, ptr %18, align 8, !tbaa !21
  %101 = getelementptr inbounds double, ptr %100, i64 %.06777
  %102 = load double, ptr %101, align 8, !tbaa !12
  %103 = fmul double %99, %102
  %104 = load ptr, ptr %19, align 8, !tbaa !21
  %105 = getelementptr inbounds double, ptr %104, i64 %.075
  %106 = load double, ptr %105, align 8, !tbaa !12
  %107 = fmul double %103, %106
  %108 = load ptr, ptr %20, align 8, !tbaa !22
  %109 = getelementptr inbounds double, ptr %108, i64 %.06987
  %110 = load double, ptr %109, align 8, !tbaa !12
  %111 = load i64, ptr %0, align 8, !tbaa !23
  %112 = load i64, ptr %21, align 8, !tbaa !24
  %113 = load i64, ptr %22, align 8, !tbaa !25
  %114 = load double, ptr %23, align 8, !tbaa !26
  %115 = load double, ptr %24, align 8, !tbaa !27
  %116 = load double, ptr %25, align 8, !tbaa !28
  %117 = load ptr, ptr %26, align 8, !tbaa !22
  %118 = getelementptr inbounds double, ptr %117, i64 %.06881
  %119 = load double, ptr %118, align 8, !tbaa !12
  %120 = load i64, ptr %1, align 8, !tbaa !23
  %121 = load i64, ptr %27, align 8, !tbaa !24
  %122 = load i64, ptr %28, align 8, !tbaa !25
  %123 = load double, ptr %29, align 8, !tbaa !26
  %124 = load double, ptr %30, align 8, !tbaa !27
  %125 = load double, ptr %31, align 8, !tbaa !28
  %126 = load ptr, ptr %32, align 8, !tbaa !22
  %127 = getelementptr inbounds double, ptr %126, i64 %.06777
  %128 = load double, ptr %127, align 8, !tbaa !12
  %129 = load i64, ptr %2, align 8, !tbaa !23
  %130 = load i64, ptr %33, align 8, !tbaa !24
  %131 = load i64, ptr %34, align 8, !tbaa !25
  %132 = load double, ptr %35, align 8, !tbaa !26
  %133 = load double, ptr %36, align 8, !tbaa !27
  %134 = load double, ptr %37, align 8, !tbaa !28
  %135 = load ptr, ptr %38, align 8, !tbaa !22
  %136 = getelementptr inbounds double, ptr %135, i64 %.075
  %137 = load double, ptr %136, align 8, !tbaa !12
  %138 = load i64, ptr %3, align 8, !tbaa !23
  %139 = load i64, ptr %39, align 8, !tbaa !24
  %140 = load i64, ptr %40, align 8, !tbaa !25
  %141 = load double, ptr %41, align 8, !tbaa !26
  %142 = load double, ptr %42, align 8, !tbaa !27
  %143 = load double, ptr %43, align 8, !tbaa !28
  %144 = call double @pg_electron_repulsion_integral_dwrt_nuc(double noundef %110, i64 noundef %111, i64 noundef %112, i64 noundef %113, double noundef %114, double noundef %115, double noundef %116, double noundef %119, i64 noundef %120, i64 noundef %121, i64 noundef %122, double noundef %123, double noundef %124, double noundef %125, double noundef %128, i64 noundef %129, i64 noundef %130, i64 noundef %131, double noundef %132, double noundef %133, double noundef %134, double noundef %137, i64 noundef %138, i64 noundef %139, i64 noundef %140, double noundef %141, double noundef %142, double noundef %143, ptr noundef nonnull %7, i64 noundef %4)
  %145 = call double @llvm.fmuladd.f64(double %107, double %144, double %.374)
  %146 = add nuw i64 %.075, 1
  %147 = load i64, ptr %11, align 8, !tbaa !5
  %148 = icmp ult i64 %146, %147
  br i1 %148, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !29
}

; Function Attrs: nounwind uwtable
declare hidden double @pg_electron_repulsion_integral_dwrt_nuc(double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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, !7, i64 24}
!6 = !{!"basis_func", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80}
!7 = !{!"long", !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 = !{!11, !11, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15, !16}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = distinct !{!17, !15, !16}
!18 = distinct !{!18, !15, !16}
!19 = distinct !{!19, !15, !16}
!20 = !{!6, !10, i64 48}
!21 = !{!6, !10, i64 40}
!22 = !{!6, !10, i64 32}
!23 = !{!6, !7, i64 0}
!24 = !{!6, !7, i64 8}
!25 = !{!6, !7, i64 16}
!26 = !{!6, !11, i64 64}
!27 = !{!6, !11, i64 72}
!28 = !{!6, !11, i64 80}
!29 = distinct !{!29, !15}


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