; LLVM IR from artvns/SimpleFvm :: simplefvm/src/MeshLoader/MeshContainer (MeshContainerBuilder)

; 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.meshloader::MeshContainerBuilder" = type { ptr, ptr, ptr, i64, i64 }

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

12:                                               ; preds = %111, %1
  %13 = load i64, ptr %8, align 8, !tbaa !9
  %14 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 3
  %15 = load i64, ptr %14, align 8, !tbaa !11
  %16 = icmp ult i64 %13, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %114

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %107, %18
  %20 = load i64, ptr %10, align 8, !tbaa !9
  %21 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 4
  %22 = load i64, ptr %21, align 8, !tbaa !13
  %23 = icmp ult i64 %20, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %19
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %110

25:                                               ; preds = %19
  %26 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 2
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  %28 = load i64, ptr %8, align 8, !tbaa !9
  %29 = load i64, ptr %10, align 8, !tbaa !9
  %30 = call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %27, i64 noundef %28, i64 noundef %29)
  %31 = icmp ne i64 0, %30
  br i1 %31, label %32, label %106

32:                                               ; preds = %25
  %33 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 2
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  %35 = load i64, ptr %8, align 8, !tbaa !9
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %34, i64 noundef %35, i64 noundef %36)
  store i64 %37, ptr %3, align 8, !tbaa !9
  %38 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = load i64, ptr %3, align 8, !tbaa !9
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %39, i64 noundef %40)
  %42 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #4
  %43 = call noundef zeroext i1 @_ZN10meshloader9MacroCell11isGhostCellEv(ptr noundef nonnull align 8 dereferenceable(169) %42)
  br i1 %43, label %105, label %44

44:                                               ; preds = %32
  %45 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = load i64, ptr %8, align 8, !tbaa !9
  %48 = load i64, ptr %10, align 8, !tbaa !9
  %49 = sub i64 %48, 1
  %50 = call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %46, i64 noundef %47, i64 noundef %49)
  store i64 %50, ptr %4, align 8, !tbaa !9
  %51 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !14
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = load i64, ptr %10, align 8, !tbaa !9
  %55 = add i64 %54, 1
  %56 = call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %52, i64 noundef %53, i64 noundef %55)
  store i64 %56, ptr %5, align 8, !tbaa !9
  %57 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !14
  %59 = load i64, ptr %8, align 8, !tbaa !9
  %60 = sub i64 %59, 1
  %61 = load i64, ptr %10, align 8, !tbaa !9
  %62 = call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %58, i64 noundef %60, i64 noundef %61)
  store i64 %62, ptr %6, align 8, !tbaa !9
  %63 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !14
  %65 = load i64, ptr %8, align 8, !tbaa !9
  %66 = add i64 %65, 1
  %67 = load i64, ptr %10, align 8, !tbaa !9
  %68 = call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %64, i64 noundef %66, i64 noundef %67)
  store i64 %68, ptr %7, align 8, !tbaa !9
  %69 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  %71 = load i64, ptr %3, align 8, !tbaa !9
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %70, i64 noundef %71)
  %73 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %72) #4
  %74 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = load i64, ptr %4, align 8, !tbaa !9
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %75, i64 noundef %76)
  call void @_ZN10meshloader9MacroCell13setMacroCellWERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %73, ptr noundef nonnull align 8 dereferenceable(8) %77)
  %78 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !15
  %80 = load i64, ptr %3, align 8, !tbaa !9
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %79, i64 noundef %80)
  %82 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %81) #4
  %83 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  %85 = load i64, ptr %5, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %84, i64 noundef %85)
  call void @_ZN10meshloader9MacroCell13setMacroCellEERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %82, ptr noundef nonnull align 8 dereferenceable(8) %86)
  %87 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !15
  %89 = load i64, ptr %3, align 8, !tbaa !9
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %88, i64 noundef %89)
  %91 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %90) #4
  %92 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  %94 = load i64, ptr %6, align 8, !tbaa !9
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %93, i64 noundef %94)
  call void @_ZN10meshloader9MacroCell13setMacroCellNERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %91, ptr noundef nonnull align 8 dereferenceable(8) %95)
  %96 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !15
  %98 = load i64, ptr %3, align 8, !tbaa !9
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %97, i64 noundef %98)
  %100 = call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %99) #4
  %101 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !15
  %103 = load i64, ptr %7, align 8, !tbaa !9
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %102, i64 noundef %103)
  call void @_ZN10meshloader9MacroCell13setMacroCellSERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %100, ptr noundef nonnull align 8 dereferenceable(8) %104)
  br label %105

105:                                              ; preds = %44, %32
  br label %106

106:                                              ; preds = %105, %25
  br label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %10, align 8, !tbaa !9
  %109 = add i64 %108, 1
  store i64 %109, ptr %10, align 8, !tbaa !9
  br label %19, !llvm.loop !16

110:                                              ; preds = %24
  br label %111

111:                                              ; preds = %110
  %112 = load i64, ptr %8, align 8, !tbaa !9
  %113 = add i64 %112, 1
  store i64 %113, ptr %8, align 8, !tbaa !9
  br label %12, !llvm.loop !18

114:                                              ; preds = %17
  %115 = getelementptr inbounds %"class.meshloader::MeshContainerBuilder", ptr %11, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !15
  call void @_ZN10meshloader4Mesh18defineMeshAsLinkedEv(ptr noundef nonnull align 8 dereferenceable(49) %116)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

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

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

declare noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(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) #2

declare noundef zeroext i1 @_ZN10meshloader9MacroCell11isGhostCellEv(ptr noundef nonnull align 8 dereferenceable(169)) #2

declare void @_ZN10meshloader9MacroCell13setMacroCellWERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN10meshloader9MacroCell13setMacroCellEERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN10meshloader9MacroCell13setMacroCellNERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN10meshloader9MacroCell13setMacroCellSERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN10meshloader4Mesh18defineMeshAsLinkedEv(ptr noundef nonnull align 8 dereferenceable(49)) #2

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

!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, !10, i64 24}
!12 = !{!"_ZTSN10meshloader20MeshContainerBuilderE", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!12, !10, i64 32}
!14 = !{!12, !6, i64 16}
!15 = !{!12, !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


; 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 @_ZN10meshloader20MeshContainerBuilder13linkMeshCellsEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 24
  %3 = load i64, ptr %2, align 8, !tbaa !5
  %.not29 = icmp eq i64 %3, 0
  br i1 %.not29, label %._crit_edge28, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load i64, ptr %4, align 8, !tbaa !11
  %.not30 = icmp eq i64 %6, 0
  br i1 %.not30, label %._crit_edge28, label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %7 = phi i64 [ %12, %._crit_edge ], [ %3, %.preheader.lr.ph ]
  %8 = phi i64 [ %13, %._crit_edge ], [ 1, %.preheader.lr.ph ]
  %.02527 = phi i64 [ %.pre-phi, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.not31 = icmp eq i64 %8, 0
  br i1 %.not31, label %.preheader.._crit_edge_crit_edge, label %.lr.ph

.preheader.._crit_edge_crit_edge:                 ; preds = %.preheader
  %.pre33 = add nuw i64 %.02527, 1
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %9 = add i64 %.02527, -1
  %10 = add nuw i64 %.02527, 1
  br label %15

._crit_edge28:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %1
  %11 = load ptr, ptr %0, align 8, !tbaa !12
  tail call void @_ZN10meshloader4Mesh18defineMeshAsLinkedEv(ptr noundef nonnull align 8 dereferenceable(49) %11)
  ret void

._crit_edge.loopexit:                             ; preds = %56
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.preheader.._crit_edge_crit_edge, %._crit_edge.loopexit
  %.pre-phi = phi i64 [ %.pre33, %.preheader.._crit_edge_crit_edge ], [ %10, %._crit_edge.loopexit ]
  %12 = phi i64 [ %7, %.preheader.._crit_edge_crit_edge ], [ %.pre, %._crit_edge.loopexit ]
  %13 = phi i64 [ 0, %.preheader.._crit_edge_crit_edge ], [ %58, %._crit_edge.loopexit ]
  %14 = icmp ult i64 %.pre-phi, %12
  br i1 %14, label %.preheader, label %._crit_edge28, !llvm.loop !13

15:                                               ; preds = %.lr.ph, %56
  %.026 = phi i64 [ 0, %.lr.ph ], [ %57, %56 ]
  %16 = load ptr, ptr %5, align 8, !tbaa !16
  %17 = tail call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %.02527, i64 noundef %.026)
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %56, label %18

18:                                               ; preds = %15
  %19 = load ptr, ptr %5, align 8, !tbaa !16
  %20 = tail call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %19, i64 noundef %.02527, i64 noundef %.026)
  %21 = load ptr, ptr %0, align 8, !tbaa !12
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %21, i64 noundef %20)
  %23 = tail call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #3
  %24 = tail call noundef zeroext i1 @_ZN10meshloader9MacroCell11isGhostCellEv(ptr noundef nonnull align 8 dereferenceable(169) %23)
  br i1 %24, label %56, label %25

25:                                               ; preds = %18
  %26 = load ptr, ptr %5, align 8, !tbaa !16
  %27 = add i64 %.026, -1
  %28 = tail call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %26, i64 noundef %.02527, i64 noundef %27)
  %29 = load ptr, ptr %5, align 8, !tbaa !16
  %30 = add nuw i64 %.026, 1
  %31 = tail call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %29, i64 noundef %.02527, i64 noundef %30)
  %32 = load ptr, ptr %5, align 8, !tbaa !16
  %33 = tail call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %32, i64 noundef %9, i64 noundef %.026)
  %34 = load ptr, ptr %5, align 8, !tbaa !16
  %35 = tail call noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40) %34, i64 noundef %10, i64 noundef %.026)
  %36 = load ptr, ptr %0, align 8, !tbaa !12
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %36, i64 noundef %20)
  %38 = tail call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #3
  %39 = load ptr, ptr %0, align 8, !tbaa !12
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %39, i64 noundef %28)
  tail call void @_ZN10meshloader9MacroCell13setMacroCellWERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %38, ptr noundef nonnull align 8 dereferenceable(8) %40)
  %41 = load ptr, ptr %0, align 8, !tbaa !12
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %41, i64 noundef %20)
  %43 = tail call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #3
  %44 = load ptr, ptr %0, align 8, !tbaa !12
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %44, i64 noundef %31)
  tail call void @_ZN10meshloader9MacroCell13setMacroCellEERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %43, ptr noundef nonnull align 8 dereferenceable(8) %45)
  %46 = load ptr, ptr %0, align 8, !tbaa !12
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %46, i64 noundef %20)
  %48 = tail call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #3
  %49 = load ptr, ptr %0, align 8, !tbaa !12
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %49, i64 noundef %33)
  tail call void @_ZN10meshloader9MacroCell13setMacroCellNERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %48, ptr noundef nonnull align 8 dereferenceable(8) %50)
  %51 = load ptr, ptr %0, align 8, !tbaa !12
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %51, i64 noundef %20)
  %53 = tail call noundef ptr @_ZNKSt10unique_ptrIN10meshloader9MacroCellESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %52) #3
  %54 = load ptr, ptr %0, align 8, !tbaa !12
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49) %54, i64 noundef %35)
  tail call void @_ZN10meshloader9MacroCell13setMacroCellSERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169) %53, ptr noundef nonnull align 8 dereferenceable(8) %55)
  br label %56

56:                                               ; preds = %15, %25, %18
  %57 = add nuw i64 %.026, 1
  %58 = load i64, ptr %4, align 8, !tbaa !11
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %15, label %._crit_edge.loopexit, !llvm.loop !17
}

declare noundef i64 @_ZNK10meshloader10NumsMatrix8getValueEmm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, 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 @_ZN10meshloader4Mesh7getCellEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN10meshloader9MacroCell11isGhostCellEv(ptr noundef nonnull align 8 dereferenceable(169)) local_unnamed_addr #1

declare void @_ZN10meshloader9MacroCell13setMacroCellWERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZN10meshloader9MacroCell13setMacroCellEERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZN10meshloader9MacroCell13setMacroCellNERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZN10meshloader9MacroCell13setMacroCellSERSt10unique_ptrIS0_St14default_deleteIS0_EE(ptr noundef nonnull align 8 dereferenceable(169), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZN10meshloader4Mesh18defineMeshAsLinkedEv(ptr noundef nonnull align 8 dereferenceable(49)) 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" }
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 = { 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, !10, i64 24}
!6 = !{!"_ZTSN10meshloader20MeshContainerBuilderE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !10, i64 32}
!12 = !{!6, !7, i64 0}
!13 = distinct !{!13, !14, !15}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = !{!6, !7, i64 16}
!17 = distinct !{!17, !14}


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