; 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_nuc(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, double noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, 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
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !9
  store double %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 !11
  br label %19

19:                                               ; preds = %136, %6
  %20 = load i64, ptr %13, align 8, !tbaa !11
  %21 = icmp ult i64 %20, 3
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %19
  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)
  %24 = load i64, ptr %13, align 8, !tbaa !11
  %25 = getelementptr inbounds [3 x i64], ptr %15, i64 0, i64 %24
  store i64 1, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store double 0.000000e+00, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 0, ptr %17, align 8, !tbaa !11
  br label %26

26:                                               ; preds = %128, %23
  %27 = load i64, ptr %17, align 8, !tbaa !11
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.basis_func, ptr %28, i32 0, i32 3
  %30 = load i64, ptr %29, align 8, !tbaa !13
  %31 = icmp ult i64 %27, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 0, ptr %18, align 8, !tbaa !11
  br label %34

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

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

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

124:                                              ; preds = %41
  %125 = load i64, ptr %18, align 8, !tbaa !11
  %126 = add i64 %125, 1
  store i64 %126, ptr %18, align 8, !tbaa !11
  br label %34, !llvm.loop !24

127:                                              ; preds = %40
  br label %128

128:                                              ; preds = %127
  %129 = load i64, ptr %17, align 8, !tbaa !11
  %130 = add i64 %129, 1
  store i64 %130, ptr %17, align 8, !tbaa !11
  br label %26, !llvm.loop !26

131:                                              ; preds = %32
  %132 = load double, ptr %16, align 8, !tbaa !9
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = load i64, ptr %13, align 8, !tbaa !11
  %135 = getelementptr inbounds double, ptr %133, i64 %134
  store double %132, ptr %135, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %136

136:                                              ; preds = %131
  %137 = load i64, ptr %13, align 8, !tbaa !11
  %138 = add i64 %137, 1
  store i64 %138, ptr %13, align 8, !tbaa !11
  br label %19, !llvm.loop !27

139:                                              ; preds = %22
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden double @pg_nuclear_attraction_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, double noundef, double noundef, ptr 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_nuc(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, double noundef %2, double noundef %3, double 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 %0, i64 48
  %11 = getelementptr inbounds i8, ptr %1, i64 48
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = getelementptr inbounds i8, ptr %1, i64 40
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  %19 = getelementptr inbounds i8, ptr %0, i64 80
  %20 = getelementptr inbounds i8, ptr %1, i64 32
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = getelementptr inbounds i8, ptr %1, i64 16
  %23 = getelementptr inbounds i8, ptr %1, i64 64
  %24 = getelementptr inbounds i8, ptr %1, i64 72
  %25 = getelementptr inbounds i8, ptr %1, i64 80
  %26 = load i64, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i64 %26, 0
  br i1 %.not, label %.split.us.preheader, label %.preheader.lr.ph

.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 %.split50.us

.split50.us:                                      ; preds = %._crit_edge46.2, %.split.us.preheader
  ret void

.preheader.lr.ph:                                 ; preds = %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)
  store i64 1, ptr %7, align 16, !tbaa !13
  %27 = load i64, ptr %9, align 8, !tbaa !5
  %.not52 = icmp eq i64 %27, 0
  br i1 %.not52, label %._crit_edge46.thread, label %.preheader

._crit_edge46.thread:                             ; preds = %.preheader.lr.ph
  store double 0.000000e+00, ptr %5, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  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)
  %28 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 1, ptr %28, align 8, !tbaa !13
  br label %.preheader.lr.ph.1

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %29 = phi i64 [ %130, %._crit_edge ], [ %26, %.preheader.lr.ph ]
  %30 = phi i64 [ %131, %._crit_edge ], [ 1, %.preheader.lr.ph ]
  %.03945 = phi i64 [ %132, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.04044 = phi double [ %.1.lcssa, %._crit_edge ], [ 0.000000e+00, %.preheader.lr.ph ]
  %.not53 = icmp eq i64 %30, 0
  br i1 %.not53, label %._crit_edge, label %.lr.ph

._crit_edge46:                                    ; preds = %._crit_edge
  store double %.1.lcssa, ptr %5, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  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)
  %31 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 1, ptr %31, align 8, !tbaa !13
  %.not51.1 = icmp eq i64 %130, 0
  br i1 %.not51.1, label %._crit_edge46.1.thread, label %.preheader.lr.ph.1

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

.preheader.lr.ph.1:                               ; preds = %._crit_edge46.thread, %._crit_edge46
  %33 = phi i64 [ %26, %._crit_edge46.thread ], [ %130, %._crit_edge46 ]
  %34 = load i64, ptr %9, align 8, !tbaa !5
  %.not52.1 = icmp eq i64 %34, 0
  br i1 %.not52.1, label %._crit_edge46.1.thread62, label %.preheader.1

._crit_edge46.1.thread62:                         ; preds = %.preheader.lr.ph.1
  %35 = getelementptr inbounds i8, ptr %5, i64 8
  store double 0.000000e+00, ptr %35, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  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 16, i1 false)
  %36 = getelementptr inbounds i8, ptr %7, i64 16
  store i64 1, ptr %36, align 16, !tbaa !13
  br label %.preheader.lr.ph.2

.preheader.1:                                     ; preds = %.preheader.lr.ph.1, %._crit_edge.1
  %37 = phi i64 [ %77, %._crit_edge.1 ], [ %33, %.preheader.lr.ph.1 ]
  %38 = phi i64 [ %78, %._crit_edge.1 ], [ 1, %.preheader.lr.ph.1 ]
  %.03945.1 = phi i64 [ %79, %._crit_edge.1 ], [ 0, %.preheader.lr.ph.1 ]
  %.04044.1 = phi double [ %.1.lcssa.1, %._crit_edge.1 ], [ 0.000000e+00, %.preheader.lr.ph.1 ]
  %.not53.1 = icmp eq i64 %38, 0
  br i1 %.not53.1, label %._crit_edge.1, label %.lr.ph.1

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

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

._crit_edge.1:                                    ; preds = %._crit_edge.loopexit.1, %.preheader.1
  %77 = phi i64 [ %37, %.preheader.1 ], [ %.pre56, %._crit_edge.loopexit.1 ]
  %78 = phi i64 [ 0, %.preheader.1 ], [ %75, %._crit_edge.loopexit.1 ]
  %.1.lcssa.1 = phi double [ %.04044.1, %.preheader.1 ], [ %73, %._crit_edge.loopexit.1 ]
  %79 = add nuw i64 %.03945.1, 1
  %80 = icmp ult i64 %79, %77
  br i1 %80, label %.preheader.1, label %._crit_edge46.1, !llvm.loop !25

._crit_edge46.1:                                  ; preds = %._crit_edge.1
  %81 = getelementptr inbounds i8, ptr %5, i64 8
  store double %.1.lcssa.1, ptr %81, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  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 16, i1 false)
  %82 = getelementptr inbounds i8, ptr %7, i64 16
  store i64 1, ptr %82, align 16, !tbaa !13
  %.not51.2 = icmp eq i64 %77, 0
  br i1 %.not51.2, label %._crit_edge46.2, label %.preheader.lr.ph.2

.preheader.lr.ph.2:                               ; preds = %._crit_edge46.1.thread62, %._crit_edge46.1
  %83 = phi i64 [ %33, %._crit_edge46.1.thread62 ], [ %77, %._crit_edge46.1 ]
  %84 = load i64, ptr %9, align 8, !tbaa !5
  %.not52.2 = icmp eq i64 %84, 0
  br i1 %.not52.2, label %._crit_edge46.2, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.lr.ph.2, %._crit_edge.2
  %85 = phi i64 [ %125, %._crit_edge.2 ], [ %83, %.preheader.lr.ph.2 ]
  %86 = phi i64 [ %126, %._crit_edge.2 ], [ 1, %.preheader.lr.ph.2 ]
  %.03945.2 = phi i64 [ %127, %._crit_edge.2 ], [ 0, %.preheader.lr.ph.2 ]
  %.04044.2 = phi double [ %.1.lcssa.2, %._crit_edge.2 ], [ 0.000000e+00, %.preheader.lr.ph.2 ]
  %.not53.2 = icmp eq i64 %86, 0
  br i1 %.not53.2, label %._crit_edge.2, label %.lr.ph.2

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

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

._crit_edge.2:                                    ; preds = %._crit_edge.loopexit.2, %.preheader.2
  %125 = phi i64 [ %85, %.preheader.2 ], [ %.pre57, %._crit_edge.loopexit.2 ]
  %126 = phi i64 [ 0, %.preheader.2 ], [ %123, %._crit_edge.loopexit.2 ]
  %.1.lcssa.2 = phi double [ %.04044.2, %.preheader.2 ], [ %121, %._crit_edge.loopexit.2 ]
  %127 = add nuw i64 %.03945.2, 1
  %128 = icmp ult i64 %127, %125
  br i1 %128, label %.preheader.2, label %._crit_edge46.2, !llvm.loop !25

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

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %130 = phi i64 [ %29, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %131 = phi i64 [ 0, %.preheader ], [ %170, %._crit_edge.loopexit ]
  %.1.lcssa = phi double [ %.04044, %.preheader ], [ %168, %._crit_edge.loopexit ]
  %132 = add nuw i64 %.03945, 1
  %133 = icmp ult i64 %132, %130
  br i1 %133, label %.preheader, label %._crit_edge46, !llvm.loop !25

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

; Function Attrs: nounwind uwtable
declare hidden double @pg_nuclear_attraction_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, double noundef, double noundef, ptr 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