; 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"

%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 dso_local void @_ZNK16VmaBlockMetadata22PrintDetailedMap_BeginER13VmaJsonWritermmm(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef) #1 align 2

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

47:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 6
  %50 = load i64, ptr %49, align 8, !tbaa !19
  %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 !20
  store i64 %53, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %117, %47
  %55 = load i64, ptr %12, align 8, !tbaa !9
  %56 = load i64, ptr %14, align 8, !tbaa !9
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %58, label %118

58:                                               ; preds = %54
  br label %59

59:                                               ; preds = %72, %58
  %60 = load i64, ptr %15, 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 %15, 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 !23
  %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 %15, align 8, !tbaa !9
  %74 = add i64 %73, 1
  store i64 %74, ptr %15, align 8, !tbaa !9
  br label %59, !llvm.loop !24

75:                                               ; preds = %70
  %76 = load i64, ptr %15, 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 %108

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = load i64, ptr %15, 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 %16, align 8, !tbaa !5
  %83 = load i64, ptr %12, align 8, !tbaa !9
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.VmaSuballocation, ptr %84, i32 0, i32 0
  %86 = load i64, ptr %85, align 8, !tbaa !20
  %87 = icmp ult i64 %83, %86
  br i1 %87, label %88, label %91

88:                                               ; preds = %79
  %89 = load i64, ptr %10, align 8, !tbaa !9
  %90 = add i64 %89, 1
  store i64 %90, ptr %10, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %88, %79
  %92 = load i64, ptr %13, align 8, !tbaa !9
  %93 = add i64 %92, 1
  store i64 %93, ptr %13, align 8, !tbaa !9
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.VmaSuballocation, ptr %94, i32 0, i32 1
  %96 = load i64, ptr %95, align 8, !tbaa !26
  %97 = load i64, ptr %11, align 8, !tbaa !9
  %98 = add i64 %97, %96
  store i64 %98, ptr %11, align 8, !tbaa !9
  %99 = load ptr, ptr %16, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.VmaSuballocation, ptr %99, i32 0, i32 0
  %101 = load i64, ptr %100, align 8, !tbaa !20
  %102 = load ptr, ptr %16, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.VmaSuballocation, ptr %102, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !26
  %105 = add i64 %101, %104
  store i64 %105, ptr %12, align 8, !tbaa !9
  %106 = load i64, ptr %15, align 8, !tbaa !9
  %107 = add i64 %106, 1
  store i64 %107, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %117

108:                                              ; preds = %75
  %109 = load i64, ptr %12, align 8, !tbaa !9
  %110 = load i64, ptr %14, align 8, !tbaa !9
  %111 = icmp ult i64 %109, %110
  br i1 %111, label %112, label %115

112:                                              ; preds = %108
  %113 = load i64, ptr %10, align 8, !tbaa !9
  %114 = add i64 %113, 1
  store i64 %114, ptr %10, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %112, %108
  %116 = load i64, ptr %14, align 8, !tbaa !9
  store i64 %116, ptr %12, align 8, !tbaa !9
  br label %117

117:                                              ; preds = %115, %91
  br label %54, !llvm.loop !27

118:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %119

119:                                              ; preds = %118, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %120 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 6
  %121 = load i64, ptr %120, align 8, !tbaa !19
  store i64 %121, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  store i64 0, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %122 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 5
  %123 = load i32, ptr %122, align 4, !tbaa !11
  %124 = icmp eq i32 %123, 2
  br i1 %124, label %125, label %130

125:                                              ; preds = %119
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %126)
  %128 = getelementptr inbounds %struct.VmaSuballocation, ptr %127, i32 0, i32 0
  %129 = load i64, ptr %128, align 8, !tbaa !20
  br label %132

130:                                              ; preds = %119
  %131 = load i64, ptr %5, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %130, %125
  %133 = phi i64 [ %129, %125 ], [ %131, %130 ]
  store i64 %133, ptr %19, align 8, !tbaa !9
  br label %134

134:                                              ; preds = %197, %132
  %135 = load i64, ptr %12, align 8, !tbaa !9
  %136 = load i64, ptr %19, align 8, !tbaa !9
  %137 = icmp ult i64 %135, %136
  br i1 %137, label %138, label %198

138:                                              ; preds = %134
  br label %139

139:                                              ; preds = %152, %138
  %140 = load i64, ptr %17, align 8, !tbaa !9
  %141 = load i64, ptr %8, align 8, !tbaa !9
  %142 = icmp ult i64 %140, %141
  br i1 %142, label %143, label %150

143:                                              ; preds = %139
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = load i64, ptr %17, align 8, !tbaa !9
  %146 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %144, i64 noundef %145)
  %147 = getelementptr inbounds %struct.VmaSuballocation, ptr %146, i32 0, i32 2
  %148 = load ptr, ptr %147, align 8, !tbaa !23
  %149 = icmp eq ptr %148, null
  br label %150

150:                                              ; preds = %143, %139
  %151 = phi i1 [ false, %139 ], [ %149, %143 ]
  br i1 %151, label %152, label %155

152:                                              ; preds = %150
  %153 = load i64, ptr %17, align 8, !tbaa !9
  %154 = add i64 %153, 1
  store i64 %154, ptr %17, align 8, !tbaa !9
  br label %139, !llvm.loop !28

155:                                              ; preds = %150
  %156 = load i64, ptr %17, align 8, !tbaa !9
  %157 = load i64, ptr %8, align 8, !tbaa !9
  %158 = icmp ult i64 %156, %157
  br i1 %158, label %159, label %188

159:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = load i64, ptr %17, align 8, !tbaa !9
  %162 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %160, i64 noundef %161)
  store ptr %162, ptr %20, align 8, !tbaa !5
  %163 = load i64, ptr %12, align 8, !tbaa !9
  %164 = load ptr, ptr %20, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.VmaSuballocation, ptr %164, i32 0, i32 0
  %166 = load i64, ptr %165, align 8, !tbaa !20
  %167 = icmp ult i64 %163, %166
  br i1 %167, label %168, label %171

168:                                              ; preds = %159
  %169 = load i64, ptr %10, align 8, !tbaa !9
  %170 = add i64 %169, 1
  store i64 %170, ptr %10, align 8, !tbaa !9
  br label %171

171:                                              ; preds = %168, %159
  %172 = load i64, ptr %18, align 8, !tbaa !9
  %173 = add i64 %172, 1
  store i64 %173, ptr %18, align 8, !tbaa !9
  %174 = load ptr, ptr %20, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.VmaSuballocation, ptr %174, i32 0, i32 1
  %176 = load i64, ptr %175, align 8, !tbaa !26
  %177 = load i64, ptr %11, align 8, !tbaa !9
  %178 = add i64 %177, %176
  store i64 %178, ptr %11, align 8, !tbaa !9
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.VmaSuballocation, ptr %179, i32 0, i32 0
  %181 = load i64, ptr %180, align 8, !tbaa !20
  %182 = load ptr, ptr %20, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.VmaSuballocation, ptr %182, i32 0, i32 1
  %184 = load i64, ptr %183, align 8, !tbaa !26
  %185 = add i64 %181, %184
  store i64 %185, ptr %12, align 8, !tbaa !9
  %186 = load i64, ptr %17, align 8, !tbaa !9
  %187 = add i64 %186, 1
  store i64 %187, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %197

188:                                              ; preds = %155
  %189 = load i64, ptr %12, align 8, !tbaa !9
  %190 = load i64, ptr %5, align 8, !tbaa !9
  %191 = icmp ult i64 %189, %190
  br i1 %191, label %192, label %195

192:                                              ; preds = %188
  %193 = load i64, ptr %10, align 8, !tbaa !9
  %194 = add i64 %193, 1
  store i64 %194, ptr %10, align 8, !tbaa !9
  br label %195

195:                                              ; preds = %192, %188
  %196 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %196, ptr %12, align 8, !tbaa !9
  br label %197

197:                                              ; preds = %195, %171
  br label %134, !llvm.loop !29

198:                                              ; preds = %134
  %199 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 5
  %200 = load i32, ptr %199, align 4, !tbaa !11
  %201 = icmp eq i32 %200, 2
  br i1 %201, label %202, label %269

202:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %203 = load ptr, ptr %7, align 8, !tbaa !5
  %204 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %203)
  %205 = sub i64 %204, 1
  store i64 %205, ptr %21, align 8, !tbaa !9
  br label %206

206:                                              ; preds = %267, %202
  %207 = load i64, ptr %12, align 8, !tbaa !9
  %208 = load i64, ptr %5, align 8, !tbaa !9
  %209 = icmp ult i64 %207, %208
  br i1 %209, label %210, label %268

210:                                              ; preds = %206
  br label %211

211:                                              ; preds = %223, %210
  %212 = load i64, ptr %21, align 8, !tbaa !9
  %213 = icmp ne i64 %212, -1
  br i1 %213, label %214, label %221

214:                                              ; preds = %211
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = load i64, ptr %21, align 8, !tbaa !9
  %217 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %215, i64 noundef %216)
  %218 = getelementptr inbounds %struct.VmaSuballocation, ptr %217, i32 0, i32 2
  %219 = load ptr, ptr %218, align 8, !tbaa !23
  %220 = icmp eq ptr %219, null
  br label %221

221:                                              ; preds = %214, %211
  %222 = phi i1 [ false, %211 ], [ %220, %214 ]
  br i1 %222, label %223, label %226

223:                                              ; preds = %221
  %224 = load i64, ptr %21, align 8, !tbaa !9
  %225 = add i64 %224, -1
  store i64 %225, ptr %21, align 8, !tbaa !9
  br label %211, !llvm.loop !30

226:                                              ; preds = %221
  %227 = load i64, ptr %21, align 8, !tbaa !9
  %228 = icmp ne i64 %227, -1
  br i1 %228, label %229, label %258

229:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %230 = load ptr, ptr %7, align 8, !tbaa !5
  %231 = load i64, ptr %21, align 8, !tbaa !9
  %232 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %230, i64 noundef %231)
  store ptr %232, ptr %22, align 8, !tbaa !5
  %233 = load i64, ptr %12, align 8, !tbaa !9
  %234 = load ptr, ptr %22, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.VmaSuballocation, ptr %234, i32 0, i32 0
  %236 = load i64, ptr %235, align 8, !tbaa !20
  %237 = icmp ult i64 %233, %236
  br i1 %237, label %238, label %241

238:                                              ; preds = %229
  %239 = load i64, ptr %10, align 8, !tbaa !9
  %240 = add i64 %239, 1
  store i64 %240, ptr %10, align 8, !tbaa !9
  br label %241

241:                                              ; preds = %238, %229
  %242 = load i64, ptr %13, align 8, !tbaa !9
  %243 = add i64 %242, 1
  store i64 %243, ptr %13, align 8, !tbaa !9
  %244 = load ptr, ptr %22, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.VmaSuballocation, ptr %244, i32 0, i32 1
  %246 = load i64, ptr %245, align 8, !tbaa !26
  %247 = load i64, ptr %11, align 8, !tbaa !9
  %248 = add i64 %247, %246
  store i64 %248, ptr %11, align 8, !tbaa !9
  %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 !20
  %252 = load ptr, ptr %22, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.VmaSuballocation, ptr %252, i32 0, i32 1
  %254 = load i64, ptr %253, align 8, !tbaa !26
  %255 = add i64 %251, %254
  store i64 %255, ptr %12, align 8, !tbaa !9
  %256 = load i64, ptr %21, align 8, !tbaa !9
  %257 = add i64 %256, -1
  store i64 %257, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br label %267

258:                                              ; preds = %226
  %259 = load i64, ptr %12, align 8, !tbaa !9
  %260 = load i64, ptr %5, align 8, !tbaa !9
  %261 = icmp ult i64 %259, %260
  br i1 %261, label %262, label %265

262:                                              ; preds = %258
  %263 = load i64, ptr %10, align 8, !tbaa !9
  %264 = add i64 %263, 1
  store i64 %264, ptr %10, align 8, !tbaa !9
  br label %265

265:                                              ; preds = %262, %258
  %266 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %266, ptr %12, align 8, !tbaa !9
  br label %267

267:                                              ; preds = %265, %241
  br label %206, !llvm.loop !31

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

269:                                              ; preds = %268, %198
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %270 = load i64, ptr %5, align 8, !tbaa !9
  %271 = load i64, ptr %11, align 8, !tbaa !9
  %272 = sub i64 %270, %271
  store i64 %272, ptr %23, align 8, !tbaa !9
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = load i64, ptr %23, align 8, !tbaa !9
  %275 = load i64, ptr %18, align 8, !tbaa !9
  %276 = load i64, ptr %13, align 8, !tbaa !9
  %277 = add i64 %275, %276
  %278 = load i64, ptr %10, align 8, !tbaa !9
  call void @_ZNK16VmaBlockMetadata22PrintDetailedMap_BeginER13VmaJsonWritermmm(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %273, i64 noundef %274, i64 noundef %277, i64 noundef %278)
  store i64 0, ptr %12, align 8, !tbaa !9
  %279 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 5
  %280 = load i32, ptr %279, align 4, !tbaa !11
  %281 = icmp eq i32 %280, 1
  br i1 %281, label %282, label %367

282:                                              ; preds = %269
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 6
  %285 = load i64, ptr %284, align 8, !tbaa !19
  %286 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %283, i64 noundef %285)
  %287 = getelementptr inbounds %struct.VmaSuballocation, ptr %286, i32 0, i32 0
  %288 = load i64, ptr %287, align 8, !tbaa !20
  store i64 %288, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %289

289:                                              ; preds = %365, %282
  %290 = load i64, ptr %12, align 8, !tbaa !9
  %291 = load i64, ptr %24, align 8, !tbaa !9
  %292 = icmp ult i64 %290, %291
  br i1 %292, label %293, label %366

293:                                              ; preds = %289
  br label %294

294:                                              ; preds = %307, %293
  %295 = load i64, ptr %25, align 8, !tbaa !9
  %296 = load i64, ptr %9, align 8, !tbaa !9
  %297 = icmp ult i64 %295, %296
  br i1 %297, label %298, label %305

298:                                              ; preds = %294
  %299 = load ptr, ptr %7, align 8, !tbaa !5
  %300 = load i64, ptr %25, align 8, !tbaa !9
  %301 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %299, i64 noundef %300)
  %302 = getelementptr inbounds %struct.VmaSuballocation, ptr %301, i32 0, i32 2
  %303 = load ptr, ptr %302, align 8, !tbaa !23
  %304 = icmp eq ptr %303, null
  br label %305

305:                                              ; preds = %298, %294
  %306 = phi i1 [ false, %294 ], [ %304, %298 ]
  br i1 %306, label %307, label %310

307:                                              ; preds = %305
  %308 = load i64, ptr %25, align 8, !tbaa !9
  %309 = add i64 %308, 1
  store i64 %309, ptr %25, align 8, !tbaa !9
  br label %294, !llvm.loop !32

310:                                              ; preds = %305
  %311 = load i64, ptr %25, align 8, !tbaa !9
  %312 = load i64, ptr %9, align 8, !tbaa !9
  %313 = icmp ult i64 %311, %312
  br i1 %313, label %314, label %352

314:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %315 = load ptr, ptr %7, align 8, !tbaa !5
  %316 = load i64, ptr %25, align 8, !tbaa !9
  %317 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %315, i64 noundef %316)
  store ptr %317, ptr %26, align 8, !tbaa !5
  %318 = load i64, ptr %12, align 8, !tbaa !9
  %319 = load ptr, ptr %26, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.VmaSuballocation, ptr %319, i32 0, i32 0
  %321 = load i64, ptr %320, align 8, !tbaa !20
  %322 = icmp ult i64 %318, %321
  br i1 %322, label %323, label %332

323:                                              ; preds = %314
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %324 = load ptr, ptr %26, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.VmaSuballocation, ptr %324, i32 0, i32 0
  %326 = load i64, ptr %325, align 8, !tbaa !20
  %327 = load i64, ptr %12, align 8, !tbaa !9
  %328 = sub i64 %326, %327
  store i64 %328, ptr %27, align 8, !tbaa !9
  %329 = load ptr, ptr %4, align 8, !tbaa !5
  %330 = load i64, ptr %12, align 8, !tbaa !9
  %331 = load i64, ptr %27, align 8, !tbaa !9
  call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %329, i64 noundef %330, i64 noundef %331)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  br label %332

332:                                              ; preds = %323, %314
  %333 = load ptr, ptr %4, align 8, !tbaa !5
  %334 = load ptr, ptr %26, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.VmaSuballocation, ptr %334, i32 0, i32 0
  %336 = load i64, ptr %335, align 8, !tbaa !20
  %337 = load ptr, ptr %26, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.VmaSuballocation, ptr %337, i32 0, i32 1
  %339 = load i64, ptr %338, align 8, !tbaa !26
  %340 = load ptr, ptr %26, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.VmaSuballocation, ptr %340, i32 0, i32 2
  %342 = load ptr, ptr %341, align 8, !tbaa !23
  call void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %333, i64 noundef %336, i64 noundef %339, ptr noundef %342)
  %343 = load ptr, ptr %26, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.VmaSuballocation, ptr %343, i32 0, i32 0
  %345 = load i64, ptr %344, align 8, !tbaa !20
  %346 = load ptr, ptr %26, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.VmaSuballocation, ptr %346, i32 0, i32 1
  %348 = load i64, ptr %347, align 8, !tbaa !26
  %349 = add i64 %345, %348
  store i64 %349, ptr %12, align 8, !tbaa !9
  %350 = load i64, ptr %25, align 8, !tbaa !9
  %351 = add i64 %350, 1
  store i64 %351, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  br label %365

352:                                              ; preds = %310
  %353 = load i64, ptr %12, align 8, !tbaa !9
  %354 = load i64, ptr %24, align 8, !tbaa !9
  %355 = icmp ult i64 %353, %354
  br i1 %355, label %356, label %363

356:                                              ; preds = %352
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %357 = load i64, ptr %24, align 8, !tbaa !9
  %358 = load i64, ptr %12, align 8, !tbaa !9
  %359 = sub i64 %357, %358
  store i64 %359, ptr %28, align 8, !tbaa !9
  %360 = load ptr, ptr %4, align 8, !tbaa !5
  %361 = load i64, ptr %12, align 8, !tbaa !9
  %362 = load i64, ptr %28, align 8, !tbaa !9
  call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %360, i64 noundef %361, i64 noundef %362)
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  br label %363

363:                                              ; preds = %356, %352
  %364 = load i64, ptr %24, align 8, !tbaa !9
  store i64 %364, ptr %12, align 8, !tbaa !9
  br label %365

365:                                              ; preds = %363, %332
  br label %289, !llvm.loop !33

366:                                              ; preds = %289
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  br label %367

367:                                              ; preds = %366, %269
  %368 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 6
  %369 = load i64, ptr %368, align 8, !tbaa !19
  store i64 %369, ptr %17, align 8, !tbaa !9
  br label %370

370:                                              ; preds = %446, %367
  %371 = load i64, ptr %12, align 8, !tbaa !9
  %372 = load i64, ptr %19, align 8, !tbaa !9
  %373 = icmp ult i64 %371, %372
  br i1 %373, label %374, label %447

374:                                              ; preds = %370
  br label %375

375:                                              ; preds = %388, %374
  %376 = load i64, ptr %17, align 8, !tbaa !9
  %377 = load i64, ptr %8, align 8, !tbaa !9
  %378 = icmp ult i64 %376, %377
  br i1 %378, label %379, label %386

379:                                              ; preds = %375
  %380 = load ptr, ptr %6, align 8, !tbaa !5
  %381 = load i64, ptr %17, align 8, !tbaa !9
  %382 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %380, i64 noundef %381)
  %383 = getelementptr inbounds %struct.VmaSuballocation, ptr %382, i32 0, i32 2
  %384 = load ptr, ptr %383, align 8, !tbaa !23
  %385 = icmp eq ptr %384, null
  br label %386

386:                                              ; preds = %379, %375
  %387 = phi i1 [ false, %375 ], [ %385, %379 ]
  br i1 %387, label %388, label %391

388:                                              ; preds = %386
  %389 = load i64, ptr %17, align 8, !tbaa !9
  %390 = add i64 %389, 1
  store i64 %390, ptr %17, align 8, !tbaa !9
  br label %375, !llvm.loop !34

391:                                              ; preds = %386
  %392 = load i64, ptr %17, align 8, !tbaa !9
  %393 = load i64, ptr %8, align 8, !tbaa !9
  %394 = icmp ult i64 %392, %393
  br i1 %394, label %395, label %433

395:                                              ; preds = %391
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %396 = load ptr, ptr %6, align 8, !tbaa !5
  %397 = load i64, ptr %17, align 8, !tbaa !9
  %398 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %396, i64 noundef %397)
  store ptr %398, ptr %29, align 8, !tbaa !5
  %399 = load i64, ptr %12, align 8, !tbaa !9
  %400 = load ptr, ptr %29, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.VmaSuballocation, ptr %400, i32 0, i32 0
  %402 = load i64, ptr %401, align 8, !tbaa !20
  %403 = icmp ult i64 %399, %402
  br i1 %403, label %404, label %413

404:                                              ; preds = %395
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %405 = load ptr, ptr %29, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.VmaSuballocation, ptr %405, i32 0, i32 0
  %407 = load i64, ptr %406, align 8, !tbaa !20
  %408 = load i64, ptr %12, align 8, !tbaa !9
  %409 = sub i64 %407, %408
  store i64 %409, ptr %30, align 8, !tbaa !9
  %410 = load ptr, ptr %4, align 8, !tbaa !5
  %411 = load i64, ptr %12, align 8, !tbaa !9
  %412 = load i64, ptr %30, align 8, !tbaa !9
  call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %410, i64 noundef %411, i64 noundef %412)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  br label %413

413:                                              ; preds = %404, %395
  %414 = load ptr, ptr %4, align 8, !tbaa !5
  %415 = load ptr, ptr %29, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.VmaSuballocation, ptr %415, i32 0, i32 0
  %417 = load i64, ptr %416, align 8, !tbaa !20
  %418 = load ptr, ptr %29, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.VmaSuballocation, ptr %418, i32 0, i32 1
  %420 = load i64, ptr %419, align 8, !tbaa !26
  %421 = load ptr, ptr %29, align 8, !tbaa !5
  %422 = getelementptr inbounds %struct.VmaSuballocation, ptr %421, i32 0, i32 2
  %423 = load ptr, ptr %422, align 8, !tbaa !23
  call void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %414, i64 noundef %417, i64 noundef %420, ptr noundef %423)
  %424 = load ptr, ptr %29, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct.VmaSuballocation, ptr %424, i32 0, i32 0
  %426 = load i64, ptr %425, align 8, !tbaa !20
  %427 = load ptr, ptr %29, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.VmaSuballocation, ptr %427, i32 0, i32 1
  %429 = load i64, ptr %428, align 8, !tbaa !26
  %430 = add i64 %426, %429
  store i64 %430, ptr %12, align 8, !tbaa !9
  %431 = load i64, ptr %17, align 8, !tbaa !9
  %432 = add i64 %431, 1
  store i64 %432, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  br label %446

433:                                              ; preds = %391
  %434 = load i64, ptr %12, align 8, !tbaa !9
  %435 = load i64, ptr %19, align 8, !tbaa !9
  %436 = icmp ult i64 %434, %435
  br i1 %436, label %437, label %444

437:                                              ; preds = %433
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %438 = load i64, ptr %19, align 8, !tbaa !9
  %439 = load i64, ptr %12, align 8, !tbaa !9
  %440 = sub i64 %438, %439
  store i64 %440, ptr %31, align 8, !tbaa !9
  %441 = load ptr, ptr %4, align 8, !tbaa !5
  %442 = load i64, ptr %12, align 8, !tbaa !9
  %443 = load i64, ptr %31, align 8, !tbaa !9
  call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %441, i64 noundef %442, i64 noundef %443)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  br label %444

444:                                              ; preds = %437, %433
  %445 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %445, ptr %12, align 8, !tbaa !9
  br label %446

446:                                              ; preds = %444, %413
  br label %370, !llvm.loop !35

447:                                              ; preds = %370
  %448 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %36, i32 0, i32 5
  %449 = load i32, ptr %448, align 4, !tbaa !11
  %450 = icmp eq i32 %449, 2
  br i1 %450, label %451, label %531

451:                                              ; preds = %447
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %452 = load ptr, ptr %7, align 8, !tbaa !5
  %453 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %452)
  %454 = sub i64 %453, 1
  store i64 %454, ptr %32, align 8, !tbaa !9
  br label %455

455:                                              ; preds = %529, %451
  %456 = load i64, ptr %12, align 8, !tbaa !9
  %457 = load i64, ptr %5, align 8, !tbaa !9
  %458 = icmp ult i64 %456, %457
  br i1 %458, label %459, label %530

459:                                              ; preds = %455
  br label %460

460:                                              ; preds = %472, %459
  %461 = load i64, ptr %32, align 8, !tbaa !9
  %462 = icmp ne i64 %461, -1
  br i1 %462, label %463, label %470

463:                                              ; preds = %460
  %464 = load ptr, ptr %7, align 8, !tbaa !5
  %465 = load i64, ptr %32, align 8, !tbaa !9
  %466 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %464, i64 noundef %465)
  %467 = getelementptr inbounds %struct.VmaSuballocation, ptr %466, i32 0, i32 2
  %468 = load ptr, ptr %467, align 8, !tbaa !23
  %469 = icmp eq ptr %468, null
  br label %470

470:                                              ; preds = %463, %460
  %471 = phi i1 [ false, %460 ], [ %469, %463 ]
  br i1 %471, label %472, label %475

472:                                              ; preds = %470
  %473 = load i64, ptr %32, align 8, !tbaa !9
  %474 = add i64 %473, -1
  store i64 %474, ptr %32, align 8, !tbaa !9
  br label %460, !llvm.loop !36

475:                                              ; preds = %470
  %476 = load i64, ptr %32, align 8, !tbaa !9
  %477 = icmp ne i64 %476, -1
  br i1 %477, label %478, label %516

478:                                              ; preds = %475
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  %479 = load ptr, ptr %7, align 8, !tbaa !5
  %480 = load i64, ptr %32, align 8, !tbaa !9
  %481 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %479, i64 noundef %480)
  store ptr %481, ptr %33, align 8, !tbaa !5
  %482 = load i64, ptr %12, align 8, !tbaa !9
  %483 = load ptr, ptr %33, align 8, !tbaa !5
  %484 = getelementptr inbounds %struct.VmaSuballocation, ptr %483, i32 0, i32 0
  %485 = load i64, ptr %484, align 8, !tbaa !20
  %486 = icmp ult i64 %482, %485
  br i1 %486, label %487, label %496

487:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #3
  %488 = load ptr, ptr %33, align 8, !tbaa !5
  %489 = getelementptr inbounds %struct.VmaSuballocation, ptr %488, i32 0, i32 0
  %490 = load i64, ptr %489, align 8, !tbaa !20
  %491 = load i64, ptr %12, align 8, !tbaa !9
  %492 = sub i64 %490, %491
  store i64 %492, ptr %34, align 8, !tbaa !9
  %493 = load ptr, ptr %4, align 8, !tbaa !5
  %494 = load i64, ptr %12, align 8, !tbaa !9
  %495 = load i64, ptr %34, align 8, !tbaa !9
  call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %493, i64 noundef %494, i64 noundef %495)
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  br label %496

496:                                              ; preds = %487, %478
  %497 = load ptr, ptr %4, align 8, !tbaa !5
  %498 = load ptr, ptr %33, align 8, !tbaa !5
  %499 = getelementptr inbounds %struct.VmaSuballocation, ptr %498, i32 0, i32 0
  %500 = load i64, ptr %499, align 8, !tbaa !20
  %501 = load ptr, ptr %33, align 8, !tbaa !5
  %502 = getelementptr inbounds %struct.VmaSuballocation, ptr %501, i32 0, i32 1
  %503 = load i64, ptr %502, align 8, !tbaa !26
  %504 = load ptr, ptr %33, align 8, !tbaa !5
  %505 = getelementptr inbounds %struct.VmaSuballocation, ptr %504, i32 0, i32 2
  %506 = load ptr, ptr %505, align 8, !tbaa !23
  call void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %497, i64 noundef %500, i64 noundef %503, ptr noundef %506)
  %507 = load ptr, ptr %33, align 8, !tbaa !5
  %508 = getelementptr inbounds %struct.VmaSuballocation, ptr %507, i32 0, i32 0
  %509 = load i64, ptr %508, align 8, !tbaa !20
  %510 = load ptr, ptr %33, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.VmaSuballocation, ptr %510, i32 0, i32 1
  %512 = load i64, ptr %511, align 8, !tbaa !26
  %513 = add i64 %509, %512
  store i64 %513, ptr %12, align 8, !tbaa !9
  %514 = load i64, ptr %32, align 8, !tbaa !9
  %515 = add i64 %514, -1
  store i64 %515, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  br label %529

516:                                              ; preds = %475
  %517 = load i64, ptr %12, align 8, !tbaa !9
  %518 = load i64, ptr %5, align 8, !tbaa !9
  %519 = icmp ult i64 %517, %518
  br i1 %519, label %520, label %527

520:                                              ; preds = %516
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  %521 = load i64, ptr %5, align 8, !tbaa !9
  %522 = load i64, ptr %12, align 8, !tbaa !9
  %523 = sub i64 %521, %522
  store i64 %523, ptr %35, align 8, !tbaa !9
  %524 = load ptr, ptr %4, align 8, !tbaa !5
  %525 = load i64, ptr %12, align 8, !tbaa !9
  %526 = load i64, ptr %35, align 8, !tbaa !9
  call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %524, i64 noundef %525, i64 noundef %526)
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  br label %527

527:                                              ; preds = %520, %516
  %528 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %528, ptr %12, align 8, !tbaa !9
  br label %529

529:                                              ; preds = %527, %496
  br label %455, !llvm.loop !37

530:                                              ; preds = %455
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  br label %531

531:                                              ; preds = %530, %447
  %532 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK16VmaBlockMetadata20PrintDetailedMap_EndER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull align 8 dereferenceable(41) %532)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #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
}

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, !18, i64 116}
!12 = !{!"_ZTS23VmaBlockMetadata_Linear", !13, i64 0, !10, i64 40, !15, i64 48, !15, i64 80, !17, i64 112, !18, i64 116, !10, i64 120, !10, i64 128, !10, i64 136}
!13 = !{!"_ZTS16VmaBlockMetadata", !10, i64 8, !6, i64 16, !10, i64 24, !14, i64 32}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTS9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE", !16, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!16 = !{!"_ZTS15VmaStlAllocatorI16VmaSuballocationE", !6, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN23VmaBlockMetadata_Linear18SECOND_VECTOR_MODEE", !7, i64 0}
!19 = !{!12, !10, i64 120}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTS16VmaSuballocation", !10, i64 0, !10, i64 8, !6, i64 16, !22, i64 24}
!22 = !{!"_ZTS20VmaSuballocationType", !7, i64 0}
!23 = !{!21, !6, i64 16}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!21, !10, i64 8}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}
!31 = distinct !{!31, !25}
!32 = distinct !{!32, !25}
!33 = distinct !{!33, !25}
!34 = distinct !{!34, !25}
!35 = distinct !{!35, !25}
!36 = distinct !{!36, !25}
!37 = distinct !{!37, !25}


; 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 dso_local void @_ZNK16VmaBlockMetadata22PrintDetailedMap_BeginER13VmaJsonWritermmm(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

; 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 uwtable
declare dso_local void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16VmaBlockMetadata20PrintDetailedMap_EndER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #0 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_Linear16PrintDetailedMapER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(41) %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 = getelementptr inbounds i8, ptr %0, i64 116
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %33

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 120
  %13 = load i64, ptr %12, align 8, !tbaa !17
  %14 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %13)
  %15 = load i64, ptr %14, align 8, !tbaa !18
  %.not326 = icmp eq i64 %15, 0
  br i1 %.not326, label %thread-pre-split, label %.preheader268

.preheader268:                                    ; preds = %11, %.critedge248
  %.0280 = phi i64 [ %.3, %.critedge248 ], [ 0, %11 ]
  %.0193279 = phi i64 [ %29, %.critedge248 ], [ 0, %11 ]
  %.0201278 = phi i64 [ %30, %.critedge248 ], [ 0, %11 ]
  %.0218277 = phi i64 [ %26, %.critedge248 ], [ 0, %11 ]
  %.0224276 = phi i64 [ %31, %.critedge248 ], [ 0, %11 ]
  %16 = icmp ult i64 %.0224276, %7
  br i1 %16, label %.lr.ph, label %.critedge248.thread

.lr.ph:                                           ; preds = %.preheader268, %21
  %.1225275 = phi i64 [ %22, %21 ], [ %.0224276, %.preheader268 ]
  %17 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1225275)
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !21
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %.critedge248

21:                                               ; preds = %.lr.ph
  %22 = add i64 %.1225275, 1
  %exitcond.not = icmp eq i64 %22, %7
  br i1 %exitcond.not, label %.critedge248.thread, label %.lr.ph, !llvm.loop !22

.critedge248.thread:                              ; preds = %.preheader268, %21
  %.3348 = add i64 %.0280, 1
  br label %thread-pre-split

.critedge248:                                     ; preds = %.lr.ph
  %23 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1225275)
  %24 = load i64, ptr %23, align 8, !tbaa !18
  %25 = icmp ult i64 %.0201278, %24
  %26 = add i64 %.0218277, 1
  %27 = getelementptr inbounds i8, ptr %23, i64 8
  %28 = load i64, ptr %27, align 8, !tbaa !24
  %29 = add i64 %28, %.0193279
  %30 = add i64 %28, %24
  %31 = add nuw i64 %.1225275, 1
  %.pn261 = zext i1 %25 to i64
  %.3 = add i64 %.0280, %.pn261
  %32 = icmp ult i64 %30, %15
  br i1 %32, label %.preheader268, label %thread-pre-split, !llvm.loop !25

thread-pre-split:                                 ; preds = %.critedge248, %.critedge248.thread, %11
  %.0218.lcssa = phi i64 [ 0, %11 ], [ %.0218277, %.critedge248.thread ], [ %26, %.critedge248 ]
  %.0201.lcssa = phi i64 [ 0, %11 ], [ %15, %.critedge248.thread ], [ %30, %.critedge248 ]
  %.0193.lcssa = phi i64 [ 0, %11 ], [ %.0193279, %.critedge248.thread ], [ %29, %.critedge248 ]
  %.0.lcssa = phi i64 [ 0, %11 ], [ %.3348, %.critedge248.thread ], [ %.3, %.critedge248 ]
  %.pr = load i32, ptr %8, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %thread-pre-split, %2
  %34 = phi i32 [ %.pr, %thread-pre-split ], [ %9, %2 ]
  %.2220 = phi i64 [ %.0218.lcssa, %thread-pre-split ], [ 0, %2 ]
  %.2203 = phi i64 [ %.0201.lcssa, %thread-pre-split ], [ 0, %2 ]
  %.2195 = phi i64 [ %.0193.lcssa, %thread-pre-split ], [ 0, %2 ]
  %.4 = phi i64 [ %.0.lcssa, %thread-pre-split ], [ 0, %2 ]
  %35 = getelementptr inbounds i8, ptr %0, i64 120
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = icmp eq i32 %34, 2
  br i1 %37, label %38, label %41

38:                                               ; preds = %33
  %39 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %40 = load i64, ptr %39, align 8, !tbaa !18
  br label %41

41:                                               ; preds = %33, %38
  %42 = phi i64 [ %40, %38 ], [ %3, %33 ]
  %43 = icmp ult i64 %.2203, %42
  br i1 %43, label %.preheader267, label %._crit_edge

.preheader267:                                    ; preds = %41, %.critedge250
  %.5292 = phi i64 [ %.8, %.critedge250 ], [ %.4, %41 ]
  %.3196291 = phi i64 [ %56, %.critedge250 ], [ %.2195, %41 ]
  %.3204290 = phi i64 [ %57, %.critedge250 ], [ %.2203, %41 ]
  %.0227289 = phi i64 [ %58, %.critedge250 ], [ %36, %41 ]
  %.0233288 = phi i64 [ %53, %.critedge250 ], [ 0, %41 ]
  %44 = icmp ult i64 %.0227289, %6
  br i1 %44, label %.lr.ph286, label %.critedge250.thread

.lr.ph286:                                        ; preds = %.preheader267, %49
  %.1228285 = phi i64 [ %50, %49 ], [ %.0227289, %.preheader267 ]
  %45 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.1228285)
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %.critedge250

49:                                               ; preds = %.lr.ph286
  %50 = add i64 %.1228285, 1
  %exitcond337.not = icmp eq i64 %50, %6
  br i1 %exitcond337.not, label %.critedge250.thread, label %.lr.ph286, !llvm.loop !26

.critedge250.thread:                              ; preds = %.preheader267, %49
  %.pn259.in358 = icmp ult i64 %.3204290, %3
  %.pn259359 = zext i1 %.pn259.in358 to i64
  %.8360 = add i64 %.5292, %.pn259359
  br label %._crit_edge

.critedge250:                                     ; preds = %.lr.ph286
  %51 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.1228285)
  %52 = load i64, ptr %51, align 8, !tbaa !18
  %53 = add i64 %.0233288, 1
  %54 = getelementptr inbounds i8, ptr %51, i64 8
  %55 = load i64, ptr %54, align 8, !tbaa !24
  %56 = add i64 %55, %.3196291
  %57 = add i64 %55, %52
  %58 = add nuw i64 %.1228285, 1
  %.pn259.in = icmp ult i64 %.3204290, %52
  %.pn259 = zext i1 %.pn259.in to i64
  %.8 = add i64 %.5292, %.pn259
  %59 = icmp ult i64 %57, %42
  br i1 %59, label %.preheader267, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %.critedge250, %.critedge250.thread, %41
  %.0233.lcssa = phi i64 [ 0, %41 ], [ %.0233288, %.critedge250.thread ], [ %53, %.critedge250 ]
  %.3204.lcssa = phi i64 [ %.2203, %41 ], [ %42, %.critedge250.thread ], [ %57, %.critedge250 ]
  %.3196.lcssa = phi i64 [ %.2195, %41 ], [ %.3196291, %.critedge250.thread ], [ %56, %.critedge250 ]
  %.5.lcssa = phi i64 [ %.4, %41 ], [ %.8360, %.critedge250.thread ], [ %.8, %.critedge250 ]
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %62, label %.loopexit266

62:                                               ; preds = %._crit_edge
  %63 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %64 = icmp ult i64 %.3204.lcssa, %3
  br i1 %64, label %.preheader265, label %.loopexit266

.preheader265:                                    ; preds = %62, %.critedge253
  %.9304 = phi i64 [ %.12, %.critedge253 ], [ %.5.lcssa, %62 ]
  %.5198303 = phi i64 [ %76, %.critedge253 ], [ %.3196.lcssa, %62 ]
  %.5206302 = phi i64 [ %77, %.critedge253 ], [ %.3204.lcssa, %62 ]
  %.3221301 = phi i64 [ %73, %.critedge253 ], [ %.2220, %62 ]
  %.0235300.in = phi i64 [ %.1236298, %.critedge253 ], [ %63, %62 ]
  %.not247297 = icmp eq i64 %.0235300.in, 0
  br i1 %.not247297, label %.critedge253.thread, label %.lr.ph299

.lr.ph299:                                        ; preds = %.preheader265, %69
  %.1236298.in = phi i64 [ %.1236298, %69 ], [ %.0235300.in, %.preheader265 ]
  %.1236298 = add i64 %.1236298.in, -1
  %65 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1236298)
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = icmp eq ptr %67, null
  br i1 %68, label %69, label %.critedge253

69:                                               ; preds = %.lr.ph299
  %.not247 = icmp eq i64 %.1236298, 0
  br i1 %.not247, label %.critedge253.thread, label %.lr.ph299, !llvm.loop !28

.critedge253.thread:                              ; preds = %.preheader265, %69
  %.12371 = add i64 %.9304, 1
  br label %.loopexit266

.critedge253:                                     ; preds = %.lr.ph299
  %70 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1236298)
  %71 = load i64, ptr %70, align 8, !tbaa !18
  %72 = icmp ult i64 %.5206302, %71
  %73 = add i64 %.3221301, 1
  %74 = getelementptr inbounds i8, ptr %70, i64 8
  %75 = load i64, ptr %74, align 8, !tbaa !24
  %76 = add i64 %75, %.5198303
  %77 = add i64 %75, %71
  %.pn = zext i1 %72 to i64
  %.12 = add i64 %.9304, %.pn
  %78 = icmp ult i64 %77, %3
  br i1 %78, label %.preheader265, label %.loopexit266, !llvm.loop !29

.loopexit266:                                     ; preds = %.critedge253, %.critedge253.thread, %62, %._crit_edge
  %.5223 = phi i64 [ %.2220, %._crit_edge ], [ %.2220, %62 ], [ %.3221301, %.critedge253.thread ], [ %73, %.critedge253 ]
  %.7200 = phi i64 [ %.3196.lcssa, %._crit_edge ], [ %.3196.lcssa, %62 ], [ %.5198303, %.critedge253.thread ], [ %76, %.critedge253 ]
  %.13 = phi i64 [ %.5.lcssa, %._crit_edge ], [ %.5.lcssa, %62 ], [ %.12371, %.critedge253.thread ], [ %.12, %.critedge253 ]
  %79 = sub i64 %3, %.7200
  %80 = add i64 %.5223, %.0233.lcssa
  tail call void @_ZNK16VmaBlockMetadata22PrintDetailedMap_BeginER13VmaJsonWritermmm(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %79, i64 noundef %80, i64 noundef %.13)
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %.loopexit264

83:                                               ; preds = %.loopexit266
  %84 = load i64, ptr %35, align 8, !tbaa !17
  %85 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %84)
  %86 = load i64, ptr %85, align 8, !tbaa !18
  %.not327 = icmp eq i64 %86, 0
  br i1 %.not327, label %.loopexit264, label %.preheader263

.preheader263:                                    ; preds = %83, %100
  %.7208312 = phi i64 [ %108, %100 ], [ 0, %83 ]
  %.0238311 = phi i64 [ %109, %100 ], [ 0, %83 ]
  %87 = icmp ult i64 %.0238311, %7
  br i1 %87, label %.lr.ph309, label %.thread

.lr.ph309:                                        ; preds = %.preheader263, %92
  %.1239308 = phi i64 [ %93, %92 ], [ %.0238311, %.preheader263 ]
  %88 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1239308)
  %89 = getelementptr inbounds i8, ptr %88, i64 16
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  %91 = icmp eq ptr %90, null
  br i1 %91, label %92, label %.critedge6

92:                                               ; preds = %.lr.ph309
  %93 = add i64 %.1239308, 1
  %exitcond338.not = icmp eq i64 %93, %7
  br i1 %exitcond338.not, label %.thread, label %.lr.ph309, !llvm.loop !30

.critedge6:                                       ; preds = %.lr.ph309
  %94 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1239308)
  %95 = load i64, ptr %94, align 8, !tbaa !18
  %96 = icmp ult i64 %.7208312, %95
  br i1 %96, label %97, label %100

97:                                               ; preds = %.critedge6
  %98 = sub i64 %95, %.7208312
  tail call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %.7208312, i64 noundef %98)
  %.pre = load i64, ptr %94, align 8, !tbaa !18
  br label %100

.thread:                                          ; preds = %.preheader263, %92
  %99 = sub i64 %86, %.7208312
  tail call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %.7208312, i64 noundef %99)
  br label %.loopexit264

100:                                              ; preds = %.critedge6, %97
  %101 = phi i64 [ %.pre, %97 ], [ %95, %.critedge6 ]
  %102 = getelementptr inbounds i8, ptr %94, i64 8
  %103 = load i64, ptr %102, align 8, !tbaa !24
  %104 = getelementptr inbounds i8, ptr %94, i64 16
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  tail call void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %101, i64 noundef %103, ptr noundef %105)
  %106 = load i64, ptr %94, align 8, !tbaa !18
  %107 = load i64, ptr %102, align 8, !tbaa !24
  %108 = add i64 %107, %106
  %109 = add nuw i64 %.1239308, 1
  %110 = icmp ult i64 %108, %86
  br i1 %110, label %.preheader263, label %.loopexit264, !llvm.loop !31

.loopexit264:                                     ; preds = %100, %.thread, %83, %.loopexit266
  %.9210 = phi i64 [ 0, %.loopexit266 ], [ 0, %83 ], [ %86, %.thread ], [ %108, %100 ]
  %111 = icmp ult i64 %.9210, %42
  br i1 %111, label %.preheader262.preheader, label %._crit_edge319

.preheader262.preheader:                          ; preds = %.loopexit264
  %112 = load i64, ptr %35, align 8, !tbaa !17
  br label %.preheader262

.preheader262:                                    ; preds = %.preheader262.preheader, %126
  %.10211318 = phi i64 [ %134, %126 ], [ %.9210, %.preheader262.preheader ]
  %.3230317 = phi i64 [ %135, %126 ], [ %112, %.preheader262.preheader ]
  %113 = icmp ult i64 %.3230317, %6
  br i1 %113, label %.lr.ph315, label %.thread378

.lr.ph315:                                        ; preds = %.preheader262, %118
  %.4231314 = phi i64 [ %119, %118 ], [ %.3230317, %.preheader262 ]
  %114 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.4231314)
  %115 = getelementptr inbounds i8, ptr %114, i64 16
  %116 = load ptr, ptr %115, align 8, !tbaa !21
  %117 = icmp eq ptr %116, null
  br i1 %117, label %118, label %.critedge8

118:                                              ; preds = %.lr.ph315
  %119 = add i64 %.4231314, 1
  %exitcond339.not = icmp eq i64 %119, %6
  br i1 %exitcond339.not, label %.thread378, label %.lr.ph315, !llvm.loop !32

.critedge8:                                       ; preds = %.lr.ph315
  %120 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.4231314)
  %121 = load i64, ptr %120, align 8, !tbaa !18
  %122 = icmp ult i64 %.10211318, %121
  br i1 %122, label %123, label %126

123:                                              ; preds = %.critedge8
  %124 = sub i64 %121, %.10211318
  tail call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %.10211318, i64 noundef %124)
  %.pre340 = load i64, ptr %120, align 8, !tbaa !18
  br label %126

.thread378:                                       ; preds = %.preheader262, %118
  %125 = sub i64 %42, %.10211318
  tail call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %.10211318, i64 noundef %125)
  br label %._crit_edge319

126:                                              ; preds = %.critedge8, %123
  %127 = phi i64 [ %.pre340, %123 ], [ %121, %.critedge8 ]
  %128 = getelementptr inbounds i8, ptr %120, i64 8
  %129 = load i64, ptr %128, align 8, !tbaa !24
  %130 = getelementptr inbounds i8, ptr %120, i64 16
  %131 = load ptr, ptr %130, align 8, !tbaa !21
  tail call void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %127, i64 noundef %129, ptr noundef %131)
  %132 = load i64, ptr %120, align 8, !tbaa !18
  %133 = load i64, ptr %128, align 8, !tbaa !24
  %134 = add i64 %133, %132
  %135 = add nuw i64 %.4231314, 1
  %136 = icmp ult i64 %134, %42
  br i1 %136, label %.preheader262, label %._crit_edge319, !llvm.loop !33

._crit_edge319:                                   ; preds = %126, %.thread378, %.loopexit264
  %.10211.lcssa = phi i64 [ %.9210, %.loopexit264 ], [ %42, %.thread378 ], [ %134, %126 ]
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 2
  br i1 %138, label %139, label %.loopexit

139:                                              ; preds = %._crit_edge319
  %140 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %141 = icmp ult i64 %.10211.lcssa, %3
  br i1 %141, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %139, %153
  %.12213325 = phi i64 [ %161, %153 ], [ %.10211.lcssa, %139 ]
  %.0215324.in = phi i64 [ %.1216322, %153 ], [ %140, %139 ]
  %.not321 = icmp eq i64 %.0215324.in, 0
  br i1 %.not321, label %.thread382, label %.lr.ph323

.lr.ph323:                                        ; preds = %.preheader, %146
  %.1216322.in = phi i64 [ %.1216322, %146 ], [ %.0215324.in, %.preheader ]
  %.1216322 = add i64 %.1216322.in, -1
  %142 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1216322)
  %143 = getelementptr inbounds i8, ptr %142, i64 16
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = icmp eq ptr %144, null
  br i1 %145, label %146, label %.critedge10

146:                                              ; preds = %.lr.ph323
  %.not = icmp eq i64 %.1216322, 0
  br i1 %.not, label %.thread382, label %.lr.ph323, !llvm.loop !34

.critedge10:                                      ; preds = %.lr.ph323
  %147 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.1216322)
  %148 = load i64, ptr %147, align 8, !tbaa !18
  %149 = icmp ult i64 %.12213325, %148
  br i1 %149, label %150, label %153

150:                                              ; preds = %.critedge10
  %151 = sub i64 %148, %.12213325
  tail call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %.12213325, i64 noundef %151)
  %.pre341 = load i64, ptr %147, align 8, !tbaa !18
  br label %153

.thread382:                                       ; preds = %.preheader, %146
  %152 = sub i64 %3, %.12213325
  tail call void @_ZNK16VmaBlockMetadata28PrintDetailedMap_UnusedRangeER13VmaJsonWritermm(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %.12213325, i64 noundef %152)
  br label %.loopexit

153:                                              ; preds = %.critedge10, %150
  %154 = phi i64 [ %.pre341, %150 ], [ %148, %.critedge10 ]
  %155 = getelementptr inbounds i8, ptr %147, i64 8
  %156 = load i64, ptr %155, align 8, !tbaa !24
  %157 = getelementptr inbounds i8, ptr %147, i64 16
  %158 = load ptr, ptr %157, align 8, !tbaa !21
  tail call void @_ZNK16VmaBlockMetadata27PrintDetailedMap_AllocationER13VmaJsonWritermmPv(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1, i64 noundef %154, i64 noundef %156, ptr noundef %158)
  %159 = load i64, ptr %147, align 8, !tbaa !18
  %160 = load i64, ptr %155, align 8, !tbaa !24
  %161 = add i64 %160, %159
  %162 = icmp ult i64 %161, %3
  br i1 %162, label %.preheader, label %.loopexit, !llvm.loop !35

.loopexit:                                        ; preds = %153, %.thread382, %139, %._crit_edge319
  tail call void @_ZNK16VmaBlockMetadata20PrintDetailedMap_EndER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(41) %1)
  ret void
}

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


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