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

; 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.timespec = type { i64, i64 }
%struct.scf_context = type { ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, i64, double, double, double, i64, double, double, i64, double, i64, i64, ptr, ptr, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, ptr, i64 }
%struct.dft_context = type { ptr, ptr, double }
%struct.molecular_grid_desc = type { ptr, i64, i64, i64, i64, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr, ptr, ptr, ptr }
%struct.molecule = type { i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr }
%struct.vec3d = type { double, double, double }
%struct.task_func_energy_dwrt_nuc_arg = type { ptr, ptr, ptr, i64, i64, i64, double }
%struct.threadpool_context = type { i64, ptr, i64 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @energy_dwrt_nuc(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.timespec, align 8
  %4 = alloca %struct.timespec, align 8
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #3
  call void @get_wall_time(ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store double 1.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store ptr null, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.scf_context, ptr %13, i32 0, i32 54
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %27

17:                                               ; preds = %1
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.scf_context, ptr %18, i32 0, i32 54
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.dft_context, ptr %20, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  store ptr %22, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  call void @calc_xc_gradients(ptr noundef %23)
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.molecular_grid_desc, ptr %24, i32 0, i32 30
  %26 = load double, ptr %25, align 8, !tbaa !16
  store double %26, ptr %5, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %17, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.scf_context, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !18
  %31 = getelementptr inbounds %struct.molecule, ptr %30, i32 0, i32 0
  %32 = load i64, ptr %31, align 8, !tbaa !19
  store i64 %32, ptr %7, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.scf_context, ptr %33, i32 0, i32 1
  %35 = load i64, ptr %34, align 8, !tbaa !22
  store i64 %35, ptr %8, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.scf_context, ptr %36, i32 0, i32 36
  %38 = load ptr, ptr %37, align 8, !tbaa !23
  store ptr %38, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !21
  br label %39

39:                                               ; preds = %81, %27
  %40 = load i64, ptr %10, align 8, !tbaa !21
  %41 = load i64, ptr %7, align 8, !tbaa !21
  %42 = icmp ult i64 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %84

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.scf_context, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = getelementptr inbounds %struct.molecule, ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  %50 = load i64, ptr %10, align 8, !tbaa !21
  %51 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %50
  store ptr %51, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %52 = call ptr @x_malloc(i64 noundef 56)
  store ptr %52, ptr %12, align 8, !tbaa !5
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.task_func_energy_dwrt_nuc_arg, ptr %54, i32 0, i32 0
  store ptr %53, ptr %55, align 8, !tbaa !25
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.task_func_energy_dwrt_nuc_arg, ptr %57, i32 0, i32 1
  store ptr %56, ptr %58, align 8, !tbaa !27
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.task_func_energy_dwrt_nuc_arg, ptr %60, i32 0, i32 2
  store ptr %59, ptr %61, align 8, !tbaa !28
  %62 = load i64, ptr %7, align 8, !tbaa !21
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.task_func_energy_dwrt_nuc_arg, ptr %63, i32 0, i32 3
  store i64 %62, ptr %64, align 8, !tbaa !29
  %65 = load i64, ptr %10, align 8, !tbaa !21
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.task_func_energy_dwrt_nuc_arg, ptr %66, i32 0, i32 4
  store i64 %65, ptr %67, align 8, !tbaa !30
  %68 = load i64, ptr %8, align 8, !tbaa !21
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.task_func_energy_dwrt_nuc_arg, ptr %69, i32 0, i32 5
  store i64 %68, ptr %70, align 8, !tbaa !31
  %71 = load double, ptr %5, align 8, !tbaa !9
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.task_func_energy_dwrt_nuc_arg, ptr %72, i32 0, i32 6
  store double %71, ptr %73, align 8, !tbaa !32
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load i64, ptr %10, align 8, !tbaa !21
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.threadpool_context, ptr %76, i32 0, i32 0
  %78 = load i64, ptr %77, align 8, !tbaa !33
  %79 = urem i64 %75, %78
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  call void @threadpool_add_task(ptr noundef %74, i64 noundef %79, ptr noundef @task_func_energy_dwrt_nuc, ptr noundef %80)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %81

81:                                               ; preds = %44
  %82 = load i64, ptr %10, align 8, !tbaa !21
  %83 = add i64 %82, 1
  store i64 %83, ptr %10, align 8, !tbaa !21
  br label %39, !llvm.loop !35

84:                                               ; preds = %43
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  call void @threadpool_wait_job_done(ptr noundef %85)
  call void @get_wall_time(ptr noundef %4)
  br label %86

86:                                               ; preds = %84
  %87 = load ptr, ptr %2, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.scf_context, ptr %87, i32 0, i32 55
  %89 = load i64, ptr %88, align 8, !tbaa !37
  %90 = icmp ne i64 %89, 0
  br i1 %90, label %94, label %91

91:                                               ; preds = %86
  %92 = call double @diff_time_ms(ptr noundef %3, ptr noundef %4)
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str, double noundef %92)
  br label %94

94:                                               ; preds = %91, %86
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #3
  ret void
}

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

declare void @get_wall_time(ptr noundef) #2

declare void @calc_xc_gradients(ptr noundef) #2

declare ptr @x_malloc(i64 noundef) #2

declare void @threadpool_add_task(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @task_func_energy_dwrt_nuc(ptr noundef) #0

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

declare void @threadpool_wait_job_done(ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

declare double @diff_time_ms(ptr noundef, ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 432}
!12 = !{!"scf_context", !6, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !10, i64 192, !13, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !13, i64 232, !10, i64 240, !10, i64 248, !13, i64 256, !10, i64 264, !13, i64 272, !13, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !10, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !13, i64 440}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"dft_context", !6, i64 0, !6, i64 8, !10, i64 16}
!16 = !{!17, !10, i64 240}
!17 = !{!"molecular_grid_desc", !6, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !6, i64 48, !6, i64 56, !13, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !13, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !13, i64 560, !13, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608}
!18 = !{!12, !6, i64 0}
!19 = !{!20, !13, i64 0}
!20 = !{!"molecule", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !13, i64 64, !6, i64 72}
!21 = !{!13, !13, i64 0}
!22 = !{!12, !13, i64 8}
!23 = !{!12, !6, i64 288}
!24 = !{!20, !6, i64 32}
!25 = !{!26, !6, i64 0}
!26 = !{!"task_func_energy_dwrt_nuc_arg", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !10, i64 48}
!27 = !{!26, !6, i64 8}
!28 = !{!26, !6, i64 16}
!29 = !{!26, !13, i64 24}
!30 = !{!26, !13, i64 32}
!31 = !{!26, !13, i64 40}
!32 = !{!26, !10, i64 48}
!33 = !{!34, !13, i64 0}
!34 = !{!"threadpool_context", !13, i64 0, !6, i64 8, !7, i64 16}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!12, !13, i64 440}


; 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"

%struct.timespec = type { i64, i64 }
%struct.vec3d = type { double, double, double }

@.str = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @energy_dwrt_nuc(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.timespec, align 8
  %3 = alloca %struct.timespec, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @get_wall_time(ptr noundef nonnull %2) #4
  %4 = getelementptr inbounds i8, ptr %0, i64 432
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %11, label %6

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %5, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !12
  call void @calc_xc_gradients(ptr noundef %8) #4
  %9 = getelementptr inbounds i8, ptr %8, i64 240
  %10 = load double, ptr %9, align 8, !tbaa !14
  br label %11

11:                                               ; preds = %6, %1
  %.031 = phi ptr [ %8, %6 ], [ null, %1 ]
  %.0 = phi double [ %10, %6 ], [ 1.000000e+00, %1 ]
  %12 = load ptr, ptr %0, align 8, !tbaa !16
  %13 = load i64, ptr %12, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i64, ptr %14, align 8, !tbaa !19
  %16 = getelementptr inbounds i8, ptr %0, i64 288
  %17 = load ptr, ptr %16, align 8, !tbaa !20
  %.not37 = icmp eq i64 %13, 0
  br i1 %.not37, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %11
  call void @threadpool_wait_job_done(ptr noundef %17) #4
  call void @get_wall_time(ptr noundef nonnull %3) #4
  %18 = getelementptr inbounds i8, ptr %0, i64 440
  %19 = load i64, ptr %18, align 8, !tbaa !21
  %.not35 = icmp eq i64 %19, 0
  br i1 %.not35, label %34, label %37

.lr.ph:                                           ; preds = %11, %.lr.ph
  %.03236 = phi i64 [ %33, %.lr.ph ], [ 0, %11 ]
  %20 = load ptr, ptr %0, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %20, i64 32
  %22 = load ptr, ptr %21, align 8, !tbaa !22
  %23 = getelementptr inbounds %struct.vec3d, ptr %22, i64 %.03236
  %24 = call ptr @x_malloc(i64 noundef 56) #4
  store ptr %0, ptr %24, align 8, !tbaa !23
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  store ptr %.031, ptr %25, align 8, !tbaa !25
  %26 = getelementptr inbounds i8, ptr %24, i64 16
  store ptr %23, ptr %26, align 8, !tbaa !26
  %27 = getelementptr inbounds i8, ptr %24, i64 24
  store i64 %13, ptr %27, align 8, !tbaa !27
  %28 = getelementptr inbounds i8, ptr %24, i64 32
  store i64 %.03236, ptr %28, align 8, !tbaa !28
  %29 = getelementptr inbounds i8, ptr %24, i64 40
  store i64 %15, ptr %29, align 8, !tbaa !29
  %30 = getelementptr inbounds i8, ptr %24, i64 48
  store double %.0, ptr %30, align 8, !tbaa !30
  %31 = load i64, ptr %17, align 8, !tbaa !31
  %32 = urem i64 %.03236, %31
  call void @threadpool_add_task(ptr noundef nonnull %17, i64 noundef %32, ptr noundef nonnull @task_func_energy_dwrt_nuc, ptr noundef nonnull %24) #4
  %33 = add nuw i64 %.03236, 1
  %exitcond.not = icmp eq i64 %33, %13
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !33

34:                                               ; preds = %._crit_edge
  %35 = call double @diff_time_ms(ptr noundef nonnull %2, ptr noundef nonnull %3) #4
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double noundef %35)
  br label %37

37:                                               ; preds = %34, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  ret void
}

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

declare void @get_wall_time(ptr noundef) local_unnamed_addr #2

declare void @calc_xc_gradients(ptr noundef) local_unnamed_addr #2

declare ptr @x_malloc(i64 noundef) local_unnamed_addr #2

declare void @threadpool_add_task(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @task_func_energy_dwrt_nuc(ptr noundef) #0

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

declare void @threadpool_wait_job_done(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare double @diff_time_ms(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "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 432}
!6 = !{!"scf_context", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !11, i64 192, !10, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !10, i64 232, !11, i64 240, !11, i64 248, !10, i64 256, !11, i64 264, !10, i64 272, !10, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !11, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !10, i64 440}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !7, i64 8}
!13 = !{!"dft_context", !7, i64 0, !7, i64 8, !11, i64 16}
!14 = !{!15, !11, i64 240}
!15 = !{!"molecular_grid_desc", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !10, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !10, i64 560, !10, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608}
!16 = !{!6, !7, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"molecule", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72}
!19 = !{!6, !10, i64 8}
!20 = !{!6, !7, i64 288}
!21 = !{!6, !10, i64 440}
!22 = !{!18, !7, i64 32}
!23 = !{!24, !7, i64 0}
!24 = !{!"task_func_energy_dwrt_nuc_arg", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !11, i64 48}
!25 = !{!24, !7, i64 8}
!26 = !{!24, !7, i64 16}
!27 = !{!24, !10, i64 24}
!28 = !{!24, !10, i64 32}
!29 = !{!24, !10, i64 40}
!30 = !{!24, !11, i64 48}
!31 = !{!32, !10, i64 0}
!32 = !{!"threadpool_context", !10, i64 0, !7, i64 8, !8, i64 16}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass