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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.VmaSuballocation = type { i64, i64, ptr, i32 }
%struct.VmaSuballocationOffsetLess = type { i8 }
%struct.VmaSuballocationOffsetGreater = type { i8 }
%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 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [49 x i8], align 1
@__PRETTY_FUNCTION__._ZNK23VmaBlockMetadata_Linear17FindSuballocationEm = external hidden unnamed_addr constant [81 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 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) #1

; 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 uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear17FindSuballocationEm(ptr noundef nonnull align 8 dereferenceable(144) %0, i64 noundef %1) #3 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 %struct.VmaSuballocation, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.VmaSuballocationOffsetLess, align 1
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %struct.VmaSuballocationOffsetLess, align 1
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %struct.VmaSuballocationOffsetGreater, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %21 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations1stEv(ptr noundef nonnull align 8 dereferenceable(144) %21)
  store ptr %22, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations2ndEv(ptr noundef nonnull align 8 dereferenceable(144) %21)
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  %24 = load i64, ptr %5, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.VmaSuballocation, ptr %8, i32 0, i32 0
  store i64 %24, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %26)
  %28 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %21, i32 0, i32 6
  %29 = load i64, ptr %28, align 8, !tbaa !14
  %30 = getelementptr inbounds %struct.VmaSuballocation, ptr %27, i64 %29
  store ptr %30, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  store ptr %32, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  %33 = call noundef ptr @_Z19VmaBinaryFindSortedI26VmaSuballocationOffsetLessPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 1 dereferenceable(1) %12)
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  store ptr %33, ptr %9, align 8, !tbaa !5
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %35)
  %37 = icmp ne ptr %34, %36
  br i1 %37, label %38, label %40

38:                                               ; preds = %2
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %39, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %41

40:                                               ; preds = %2
  store i32 0, ptr %13, align 4
  br label %41

41:                                               ; preds = %40, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %42 = load i32, ptr %13, align 4
  switch i32 %42, label %76 [
    i32 0, label %43
  ]

43:                                               ; preds = %41
  %44 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %21, i32 0, i32 5
  %45 = load i32, ptr %44, align 4, !tbaa !22
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %75

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %48 = getelementptr inbounds %class.VmaBlockMetadata_Linear, ptr %21, i32 0, i32 5
  %49 = load i32, ptr %48, align 4, !tbaa !22
  %50 = icmp eq i32 %49, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  br i1 %50, label %51, label %57

51:                                               ; preds = %47
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %52)
  store ptr %53, ptr %15, align 8, !tbaa !5
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %54)
  store ptr %55, ptr %16, align 8, !tbaa !5
  %56 = call noundef ptr @_Z19VmaBinaryFindSortedI26VmaSuballocationOffsetLessPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 1 dereferenceable(1) %17)
  br label %63

57:                                               ; preds = %47
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %58)
  store ptr %59, ptr %18, align 8, !tbaa !5
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %60)
  store ptr %61, ptr %19, align 8, !tbaa !5
  %62 = call noundef ptr @_Z19VmaBinaryFindSortedI29VmaSuballocationOffsetGreaterPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 1 dereferenceable(1) %20)
  br label %63

63:                                               ; preds = %57, %51
  %64 = phi ptr [ %56, %51 ], [ %62, %57 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  store ptr %64, ptr %14, align 8, !tbaa !5
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %66)
  %68 = icmp ne ptr %65, %67
  br i1 %68, label %69, label %71

69:                                               ; preds = %63
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %70, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %72

71:                                               ; preds = %63
  store i32 0, ptr %13, align 4
  br label %72

72:                                               ; preds = %71, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %73 = load i32, ptr %13, align 4
  switch i32 %73, label %76 [
    i32 0, label %74
  ]

74:                                               ; preds = %72
  br label %75

75:                                               ; preds = %74, %43
  call void @__assert_fail(ptr noundef @.str.73, ptr noundef @.str.2, i32 noundef 8879, ptr noundef @__PRETTY_FUNCTION__._ZNK23VmaBlockMetadata_Linear17FindSuballocationEm) #5
  unreachable

76:                                               ; preds = %72, %41
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %77 = load ptr, ptr %3, align 8
  ret ptr %77
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19VmaBinaryFindSortedI26VmaSuballocationOffsetLessPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19VmaBinaryFindSortedI29VmaSuballocationOffsetGreaterPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) #3

attributes #0 = { nocallback nofree nosync 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 = { nounwind }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS16VmaSuballocation", !10, i64 0, !10, i64 8, !6, i64 16, !13, i64 24}
!13 = !{!"_ZTS20VmaSuballocationType", !7, i64 0}
!14 = !{!15, !10, i64 120}
!15 = !{!"_ZTS23VmaBlockMetadata_Linear", !16, i64 0, !10, i64 40, !18, i64 48, !18, i64 80, !20, i64 112, !21, i64 116, !10, i64 120, !10, i64 128, !10, i64 136}
!16 = !{!"_ZTS16VmaBlockMetadata", !10, i64 8, !6, i64 16, !10, i64 24, !17, i64 32}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE", !19, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!19 = !{!"_ZTS15VmaStlAllocatorI16VmaSuballocationE", !6, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN23VmaBlockMetadata_Linear18SECOND_VECTOR_MODEE", !7, i64 0}
!22 = !{!15, !21, i64 116}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.VmaSuballocation = type { i64, i64, ptr, i32 }
%struct.VmaSuballocationOffsetLess = type { i8 }
%struct.VmaSuballocationOffsetGreater = type { i8 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [49 x i8], align 1
@__PRETTY_FUNCTION__._ZNK23VmaBlockMetadata_Linear17FindSuballocationEm = external hidden unnamed_addr constant [81 x i8], align 1

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

; Function Attrs: mustprogress 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) local_unnamed_addr #1

; 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 #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)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear17FindSuballocationEm(ptr noundef nonnull align 8 dereferenceable(144) %0, i64 noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %struct.VmaSuballocation, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.VmaSuballocationOffsetLess, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.VmaSuballocationOffsetLess, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.VmaSuballocationOffsetGreater, align 1
  %13 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations1stEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %14 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK23VmaBlockMetadata_Linear23AccessSuballocations2ndEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  store i64 %1, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %15 = tail call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  %16 = getelementptr inbounds i8, ptr %0, i64 120
  %17 = load i64, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds %struct.VmaSuballocation, ptr %15, i64 %17
  store ptr %18, ptr %4, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %19 = tail call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  store ptr %19, ptr %5, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  %20 = call noundef ptr @_Z19VmaBinaryFindSortedI26VmaSuballocationOffsetLessPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %21 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  %.not = icmp eq ptr %20, %21
  br i1 %.not, label %22, label %38

22:                                               ; preds = %2
  %23 = getelementptr inbounds i8, ptr %0, i64 116
  %24 = load i32, ptr %23, align 4, !tbaa !21
  %.not20 = icmp eq i32 %24, 0
  br i1 %.not20, label %37, label %25

25:                                               ; preds = %22
  %26 = icmp eq i32 %24, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  %27 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  br i1 %26, label %28, label %31

28:                                               ; preds = %25
  store ptr %27, ptr %7, align 8, !tbaa !20
  %29 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  store ptr %29, ptr %8, align 8, !tbaa !20
  %30 = call noundef ptr @_Z19VmaBinaryFindSortedI26VmaSuballocationOffsetLessPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 1 dereferenceable(1) %9)
  br label %34

31:                                               ; preds = %25
  store ptr %27, ptr %10, align 8, !tbaa !20
  %32 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  store ptr %32, ptr %11, align 8, !tbaa !20
  %33 = call noundef ptr @_Z19VmaBinaryFindSortedI29VmaSuballocationOffsetGreaterPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 1 dereferenceable(1) %12)
  br label %34

34:                                               ; preds = %31, %28
  %35 = phi ptr [ %30, %28 ], [ %33, %31 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %36 = call noundef ptr @_ZNK9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  %.not21 = icmp eq ptr %35, %36
  br i1 %.not21, label %37, label %38

37:                                               ; preds = %34, %22
  call void @__assert_fail(ptr noundef nonnull @.str.73, ptr noundef nonnull @.str.2, i32 noundef 8879, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK23VmaBlockMetadata_Linear17FindSuballocationEm) #5
  unreachable

38:                                               ; preds = %34, %2
  %.2 = phi ptr [ %35, %34 ], [ %20, %2 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  ret ptr %.2
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19VmaBinaryFindSortedI26VmaSuballocationOffsetLessPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19VmaBinaryFindSortedI29VmaSuballocationOffsetGreaterPK16VmaSuballocationS1_ET0_RKS4_S6_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync 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 = { nounwind }
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, !7, i64 0}
!6 = !{!"_ZTS16VmaSuballocation", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS20VmaSuballocationType", !8, i64 0}
!12 = !{!13, !7, i64 120}
!13 = !{!"_ZTS23VmaBlockMetadata_Linear", !14, i64 0, !7, i64 40, !16, i64 48, !16, i64 80, !18, i64 112, !19, i64 116, !7, i64 120, !7, i64 128, !7, i64 136}
!14 = !{!"_ZTS16VmaBlockMetadata", !7, i64 8, !10, i64 16, !7, i64 24, !15, i64 32}
!15 = !{!"bool", !8, i64 0}
!16 = !{!"_ZTS9VmaVectorI16VmaSuballocation15VmaStlAllocatorIS0_EE", !17, i64 0, !10, i64 8, !7, i64 16, !7, i64 24}
!17 = !{!"_ZTS15VmaStlAllocatorI16VmaSuballocationE", !10, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!"_ZTSN23VmaBlockMetadata_Linear18SECOND_VECTOR_MODEE", !8, i64 0}
!20 = !{!10, !10, i64 0}
!21 = !{!13, !19, i64 116}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass