; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (sph_system_data2)

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

%"class.jet::ConstArrayAccessor" = type { i64, ptr }
%"class.jet::ConstArrayAccessor.14" = type { i64, ptr }
%"class.jet::Vector" = type { double, double }
%"struct.jet::SphSpikyKernel2" = type { double, double, double, double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.jet::SphSystemData2" = type { %"class.jet::ParticleSystemData2", double, double, double, double, i64, i64 }
%"class.jet::ParticleSystemData2" = type { %"class.jet::Serializable", double, double, i64, i64, i64, i64, %"class.std::vector", %"class.std::vector.0", %"class.std::shared_ptr", %"class.std::vector.5" }
%"class.jet::Serializable" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<jet::Array<double, 1>, std::allocator<jet::Array<double, 1>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Array<double, 1>, std::allocator<jet::Array<double, 1>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Array<double, 1>, std::allocator<jet::Array<double, 1>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Array<double, 1>, std::allocator<jet::Array<double, 1>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<jet::Array<jet::Vector<double, 2>, 1>, std::allocator<jet::Array<jet::Vector<double, 2>, 1>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Array<jet::Vector<double, 2>, 1>, std::allocator<jet::Array<jet::Vector<double, 2>, 1>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Array<jet::Vector<double, 2>, 1>, std::allocator<jet::Array<jet::Vector<double, 2>, 1>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Array<jet::Vector<double, 2>, 1>, std::allocator<jet::Array<jet::Vector<double, 2>, 1>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare noundef double @_ZNK3jet19ParticleSystemData24massEv(ptr noundef nonnull align 8 dereferenceable(144)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet14SphSystemData29densitiesEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ConstArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(192)) #2 align 2

declare void @_ZNK3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind writable sret(%"class.jet::ConstArrayAccessor.14") align 8, ptr noundef nonnull align 8 dereferenceable(144)) #1

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet19ParticleSystemData213neighborListsEv(ptr noundef nonnull align 8 dereferenceable(144)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3jet15SphSpikyKernel2C2Ed(ptr noundef nonnull align 8 dereferenceable(40), double noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm2EE10distanceToERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK3jet14SphSystemData211laplacianAtEmRKNS_18ConstArrayAccessorIdLm1EEE(ptr noundef nonnull align 8 dereferenceable(192) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca %"class.jet::ConstArrayAccessor.14", align 8
  %9 = alloca %"class.jet::ConstArrayAccessor", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.jet::Vector", align 8
  %12 = alloca %"struct.jet::SphSpikyKernel2", align 8
  %13 = alloca double, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.jet::Vector", align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store double 0.000000e+00, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  call void @_ZNK3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind writable sret(%"class.jet::ConstArrayAccessor.14") align 8 %8, ptr noundef nonnull align 8 dereferenceable(144) %20)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  call void @_ZNK3jet14SphSystemData29densitiesEv(ptr dead_on_unwind writable sret(%"class.jet::ConstArrayAccessor") align 8 %9, ptr noundef nonnull align 8 dereferenceable(192) %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet19ParticleSystemData213neighborListsEv(ptr noundef nonnull align 8 dereferenceable(144) %20)
  %22 = load i64, ptr %5, align 8, !tbaa !9
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %22) #6
  store ptr %23, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %24 = load i64, ptr %5, align 8, !tbaa !9
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %24)
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %25)
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #6
  %26 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %20, i32 0, i32 4
  %27 = load double, ptr %26, align 8, !tbaa !13
  call void @_ZN3jet15SphSpikyKernel2C2Ed(ptr noundef nonnull align 8 dereferenceable(40) %12, double noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %28 = call noundef double @_ZNK3jet19ParticleSystemData24massEv(ptr noundef nonnull align 8 dereferenceable(144) %20)
  store double %28, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %29, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  %31 = call ptr @_ZNKSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %33 = load ptr, ptr %14, align 8, !tbaa !5
  %34 = call ptr @_ZNKSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  br label %36

36:                                               ; preds = %64, %3
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br i1 %37, label %39, label %38

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %66

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %41 = load i64, ptr %40, align 8, !tbaa !9
  store i64 %41, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %42 = load i64, ptr %17, align 8, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %42)
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %43)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %44 = call noundef double @_ZNK3jet6VectorIdLm2EE10distanceToERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %18)
  store double %44, ptr %19, align 8, !tbaa !11
  %45 = load double, ptr %13, align 8, !tbaa !11
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = load i64, ptr %17, align 8, !tbaa !9
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %47)
  %49 = load double, ptr %48, align 8, !tbaa !11
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = load i64, ptr %5, align 8, !tbaa !9
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %50, i64 noundef %51)
  %53 = load double, ptr %52, align 8, !tbaa !11
  %54 = fsub double %49, %53
  %55 = fmul double %45, %54
  %56 = load i64, ptr %17, align 8, !tbaa !9
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %56)
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = fdiv double %55, %58
  %60 = load double, ptr %19, align 8, !tbaa !11
  %61 = call noundef double @_ZNK3jet15SphSpikyKernel216secondDerivativeEd(ptr noundef nonnull align 8 dereferenceable(40) %12, double noundef %60)
  %62 = load double, ptr %7, align 8, !tbaa !11
  %63 = call double @llvm.fmuladd.f64(double %59, double %61, double %62)
  store double %63, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %64

64:                                               ; preds = %39
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br label %36

66:                                               ; preds = %38
  %67 = load double, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret double %67
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet15SphSpikyKernel216secondDerivativeEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { mustprogress 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 #3 = { mustprogress 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 = { inlinehint mustprogress 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 168}
!14 = !{!"_ZTSN3jet14SphSystemData2E", !15, i64 0, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !10, i64 176, !10, i64 184}
!15 = !{!"_ZTSN3jet19ParticleSystemData2E", !16, i64 0, !12, i64 8, !12, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !17, i64 56, !21, i64 80, !25, i64 104, !28, i64 120}
!16 = !{!"_ZTSN3jet12SerializableE"}
!17 = !{!"_ZTSSt6vectorIN3jet5ArrayIdLm1EEESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt10shared_ptrIN3jet22PointNeighborSearcher2EE", !26, i64 0}
!26 = !{!"_ZTSSt12__shared_ptrIN3jet22PointNeighborSearcher2ELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !27, i64 8}
!27 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!28 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


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

%"class.jet::ConstArrayAccessor" = type { i64, ptr }
%"class.jet::ConstArrayAccessor.14" = type { i64, ptr }
%"class.jet::Vector" = type { double, double }
%"struct.jet::SphSpikyKernel2" = type { double, double, double, double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

declare noundef double @_ZNK3jet19ParticleSystemData24massEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #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 uwtable
declare dso_local void @_ZNK3jet14SphSystemData29densitiesEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ConstArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #2 align 2

declare void @_ZNK3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind writable sret(%"class.jet::ConstArrayAccessor.14") align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet19ParticleSystemData213neighborListsEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3jet15SphSpikyKernel2C2Ed(ptr noundef nonnull align 8 dereferenceable(40), double noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm2EE10distanceToERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK3jet14SphSystemData211laplacianAtEmRKNS_18ConstArrayAccessorIdLm1EEE(ptr noundef nonnull align 8 dereferenceable(192) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %"class.jet::ConstArrayAccessor.14", align 8
  %5 = alloca %"class.jet::ConstArrayAccessor", align 8
  %6 = alloca %"class.jet::Vector", align 8
  %7 = alloca %"struct.jet::SphSpikyKernel2", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.jet::Vector", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @_ZNK3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::ConstArrayAccessor.14") align 8 %4, ptr noundef nonnull align 8 dereferenceable(144) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZNK3jet14SphSystemData29densitiesEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::ConstArrayAccessor") align 8 %5, ptr noundef nonnull align 8 dereferenceable(192) %0)
  %11 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet19ParticleSystemData213neighborListsEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %1) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %1)
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  %14 = getelementptr inbounds i8, ptr %0, i64 168
  %15 = load double, ptr %14, align 8, !tbaa !5
  call void @_ZN3jet15SphSpikyKernel2C2Ed(ptr noundef nonnull align 8 dereferenceable(40) %7, double noundef %15)
  %16 = call noundef double @_ZNK3jet19ParticleSystemData24massEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %17 = call ptr @_ZNKSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  store ptr %17, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %18 = call ptr @_ZNKSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  store ptr %18, ptr %9, align 8
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %19, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %3
  %.0.lcssa = phi double [ 0.000000e+00, %3 ], [ %34, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  ret double %.0.lcssa

.lr.ph:                                           ; preds = %3, %.lr.ph
  %.015 = phi double [ %34, %.lr.ph ], [ 0.000000e+00, %3 ]
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %21 = load i64, ptr %20, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %21)
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %22)
  %23 = call noundef double @_ZNK3jet6VectorIdLm2EE10distanceToERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2, i64 noundef %21)
  %25 = load double, ptr %24, align 8, !tbaa !30
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2, i64 noundef %1)
  %27 = load double, ptr %26, align 8, !tbaa !30
  %28 = fsub double %25, %27
  %29 = fmul double %16, %28
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3jet18ConstArrayAccessorIdLm1EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %21)
  %31 = load double, ptr %30, align 8, !tbaa !30
  %32 = fdiv double %29, %31
  %33 = call noundef double @_ZNK3jet15SphSpikyKernel216secondDerivativeEd(ptr noundef nonnull align 8 dereferenceable(40) %7, double noundef %23)
  %34 = call double @llvm.fmuladd.f64(double %32, double %33, double %.015)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %36, label %.lr.ph, label %._crit_edge
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet15SphSpikyKernel216secondDerivativeEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) local_unnamed_addr #4 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { mustprogress 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 #3 = { mustprogress 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 = { inlinehint mustprogress 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !9, i64 168}
!6 = !{!"_ZTSN3jet14SphSystemData2E", !7, i64 0, !9, i64 144, !9, i64 152, !9, i64 160, !9, i64 168, !12, i64 176, !12, i64 184}
!7 = !{!"_ZTSN3jet19ParticleSystemData2E", !8, i64 0, !9, i64 8, !9, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !18, i64 80, !22, i64 104, !25, i64 120}
!8 = !{!"_ZTSN3jet12SerializableE"}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSSt6vectorIN3jet5ArrayIdLm1EEESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !10, i64 0}
!18 = !{!"_ZTSSt6vectorIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!22 = !{!"_ZTSSt10shared_ptrIN3jet22PointNeighborSearcher2EE", !23, i64 0}
!23 = !{!"_ZTSSt12__shared_ptrIN3jet22PointNeighborSearcher2ELN9__gnu_cxx12_Lock_policyE2EE", !17, i64 0, !24, i64 8}
!24 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !17, i64 0}
!25 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!29 = !{!12, !12, i64 0}
!30 = !{!9, !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass