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

; 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::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: mustprogress uwtable
define dso_local void @_ZN3jet14SphSystemData23setERKS0_(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull align 8 dereferenceable(192) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3jet19ParticleSystemData23setERKS0_(ptr noundef nonnull align 8 dereferenceable(144) %5, ptr noundef nonnull align 8 dereferenceable(144) %6)
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %7, i32 0, i32 1
  %9 = load double, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %5, i32 0, i32 1
  store double %9, ptr %10, align 8, !tbaa !9
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %11, i32 0, i32 2
  %13 = load double, ptr %12, align 8, !tbaa !30
  %14 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %5, i32 0, i32 2
  store double %13, ptr %14, align 8, !tbaa !30
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %15, i32 0, i32 3
  %17 = load double, ptr %16, align 8, !tbaa !31
  %18 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %5, i32 0, i32 3
  store double %17, ptr %18, align 8, !tbaa !31
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %19, i32 0, i32 4
  %21 = load double, ptr %20, align 8, !tbaa !32
  %22 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %5, i32 0, i32 4
  store double %21, ptr %22, align 8, !tbaa !32
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %23, i32 0, i32 6
  %25 = load i64, ptr %24, align 8, !tbaa !33
  %26 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %5, i32 0, i32 6
  store i64 %25, ptr %26, align 8, !tbaa !33
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %27, i32 0, i32 5
  %29 = load i64, ptr %28, align 8, !tbaa !34
  %30 = getelementptr inbounds %"class.jet::SphSystemData2", ptr %5, i32 0, i32 5
  store i64 %29, ptr %30, align 8, !tbaa !34
  ret void
}

declare void @_ZN3jet19ParticleSystemData23setERKS0_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) #1

attributes #0 = { 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 #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" }

!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, !13, i64 144}
!10 = !{!"_ZTSN3jet14SphSystemData2E", !11, i64 0, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !14, i64 176, !14, i64 184}
!11 = !{!"_ZTSN3jet19ParticleSystemData2E", !12, i64 0, !13, i64 8, !13, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !15, i64 56, !19, i64 80, !23, i64 104, !26, i64 120}
!12 = !{!"_ZTSN3jet12SerializableE"}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIN3jet5ArrayIdLm1EEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayIdLm1EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN3jet5ArrayINS0_6VectorIdLm2EEELm1EEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt10shared_ptrIN3jet22PointNeighborSearcher2EE", !24, i64 0}
!24 = !{!"_ZTSSt12__shared_ptrIN3jet22PointNeighborSearcher2ELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !25, i64 8}
!25 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!26 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!10, !13, i64 152}
!31 = !{!10, !13, i64 160}
!32 = !{!10, !13, i64 168}
!33 = !{!10, !14, i64 184}
!34 = !{!10, !14, i64 176}


; 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 uwtable
define dso_local void @_ZN3jet14SphSystemData23setERKS0_(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull align 8 dereferenceable(192) %1) local_unnamed_addr #0 align 2 {
  tail call void @_ZN3jet19ParticleSystemData23setERKS0_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(144) %1)
  %3 = getelementptr inbounds i8, ptr %1, i64 144
  %4 = getelementptr inbounds i8, ptr %0, i64 144
  %5 = load <2 x double>, ptr %3, align 8, !tbaa !5
  store <2 x double> %5, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 160
  %7 = getelementptr inbounds i8, ptr %0, i64 160
  %8 = load <2 x double>, ptr %6, align 8, !tbaa !5
  store <2 x double> %8, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 176
  %10 = getelementptr inbounds i8, ptr %0, i64 176
  %11 = load <2 x i64>, ptr %9, align 8, !tbaa !9
  store <2 x i64> %11, ptr %10, align 8, !tbaa !9
  ret void
}

declare void @_ZN3jet19ParticleSystemData23setERKS0_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

attributes #0 = { 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 #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" }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}


; Effective O3 passes: GlobalOptPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass