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

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN23VmaBlockMetadata_Linear16CleanupAfterFreeEv = external hidden unnamed_addr constant [49 x i8], align 1

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN23VmaBlockMetadata_Linear16CleanupAfterFreeEv(ptr noundef nonnull align 8 dereferenceable(144) %0) #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %11 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN23VmaBlockMetadata_Linear23AccessSuballocations1stEv(ptr noundef nonnull align 8 dereferenceable(144) %10)
  store ptr %11, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %12 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN23VmaBlockMetadata_Linear23AccessSuballocations2ndEv(ptr noundef nonnull align 8 dereferenceable(144) %10)
  store ptr %12, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %10, align 8, !tbaa !9
  %14 = getelementptr inbounds ptr, ptr %13, i64 7
  %15 = load ptr, ptr %14, align 8
  %16 = call noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(144) %10)
  br i1 %16, label %17, label %24

17:                                               ; preds = %1
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  %20 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  store i64 0, ptr %20, align 8, !tbaa !11
  %21 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  store i64 0, ptr %21, align 8, !tbaa !20
  %22 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 8
  store i64 0, ptr %22, align 8, !tbaa !21
  %23 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 5
  store i32 0, ptr %23, align 4, !tbaa !22
  br label %217

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  store i64 %26, ptr %5, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %27 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %28 = load i64, ptr %27, align 8, !tbaa !11
  %29 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  %30 = load i64, ptr %29, align 8, !tbaa !20
  %31 = add i64 %28, %30
  store i64 %31, ptr %6, align 8, !tbaa !23
  %32 = load i64, ptr %6, align 8, !tbaa !23
  %33 = load i64, ptr %5, align 8, !tbaa !23
  %34 = icmp ule i64 %32, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %24
  br label %38

36:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.74, ptr noundef @.str.2, i32 noundef 8908, ptr noundef @__PRETTY_FUNCTION__._ZN23VmaBlockMetadata_Linear16CleanupAfterFreeEv) #6
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  br label %39

39:                                               ; preds = %54, %38
  %40 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %41 = load i64, ptr %40, align 8, !tbaa !11
  %42 = load i64, ptr %5, align 8, !tbaa !23
  %43 = icmp ult i64 %41, %42
  br i1 %43, label %44, label %52

44:                                               ; preds = %39
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %45, i64 noundef %47)
  %49 = getelementptr inbounds %struct.VmaSuballocation, ptr %48, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !24
  %51 = icmp eq i32 %50, 0
  br label %52

52:                                               ; preds = %44, %39
  %53 = phi i1 [ false, %39 ], [ %51, %44 ]
  br i1 %53, label %54, label %61

54:                                               ; preds = %52
  %55 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %57 = add i64 %56, 1
  store i64 %57, ptr %55, align 8, !tbaa !11
  %58 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  %59 = load i64, ptr %58, align 8, !tbaa !20
  %60 = add i64 %59, -1
  store i64 %60, ptr %58, align 8, !tbaa !20
  br label %39, !llvm.loop !27

61:                                               ; preds = %52
  br label %62

62:                                               ; preds = %74, %61
  %63 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  %64 = load i64, ptr %63, align 8, !tbaa !20
  %65 = icmp ugt i64 %64, 0
  br i1 %65, label %66, label %72

66:                                               ; preds = %62
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %67)
  %69 = getelementptr inbounds %struct.VmaSuballocation, ptr %68, i32 0, i32 3
  %70 = load i32, ptr %69, align 8, !tbaa !24
  %71 = icmp eq i32 %70, 0
  br label %72

72:                                               ; preds = %66, %62
  %73 = phi i1 [ false, %62 ], [ %71, %66 ]
  br i1 %73, label %74, label %79

74:                                               ; preds = %72
  %75 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  %76 = load i64, ptr %75, align 8, !tbaa !20
  %77 = add i64 %76, -1
  store i64 %77, ptr %75, align 8, !tbaa !20
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %78)
  br label %62, !llvm.loop !29

79:                                               ; preds = %72
  br label %80

80:                                               ; preds = %92, %79
  %81 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 8
  %82 = load i64, ptr %81, align 8, !tbaa !21
  %83 = icmp ugt i64 %82, 0
  br i1 %83, label %84, label %90

84:                                               ; preds = %80
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %85)
  %87 = getelementptr inbounds %struct.VmaSuballocation, ptr %86, i32 0, i32 3
  %88 = load i32, ptr %87, align 8, !tbaa !24
  %89 = icmp eq i32 %88, 0
  br label %90

90:                                               ; preds = %84, %80
  %91 = phi i1 [ false, %80 ], [ %89, %84 ]
  br i1 %91, label %92, label %97

92:                                               ; preds = %90
  %93 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 8
  %94 = load i64, ptr %93, align 8, !tbaa !21
  %95 = add i64 %94, -1
  store i64 %95, ptr %93, align 8, !tbaa !21
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %96)
  br label %80, !llvm.loop !30

97:                                               ; preds = %90
  br label %98

98:                                               ; preds = %110, %97
  %99 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 8
  %100 = load i64, ptr %99, align 8, !tbaa !21
  %101 = icmp ugt i64 %100, 0
  br i1 %101, label %102, label %108

102:                                              ; preds = %98
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %103, i64 noundef 0)
  %105 = getelementptr inbounds %struct.VmaSuballocation, ptr %104, i32 0, i32 3
  %106 = load i32, ptr %105, align 8, !tbaa !24
  %107 = icmp eq i32 %106, 0
  br label %108

108:                                              ; preds = %102, %98
  %109 = phi i1 [ false, %98 ], [ %107, %102 ]
  br i1 %109, label %110, label %115

110:                                              ; preds = %108
  %111 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 8
  %112 = load i64, ptr %111, align 8, !tbaa !21
  %113 = add i64 %112, -1
  store i64 %113, ptr %111, align 8, !tbaa !21
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZL15VmaVectorRemoveI16VmaSuballocation15VmaStlAllocatorIS0_EEvR9VmaVectorIT_T0_Em(ptr noundef nonnull align 8 dereferenceable(32) %114, i64 noundef 0)
  br label %98, !llvm.loop !31

115:                                              ; preds = %108
  %116 = call noundef zeroext i1 @_ZNK23VmaBlockMetadata_Linear16ShouldCompact1stEv(ptr noundef nonnull align 8 dereferenceable(144) %10)
  br i1 %116, label %117, label %161

117:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %118 = load i64, ptr %5, align 8, !tbaa !23
  %119 = load i64, ptr %6, align 8, !tbaa !23
  %120 = sub i64 %118, %119
  store i64 %120, ptr %7, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %121 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %122 = load i64, ptr %121, align 8, !tbaa !11
  store i64 %122, ptr %8, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !23
  br label %123

123:                                              ; preds = %153, %117
  %124 = load i64, ptr %9, align 8, !tbaa !23
  %125 = load i64, ptr %7, align 8, !tbaa !23
  %126 = icmp ult i64 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %156

128:                                              ; preds = %123
  br label %129

129:                                              ; preds = %136, %128
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = load i64, ptr %8, align 8, !tbaa !23
  %132 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %130, i64 noundef %131)
  %133 = getelementptr inbounds %struct.VmaSuballocation, ptr %132, i32 0, i32 3
  %134 = load i32, ptr %133, align 8, !tbaa !24
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %129
  %137 = load i64, ptr %8, align 8, !tbaa !23
  %138 = add i64 %137, 1
  store i64 %138, ptr %8, align 8, !tbaa !23
  br label %129, !llvm.loop !32

139:                                              ; preds = %129
  %140 = load i64, ptr %9, align 8, !tbaa !23
  %141 = load i64, ptr %8, align 8, !tbaa !23
  %142 = icmp ne i64 %140, %141
  br i1 %142, label %143, label %150

143:                                              ; preds = %139
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = load i64, ptr %8, align 8, !tbaa !23
  %146 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %144, i64 noundef %145)
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = load i64, ptr %9, align 8, !tbaa !23
  %149 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %147, i64 noundef %148)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %149, ptr align 8 %146, i64 32, i1 false), !tbaa.struct !33
  br label %150

150:                                              ; preds = %143, %139
  %151 = load i64, ptr %8, align 8, !tbaa !23
  %152 = add i64 %151, 1
  store i64 %152, ptr %8, align 8, !tbaa !23
  br label %153

153:                                              ; preds = %150
  %154 = load i64, ptr %9, align 8, !tbaa !23
  %155 = add i64 %154, 1
  store i64 %155, ptr %9, align 8, !tbaa !23
  br label %123, !llvm.loop !35

156:                                              ; preds = %127
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = load i64, ptr %7, align 8, !tbaa !23
  call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %157, i64 noundef %158)
  %159 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  store i64 0, ptr %159, align 8, !tbaa !11
  %160 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  store i64 0, ptr %160, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %161

161:                                              ; preds = %156, %115
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = call noundef zeroext i1 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %162)
  br i1 %163, label %164, label %166

164:                                              ; preds = %161
  %165 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 5
  store i32 0, ptr %165, align 4, !tbaa !22
  br label %166

166:                                              ; preds = %164, %161
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %167)
  %169 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %170 = load i64, ptr %169, align 8, !tbaa !11
  %171 = sub i64 %168, %170
  %172 = icmp eq i64 %171, 0
  br i1 %172, label %173, label %216

173:                                              ; preds = %166
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %174)
  %175 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  store i64 0, ptr %175, align 8, !tbaa !11
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = call noundef zeroext i1 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %176)
  br i1 %177, label %215, label %178

178:                                              ; preds = %173
  %179 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 5
  %180 = load i32, ptr %179, align 4, !tbaa !22
  %181 = icmp eq i32 %180, 1
  br i1 %181, label %182, label %215

182:                                              ; preds = %178
  %183 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 5
  store i32 0, ptr %183, align 4, !tbaa !22
  %184 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 8
  %185 = load i64, ptr %184, align 8, !tbaa !21
  %186 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  store i64 %185, ptr %186, align 8, !tbaa !20
  br label %187

187:                                              ; preds = %203, %182
  %188 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %189 = load i64, ptr %188, align 8, !tbaa !11
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %190)
  %192 = icmp ult i64 %189, %191
  br i1 %192, label %193, label %201

193:                                              ; preds = %187
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %196 = load i64, ptr %195, align 8, !tbaa !11
  %197 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %194, i64 noundef %196)
  %198 = getelementptr inbounds %struct.VmaSuballocation, ptr %197, i32 0, i32 3
  %199 = load i32, ptr %198, align 8, !tbaa !24
  %200 = icmp eq i32 %199, 0
  br label %201

201:                                              ; preds = %193, %187
  %202 = phi i1 [ false, %187 ], [ %200, %193 ]
  br i1 %202, label %203, label %210

203:                                              ; preds = %201
  %204 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 6
  %205 = load i64, ptr %204, align 8, !tbaa !11
  %206 = add i64 %205, 1
  store i64 %206, ptr %204, align 8, !tbaa !11
  %207 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 7
  %208 = load i64, ptr %207, align 8, !tbaa !20
  %209 = add i64 %208, -1
  store i64 %209, ptr %207, align 8, !tbaa !20
  br label %187, !llvm.loop !36

210:                                              ; preds = %201
  %211 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 8
  store i64 0, ptr %211, align 8, !tbaa !21
  %212 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %10, i32 0, i32 4
  %213 = load i32, ptr %212, align 8, !tbaa !37
  %214 = xor i32 %213, 1
  store i32 %214, ptr %212, align 8, !tbaa !37
  br label %215

215:                                              ; preds = %210, %178, %173
  br label %216

216:                                              ; preds = %215, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %217

217:                                              ; preds = %216, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK23VmaBlockMetadata_Linear16ShouldCompact1stEv(ptr noundef nonnull align 8 dereferenceable(144)) #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15VmaVectorRemoveI16VmaSuballocation15VmaStlAllocatorIS0_EEvR9VmaVectorIT_T0_Em(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !14, i64 120}
!12 = !{!"_ZTS23VmaBlockMetadata_Linear", !13, i64 0, !14, i64 40, !16, i64 48, !16, i64 80, !18, i64 112, !19, i64 116, !14, i64 120, !14, i64 128, !14, i64 136}
!13 = !{!"_ZTS16VmaBlockMetadata", !14, i64 8, !6, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTS9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE", !17, i64 0, !6, i64 8, !14, i64 16, !14, i64 24}
!17 = !{!"_ZTS15VmaStlAllocatorI16VmaSuballocationE", !6, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN23VmaBlockMetadata_Linear18SECOND_VECTOR_MODEE", !7, i64 0}
!20 = !{!12, !14, i64 128}
!21 = !{!12, !14, i64 136}
!22 = !{!12, !19, i64 116}
!23 = !{!14, !14, i64 0}
!24 = !{!25, !26, i64 24}
!25 = !{!"_ZTS16VmaSuballocation", !14, i64 0, !14, i64 8, !6, i64 16, !26, i64 24}
!26 = !{!"_ZTS20VmaSuballocationType", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}
!33 = !{i64 0, i64 8, !23, i64 8, i64 8, !23, i64 16, i64 8, !5, i64 24, i64 4, !34}
!34 = !{!26, !26, i64 0}
!35 = distinct !{!35, !28}
!36 = distinct !{!36, !28}
!37 = !{!12, !18, i64 112}


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

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN23VmaBlockMetadata_Linear16CleanupAfterFreeEv = external hidden unnamed_addr constant [49 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN23VmaBlockMetadata_Linear16CleanupAfterFreeEv(ptr noundef nonnull align 8 dereferenceable(144) %0) local_unnamed_addr #3 align 2 {
  %2 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN23VmaBlockMetadata_Linear23AccessSuballocations1stEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %3 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN23VmaBlockMetadata_Linear23AccessSuballocations2ndEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 56
  %6 = load ptr, ptr %5, align 8
  %7 = tail call noundef zeroext i1 %6(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  br i1 %7, label %9, label %11

9:                                                ; preds = %1
  tail call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  tail call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %10 = getelementptr inbounds i8, ptr %0, i64 116
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(28) %10, i8 0, i64 28, i1 false)
  br label %105

11:                                               ; preds = %1
  %12 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %13 = getelementptr inbounds i8, ptr %0, i64 120
  %14 = load i64, ptr %13, align 8, !tbaa !8
  %15 = load i64, ptr %8, align 8, !tbaa !19
  %16 = add i64 %15, %14
  %.not = icmp ugt i64 %16, %12
  br i1 %.not, label %18, label %.preheader51

.preheader51:                                     ; preds = %11
  %17 = icmp ult i64 %14, %12
  br i1 %17, label %.lr.ph, label %.critedge

18:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.74, ptr noundef nonnull @.str.2, i32 noundef 8908, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN23VmaBlockMetadata_Linear16CleanupAfterFreeEv) #5
  unreachable

.lr.ph:                                           ; preds = %.preheader51, %24
  %19 = phi i64 [ %26, %24 ], [ %14, %.preheader51 ]
  %20 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %19)
  %21 = getelementptr inbounds i8, ptr %20, i64 24
  %22 = load i32, ptr %21, align 8, !tbaa !20
  %23 = icmp eq i32 %22, 0
  %.pre.pre = load i64, ptr %8, align 8, !tbaa !19
  br i1 %23, label %24, label %.critedge

24:                                               ; preds = %.lr.ph
  %25 = load i64, ptr %13, align 8, !tbaa !8
  %26 = add i64 %25, 1
  store i64 %26, ptr %13, align 8, !tbaa !8
  %27 = add i64 %.pre.pre, -1
  store i64 %27, ptr %8, align 8, !tbaa !19
  %28 = icmp ult i64 %26, %12
  br i1 %28, label %.lr.ph, label %.critedge, !llvm.loop !23

.critedge:                                        ; preds = %.lr.ph, %24, %.preheader51
  %29 = phi i64 [ %15, %.preheader51 ], [ %.pre.pre, %.lr.ph ], [ %27, %24 ]
  %.not4753 = icmp eq i64 %29, 0
  br i1 %.not4753, label %.critedge2, label %.lr.ph54

.lr.ph54:                                         ; preds = %.critedge, %34
  %30 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %31 = getelementptr inbounds i8, ptr %30, i64 24
  %32 = load i32, ptr %31, align 8, !tbaa !20
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %.critedge2

34:                                               ; preds = %.lr.ph54
  %35 = load i64, ptr %8, align 8, !tbaa !19
  %36 = add i64 %35, -1
  store i64 %36, ptr %8, align 8, !tbaa !19
  tail call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %37 = load i64, ptr %8, align 8, !tbaa !19
  %.not47 = icmp eq i64 %37, 0
  br i1 %.not47, label %.critedge2, label %.lr.ph54, !llvm.loop !25

.critedge2:                                       ; preds = %.lr.ph54, %34, %.critedge
  %38 = getelementptr inbounds i8, ptr %0, i64 136
  %39 = load i64, ptr %38, align 8, !tbaa !26
  %.not4856 = icmp eq i64 %39, 0
  br i1 %.not4856, label %.critedge6, label %.lr.ph57

.lr.ph57:                                         ; preds = %.critedge2, %44
  %40 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %41 = getelementptr inbounds i8, ptr %40, i64 24
  %42 = load i32, ptr %41, align 8, !tbaa !20
  %43 = icmp eq i32 %42, 0
  %.pre69.pre = load i64, ptr %38, align 8, !tbaa !26
  br i1 %43, label %44, label %.critedge4

44:                                               ; preds = %.lr.ph57
  %45 = add i64 %.pre69.pre, -1
  store i64 %45, ptr %38, align 8, !tbaa !26
  tail call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %46 = load i64, ptr %38, align 8, !tbaa !26
  %.not48 = icmp eq i64 %46, 0
  br i1 %.not48, label %.critedge6, label %.lr.ph57, !llvm.loop !27

.critedge4:                                       ; preds = %.lr.ph57
  %47 = icmp eq i64 %.pre69.pre, 0
  br i1 %47, label %.critedge6, label %.lr.ph61

.lr.ph61:                                         ; preds = %.critedge4, %52
  %48 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef 0)
  %49 = getelementptr inbounds i8, ptr %48, i64 24
  %50 = load i32, ptr %49, align 8, !tbaa !20
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %.critedge6

52:                                               ; preds = %.lr.ph61
  %53 = load i64, ptr %38, align 8, !tbaa !26
  %54 = add i64 %53, -1
  store i64 %54, ptr %38, align 8, !tbaa !26
  tail call void @_ZL15VmaVectorRemoveI16VmaSuballocation15VmaStlAllocatorIS0_EEvR9VmaVectorIT_T0_Em(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef 0)
  %55 = load i64, ptr %38, align 8, !tbaa !26
  %.not49 = icmp eq i64 %55, 0
  br i1 %.not49, label %.critedge6, label %.lr.ph61, !llvm.loop !28

.critedge6:                                       ; preds = %44, %.lr.ph61, %52, %.critedge2, %.critedge4
  %56 = tail call noundef zeroext i1 @_ZNK23VmaBlockMetadata_Linear16ShouldCompact1stEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %56, label %57, label %72

57:                                               ; preds = %.critedge6
  %58 = sub i64 %12, %16
  %.not68 = icmp eq i64 %12, %16
  br i1 %.not68, label %._crit_edge, label %.preheader.preheader

.preheader.preheader:                             ; preds = %57
  %59 = load i64, ptr %13, align 8, !tbaa !8
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %70
  %.064 = phi i64 [ %71, %70 ], [ 0, %.preheader.preheader ]
  %.04463 = phi i64 [ %65, %70 ], [ %59, %.preheader.preheader ]
  br label %60

._crit_edge:                                      ; preds = %70, %57
  tail call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %58)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 0, i64 16, i1 false)
  br label %72

60:                                               ; preds = %60, %.preheader
  %.1 = phi i64 [ %65, %60 ], [ %.04463, %.preheader ]
  %61 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.1)
  %62 = getelementptr inbounds i8, ptr %61, i64 24
  %63 = load i32, ptr %62, align 8, !tbaa !20
  %64 = icmp eq i32 %63, 0
  %65 = add i64 %.1, 1
  br i1 %64, label %60, label %66, !llvm.loop !29

66:                                               ; preds = %60
  %.not50 = icmp eq i64 %.064, %.1
  br i1 %.not50, label %70, label %67

67:                                               ; preds = %66
  %68 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.1)
  %69 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.064)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %69, ptr noundef nonnull align 8 dereferenceable(32) %68, i64 32, i1 false), !tbaa.struct !30
  br label %70

70:                                               ; preds = %67, %66
  %71 = add nuw i64 %.064, 1
  %exitcond.not = icmp eq i64 %71, %58
  br i1 %exitcond.not, label %._crit_edge, label %.preheader, !llvm.loop !34

72:                                               ; preds = %._crit_edge, %.critedge6
  %73 = tail call noundef zeroext i1 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  br i1 %73, label %74, label %76

74:                                               ; preds = %72
  %75 = getelementptr inbounds i8, ptr %0, i64 116
  store i32 0, ptr %75, align 4, !tbaa !35
  br label %76

76:                                               ; preds = %74, %72
  %77 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %78 = load i64, ptr %13, align 8, !tbaa !8
  %79 = icmp eq i64 %77, %78
  br i1 %79, label %80, label %105

80:                                               ; preds = %76
  tail call void @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  store i64 0, ptr %13, align 8, !tbaa !8
  %81 = tail call noundef zeroext i1 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  br i1 %81, label %105, label %82

82:                                               ; preds = %80
  %83 = getelementptr inbounds i8, ptr %0, i64 116
  %84 = load i32, ptr %83, align 4, !tbaa !35
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %86, label %105

86:                                               ; preds = %82
  store i32 0, ptr %83, align 4, !tbaa !35
  %87 = load i64, ptr %38, align 8, !tbaa !26
  store i64 %87, ptr %8, align 8, !tbaa !19
  %88 = load i64, ptr %13, align 8, !tbaa !8
  %89 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %90 = icmp ult i64 %88, %89
  br i1 %90, label %.lr.ph66, label %.critedge8

.lr.ph66:                                         ; preds = %86, %96
  %91 = load i64, ptr %13, align 8, !tbaa !8
  %92 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %91)
  %93 = getelementptr inbounds i8, ptr %92, i64 24
  %94 = load i32, ptr %93, align 8, !tbaa !20
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %.critedge8

96:                                               ; preds = %.lr.ph66
  %97 = load <2 x i64>, ptr %13, align 8, !tbaa !31
  %98 = add <2 x i64> %97, <i64 1, i64 -1>
  store <2 x i64> %98, ptr %13, align 8, !tbaa !31
  %99 = tail call noundef i64 @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %100 = extractelement <2 x i64> %98, i64 0
  %101 = icmp ult i64 %100, %99
  br i1 %101, label %.lr.ph66, label %.critedge8, !llvm.loop !36

.critedge8:                                       ; preds = %.lr.ph66, %96, %86
  store i64 0, ptr %38, align 8, !tbaa !26
  %102 = getelementptr inbounds i8, ptr %0, i64 112
  %103 = load i32, ptr %102, align 8, !tbaa !37
  %104 = xor i32 %103, 1
  store i32 %104, ptr %102, align 8, !tbaa !37
  br label %105

105:                                              ; preds = %76, %.critedge8, %82, %80, %9
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK23VmaBlockMetadata_Linear16ShouldCompact1stEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15VmaVectorRemoveI16VmaSuballocation15VmaStlAllocatorIS0_EEvR9VmaVectorIT_T0_Em(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 120}
!9 = !{!"_ZTS23VmaBlockMetadata_Linear", !10, i64 0, !11, i64 40, !15, i64 48, !15, i64 80, !17, i64 112, !18, i64 116, !11, i64 120, !11, i64 128, !11, i64 136}
!10 = !{!"_ZTS16VmaBlockMetadata", !11, i64 8, !13, i64 16, !11, i64 24, !14, i64 32}
!11 = !{!"long", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"any pointer", !12, i64 0}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"_ZTS9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE", !16, i64 0, !13, i64 8, !11, i64 16, !11, i64 24}
!16 = !{!"_ZTS15VmaStlAllocatorI16VmaSuballocationE", !13, i64 0}
!17 = !{!"int", !12, i64 0}
!18 = !{!"_ZTSN23VmaBlockMetadata_Linear18SECOND_VECTOR_MODEE", !12, i64 0}
!19 = !{!9, !11, i64 128}
!20 = !{!21, !22, i64 24}
!21 = !{!"_ZTS16VmaSuballocation", !11, i64 0, !11, i64 8, !13, i64 16, !22, i64 24}
!22 = !{!"_ZTS20VmaSuballocationType", !12, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!9, !11, i64 136}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}
!29 = distinct !{!29, !24}
!30 = !{i64 0, i64 8, !31, i64 8, i64 8, !31, i64 16, i64 8, !32, i64 24, i64 4, !33}
!31 = !{!11, !11, i64 0}
!32 = !{!13, !13, i64 0}
!33 = !{!22, !22, i64 0}
!34 = distinct !{!34, !24}
!35 = !{!9, !18, i64 116}
!36 = distinct !{!36, !24}
!37 = !{!9, !17, i64 112}


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