; LLVM IR from moarseniy/CudaFEMproject :: FEMproject/DataKeeper/src/datakeeper.ll (ZN13FEMdataKeeper13ParseElementsEv)

; 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.Element = type { i32, %"class.std::vector.35", %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, float, float, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CPU_Matrix = type { %class.Matrix.base, [7 x i8] }
%class.Matrix.base = type <{ ptr, i32, [4 x i8], i64, i64, i64, ptr, i8 }>
%class.FEMdataKeeper = type { i32, i32, i32, i32, i32, i32, %class.CPU_Matrix, %"class.std::vector.10", %class.CPU_Matrix, i32, [4 x i8], %class.CPU_Matrix, %class.CPU_Matrix, %"class.std::vector.15", %"class.std::vector.20", %"class.std::vector.25", %"class.std::vector.30", ptr, ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", float, float, %"class.std::basic_fstream", %"class.std::basic_fstream", %"class.std::basic_fstream", %"class.std::basic_fstream", %"class.std::basic_fstream" }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<CPU_Matrix, std::allocator<CPU_Matrix>>::_Vector_impl" }
%"struct.std::_Vector_base<CPU_Matrix, std::allocator<CPU_Matrix>>::_Vector_impl" = type { %"struct.std::_Vector_base<CPU_Matrix, std::allocator<CPU_Matrix>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CPU_Matrix, std::allocator<CPU_Matrix>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<Element, std::allocator<Element>>::_Vector_impl" }
%"struct.std::_Vector_base<Element, std::allocator<Element>>::_Vector_impl" = type { %"struct.std::_Vector_base<Element, std::allocator<Element>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Element, std::allocator<Element>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<Constraint, std::allocator<Constraint>>::_Vector_impl" }
%"struct.std::_Vector_base<Constraint, std::allocator<Constraint>>::_Vector_impl" = type { %"struct.std::_Vector_base<Constraint, std::allocator<Constraint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Constraint, std::allocator<Constraint>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<Load, std::allocator<Load>>::_Vector_impl" }
%"struct.std::_Vector_base<Load, std::allocator<Load>>::_Vector_impl" = type { %"struct.std::_Vector_base<Load, std::allocator<Load>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Load, std::allocator<Load>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<BoundaryEdge, std::allocator<BoundaryEdge>>::_Vector_impl" }
%"struct.std::_Vector_base<BoundaryEdge, std::allocator<BoundaryEdge>>::_Vector_impl" = type { %"struct.std::_Vector_base<BoundaryEdge, std::allocator<BoundaryEdge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<BoundaryEdge, std::allocator<BoundaryEdge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_fstream" = type { %"class.std::basic_iostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13FEMdataKeeper13ParseElementsEv(ptr noundef nonnull align 8 dereferenceable(3168) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.Element, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %46, %1
  %12 = load i32, ptr %3, align 4, !tbaa !9
  %13 = getelementptr inbounds %class.FEMdataKeeper, ptr %10, i32 0, i32 2
  %14 = load i32, ptr %13, align 8, !tbaa !11
  %15 = icmp slt i32 %12, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %11
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %54

17:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 1104, ptr %5) #5
  %18 = getelementptr inbounds %class.FEMdataKeeper, ptr %10, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !51
  call void @_ZN7ElementC1Ei(ptr noundef nonnull align 8 dereferenceable(1104) %5, i32 noundef %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %36, %17
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = getelementptr inbounds %class.FEMdataKeeper, ptr %10, i32 0, i32 0
  %23 = load i32, ptr %22, align 8, !tbaa !51
  %24 = add nsw i32 %23, 1
  %25 = icmp slt i32 %21, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %20
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %43

27:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %28 = getelementptr inbounds %class.FEMdataKeeper, ptr %10, i32 0, i32 26
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %30 unwind label %39

30:                                               ; preds = %27
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = getelementptr inbounds %struct.Element, ptr %5, i32 0, i32 1
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %34) #5
  store i32 %31, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %36

36:                                               ; preds = %30
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %6, align 4, !tbaa !9
  br label %20, !llvm.loop !52

39:                                               ; preds = %27
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %8, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %53

43:                                               ; preds = %26
  %44 = getelementptr inbounds %class.FEMdataKeeper, ptr %10, i32 0, i32 13
  invoke void @_ZNSt6vectorI7ElementSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 8 dereferenceable(1104) %5)
          to label %45 unwind label %49

45:                                               ; preds = %43
  call void @_ZN7ElementD1Ev(ptr noundef nonnull align 8 dereferenceable(1104) %5) #5
  call void @llvm.lifetime.end.p0(i64 1104, ptr %5) #5
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %3, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %3, align 4, !tbaa !9
  br label %11, !llvm.loop !54

49:                                               ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %8, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %9, align 4
  br label %53

53:                                               ; preds = %49, %39
  call void @_ZN7ElementD1Ev(ptr noundef nonnull align 8 dereferenceable(1104) %5) #5
  call void @llvm.lifetime.end.p0(i64 1104, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %55

54:                                               ; preds = %16
  ret void

55:                                               ; preds = %53
  %56 = load ptr, ptr %8, align 8
  %57 = load i32, ptr %9, align 4
  %58 = insertvalue { ptr, i32 } poison, ptr %56, 0
  %59 = insertvalue { ptr, i32 } %58, i32 %57, 1
  resume { ptr, i32 } %59
}

declare void @_ZN7ElementC1Ei(ptr noundef nonnull align 8 dereferenceable(1104), i32 noundef) unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI7ElementSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(1104)) #2 align 2

; Function Attrs: nounwind
declare void @_ZN7ElementD1Ev(ptr noundef nonnull align 8 dereferenceable(1104)) unnamed_addr #4

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 = { 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 #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS13FEMdataKeeper", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24, !18, i64 80, !13, i64 104, !10, i64 160, !13, i64 168, !13, i64 224, !22, i64 280, !26, i64 304, !30, i64 328, !34, i64 352, !6, i64 376, !6, i64 384, !38, i64 392, !38, i64 424, !38, i64 456, !38, i64 488, !40, i64 520, !40, i64 524, !41, i64 528, !41, i64 1056, !41, i64 1584, !41, i64 2112, !41, i64 2640}
!13 = !{!"_ZTS10CPU_Matrix", !14, i64 0}
!14 = !{!"_ZTS6Matrix", !15, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !6, i64 40, !17, i64 48}
!15 = !{!"_ZTS11DEVICE_NAME", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSSt6vectorI10CPU_MatrixSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI10CPU_MatrixSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI10CPU_MatrixSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI10CPU_MatrixSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt6vectorI7ElementSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI7ElementSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI7ElementSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI7ElementSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt6vectorI10ConstraintSaIS0_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseI10ConstraintSaIS0_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseI10ConstraintSaIS0_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseI10ConstraintSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTSSt6vectorI4LoadSaIS0_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseI4LoadSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseI4LoadSaIS0_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseI4LoadSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorI12BoundaryEdgeSaIS0_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseI12BoundaryEdgeSaIS0_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseI12BoundaryEdgeSaIS0_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseI12BoundaryEdgeSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !39, i64 0, !16, i64 8, !7, i64 16}
!39 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!40 = !{!"float", !7, i64 0}
!41 = !{!"_ZTSSt13basic_fstreamIcSt11char_traitsIcEE", !42, i64 0, !45, i64 24}
!42 = !{!"_ZTSSd", !43, i64 0, !44, i64 16}
!43 = !{!"_ZTSSi", !16, i64 8}
!44 = !{!"_ZTSSo"}
!45 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !46, i64 0, !7, i64 64, !48, i64 104, !49, i64 120, !50, i64 124, !50, i64 132, !50, i64 140, !6, i64 152, !16, i64 160, !17, i64 168, !17, i64 169, !17, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !17, i64 192, !6, i64 200, !6, i64 208, !16, i64 216, !6, i64 224, !6, i64 232}
!46 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !47, i64 56}
!47 = !{!"_ZTSSt6locale", !6, i64 0}
!48 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !17, i64 8}
!49 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!50 = !{!"_ZTS11__mbstate_t", !10, i64 0, !7, i64 4}
!51 = !{!12, !10, i64 0}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = distinct !{!54, !53}


; 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.Element = type { i32, %"class.std::vector.35", %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, float, float, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix, %class.CPU_Matrix }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CPU_Matrix = type { %class.Matrix.base, [7 x i8] }
%class.Matrix.base = type <{ ptr, i32, [4 x i8], i64, i64, i64, ptr, i8 }>

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13FEMdataKeeper13ParseElementsEv(ptr noundef nonnull align 8 dereferenceable(3168) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.Element, align 8
  %3 = alloca i32, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph15, label %._crit_edge16

.lr.ph15:                                         ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 1056
  %8 = getelementptr inbounds i8, ptr %2, i64 8
  %9 = getelementptr inbounds i8, ptr %0, i64 280
  br label %10

._crit_edge16:                                    ; preds = %21, %1
  ret void

10:                                               ; preds = %.lr.ph15, %21
  %.0913 = phi i32 [ 0, %.lr.ph15 ], [ %22, %21 ]
  call void @llvm.lifetime.start.p0(i64 1104, ptr nonnull %2) #5
  %11 = load i32, ptr %0, align 8, !tbaa !49
  call void @_ZN7ElementC1Ei(ptr noundef nonnull align 8 dereferenceable(1104) %2, i32 noundef %11)
  %12 = load i32, ptr %0, align 8, !tbaa !49
  %.not11 = icmp slt i32 %12, 0
  br i1 %.not11, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %14, %10
  invoke void @_ZNSt6vectorI7ElementSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(1104) %2)
          to label %21 unwind label %25

.lr.ph:                                           ; preds = %10, %14
  %indvars.iv = phi i64 [ %indvars.iv.next, %14 ], [ 0, %10 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %13 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %14 unwind label %19

14:                                               ; preds = %.lr.ph
  %15 = load i32, ptr %3, align 4, !tbaa !50
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #5
  store i32 %15, ptr %16, align 4, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr %0, align 8, !tbaa !49
  %18 = sext i32 %17 to i64
  %.not.not = icmp slt i64 %indvars.iv, %18
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !51

19:                                               ; preds = %.lr.ph
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %27

21:                                               ; preds = %._crit_edge
  call void @_ZN7ElementD1Ev(ptr noundef nonnull align 8 dereferenceable(1104) %2) #5
  call void @llvm.lifetime.end.p0(i64 1104, ptr nonnull %2) #5
  %22 = add nuw nsw i32 %.0913, 1
  %23 = load i32, ptr %4, align 8, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %10, label %._crit_edge16, !llvm.loop !53

25:                                               ; preds = %._crit_edge
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %27

27:                                               ; preds = %25, %19
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %26, %25 ]
  call void @_ZN7ElementD1Ev(ptr noundef nonnull align 8 dereferenceable(1104) %2) #5
  call void @llvm.lifetime.end.p0(i64 1104, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn
}

declare void @_ZN7ElementC1Ei(ptr noundef nonnull align 8 dereferenceable(1104), i32 noundef) unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI7ElementSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(1104)) local_unnamed_addr #2 align 2

; Function Attrs: nounwind
declare void @_ZN7ElementD1Ev(ptr noundef nonnull align 8 dereferenceable(1104)) unnamed_addr #4

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 = { 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 #5 = { 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 8}
!6 = !{!"_ZTS13FEMdataKeeper", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !16, i64 80, !10, i64 104, !7, i64 160, !10, i64 168, !10, i64 224, !20, i64 280, !24, i64 304, !28, i64 328, !32, i64 352, !14, i64 376, !14, i64 384, !36, i64 392, !36, i64 424, !36, i64 456, !36, i64 488, !38, i64 520, !38, i64 524, !39, i64 528, !39, i64 1056, !39, i64 1584, !39, i64 2112, !39, i64 2640}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS10CPU_Matrix", !11, i64 0}
!11 = !{!"_ZTS6Matrix", !12, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !14, i64 40, !15, i64 48}
!12 = !{!"_ZTS11DEVICE_NAME", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = !{!"_ZTSSt6vectorI10CPU_MatrixSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI10CPU_MatrixSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI10CPU_MatrixSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI10CPU_MatrixSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!20 = !{!"_ZTSSt6vectorI7ElementSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseI7ElementSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI7ElementSaIS0_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI7ElementSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"_ZTSSt6vectorI10ConstraintSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseI10ConstraintSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI10ConstraintSaIS0_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI10ConstraintSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!28 = !{!"_ZTSSt6vectorI4LoadSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseI4LoadSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI4LoadSaIS0_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI4LoadSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!32 = !{!"_ZTSSt6vectorI12BoundaryEdgeSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseI12BoundaryEdgeSaIS0_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseI12BoundaryEdgeSaIS0_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseI12BoundaryEdgeSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!36 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !37, i64 0, !13, i64 8, !8, i64 16}
!37 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!38 = !{!"float", !8, i64 0}
!39 = !{!"_ZTSSt13basic_fstreamIcSt11char_traitsIcEE", !40, i64 0, !43, i64 24}
!40 = !{!"_ZTSSd", !41, i64 0, !42, i64 16}
!41 = !{!"_ZTSSi", !13, i64 8}
!42 = !{!"_ZTSSo"}
!43 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !44, i64 0, !8, i64 64, !46, i64 104, !47, i64 120, !48, i64 124, !48, i64 132, !48, i64 140, !14, i64 152, !13, i64 160, !15, i64 168, !15, i64 169, !15, i64 170, !8, i64 171, !14, i64 176, !14, i64 184, !15, i64 192, !14, i64 200, !14, i64 208, !13, i64 216, !14, i64 224, !14, i64 232}
!44 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !45, i64 56}
!45 = !{!"_ZTSSt6locale", !14, i64 0}
!46 = !{!"_ZTSSt12__basic_fileIcE", !14, i64 0, !15, i64 8}
!47 = !{!"_ZTSSt13_Ios_Openmode", !8, i64 0}
!48 = !{!"_ZTS11__mbstate_t", !7, i64 0, !8, i64 4}
!49 = !{!6, !7, i64 0}
!50 = !{!7, !7, i64 0}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.mustprogress"}
!53 = distinct !{!53, !52}


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