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

15:                                               ; preds = %130, %4
  %16 = load i64, ptr %9, align 8, !tbaa !9
  %17 = icmp ult i64 %16, 3
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %133

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

22:                                               ; preds = %122, %19
  %23 = load i64, ptr %13, align 8, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.basis_func, ptr %24, i32 0, i32 3
  %26 = load i64, ptr %25, align 8, !tbaa !13
  %27 = icmp ult i64 %23, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %22
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %125

29:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %30

30:                                               ; preds = %118, %29
  %31 = load i64, ptr %14, align 8, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.basis_func, ptr %32, i32 0, i32 3
  %34 = load i64, ptr %33, align 8, !tbaa !13
  %35 = icmp ult i64 %31, %34
  br i1 %35, label %37, label %36

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

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

118:                                              ; preds = %37
  %119 = load i64, ptr %14, align 8, !tbaa !9
  %120 = add i64 %119, 1
  store i64 %120, ptr %14, align 8, !tbaa !9
  br label %30, !llvm.loop !24

121:                                              ; preds = %36
  br label %122

122:                                              ; preds = %121
  %123 = load i64, ptr %13, align 8, !tbaa !9
  %124 = add i64 %123, 1
  store i64 %124, ptr %13, align 8, !tbaa !9
  br label %22, !llvm.loop !26

125:                                              ; preds = %28
  %126 = load double, ptr %12, align 8, !tbaa !11
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = load i64, ptr %9, align 8, !tbaa !9
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  store double %126, ptr %129, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  br label %130

130:                                              ; preds = %125
  %131 = load i64, ptr %9, align 8, !tbaa !9
  %132 = add i64 %131, 1
  store i64 %132, ptr %9, align 8, !tbaa !9
  br label %15, !llvm.loop !27

133:                                              ; preds = %18
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden double @pg_kinetic_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, 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}


; 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_kinetic_integral_dwrt_nuc(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #3 {
  %5 = alloca [3 x i64], align 16
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = getelementptr inbounds i8, ptr %1, i64 24
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  %9 = getelementptr inbounds i8, ptr %1, i64 48
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = getelementptr inbounds i8, ptr %1, i64 40
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = getelementptr inbounds i8, ptr %0, i64 64
  %16 = getelementptr inbounds i8, ptr %0, i64 72
  %17 = getelementptr inbounds i8, ptr %0, i64 80
  %18 = getelementptr inbounds i8, ptr %1, i64 32
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = getelementptr inbounds i8, ptr %1, i64 16
  %21 = getelementptr inbounds i8, ptr %1, i64 64
  %22 = getelementptr inbounds i8, ptr %1, i64 72
  %23 = getelementptr inbounds i8, ptr %1, i64 80
  %24 = load i64, ptr %6, align 8, !tbaa !5
  %.not = icmp eq i64 %24, 0
  br i1 %.not, label %.split.us.preheader, label %.preheader.lr.ph

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

.split48.us:                                      ; preds = %._crit_edge44.2, %.split.us.preheader
  ret void

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

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

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %27 = phi i64 [ %128, %._crit_edge ], [ %24, %.preheader.lr.ph ]
  %28 = phi i64 [ %129, %._crit_edge ], [ 1, %.preheader.lr.ph ]
  %.03743 = phi i64 [ %130, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.03842 = phi double [ %.1.lcssa, %._crit_edge ], [ 0.000000e+00, %.preheader.lr.ph ]
  %.not51 = icmp eq i64 %28, 0
  br i1 %.not51, label %._crit_edge, label %.lr.ph

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

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

.preheader.lr.ph.1:                               ; preds = %._crit_edge44.thread, %._crit_edge44
  %31 = phi i64 [ %24, %._crit_edge44.thread ], [ %128, %._crit_edge44 ]
  %32 = load i64, ptr %7, align 8, !tbaa !5
  %.not50.1 = icmp eq i64 %32, 0
  br i1 %.not50.1, label %._crit_edge44.1.thread60, label %.preheader.1

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

.preheader.1:                                     ; preds = %.preheader.lr.ph.1, %._crit_edge.1
  %35 = phi i64 [ %75, %._crit_edge.1 ], [ %31, %.preheader.lr.ph.1 ]
  %36 = phi i64 [ %76, %._crit_edge.1 ], [ 1, %.preheader.lr.ph.1 ]
  %.03743.1 = phi i64 [ %77, %._crit_edge.1 ], [ 0, %.preheader.lr.ph.1 ]
  %.03842.1 = phi double [ %.1.lcssa.1, %._crit_edge.1 ], [ 0.000000e+00, %.preheader.lr.ph.1 ]
  %.not51.1 = icmp eq i64 %36, 0
  br i1 %.not51.1, label %._crit_edge.1, label %.lr.ph.1

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

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

._crit_edge.1:                                    ; preds = %._crit_edge.loopexit.1, %.preheader.1
  %75 = phi i64 [ %35, %.preheader.1 ], [ %.pre54, %._crit_edge.loopexit.1 ]
  %76 = phi i64 [ 0, %.preheader.1 ], [ %73, %._crit_edge.loopexit.1 ]
  %.1.lcssa.1 = phi double [ %.03842.1, %.preheader.1 ], [ %71, %._crit_edge.loopexit.1 ]
  %77 = add nuw i64 %.03743.1, 1
  %78 = icmp ult i64 %77, %75
  br i1 %78, label %.preheader.1, label %._crit_edge44.1, !llvm.loop !25

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

.preheader.lr.ph.2:                               ; preds = %._crit_edge44.1.thread60, %._crit_edge44.1
  %81 = phi i64 [ %31, %._crit_edge44.1.thread60 ], [ %75, %._crit_edge44.1 ]
  %82 = load i64, ptr %7, align 8, !tbaa !5
  %.not50.2 = icmp eq i64 %82, 0
  br i1 %.not50.2, label %._crit_edge44.2, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.lr.ph.2, %._crit_edge.2
  %83 = phi i64 [ %123, %._crit_edge.2 ], [ %81, %.preheader.lr.ph.2 ]
  %84 = phi i64 [ %124, %._crit_edge.2 ], [ 1, %.preheader.lr.ph.2 ]
  %.03743.2 = phi i64 [ %125, %._crit_edge.2 ], [ 0, %.preheader.lr.ph.2 ]
  %.03842.2 = phi double [ %.1.lcssa.2, %._crit_edge.2 ], [ 0.000000e+00, %.preheader.lr.ph.2 ]
  %.not51.2 = icmp eq i64 %84, 0
  br i1 %.not51.2, label %._crit_edge.2, label %.lr.ph.2

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

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

._crit_edge.2:                                    ; preds = %._crit_edge.loopexit.2, %.preheader.2
  %123 = phi i64 [ %83, %.preheader.2 ], [ %.pre55, %._crit_edge.loopexit.2 ]
  %124 = phi i64 [ 0, %.preheader.2 ], [ %121, %._crit_edge.loopexit.2 ]
  %.1.lcssa.2 = phi double [ %.03842.2, %.preheader.2 ], [ %119, %._crit_edge.loopexit.2 ]
  %125 = add nuw i64 %.03743.2, 1
  %126 = icmp ult i64 %125, %123
  br i1 %126, label %.preheader.2, label %._crit_edge44.2, !llvm.loop !25

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

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %128 = phi i64 [ %27, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %129 = phi i64 [ 0, %.preheader ], [ %168, %._crit_edge.loopexit ]
  %.1.lcssa = phi double [ %.03842, %.preheader ], [ %166, %._crit_edge.loopexit ]
  %130 = add nuw i64 %.03743, 1
  %131 = icmp ult i64 %130, %128
  br i1 %131, label %.preheader, label %._crit_edge44, !llvm.loop !25

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

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