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

21:                                               ; preds = %139, %7
  %22 = load i64, ptr %15, align 8, !tbaa !11
  %23 = icmp ult i64 %22, 3
  br i1 %23, label %25, label %24

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

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

28:                                               ; preds = %131, %25
  %29 = load i64, ptr %19, align 8, !tbaa !11
  %30 = load ptr, ptr %8, 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 %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %134

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

36:                                               ; preds = %127, %35
  %37 = load i64, ptr %20, align 8, !tbaa !11
  %38 = load ptr, ptr %9, 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 %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %130

43:                                               ; preds = %36
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.basis_func, ptr %44, i32 0, i32 6
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = load i64, ptr %19, align 8, !tbaa !11
  %48 = getelementptr inbounds double, ptr %46, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !9
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.basis_func, ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !15
  %53 = load i64, ptr %20, align 8, !tbaa !11
  %54 = getelementptr inbounds double, ptr %52, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !9
  %56 = fmul double %49, %55
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.basis_func, ptr %57, i32 0, i32 5
  %59 = load ptr, ptr %58, align 8, !tbaa !16
  %60 = load i64, ptr %19, align 8, !tbaa !11
  %61 = getelementptr inbounds double, ptr %59, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !9
  %63 = fmul double %56, %62
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.basis_func, ptr %64, i32 0, i32 5
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = load i64, ptr %20, align 8, !tbaa !11
  %68 = getelementptr inbounds double, ptr %66, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = fmul double %63, %69
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.basis_func, ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !17
  %74 = load i64, ptr %19, align 8, !tbaa !11
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.basis_func, ptr %77, i32 0, i32 0
  %79 = load i64, ptr %78, align 8, !tbaa !18
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.basis_func, ptr %80, i32 0, i32 1
  %82 = load i64, ptr %81, align 8, !tbaa !19
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.basis_func, ptr %83, i32 0, i32 2
  %85 = load i64, ptr %84, align 8, !tbaa !20
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.basis_func, ptr %86, i32 0, i32 8
  %88 = load double, ptr %87, align 8, !tbaa !21
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.basis_func, ptr %89, i32 0, i32 9
  %91 = load double, ptr %90, align 8, !tbaa !22
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.basis_func, ptr %92, i32 0, i32 10
  %94 = load double, ptr %93, align 8, !tbaa !23
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.basis_func, ptr %95, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !17
  %98 = load i64, ptr %20, align 8, !tbaa !11
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.basis_func, ptr %101, i32 0, i32 0
  %103 = load i64, ptr %102, align 8, !tbaa !18
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.basis_func, ptr %104, i32 0, i32 1
  %106 = load i64, ptr %105, align 8, !tbaa !19
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.basis_func, ptr %107, i32 0, i32 2
  %109 = load i64, ptr %108, align 8, !tbaa !20
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.basis_func, ptr %110, i32 0, i32 8
  %112 = load double, ptr %111, align 8, !tbaa !21
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.basis_func, ptr %113, i32 0, i32 9
  %115 = load double, ptr %114, align 8, !tbaa !22
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.basis_func, ptr %116, i32 0, i32 10
  %118 = load double, ptr %117, align 8, !tbaa !23
  %119 = load double, ptr %10, align 8, !tbaa !9
  %120 = load double, ptr %11, align 8, !tbaa !9
  %121 = load double, ptr %12, align 8, !tbaa !9
  %122 = getelementptr inbounds [3 x i64], ptr %17, i64 0, i64 0
  %123 = load i64, ptr %13, align 8, !tbaa !11
  %124 = call double @pg_nuclear_attraction_integral_dwrt_orb_center(double noundef %76, i64 noundef %79, i64 noundef %82, i64 noundef %85, double noundef %88, double noundef %91, double noundef %94, double noundef %100, i64 noundef %103, i64 noundef %106, i64 noundef %109, double noundef %112, double noundef %115, double noundef %118, double noundef %119, double noundef %120, double noundef %121, ptr noundef %122, i64 noundef %123)
  %125 = load double, ptr %18, align 8, !tbaa !9
  %126 = call double @llvm.fmuladd.f64(double %70, double %124, double %125)
  store double %126, ptr %18, align 8, !tbaa !9
  br label %127

127:                                              ; preds = %43
  %128 = load i64, ptr %20, align 8, !tbaa !11
  %129 = add i64 %128, 1
  store i64 %129, ptr %20, align 8, !tbaa !11
  br label %36, !llvm.loop !24

130:                                              ; preds = %42
  br label %131

131:                                              ; preds = %130
  %132 = load i64, ptr %19, align 8, !tbaa !11
  %133 = add i64 %132, 1
  store i64 %133, ptr %19, align 8, !tbaa !11
  br label %28, !llvm.loop !26

134:                                              ; preds = %34
  %135 = load double, ptr %18, align 8, !tbaa !9
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = load i64, ptr %15, align 8, !tbaa !11
  %138 = getelementptr inbounds double, ptr %136, i64 %137
  store double %135, ptr %138, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  br label %139

139:                                              ; preds = %134
  %140 = load i64, ptr %15, align 8, !tbaa !11
  %141 = add i64 %140, 1
  store i64 %141, ptr %15, align 8, !tbaa !11
  br label %21, !llvm.loop !27

142:                                              ; preds = %24
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden double @pg_nuclear_attraction_integral_dwrt_orb_center(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, 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 24}
!14 = !{!"basis_func", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!15 = !{!14, !6, i64 48}
!16 = !{!14, !6, i64 40}
!17 = !{!14, !6, i64 32}
!18 = !{!14, !12, i64 0}
!19 = !{!14, !12, i64 8}
!20 = !{!14, !12, i64 16}
!21 = !{!14, !10, i64 64}
!22 = !{!14, !10, i64 72}
!23 = !{!14, !10, i64 80}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !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_nuclear_attraction_integral_dwrt_orb_center(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, double noundef %2, double noundef %3, double noundef %4, i64 noundef %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #3 {
  %8 = alloca [3 x i64], align 16
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = getelementptr inbounds i8, ptr %1, i64 24
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  %12 = getelementptr inbounds i8, ptr %1, i64 48
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = getelementptr inbounds i8, ptr %1, i64 40
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = getelementptr inbounds i8, ptr %0, i64 80
  %21 = getelementptr inbounds i8, ptr %1, i64 32
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  %23 = getelementptr inbounds i8, ptr %1, i64 16
  %24 = getelementptr inbounds i8, ptr %1, i64 64
  %25 = getelementptr inbounds i8, ptr %1, i64 72
  %26 = getelementptr inbounds i8, ptr %1, i64 80
  %27 = load i64, ptr %9, align 8, !tbaa !5
  %.not = icmp eq i64 %27, 0
  br i1 %.not, label %.split.us.preheader, label %.preheader.lr.ph

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

.split51.us:                                      ; preds = %._crit_edge47.2, %.split.us.preheader
  ret void

.preheader.lr.ph:                                 ; preds = %7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %8, i8 0, i64 24, i1 false)
  store i64 1, ptr %8, align 16, !tbaa !13
  %28 = load i64, ptr %10, align 8, !tbaa !5
  %.not53 = icmp eq i64 %28, 0
  br i1 %.not53, label %._crit_edge47.thread, label %.preheader

._crit_edge47.thread:                             ; preds = %.preheader.lr.ph
  store double 0.000000e+00, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %8, i8 0, i64 24, i1 false)
  %29 = getelementptr inbounds i8, ptr %8, i64 8
  store i64 1, ptr %29, align 8, !tbaa !13
  br label %.preheader.lr.ph.1

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %30 = phi i64 [ %131, %._crit_edge ], [ %27, %.preheader.lr.ph ]
  %31 = phi i64 [ %132, %._crit_edge ], [ 1, %.preheader.lr.ph ]
  %.04046 = phi i64 [ %133, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.04145 = phi double [ %.1.lcssa, %._crit_edge ], [ 0.000000e+00, %.preheader.lr.ph ]
  %.not54 = icmp eq i64 %31, 0
  br i1 %.not54, label %._crit_edge, label %.lr.ph

._crit_edge47:                                    ; preds = %._crit_edge
  store double %.1.lcssa, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %8, i8 0, i64 24, i1 false)
  %32 = getelementptr inbounds i8, ptr %8, i64 8
  store i64 1, ptr %32, align 8, !tbaa !13
  %.not52.1 = icmp eq i64 %131, 0
  br i1 %.not52.1, label %._crit_edge47.1.thread, label %.preheader.lr.ph.1

