; LLVM IR from artvns/SimpleFvm :: simplefvm/src/MeshLoader/StaggeredMeshPart/VelocityNumberingSets/NumsSetsCreator_ad63ed8d (ZN10meshloader16NumsSetsCreatorV15createFacesSetsEc)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.meshloader::AbstractNumsSetsCreator" = type { ptr, ptr, ptr, ptr, %"class.std::vector" }

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

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN10meshloader8NumsSets10getNumsSetEc(ptr noundef nonnull align 8 dereferenceable(80), i8 noundef signext) #1

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

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

declare noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellSEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #1

declare noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellNEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10meshloader16NumsSetsCreatorV14isGhostCellN_NEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #3 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) #1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader9MacroCell13getMacroCellNEv(ptr noundef nonnull align 8 dereferenceable(169)) #1

declare noundef i64 @_ZN10meshloader9MacroCell16getCellGlobalNumEv(ptr noundef nonnull align 8 dereferenceable(169)) #1

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

declare void @_ZN10meshloader8NumsSets10addNumsSetEcSt6vectorImSaImEE(ptr noundef nonnull align 8 dereferenceable(80), i8 noundef signext, ptr noundef) #1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10meshloader16NumsSetsCreatorV15createFacesSetsEc(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %13 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 2
  %14 = load ptr, ptr %13, align 8, !tbaa !10
  %15 = load i8, ptr %4, align 1, !tbaa !9
  %16 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN10meshloader8NumsSets10getNumsSetEc(ptr noundef nonnull align 8 dereferenceable(80) %14, i8 noundef signext %15)
  %17 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  store i64 %17, ptr %5, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !16
  br label %18

18:                                               ; preds = %58, %2
  %19 = load i64, ptr %6, align 8, !tbaa !16
  %20 = load i64, ptr %5, align 8, !tbaa !16
  %21 = icmp ult i64 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %61

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %24 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !10
  %26 = load i8, ptr %4, align 1, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN10meshloader8NumsSets10getNumsSetEc(ptr noundef nonnull align 8 dereferenceable(80) %25, i8 noundef signext %26)
  %28 = load i64, ptr %6, align 8, !tbaa !16
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %28)
  %30 = load i64, ptr %29, align 8, !tbaa !16
  store i64 %30, ptr %7, align 8, !tbaa !16
  %31 = load i64, ptr %7, align 8, !tbaa !16
  %32 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellSEm(ptr noundef nonnull align 8 dereferenceable(56) %12, i64 noundef %31)
  br i1 %32, label %38, label %33

33:                                               ; preds = %23
  %34 = load i64, ptr %7, align 8, !tbaa !16
  %35 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellNEm(ptr noundef nonnull align 8 dereferenceable(56) %12, i64 noundef %34)
  br i1 %35, label %38, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 4
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %7)
  br label %38

38:                                               ; preds = %36, %33, %23
  %39 = load i64, ptr %7, align 8, !tbaa !16
  %40 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellSEm(ptr noundef nonnull align 8 dereferenceable(56) %12, i64 noundef %39)
  br i1 %40, label %57, label %41

41:                                               ; preds = %38
  %42 = load i64, ptr %7, align 8, !tbaa !16
  %43 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellNEm(ptr noundef nonnull align 8 dereferenceable(56) %12, i64 noundef %42)
  br i1 %43, label %57, label %44

44:                                               ; preds = %41
  %45 = load i64, ptr %7, align 8, !tbaa !16
  %46 = call noundef zeroext i1 @_ZN10meshloader16NumsSetsCreatorV14isGhostCellN_NEm(ptr noundef nonnull align 8 dereferenceable(56) %12, i64 noundef %45)
  br i1 %46, label %47, label %57

47:                                               ; preds = %44
  %48 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %49 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = load i64, ptr %7, align 8, !tbaa !16
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %50, i64 noundef %51)
  %53 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %52) #4
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader9MacroCell13getMacroCellNEv(ptr noundef nonnull align 8 dereferenceable(169) %53)
  %55 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %54) #4
  %56 = call noundef i64 @_ZN10meshloader9MacroCell16getCellGlobalNumEv(ptr noundef nonnull align 8 dereferenceable(169) %55)
  store i64 %56, ptr %8, align 8, !tbaa !16
  call void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %57

57:                                               ; preds = %47, %44, %41, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %58

58:                                               ; preds = %57
  %59 = load i64, ptr %6, align 8, !tbaa !16
  %60 = add i64 %59, 1
  store i64 %60, ptr %6, align 8, !tbaa !16
  br label %18, !llvm.loop !19

61:                                               ; preds = %22
  %62 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 4
  %63 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #4
  %64 = icmp ugt i64 %63, 0
  br i1 %64, label %65, label %75

65:                                               ; preds = %61
  %66 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 3
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = load i8, ptr %4, align 1, !tbaa !9
  %69 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 4
  call void @_ZNSt6vectorImSaImEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %69)
  invoke void @_ZN10meshloader8NumsSets10addNumsSetEcSt6vectorImSaImEE(ptr noundef nonnull align 8 dereferenceable(80) %67, i8 noundef signext %68, ptr noundef %9)
          to label %70 unwind label %71

70:                                               ; preds = %65
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %75

71:                                               ; preds = %65
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %10, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %11, align 4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %77

75:                                               ; preds = %70, %61
  %76 = getelementptr inbounds %"class.meshloader::AbstractNumsSetsCreator", ptr %12, i32 0, i32 4
  call void @_ZNSt6vectorImSaImEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void

77:                                               ; preds = %71
  %78 = load ptr, ptr %10, align 8
  %79 = load i32, ptr %11, align 4
  %80 = insertvalue { ptr, i32 } poison, ptr %78, 0
  %81 = insertvalue { ptr, i32 } %80, i32 %79, 1
  resume { ptr, i32 } %81
}

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 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 #3 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 16}
!11 = !{!"_ZTSN10meshloader23AbstractNumsSetsCreatorE", !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32}
!12 = !{!"_ZTSSt6vectorImSaImEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseImSaImEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!11, !6, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!11, !6, i64 24}


; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, 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 nonnull align 8 dereferenceable(24) ptr @_ZN10meshloader8NumsSets10getNumsSetEc(ptr noundef nonnull align 8 dereferenceable(80), i8 noundef signext) local_unnamed_addr #1

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

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

declare noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellSEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellNEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10meshloader16NumsSetsCreatorV14isGhostCellN_NEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #3 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) local_unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader9MacroCell13getMacroCellNEv(ptr noundef nonnull align 8 dereferenceable(169)) local_unnamed_addr #1

declare noundef i64 @_ZN10meshloader9MacroCell16getCellGlobalNumEv(ptr noundef nonnull align 8 dereferenceable(169)) 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

declare void @_ZN10meshloader8NumsSets10addNumsSetEcSt6vectorImSaImEE(ptr noundef nonnull align 8 dereferenceable(80), i8 noundef signext, ptr noundef) local_unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10meshloader16NumsSetsCreatorV15createFacesSetsEc(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN10meshloader8NumsSets10getNumsSetEc(ptr noundef nonnull align 8 dereferenceable(80) %7, i8 noundef signext %1)
  %9 = tail call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %.not10 = icmp eq i64 %9, 0
  br i1 %.not10, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  br label %14

._crit_edge:                                      ; preds = %41, %2
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %49, label %43

14:                                               ; preds = %.lr.ph, %41
  %.09 = phi i64 [ 0, %.lr.ph ], [ %42, %41 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN10meshloader8NumsSets10getNumsSetEc(ptr noundef nonnull align 8 dereferenceable(80) %15, i8 noundef signext %1)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %.09)
  %18 = load i64, ptr %17, align 8, !tbaa !14
  store i64 %18, ptr %3, align 8, !tbaa !14
  %19 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellSEm(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %18)
  br i1 %19, label %24, label %20

20:                                               ; preds = %14
  %21 = load i64, ptr %3, align 8, !tbaa !14
  %22 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellNEm(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %21)
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %24

24:                                               ; preds = %23, %20, %14
  %25 = load i64, ptr %3, align 8, !tbaa !14
  %26 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellSEm(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %25)
  br i1 %26, label %41, label %27

27:                                               ; preds = %24
  %28 = load i64, ptr %3, align 8, !tbaa !14
  %29 = call noundef zeroext i1 @_ZN10meshloader23AbstractNumsSetsCreator12isGhostCellNEm(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %28)
  br i1 %29, label %41, label %30

30:                                               ; preds = %27
  %31 = load i64, ptr %3, align 8, !tbaa !14
  %32 = call noundef zeroext i1 @_ZN10meshloader16NumsSetsCreatorV14isGhostCellN_NEm(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %31)
  br i1 %32, label %33, label %41

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %34 = load ptr, ptr %11, align 8, !tbaa !16
  %35 = load i64, ptr %3, align 8, !tbaa !14
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %34, i64 noundef %35)
  %37 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #4
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader9MacroCell13getMacroCellNEv(ptr noundef nonnull align 8 dereferenceable(169) %37)
  %39 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #4
  %40 = call noundef i64 @_ZN10meshloader9MacroCell16getCellGlobalNumEv(ptr noundef nonnull align 8 dereferenceable(169) %39)
  store i64 %40, ptr %4, align 8, !tbaa !14
  call void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %41

41:                                               ; preds = %33, %30, %27, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %42 = add nuw i64 %.09, 1
  %exitcond.not = icmp eq i64 %42, %9
  br i1 %exitcond.not, label %._crit_edge, label %14, !llvm.loop !17

43:                                               ; preds = %._crit_edge
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  call void @_ZNSt6vectorImSaImEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %12)
  invoke void @_ZN10meshloader8NumsSets10addNumsSetEcSt6vectorImSaImEE(ptr noundef nonnull align 8 dereferenceable(80) %45, i8 noundef signext %1, ptr noundef nonnull %5)
          to label %46 unwind label %47

46:                                               ; preds = %43
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %49

47:                                               ; preds = %43
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  resume { ptr, i32 } %48

49:                                               ; preds = %46, %._crit_edge
  call void @_ZNSt6vectorImSaImEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  ret void
}

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 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 #3 = { 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 #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 16}
!6 = !{!"_ZTSN10meshloader23AbstractNumsSetsCreatorE", !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorImSaImEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseImSaImEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!6, !7, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !7, i64 24}


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