; LLVM IR from zeux/meshoptimizer :: gltf/node.ll (Z10markScenesP10cgltf_dataRSt6vectorI8NodeInfoSaIS2_EE)

; 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.NodeInfo = type { i32, i8, i8, i32, i32, %"class.std::vector.0", i8, i64, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }
%struct.cgltf_data = type { i32, ptr, %struct.cgltf_asset, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, ptr, i64, ptr, i64, %struct.cgltf_extras, i64, ptr, ptr, i64, ptr, i64, ptr, i64, ptr, i64, %struct.cgltf_memory_options, %struct.cgltf_file_options }
%struct.cgltf_asset = type { ptr, ptr, ptr, ptr, %struct.cgltf_extras, i64, ptr }
%struct.cgltf_extras = type { i64, i64, ptr }
%struct.cgltf_memory_options = type { ptr, ptr, ptr }
%struct.cgltf_file_options = type { ptr, ptr, ptr }
%struct.cgltf_scene = type { ptr, ptr, i64, %struct.cgltf_extras, i64, ptr }
%struct.cgltf_node = type { ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, i64, i32, i32, i32, i32, [3 x float], [4 x float], [3 x float], [16 x float], %struct.cgltf_extras, i32, %struct.cgltf_mesh_gpu_instancing, i64, ptr }
%struct.cgltf_mesh_gpu_instancing = type { ptr, i64 }

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

12:                                               ; preds = %23, %2
  %13 = load i64, ptr %5, align 8, !tbaa !9
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call noundef i64 @_ZNKSt6vectorI8NodeInfoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #2
  %16 = icmp ult i64 %13, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  br label %26

18:                                               ; preds = %12
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load i64, ptr %5, align 8, !tbaa !9
  %21 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %20) #2
  %22 = getelementptr inbounds %struct.NodeInfo, ptr %21, i32 0, i32 0
  store i32 -1, ptr %22, align 8, !tbaa !11
  br label %23

23:                                               ; preds = %18
  %24 = load i64, ptr %5, align 8, !tbaa !9
  %25 = add i64 %24, 1
  store i64 %25, ptr %5, align 8, !tbaa !9
  br label %12, !llvm.loop !19

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %83, %26
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.cgltf_data, ptr %29, i32 0, i32 28
  %31 = load i64, ptr %30, align 8, !tbaa !21
  %32 = icmp ult i64 %28, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %27
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  br label %86

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %79, %34
  %36 = load i64, ptr %8, align 8, !tbaa !9
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.cgltf_data, ptr %37, i32 0, i32 27
  %39 = load ptr, ptr %38, align 8, !tbaa !28
  %40 = load i64, ptr %6, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.cgltf_scene, ptr %39, i64 %40
  %42 = getelementptr inbounds %struct.cgltf_scene, ptr %41, i32 0, i32 2
  %43 = load i64, ptr %42, align 8, !tbaa !29
  %44 = icmp ult i64 %36, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %35
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  br label %82

46:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.cgltf_data, ptr %48, i32 0, i32 27
  %50 = load ptr, ptr %49, align 8, !tbaa !28
  %51 = load i64, ptr %6, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.cgltf_scene, ptr %50, i64 %51
  %53 = getelementptr inbounds %struct.cgltf_scene, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !31
  %55 = load i64, ptr %8, align 8, !tbaa !9
  %56 = getelementptr inbounds ptr, ptr %54, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.cgltf_data, ptr %58, i32 0, i32 25
  %60 = load ptr, ptr %59, align 8, !tbaa !32
  %61 = ptrtoint ptr %57 to i64
  %62 = ptrtoint ptr %60 to i64
  %63 = sub i64 %61, %62
  %64 = sdiv exact i64 %63, 264
  %65 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %64) #2
  store ptr %65, ptr %9, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.NodeInfo, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !11
  %69 = icmp sge i32 %68, 0
  br i1 %69, label %70, label %73

70:                                               ; preds = %46
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.NodeInfo, ptr %71, i32 0, i32 0
  store i32 -2, ptr %72, align 8, !tbaa !11
  br label %78

73:                                               ; preds = %46
  %74 = load i64, ptr %6, align 8, !tbaa !9
  %75 = trunc i64 %74 to i32
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.NodeInfo, ptr %76, i32 0, i32 0
  store i32 %75, ptr %77, align 8, !tbaa !11
  br label %78

78:                                               ; preds = %73, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  br label %79

79:                                               ; preds = %78
  %80 = load i64, ptr %8, align 8, !tbaa !9
  %81 = add i64 %80, 1
  store i64 %81, ptr %8, align 8, !tbaa !9
  br label %35, !llvm.loop !33

82:                                               ; preds = %45
  br label %83

83:                                               ; preds = %82
  %84 = load i64, ptr %6, align 8, !tbaa !9
  %85 = add i64 %84, 1
  store i64 %85, ptr %6, align 8, !tbaa !9
  br label %27, !llvm.loop !34

86:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %87

87:                                               ; preds = %126, %86
  %88 = load i64, ptr %10, align 8, !tbaa !9
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.cgltf_data, ptr %89, i32 0, i32 26
  %91 = load i64, ptr %90, align 8, !tbaa !35
  %92 = icmp ult i64 %88, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %87
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  br label %129

94:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.cgltf_data, ptr %95, i32 0, i32 25
  %97 = load ptr, ptr %96, align 8, !tbaa !32
  %98 = load i64, ptr %10, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.cgltf_node, ptr %97, i64 %98
  store ptr %99, ptr %11, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %105, %94
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.cgltf_node, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !36
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %109

105:                                              ; preds = %100
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.cgltf_node, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !36
  store ptr %108, ptr %11, align 8, !tbaa !5
  br label %100, !llvm.loop !39

109:                                              ; preds = %100
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.cgltf_data, ptr %112, i32 0, i32 25
  %114 = load ptr, ptr %113, align 8, !tbaa !32
  %115 = ptrtoint ptr %111 to i64
  %116 = ptrtoint ptr %114 to i64
  %117 = sub i64 %115, %116
  %118 = sdiv exact i64 %117, 264
  %119 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %118) #2
  %120 = getelementptr inbounds %struct.NodeInfo, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %120, align 8, !tbaa !11
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = load i64, ptr %10, align 8, !tbaa !9
  %124 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %123) #2
  %125 = getelementptr inbounds %struct.NodeInfo, ptr %124, i32 0, i32 0
  store i32 %121, ptr %125, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  br label %126

126:                                              ; preds = %109
  %127 = load i64, ptr %10, align 8, !tbaa !9
  %128 = add i64 %127, 1
  store i64 %128, ptr %10, align 8, !tbaa !9
  br label %87, !llvm.loop !40

129:                                              ; preds = %93
  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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI8NodeInfoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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, !13, i64 0}
!12 = !{!"_ZTS8NodeInfo", !13, i64 0, !14, i64 4, !14, i64 5, !13, i64 8, !13, i64 12, !15, i64 16, !14, i64 40, !10, i64 48, !6, i64 56}
!13 = !{!"int", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSSt6vectorImSaImEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseImSaImEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !10, i64 288}
!22 = !{!"_ZTS10cgltf_data", !23, i64 0, !6, i64 8, !24, i64 16, !6, i64 88, !10, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !10, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !10, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !10, i64 192, !6, i64 200, !10, i64 208, !6, i64 216, !10, i64 224, !6, i64 232, !10, i64 240, !6, i64 248, !10, i64 256, !6, i64 264, !10, i64 272, !6, i64 280, !10, i64 288, !6, i64 296, !6, i64 304, !10, i64 312, !6, i64 320, !10, i64 328, !25, i64 336, !10, i64 360, !6, i64 368, !6, i64 376, !10, i64 384, !6, i64 392, !10, i64 400, !6, i64 408, !10, i64 416, !6, i64 424, !10, i64 432, !26, i64 440, !27, i64 464}
!23 = !{!"_ZTS15cgltf_file_type", !7, i64 0}
!24 = !{!"_ZTS11cgltf_asset", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !25, i64 32, !10, i64 56, !6, i64 64}
!25 = !{!"_ZTS12cgltf_extras", !10, i64 0, !10, i64 8, !6, i64 16}
!26 = !{!"_ZTS20cgltf_memory_options", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTS18cgltf_file_options", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!22, !6, i64 280}
!29 = !{!30, !10, i64 16}
!30 = !{!"_ZTS11cgltf_scene", !6, i64 0, !6, i64 8, !10, i64 16, !25, i64 24, !10, i64 48, !6, i64 56}
!31 = !{!30, !6, i64 8}
!32 = !{!22, !6, i64 264}
!33 = distinct !{!33, !20}
!34 = distinct !{!34, !20}
!35 = !{!22, !10, i64 272}
!36 = !{!37, !6, i64 8}
!37 = !{!"_ZTS10cgltf_node", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !7, i64 96, !7, i64 108, !7, i64 124, !7, i64 136, !25, i64 200, !13, i64 224, !38, i64 232, !10, i64 248, !6, i64 256}
!38 = !{!"_ZTS25cgltf_mesh_gpu_instancing", !6, i64 0, !10, i64 8}
!39 = distinct !{!39, !20}
!40 = distinct !{!40, !20}


; 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.cgltf_scene = type { ptr, ptr, i64, %struct.cgltf_extras, i64, ptr }
%struct.cgltf_extras = type { i64, i64, ptr }
%struct.cgltf_node = type { ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, i64, i32, i32, i32, i32, [3 x float], [4 x float], [3 x float], [16 x float], %struct.cgltf_extras, i32, %struct.cgltf_mesh_gpu_instancing, i64, ptr }
%struct.cgltf_mesh_gpu_instancing = type { ptr, i64 }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z10markScenesP10cgltf_dataRSt6vectorI8NodeInfoSaIS2_EE(ptr nocapture noundef readonly %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 {
  %3 = tail call noundef i64 @_ZNKSt6vectorI8NodeInfoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #1
  %.not46 = icmp eq i64 %3, 0
  br i1 %.not46, label %.preheader38, label %.lr.ph

.preheader38:                                     ; preds = %.lr.ph, %2
  %4 = getelementptr inbounds i8, ptr %0, i64 288
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %.not47 = icmp eq i64 %5, 0
  br i1 %.not47, label %.preheader, label %.preheader37.lr.ph

.preheader37.lr.ph:                               ; preds = %.preheader38
  %6 = getelementptr inbounds i8, ptr %0, i64 280
  %7 = getelementptr inbounds i8, ptr %0, i64 264
  %.pre = load ptr, ptr %6, align 8, !tbaa !16
  br label %.preheader37

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.03339 = phi i64 [ %9, %.lr.ph ], [ 0, %2 ]
  %8 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.03339) #1
  store i32 -1, ptr %8, align 8, !tbaa !17
  %9 = add nuw i64 %.03339, 1
  %10 = tail call noundef i64 @_ZNKSt6vectorI8NodeInfoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #1
  %11 = icmp ult i64 %9, %10
  br i1 %11, label %.lr.ph, label %.preheader38, !llvm.loop !25

.preheader37:                                     ; preds = %.preheader37.lr.ph, %._crit_edge
  %12 = phi i64 [ %5, %.preheader37.lr.ph ], [ %20, %._crit_edge ]
  %13 = phi ptr [ %.pre, %.preheader37.lr.ph ], [ %21, %._crit_edge ]
  %.03542 = phi i64 [ 0, %.preheader37.lr.ph ], [ %22, %._crit_edge ]
  %14 = getelementptr inbounds %struct.cgltf_scene, ptr %13, i64 %.03542, i32 2
  %15 = load i64, ptr %14, align 8, !tbaa !27
  %.not48 = icmp eq i64 %15, 0
  br i1 %.not48, label %._crit_edge, label %.lr.ph41

.lr.ph41:                                         ; preds = %.preheader37
  %16 = trunc i64 %.03542 to i32
  br label %24

.preheader:                                       ; preds = %._crit_edge, %.preheader38
  %17 = getelementptr inbounds i8, ptr %0, i64 272
  %18 = load i64, ptr %17, align 8, !tbaa !29
  %.not49 = icmp eq i64 %18, 0
  br i1 %.not49, label %._crit_edge45, label %.lr.ph44

.lr.ph44:                                         ; preds = %.preheader
  %19 = getelementptr inbounds i8, ptr %0, i64 264
  br label %43

._crit_edge.loopexit:                             ; preds = %24
  %.pre50 = load i64, ptr %4, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader37
  %20 = phi i64 [ %.pre50, %._crit_edge.loopexit ], [ %12, %.preheader37 ]
  %21 = phi ptr [ %39, %._crit_edge.loopexit ], [ %13, %.preheader37 ]
  %22 = add nuw i64 %.03542, 1
  %23 = icmp ult i64 %22, %20
  br i1 %23, label %.preheader37, label %.preheader, !llvm.loop !30

24:                                               ; preds = %.lr.ph41, %24
  %25 = phi ptr [ %13, %.lr.ph41 ], [ %39, %24 ]
  %.03440 = phi i64 [ 0, %.lr.ph41 ], [ %38, %24 ]
  %26 = getelementptr inbounds %struct.cgltf_scene, ptr %25, i64 %.03542, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !31
  %28 = getelementptr inbounds ptr, ptr %27, i64 %.03440
  %29 = load ptr, ptr %28, align 8, !tbaa !32
  %30 = load ptr, ptr %7, align 8, !tbaa !33
  %31 = ptrtoint ptr %29 to i64
  %32 = ptrtoint ptr %30 to i64
  %33 = sub i64 %31, %32
  %34 = sdiv exact i64 %33, 264
  %35 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %34) #1
  %36 = load i32, ptr %35, align 8, !tbaa !17
  %37 = icmp sgt i32 %36, -1
  %storemerge = select i1 %37, i32 -2, i32 %16
  store i32 %storemerge, ptr %35, align 8, !tbaa !17
  %38 = add nuw i64 %.03440, 1
  %39 = load ptr, ptr %6, align 8, !tbaa !16
  %40 = getelementptr inbounds %struct.cgltf_scene, ptr %39, i64 %.03542, i32 2
  %41 = load i64, ptr %40, align 8, !tbaa !27
  %42 = icmp ult i64 %38, %41
  br i1 %42, label %24, label %._crit_edge.loopexit, !llvm.loop !34

._crit_edge45:                                    ; preds = %49, %.preheader
  ret void

43:                                               ; preds = %.lr.ph44, %49
  %.03243 = phi i64 [ 0, %.lr.ph44 ], [ %57, %49 ]
  %44 = load ptr, ptr %19, align 8, !tbaa !33
  %45 = getelementptr inbounds %struct.cgltf_node, ptr %44, i64 %.03243
  br label %46

46:                                               ; preds = %46, %43
  %.0 = phi ptr [ %45, %43 ], [ %48, %46 ]
  %47 = getelementptr inbounds i8, ptr %.0, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !35
  %.not = icmp eq ptr %48, null
  br i1 %.not, label %49, label %46, !llvm.loop !38

49:                                               ; preds = %46
  %50 = ptrtoint ptr %.0 to i64
  %51 = ptrtoint ptr %44 to i64
  %52 = sub i64 %50, %51
  %53 = sdiv exact i64 %52, 264
  %54 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %53) #1
  %55 = load i32, ptr %54, align 8, !tbaa !17
  %56 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI8NodeInfoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.03243) #1
  store i32 %55, ptr %56, align 8, !tbaa !17
  %57 = add nuw i64 %.03243, 1
  %58 = load i64, ptr %17, align 8, !tbaa !29
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %43, label %._crit_edge45, !llvm.loop !39
}

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

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

attributes #0 = { 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 #1 = { 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, !13, i64 288}
!6 = !{!"_ZTS10cgltf_data", !7, i64 0, !10, i64 8, !11, i64 16, !10, i64 88, !13, i64 96, !10, i64 104, !13, i64 112, !10, i64 120, !13, i64 128, !10, i64 136, !13, i64 144, !10, i64 152, !13, i64 160, !10, i64 168, !13, i64 176, !10, i64 184, !13, i64 192, !10, i64 200, !13, i64 208, !10, i64 216, !13, i64 224, !10, i64 232, !13, i64 240, !10, i64 248, !13, i64 256, !10, i64 264, !13, i64 272, !10, i64 280, !13, i64 288, !10, i64 296, !10, i64 304, !13, i64 312, !10, i64 320, !13, i64 328, !12, i64 336, !13, i64 360, !10, i64 368, !10, i64 376, !13, i64 384, !10, i64 392, !13, i64 400, !10, i64 408, !13, i64 416, !10, i64 424, !13, i64 432, !14, i64 440, !15, i64 464}
!7 = !{!"_ZTS15cgltf_file_type", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS11cgltf_asset", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !13, i64 56, !10, i64 64}
!12 = !{!"_ZTS12cgltf_extras", !13, i64 0, !13, i64 8, !10, i64 16}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTS20cgltf_memory_options", !10, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!"_ZTS18cgltf_file_options", !10, i64 0, !10, i64 8, !10, i64 16}
!16 = !{!6, !10, i64 280}
!17 = !{!18, !19, i64 0}
!18 = !{!"_ZTS8NodeInfo", !19, i64 0, !20, i64 4, !20, i64 5, !19, i64 8, !19, i64 12, !21, i64 16, !20, i64 40, !13, i64 48, !10, i64 56}
!19 = !{!"int", !8, i64 0}
!20 = !{!"bool", !8, i64 0}
!21 = !{!"_ZTSSt6vectorImSaImEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseImSaImEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !13, i64 16}
!28 = !{!"_ZTS11cgltf_scene", !10, i64 0, !10, i64 8, !13, i64 16, !12, i64 24, !13, i64 48, !10, i64 56}
!29 = !{!6, !13, i64 272}
!30 = distinct !{!30, !26}
!31 = !{!28, !10, i64 8}
!32 = !{!10, !10, i64 0}
!33 = !{!6, !10, i64 264}
!34 = distinct !{!34, !26}
!35 = !{!36, !10, i64 8}
!36 = !{!"_ZTS10cgltf_node", !10, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !13, i64 72, !19, i64 80, !19, i64 84, !19, i64 88, !19, i64 92, !8, i64 96, !8, i64 108, !8, i64 124, !8, i64 136, !12, i64 200, !19, i64 224, !37, i64 232, !13, i64 248, !10, i64 256}
!37 = !{!"_ZTS25cgltf_mesh_gpu_instancing", !10, i64 0, !13, i64 8}
!38 = distinct !{!38, !26}
!39 = distinct !{!39, !26}


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