._crit_edge47.1.thread:                           ; preds = %._crit_edge47
  %33 = getelementptr inbounds i8, ptr %6, i64 8
  store double 0.000000e+00, ptr %33, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  br label %._crit_edge47.2

.preheader.lr.ph.1:                               ; preds = %._crit_edge47.thread, %._crit_edge47
  %34 = phi i64 [ %27, %._crit_edge47.thread ], [ %131, %._crit_edge47 ]
  %35 = load i64, ptr %10, align 8, !tbaa !5
  %.not53.1 = icmp eq i64 %35, 0
  br i1 %.not53.1, label %._crit_edge47.1.thread63, label %.preheader.1

._crit_edge47.1.thread63:                         ; preds = %.preheader.lr.ph.1
  %36 = getelementptr inbounds i8, ptr %6, i64 8
  store double 0.000000e+00, ptr %36, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %8, i8 0, i64 16, i1 false)
  %37 = getelementptr inbounds i8, ptr %8, i64 16
  store i64 1, ptr %37, align 16, !tbaa !13
  br label %.preheader.lr.ph.2

.preheader.1:                                     ; preds = %.preheader.lr.ph.1, %._crit_edge.1
  %38 = phi i64 [ %78, %._crit_edge.1 ], [ %34, %.preheader.lr.ph.1 ]
  %39 = phi i64 [ %79, %._crit_edge.1 ], [ 1, %.preheader.lr.ph.1 ]
  %.04046.1 = phi i64 [ %80, %._crit_edge.1 ], [ 0, %.preheader.lr.ph.1 ]
  %.04145.1 = phi double [ %.1.lcssa.1, %._crit_edge.1 ], [ 0.000000e+00, %.preheader.lr.ph.1 ]
  %.not54.1 = icmp eq i64 %39, 0
  br i1 %.not54.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.preheader.1, %.lr.ph.1
  %.044.1 = phi i64 [ %75, %.lr.ph.1 ], [ 0, %.preheader.1 ]
  %.143.1 = phi double [ %74, %.lr.ph.1 ], [ %.04145.1, %.preheader.1 ]
  %40 = load ptr, ptr %11, align 8, !tbaa !14
  %41 = getelementptr inbounds double, ptr %40, i64 %.04046.1
  %42 = load double, ptr %41, align 8, !tbaa !12
  %43 = load ptr, ptr %12, align 8, !tbaa !14
  %44 = getelementptr inbounds double, ptr %43, i64 %.044.1
  %45 = load double, ptr %44, align 8, !tbaa !12
  %46 = fmul double %42, %45
  %47 = load ptr, ptr %13, align 8, !tbaa !15
  %48 = getelementptr inbounds double, ptr %47, i64 %.04046.1
  %49 = load double, ptr %48, align 8, !tbaa !12
  %50 = fmul double %46, %49
  %51 = load ptr, ptr %14, align 8, !tbaa !15
  %52 = getelementptr inbounds double, ptr %51, i64 %.044.1
  %53 = load double, ptr %52, align 8, !tbaa !12
  %54 = fmul double %50, %53
  %55 = load ptr, ptr %15, align 8, !tbaa !16
  %56 = getelementptr inbounds double, ptr %55, i64 %.04046.1
  %57 = load double, ptr %56, align 8, !tbaa !12
  %58 = load i64, ptr %0, align 8, !tbaa !17
  %59 = load i64, ptr %16, align 8, !tbaa !18
  %60 = load i64, ptr %17, align 8, !tbaa !19
  %61 = load double, ptr %18, align 8, !tbaa !20
  %62 = load double, ptr %19, align 8, !tbaa !21
  %63 = load double, ptr %20, align 8, !tbaa !22
  %64 = load ptr, ptr %21, align 8, !tbaa !16
  %65 = getelementptr inbounds double, ptr %64, i64 %.044.1
  %66 = load double, ptr %65, align 8, !tbaa !12
  %67 = load i64, ptr %1, align 8, !tbaa !17
  %68 = load i64, ptr %22, align 8, !tbaa !18
  %69 = load i64, ptr %23, align 8, !tbaa !19
  %70 = load double, ptr %24, align 8, !tbaa !20
  %71 = load double, ptr %25, align 8, !tbaa !21
  %72 = load double, ptr %26, align 8, !tbaa !22
  %73 = call double @pg_nuclear_attraction_integral_dwrt_orb_center(double noundef %57, i64 noundef %58, i64 noundef %59, i64 noundef %60, double noundef %61, double noundef %62, double noundef %63, double noundef %66, i64 noundef %67, i64 noundef %68, i64 noundef %69, double noundef %70, double noundef %71, double noundef %72, double noundef %2, double noundef %3, double noundef %4, ptr noundef nonnull %8, i64 noundef %5)
  %74 = call double @llvm.fmuladd.f64(double %54, double %73, double %.143.1)
  %75 = add nuw i64 %.044.1, 1
  %76 = load i64, ptr %10, align 8, !tbaa !5
  %77 = icmp ult i64 %75, %76
  br i1 %77, label %.lr.ph.1, label %._crit_edge.loopexit.1, !llvm.loop !23

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

._crit_edge.1:                                    ; preds = %._crit_edge.loopexit.1, %.preheader.1
  %78 = phi i64 [ %38, %.preheader.1 ], [ %.pre57, %._crit_edge.loopexit.1 ]
  %79 = phi i64 [ 0, %.preheader.1 ], [ %76, %._crit_edge.loopexit.1 ]
  %.1.lcssa.1 = phi double [ %.04145.1, %.preheader.1 ], [ %74, %._crit_edge.loopexit.1 ]
  %80 = add nuw i64 %.04046.1, 1
  %81 = icmp ult i64 %80, %78
  br i1 %81, label %.preheader.1, label %._crit_edge47.1, !llvm.loop !25

._crit_edge47.1:                                  ; preds = %._crit_edge.1
  %82 = getelementptr inbounds i8, ptr %6, i64 8
  store double %.1.lcssa.1, ptr %82, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %8, i8 0, i64 16, i1 false)
  %83 = getelementptr inbounds i8, ptr %8, i64 16
  store i64 1, ptr %83, align 16, !tbaa !13
  %.not52.2 = icmp eq i64 %78, 0
  br i1 %.not52.2, label %._crit_edge47.2, label %.preheader.lr.ph.2

.preheader.lr.ph.2:                               ; preds = %._crit_edge47.1.thread63, %._crit_edge47.1
  %84 = phi i64 [ %34, %._crit_edge47.1.thread63 ], [ %78, %._crit_edge47.1 ]
  %85 = load i64, ptr %10, align 8, !tbaa !5
  %.not53.2 = icmp eq i64 %85, 0
  br i1 %.not53.2, label %._crit_edge47.2, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.lr.ph.2, %._crit_edge.2
  %86 = phi i64 [ %126, %._crit_edge.2 ], [ %84, %.preheader.lr.ph.2 ]
  %87 = phi i64 [ %127, %._crit_edge.2 ], [ 1, %.preheader.lr.ph.2 ]
  %.04046.2 = phi i64 [ %128, %._crit_edge.2 ], [ 0, %.preheader.lr.ph.2 ]
  %.04145.2 = phi double [ %.1.lcssa.2, %._crit_edge.2 ], [ 0.000000e+00, %.preheader.lr.ph.2 ]
  %.not54.2 = icmp eq i64 %87, 0
  br i1 %.not54.2, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.preheader.2, %.lr.ph.2
  %.044.2 = phi i64 [ %123, %.lr.ph.2 ], [ 0, %.preheader.2 ]
  %.143.2 = phi double [ %122, %.lr.ph.2 ], [ %.04145.2, %.preheader.2 ]
  %88 = load ptr, ptr %11, align 8, !tbaa !14
  %89 = getelementptr inbounds double, ptr %88, i64 %.04046.2
  %90 = load double, ptr %89, align 8, !tbaa !12
  %91 = load ptr, ptr %12, align 8, !tbaa !14
  %92 = getelementptr inbounds double, ptr %91, i64 %.044.2
  %93 = load double, ptr %92, align 8, !tbaa !12
  %94 = fmul double %90, %93
  %95 = load ptr, ptr %13, align 8, !tbaa !15
  %96 = getelementptr inbounds double, ptr %95, i64 %.04046.2
  %97 = load double, ptr %96, align 8, !tbaa !12
  %98 = fmul double %94, %97
  %99 = load ptr, ptr %14, align 8, !tbaa !15
  %100 = getelementptr inbounds double, ptr %99, i64 %.044.2
  %101 = load double, ptr %100, align 8, !tbaa !12
  %102 = fmul double %98, %101
  %103 = load ptr, ptr %15, align 8, !tbaa !16
  %104 = getelementptr inbounds double, ptr %103, i64 %.04046.2
  %105 = load double, ptr %104, align 8, !tbaa !12
  %106 = load i64, ptr %0, align 8, !tbaa !17
  %107 = load i64, ptr %16, align 8, !tbaa !18
  %108 = load i64, ptr %17, align 8, !tbaa !19
  %109 = load double, ptr %18, align 8, !tbaa !20
  %110 = load double, ptr %19, align 8, !tbaa !21
  %111 = load double, ptr %20, align 8, !tbaa !22
  %112 = load ptr, ptr %21, align 8, !tbaa !16
  %113 = getelementptr inbounds double, ptr %112, i64 %.044.2
  %114 = load double, ptr %113, align 8, !tbaa !12
  %115 = load i64, ptr %1, align 8, !tbaa !17
  %116 = load i64, ptr %22, align 8, !tbaa !18
  %117 = load i64, ptr %23, align 8, !tbaa !19
  %118 = load double, ptr %24, align 8, !tbaa !20
  %119 = load double, ptr %25, align 8, !tbaa !21
  %120 = load double, ptr %26, align 8, !tbaa !22
  %121 = call double @pg_nuclear_attraction_integral_dwrt_orb_center(double noundef %105, i64 noundef %106, i64 noundef %107, i64 noundef %108, double noundef %109, double noundef %110, double noundef %111, double noundef %114, i64 noundef %115, i64 noundef %116, i64 noundef %117, double noundef %118, double noundef %119, double noundef %120, double noundef %2, double noundef %3, double noundef %4, ptr noundef nonnull %8, i64 noundef %5)
  %122 = call double @llvm.fmuladd.f64(double %102, double %121, double %.143.2)
  %123 = add nuw i64 %.044.2, 1
  %124 = load i64, ptr %10, align 8, !tbaa !5
  %125 = icmp ult i64 %123, %124
  br i1 %125, label %.lr.ph.2, label %._crit_edge.loopexit.2, !llvm.loop !23

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

._crit_edge.2:                                    ; preds = %._crit_edge.loopexit.2, %.preheader.2
  %126 = phi i64 [ %86, %.preheader.2 ], [ %.pre58, %._crit_edge.loopexit.2 ]
  %127 = phi i64 [ 0, %.preheader.2 ], [ %124, %._crit_edge.loopexit.2 ]
  %.1.lcssa.2 = phi double [ %.04145.2, %.preheader.2 ], [ %122, %._crit_edge.loopexit.2 ]
  %128 = add nuw i64 %.04046.2, 1
  %129 = icmp ult i64 %128, %126
  br i1 %129, label %.preheader.2, label %._crit_edge47.2, !llvm.loop !25

._crit_edge47.2:                                  ; preds = %._crit_edge.2, %.preheader.lr.ph.2, %._crit_edge47.1.thread, %._crit_edge47.1
  %.041.lcssa.2 = phi double [ 0.000000e+00, %._crit_edge47.1 ], [ 0.000000e+00, %._crit_edge47.1.thread ], [ 0.000000e+00, %.preheader.lr.ph.2 ], [ %.1.lcssa.2, %._crit_edge.2 ]
  %130 = getelementptr inbounds i8, ptr %6, i64 16
  store double %.041.lcssa.2, ptr %130, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  br label %.split51.us

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %131 = phi i64 [ %30, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %132 = phi i64 [ 0, %.preheader ], [ %171, %._crit_edge.loopexit ]
  %.1.lcssa = phi double [ %.04145, %.preheader ], [ %169, %._crit_edge.loopexit ]
  %133 = add nuw i64 %.04046, 1
  %134 = icmp ult i64 %133, %131
  br i1 %134, label %.preheader, label %._crit_edge47, !llvm.loop !25

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.044 = phi i64 [ %170, %.lr.ph ], [ 0, %.preheader ]
  %.143 = phi double [ %169, %.lr.ph ], [ %.04145, %.preheader ]
  %135 = load ptr, ptr %11, align 8, !tbaa !14
  %136 = getelementptr inbounds double, ptr %135, i64 %.04046
  %137 = load double, ptr %136, align 8, !tbaa !12
  %138 = load ptr, ptr %12, align 8, !tbaa !14
  %139 = getelementptr inbounds double, ptr %138, i64 %.044
  %140 = load double, ptr %139, align 8, !tbaa !12
  %141 = fmul double %137, %140
  %142 = load ptr, ptr %13, align 8, !tbaa !15
  %143 = getelementptr inbounds double, ptr %142, i64 %.04046
  %144 = load double, ptr %143, align 8, !tbaa !12
  %145 = fmul double %141, %144
  %146 = load ptr, ptr %14, align 8, !tbaa !15
  %147 = getelementptr inbounds double, ptr %146, i64 %.044
  %148 = load double, ptr %147, align 8, !tbaa !12
  %149 = fmul double %145, %148
  %150 = load ptr, ptr %15, align 8, !tbaa !16
  %151 = getelementptr inbounds double, ptr %150, i64 %.04046
  %152 = load double, ptr %151, align 8, !tbaa !12
  %153 = load i64, ptr %0, align 8, !tbaa !17
  %154 = load i64, ptr %16, align 8, !tbaa !18
  %155 = load i64, ptr %17, align 8, !tbaa !19
  %156 = load double, ptr %18, align 8, !tbaa !20
  %157 = load double, ptr %19, align 8, !tbaa !21
  %158 = load double, ptr %20, align 8, !tbaa !22
  %159 = load ptr, ptr %21, align 8, !tbaa !16
  %160 = getelementptr inbounds double, ptr %159, i64 %.044
  %161 = load double, ptr %160, align 8, !tbaa !12
  %162 = load i64, ptr %1, align 8, !tbaa !17
  %163 = load i64, ptr %22, align 8, !tbaa !18
  %164 = load i64, ptr %23, align 8, !tbaa !19
  %165 = load double, ptr %24, align 8, !tbaa !20
  %166 = load double, ptr %25, align 8, !tbaa !21
  %167 = load double, ptr %26, align 8, !tbaa !22
  %168 = call double @pg_nuclear_attraction_integral_dwrt_orb_center(double noundef %152, i64 noundef %153, i64 noundef %154, i64 noundef %155, double noundef %156, double noundef %157, double noundef %158, double noundef %161, i64 noundef %162, i64 noundef %163, i64 noundef %164, double noundef %165, double noundef %166, double noundef %167, double noundef %2, double noundef %3, double noundef %4, ptr noundef nonnull %8, i64 noundef %5)
  %169 = call double @llvm.fmuladd.f64(double %149, double %168, double %.143)
  %170 = add nuw i64 %.044, 1
  %171 = load i64, ptr %10, align 8, !tbaa !5
  %172 = icmp ult i64 %170, %171
  br i1 %172, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !23
}

; Function Attrs: nounwind uwtable
declare hidden double @pg_nuclear_attraction_integral_dwrt_orb_center(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, 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 = !{!6, !10, i64 48}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !10, i64 32}
!17 = !{!6, !7, i64 0}
!18 = !{!6, !7, i64 8}
!19 = !{!6, !7, i64 16}
!20 = !{!6, !11, i64 64}
!21 = !{!6, !11, i64 72}
!22 = !{!6, !11, i64 80}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24, !26}
!26 = !{!"llvm.loop.unswitch.partial.disable"}


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