; LLVM IR from khushmmehta/Scorch-V :: src/ScorchVkEngine/Abstractions (VulkanMemoryAllocator)

; 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.VmaDetailedStatistics = type { %struct.VmaStatistics, i32, i64, i64, i64, i64 }
%struct.VmaStatistics = type { i32, i32, i64, i64 }
%class.VmaBlockMetadata_Linear = type { %class.VmaBlockMetadata.base, i64, %class.VmaVector.2, %class.VmaVector.2, i32, i32, i64, i64, i64 }
%class.VmaBlockMetadata.base = type <{ ptr, i64, ptr, i64, i8 }>
%class.VmaVector.2 = type { %struct.VmaStlAllocator.3, ptr, i64, i64 }
%struct.VmaStlAllocator.3 = type { ptr }
%struct.VmaSuballocation = type { i64, i64, ptr, i32 }

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK23VmaBlockMetadata_Linear21AddDetailedStatisticsER21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(64) %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %26 = call noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %25)
  store i64 %26, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %27 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations1stEv(ptr noundef nonnull align 8 dereferenceable(144) %25)
  store ptr %27, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations2ndEv(ptr noundef nonnull align 8 dereferenceable(144) %25)
  store ptr %28, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %29)
  store i64 %30, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  store i64 %32, ptr %9, align 8, !tbaa !9
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.VmaDetailedStatistics, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %struct.VmaStatistics, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !11
  %37 = add i32 %36, 1
  store i32 %37, ptr %35, align 8, !tbaa !11
  %38 = load i64, ptr %5, align 8, !tbaa !9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.VmaDetailedStatistics, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %struct.VmaStatistics, ptr %40, i32 0, i32 2
  %42 = load i64, ptr %41, align 8, !tbaa !15
  %43 = add i64 %42, %38
  store i64 %43, ptr %41, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !9
  %44 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %25, i32 0, i32 5
  %45 = load i32, ptr %44, align 4, !tbaa !16
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %47, label %124

47:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %25, i32 0, i32 6
  %50 = load i64, ptr %49, align 8, !tbaa !23
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %48, i64 noundef %50)
  %52 = getelementptr inbounds %struct.VmaSuballocation, ptr %51, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !24
  store i64 %53, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %122, %47
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = load i64, ptr %11, align 8, !tbaa !9
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %58, label %123

58:                                               ; preds = %54
  br label %59

59:                                               ; preds = %72, %58
  %60 = load i64, ptr %12, align 8, !tbaa !9
  %61 = load i64, ptr %9, align 8, !tbaa !9
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %63, label %70

63:                                               ; preds = %59
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load i64, ptr %12, align 8, !tbaa !9
  %66 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %64, i64 noundef %65)
  %67 = getelementptr inbounds %struct.VmaSuballocation, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !27
  %69 = icmp eq ptr %68, null
  br label %70

70:                                               ; preds = %63, %59
  %71 = phi i1 [ false, %59 ], [ %69, %63 ]
  br i1 %71, label %72, label %75

72:                                               ; preds = %70
  %73 = load i64, ptr %12, align 8, !tbaa !9
  %74 = add i64 %73, 1
  store i64 %74, ptr %12, align 8, !tbaa !9
  br label %59, !llvm.loop !28

75:                                               ; preds = %70
  %76 = load i64, ptr %12, align 8, !tbaa !9
  %77 = load i64, ptr %9, align 8, !tbaa !9
  %78 = icmp ult i64 %76, %77
  br i1 %78, label %79, label %110

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = load i64, ptr %12, align 8, !tbaa !9
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %81)
  store ptr %82, ptr %13, align 8, !tbaa !5
  %83 = load i64, ptr %10, align 8, !tbaa !9
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.VmaSuballocation, ptr %84, i32 0, i32 0
  %86 = load i64, ptr %85, align 8, !tbaa !24
  %87 = icmp ult i64 %83, %86
  br i1 %87, label %88, label %96

88:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.VmaSuballocation, ptr %89, i32 0, i32 0
  %91 = load i64, ptr %90, align 8, !tbaa !24
  %92 = load i64, ptr %10, align 8, !tbaa !9
  %93 = sub i64 %91, %92
  store i64 %93, ptr %14, align 8, !tbaa !9
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = load i64, ptr %14, align 8, !tbaa !9
  call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %94, i64 noundef %95)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %96

96:                                               ; preds = %88, %79
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.VmaSuballocation, ptr %98, i32 0, i32 1
  %100 = load i64, ptr %99, align 8, !tbaa !30
  call void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %97, i64 noundef %100)
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.VmaSuballocation, ptr %101, i32 0, i32 0
  %103 = load i64, ptr %102, align 8, !tbaa !24
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.VmaSuballocation, ptr %104, i32 0, i32 1
  %106 = load i64, ptr %105, align 8, !tbaa !30
  %107 = add i64 %103, %106
  store i64 %107, ptr %10, align 8, !tbaa !9
  %108 = load i64, ptr %12, align 8, !tbaa !9
  %109 = add i64 %108, 1
  store i64 %109, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %122

110:                                              ; preds = %75
  %111 = load i64, ptr %10, align 8, !tbaa !9
  %112 = load i64, ptr %11, align 8, !tbaa !9
  %113 = icmp ult i64 %111, %112
  br i1 %113, label %114, label %120

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %115 = load i64, ptr %11, align 8, !tbaa !9
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = sub i64 %115, %116
  store i64 %117, ptr %15, align 8, !tbaa !9
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %118, i64 noundef %119)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %120

120:                                              ; preds = %114, %110
  %121 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %121, ptr %10, align 8, !tbaa !9
  br label %122

122:                                              ; preds = %120, %96
  br label %54, !llvm.loop !31

123:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %124

124:                                              ; preds = %123, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %125 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %25, i32 0, i32 6
  %126 = load i64, ptr %125, align 8, !tbaa !23
  store i64 %126, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %127 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %25, i32 0, i32 5
  %128 = load i32, ptr %127, align 4, !tbaa !16
  %129 = icmp eq i32 %128, 2
  br i1 %129, label %130, label %135

130:                                              ; preds = %124
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %131)
  %133 = getelementptr inbounds %struct.VmaSuballocation, ptr %132, i32 0, i32 0
  %134 = load i64, ptr %133, align 8, !tbaa !24
  br label %137

135:                                              ; preds = %124
  %136 = load i64, ptr %5, align 8, !tbaa !9
  br label %137

137:                                              ; preds = %135, %130
  %138 = phi i64 [ %134, %130 ], [ %136, %135 ]
  store i64 %138, ptr %17, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %207, %137
  %140 = load i64, ptr %10, align 8, !tbaa !9
  %141 = load i64, ptr %17, align 8, !tbaa !9
  %142 = icmp ult i64 %140, %141
  br i1 %142, label %143, label %208

143:                                              ; preds = %139
  br label %144

144:                                              ; preds = %157, %143
  %145 = load i64, ptr %16, align 8, !tbaa !9
  %146 = load i64, ptr %8, align 8, !tbaa !9
  %147 = icmp ult i64 %145, %146
  br i1 %147, label %148, label %155

148:                                              ; preds = %144
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load i64, ptr %16, align 8, !tbaa !9
  %151 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %149, i64 noundef %150)
  %152 = getelementptr inbounds %struct.VmaSuballocation, ptr %151, i32 0, i32 2
  %153 = load ptr, ptr %152, align 8, !tbaa !27
  %154 = icmp eq ptr %153, null
  br label %155

155:                                              ; preds = %148, %144
  %156 = phi i1 [ false, %144 ], [ %154, %148 ]
  br i1 %156, label %157, label %160

157:                                              ; preds = %155
  %158 = load i64, ptr %16, align 8, !tbaa !9
  %159 = add i64 %158, 1
  store i64 %159, ptr %16, align 8, !tbaa !9
  br label %144, !llvm.loop !32

160:                                              ; preds = %155
  %161 = load i64, ptr %16, align 8, !tbaa !9
  %162 = load i64, ptr %8, align 8, !tbaa !9
  %163 = icmp ult i64 %161, %162
  br i1 %163, label %164, label %195

164:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = load i64, ptr %16, align 8, !tbaa !9
  %167 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %165, i64 noundef %166)
  store ptr %167, ptr %18, align 8, !tbaa !5
  %168 = load i64, ptr %10, align 8, !tbaa !9
  %169 = load ptr, ptr %18, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.VmaSuballocation, ptr %169, i32 0, i32 0
  %171 = load i64, ptr %170, align 8, !tbaa !24
  %172 = icmp ult i64 %168, %171
  br i1 %172, label %173, label %181

173:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %174 = load ptr, ptr %18, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.VmaSuballocation, ptr %174, i32 0, i32 0
  %176 = load i64, ptr %175, align 8, !tbaa !24
  %177 = load i64, ptr %10, align 8, !tbaa !9
  %178 = sub i64 %176, %177
  store i64 %178, ptr %19, align 8, !tbaa !9
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = load i64, ptr %19, align 8, !tbaa !9
  call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %179, i64 noundef %180)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %181

181:                                              ; preds = %173, %164
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load ptr, ptr %18, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.VmaSuballocation, ptr %183, i32 0, i32 1
  %185 = load i64, ptr %184, align 8, !tbaa !30
  call void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %182, i64 noundef %185)
  %186 = load ptr, ptr %18, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.VmaSuballocation, ptr %186, i32 0, i32 0
  %188 = load i64, ptr %187, align 8, !tbaa !24
  %189 = load ptr, ptr %18, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.VmaSuballocation, ptr %189, i32 0, i32 1
  %191 = load i64, ptr %190, align 8, !tbaa !30
  %192 = add i64 %188, %191
  store i64 %192, ptr %10, align 8, !tbaa !9
  %193 = load i64, ptr %16, align 8, !tbaa !9
  %194 = add i64 %193, 1
  store i64 %194, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %207

195:                                              ; preds = %160
  %196 = load i64, ptr %10, align 8, !tbaa !9
  %197 = load i64, ptr %17, align 8, !tbaa !9
  %198 = icmp ult i64 %196, %197
  br i1 %198, label %199, label %205

199:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %200 = load i64, ptr %17, align 8, !tbaa !9
  %201 = load i64, ptr %10, align 8, !tbaa !9
  %202 = sub i64 %200, %201
  store i64 %202, ptr %20, align 8, !tbaa !9
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = load i64, ptr %20, align 8, !tbaa !9
  call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %203, i64 noundef %204)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %205

205:                                              ; preds = %199, %195
  %206 = load i64, ptr %17, align 8, !tbaa !9
  store i64 %206, ptr %10, align 8, !tbaa !9
  br label %207

207:                                              ; preds = %205, %181
  br label %139, !llvm.loop !33

208:                                              ; preds = %139
  %209 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %25, i32 0, i32 5
  %210 = load i32, ptr %209, align 4, !tbaa !16
  %211 = icmp eq i32 %210, 2
  br i1 %211, label %212, label %284

212:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %213)
  %215 = sub i64 %214, 1
  store i64 %215, ptr %21, align 8, !tbaa !9
  br label %216

216:                                              ; preds = %282, %212
  %217 = load i64, ptr %10, align 8, !tbaa !9
  %218 = load i64, ptr %5, align 8, !tbaa !9
  %219 = icmp ult i64 %217, %218
  br i1 %219, label %220, label %283

220:                                              ; preds = %216
  br label %221

221:                                              ; preds = %233, %220
  %222 = load i64, ptr %21, align 8, !tbaa !9
  %223 = icmp ne i64 %222, -1
  br i1 %223, label %224, label %231

224:                                              ; preds = %221
  %225 = load ptr, ptr %7, align 8, !tbaa !5
  %226 = load i64, ptr %21, align 8, !tbaa !9
  %227 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %225, i64 noundef %226)
  %228 = getelementptr inbounds %struct.VmaSuballocation, ptr %227, i32 0, i32 2
  %229 = load ptr, ptr %228, align 8, !tbaa !27
  %230 = icmp eq ptr %229, null
  br label %231

231:                                              ; preds = %224, %221
  %232 = phi i1 [ false, %221 ], [ %230, %224 ]
  br i1 %232, label %233, label %236

233:                                              ; preds = %231
  %234 = load i64, ptr %21, align 8, !tbaa !9
  %235 = add i64 %234, -1
  store i64 %235, ptr %21, align 8, !tbaa !9
  br label %221, !llvm.loop !34

236:                                              ; preds = %231
  %237 = load i64, ptr %21, align 8, !tbaa !9
  %238 = icmp ne i64 %237, -1
  br i1 %238, label %239, label %270

239:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = load i64, ptr %21, align 8, !tbaa !9
  %242 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %240, i64 noundef %241)
  store ptr %242, ptr %22, align 8, !tbaa !5
  %243 = load i64, ptr %10, align 8, !tbaa !9
  %244 = load ptr, ptr %22, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.VmaSuballocation, ptr %244, i32 0, i32 0
  %246 = load i64, ptr %245, align 8, !tbaa !24
  %247 = icmp ult i64 %243, %246
  br i1 %247, label %248, label %256

248:                                              ; preds = %239
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %249 = load ptr, ptr %22, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.VmaSuballocation, ptr %249, i32 0, i32 0
  %251 = load i64, ptr %250, align 8, !tbaa !24
  %252 = load i64, ptr %10, align 8, !tbaa !9
  %253 = sub i64 %251, %252
  store i64 %253, ptr %23, align 8, !tbaa !9
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = load i64, ptr %23, align 8, !tbaa !9
  call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %254, i64 noundef %255)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  br label %256

256:                                              ; preds = %248, %239
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = load ptr, ptr %22, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.VmaSuballocation, ptr %258, i32 0, i32 1
  %260 = load i64, ptr %259, align 8, !tbaa !30
  call void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %257, i64 noundef %260)
  %261 = load ptr, ptr %22, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.VmaSuballocation, ptr %261, i32 0, i32 0
  %263 = load i64, ptr %262, align 8, !tbaa !24
  %264 = load ptr, ptr %22, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.VmaSuballocation, ptr %264, i32 0, i32 1
  %266 = load i64, ptr %265, align 8, !tbaa !30
  %267 = add i64 %263, %266
  store i64 %267, ptr %10, align 8, !tbaa !9
  %268 = load i64, ptr %21, align 8, !tbaa !9
  %269 = add i64 %268, -1
  store i64 %269, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br label %282

270:                                              ; preds = %236
  %271 = load i64, ptr %10, align 8, !tbaa !9
  %272 = load i64, ptr %5, align 8, !tbaa !9
  %273 = icmp ult i64 %271, %272
  br i1 %273, label %274, label %280

274:                                              ; preds = %270
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %275 = load i64, ptr %5, align 8, !tbaa !9
  %276 = load i64, ptr %10, align 8, !tbaa !9
  %277 = sub i64 %275, %276
  store i64 %277, ptr %24, align 8, !tbaa !9
  %278 = load ptr, ptr %4, align 8, !tbaa !5
  %279 = load i64, ptr %24, align 8, !tbaa !9
  call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %278, i64 noundef %279)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  br label %280

280:                                              ; preds = %274, %270
  %281 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %281, ptr %10, align 8, !tbaa !9
  br label %282

282:                                              ; preds = %280, %256
  br label %216, !llvm.loop !35

283:                                              ; preds = %216
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %284

284:                                              ; preds = %283, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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, !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, !14, i64 0}
!12 = !{!"_ZTS21VmaDetailedStatistics", !13, i64 0, !14, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!13 = !{!"_ZTS13VmaStatistics", !14, i64 0, !14, i64 4, !10, i64 8, !10, i64 16}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !10, i64 8}
!16 = !{!17, !22, i64 116}
!17 = !{!"_ZTS23VmaBlockMetadata_Linear", !18, i64 0, !10, i64 40, !20, i64 48, !20, i64 80, !14, i64 112, !22, i64 116, !10, i64 120, !10, i64 128, !10, i64 136}
!18 = !{!"_ZTS16VmaBlockMetadata", !10, i64 8, !6, i64 16, !10, i64 24, !19, i64 32}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTS9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE", !21, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!21 = !{!"_ZTS15VmaStlAllocatorI16VmaSuballocationE", !6, i64 0}
!22 = !{!"_ZTSN23VmaBlockMetadata_Linear18SECOND_VECTOR_MODEE", !7, i64 0}
!23 = !{!17, !10, i64 120}
!24 = !{!25, !10, i64 0}
!25 = !{!"_ZTS16VmaSuballocation", !10, i64 0, !10, i64 8, !6, i64 16, !26, i64 24}
!26 = !{!"_ZTS20VmaSuballocationType", !7, i64 0}
!27 = !{!25, !6, i64 16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!25, !10, i64 8}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}
!34 = distinct !{!34, !29}
!35 = distinct !{!35, !29}


; 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
declare hidden void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK23VmaBlockMetadata_Linear21AddDetailedStatisticsER21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(64) %1) unnamed_addr #0 align 2 {
  %3 = tail call noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  %4 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations1stEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %5 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations2ndEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %6 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %7 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %8 = load i32, ptr %1, align 8, !tbaa !5
  %9 = add i32 %8, 1
  store i32 %9, ptr %1, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !12
  %12 = add i64 %11, %3
  store i64 %12, ptr %10, align 8, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %0, i64 116
  %14 = load i32, ptr %13, align 4, !tbaa !13
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %16, label %42

16:                                               ; preds = %2
  %17 = getelementptr inbounds i8, ptr %0, i64 120
  %18 = load i64, ptr %17, align 8, !tbaa !21
  %19 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %18)
  %20 = load i64, ptr %19, align 8, !tbaa !22
  %.not136 = icmp eq i64 %20, 0
  br i1 %.not136, label %thread-pre-split, label %.preheader117

.preheader117:                                    ; preds = %16, %34
  %.0123 = phi i64 [ %39, %34 ], [ 0, %16 ]
  %.098122 = phi i64 [ %40, %34 ], [ 0, %16 ]
  %21 = icmp ult i64 %.098122, %7
  br i1 %21, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %.preheader117, %26
  %.199121 = phi i64 [ %27, %26 ], [ %.098122, %.preheader117 ]
  %22 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.199121)
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !25
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %.critedge

26:                                               ; preds = %.lr.ph
  %27 = add i64 %.199121, 1
  %exitcond.not = icmp eq i64 %27, %7
  br i1 %exitcond.not, label %.thread, label %.lr.ph, !llvm.loop !26

.critedge:                                        ; preds = %.lr.ph
  %28 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.199121)
  %29 = load i64, ptr %28, align 8, !tbaa !22
  %30 = icmp ult i64 %.0123, %29
  br i1 %30, label %31, label %34

31:                                               ; preds = %.critedge
  %32 = sub i64 %29, %.0123
  tail call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %32)
  br label %34

.thread:                                          ; preds = %.preheader117, %26
  %33 = sub i64 %20, %.0123
  tail call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %33)
  br label %thread-pre-split

34:                                               ; preds = %.critedge, %31
  %35 = getelementptr inbounds i8, ptr %28, i64 8
  %36 = load i64, ptr %35, align 8, !tbaa !28
  tail call void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %36)
  %37 = load i64, ptr %28, align 8, !tbaa !22
  %38 = load i64, ptr %35, align 8, !tbaa !28
  %39 = add i64 %38, %37
  %40 = add nuw i64 %.199121, 1
  %41 = icmp ult i64 %39, %20
  br i1 %41, label %.preheader117, label %thread-pre-split, !llvm.loop !29

thread-pre-split:                                 ; preds = %34, %.thread, %16
  %.0.lcssa = phi i64 [ 0, %16 ], [ %20, %.thread ], [ %39, %34 ]
  %.pr = load i32, ptr %13, align 4, !tbaa !13
  br label %42

42:                                               ; preds = %thread-pre-split, %2
  %43 = phi i32 [ %.pr, %thread-pre-split ], [ %14, %2 ]
  %.2 = phi i64 [ %.0.lcssa, %thread-pre-split ], [ 0, %2 ]
  %44 = getelementptr inbounds i8, ptr %0, i64 120
  %45 = load i64, ptr %44, align 8, !tbaa !21
  %46 = icmp eq i32 %43, 2
  br i1 %46, label %47, label %50

47:                                               ; preds = %42
  %48 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %49 = load i64, ptr %48, align 8, !tbaa !22
  br label %50

50:                                               ; preds = %42, %47
  %51 = phi i64 [ %49, %47 ], [ %3, %42 ]
  %52 = icmp ult i64 %.2, %51
  br i1 %52, label %.preheader116, label %._crit_edge

.preheader116:                                    ; preds = %50, %66
  %.3129 = phi i64 [ %71, %66 ], [ %.2, %50 ]
  %.0101128 = phi i64 [ %72, %66 ], [ %45, %50 ]
  %53 = icmp ult i64 %.0101128, %6
  br i1 %53, label %.lr.ph126, label %.thread145

.lr.ph126:                                        ; preds = %.preheader116, %58
  %.1102125 = phi i64 [ %59, %58 ], [ %.0101128, %.preheader116 ]
  %54 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.1102125)
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !25
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %.critedge2

58:                                               ; preds = %.lr.ph126
  %59 = add i64 %.1102125, 1
  %exitcond141.not = icmp eq i64 %59, %6
  br i1 %exitcond141.not, label %.thread145, label %.lr.ph126, !llvm.loop !30

.critedge2:                                       ; preds = %.lr.ph126
  %60 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.1102125)
  %61 = load i64, ptr %60, align 8, !tbaa !22
  %62 = icmp ult i64 %.3129, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %.critedge2
  %64 = sub i64 %61, %.3129
  tail call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %64)
  br label %66

.thread145:                                       ; preds = %.preheader116, %58
  %65 = sub i64 %51, %.3129
  tail call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %65)
  br label %._crit_edge

66:                                               ; preds = %.critedge2, %63
  %67 = getelementptr inbounds i8, ptr %60, i64 8
  %68 = load i64, ptr %67, align 8, !tbaa !28
  tail call void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %68)
  %69 = load i64, ptr %60, align 8, !tbaa !22
  %70 = load i64, ptr %67, align 8, !tbaa !28
  %71 = add i64 %70, %69
  %72 = add nuw i64 %.1102125, 1
  %73 = icmp ult i64 %71, %51
  br i1 %73, label %.preheader116, label %._crit_edge, !llvm.loop !31

._crit_edge:                                      ; preds = %66, %.thread145, %50
  %.3.lcssa = phi i64 [ %.2, %50 ], [ %51, %.thread145 ], [ %71, %66 ]
  %74 = load i32, ptr %13, align 4, !tbaa !13
  %75 = icmp eq i32 %74, 2
  br i1 %75, label %76, label %.loopexit

76:                                               ; preds = %._crit_edge
  %77 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %78 = icmp ult i64 %.3.lcssa, %3
  br i1 %78, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %76, %90
  %.5135 = phi i64 [ %95, %90 ], [ %.3.lcssa, %76 ]
  %.0104134.in = phi i64 [ %.1105132, %90 ], [ %77, %76 ]
  %.not131 = icmp eq i64 %.0104134.in, 0
  br i1 %.not131, label %.thread149, label %.lr.ph133

.lr.ph133:                                        ; preds = %.preheader, %83
  %.1105132.in = phi i64 [ %.1105132, %83 ], [ %.0104134.in, %.preheader ]
  %.1105132 = add i64 %.1105132.in, -1
  %79 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1105132)
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %81 = load ptr, ptr %80, align 8, !tbaa !25
  %82 = icmp eq ptr %81, null
  br i1 %82, label %83, label %.critedge4

83:                                               ; preds = %.lr.ph133
  %.not = icmp eq i64 %.1105132, 0
  br i1 %.not, label %.thread149, label %.lr.ph133, !llvm.loop !32

.critedge4:                                       ; preds = %.lr.ph133
  %84 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1105132)
  %85 = load i64, ptr %84, align 8, !tbaa !22
  %86 = icmp ult i64 %.5135, %85
  br i1 %86, label %87, label %90

87:                                               ; preds = %.critedge4
  %88 = sub i64 %85, %.5135
  tail call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %88)
  br label %90

.thread149:                                       ; preds = %.preheader, %83
  %89 = sub i64 %3, %.5135
  tail call void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %89)
  br label %.loopexit

90:                                               ; preds = %.critedge4, %87
  %91 = getelementptr inbounds i8, ptr %84, i64 8
  %92 = load i64, ptr %91, align 8, !tbaa !28
  tail call void @_ZL34VmaAddDetailedStatisticsAllocationR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64) %1, i64 noundef %92)
  %93 = load i64, ptr %84, align 8, !tbaa !22
  %94 = load i64, ptr %91, align 8, !tbaa !28
  %95 = add i64 %94, %93
  %96 = icmp ult i64 %95, %3
  br i1 %96, label %.preheader, label %.loopexit, !llvm.loop !33

.loopexit:                                        ; preds = %90, %.thread149, %76, %._crit_edge
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL35VmaAddDetailedStatisticsUnusedRangeR21VmaDetailedStatisticsm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) local_unnamed_addr #0

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

!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, !8, i64 0}
!6 = !{!"_ZTS21VmaDetailedStatistics", !7, i64 0, !8, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!7 = !{!"_ZTS13VmaStatistics", !8, i64 0, !8, i64 4, !11, i64 8, !11, i64 16}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"long", !9, i64 0}
!12 = !{!6, !11, i64 8}
!13 = !{!14, !20, i64 116}
!14 = !{!"_ZTS23VmaBlockMetadata_Linear", !15, i64 0, !11, i64 40, !18, i64 48, !18, i64 80, !8, i64 112, !20, i64 116, !11, i64 120, !11, i64 128, !11, i64 136}
!15 = !{!"_ZTS16VmaBlockMetadata", !11, i64 8, !16, i64 16, !11, i64 24, !17, i64 32}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!"bool", !9, i64 0}
!18 = !{!"_ZTS9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE", !19, i64 0, !16, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!"_ZTS15VmaStlAllocatorI16VmaSuballocationE", !16, i64 0}
!20 = !{!"_ZTSN23VmaBlockMetadata_Linear18SECOND_VECTOR_MODEE", !9, i64 0}
!21 = !{!14, !11, i64 120}
!22 = !{!23, !11, i64 0}
!23 = !{!"_ZTS16VmaSuballocation", !11, i64 0, !11, i64 8, !16, i64 16, !24, i64 24}
!24 = !{!"_ZTS20VmaSuballocationType", !9, i64 0}
!25 = !{!23, !16, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!23, !11, i64 8}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !27}
!31 = distinct !{!31, !27}
!32 = distinct !{!32, !27}
!33 = distinct !{!33, !27}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass