; 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.VmaStringBuilder = type { %class.VmaVector }
%class.VmaVector = type { %struct.VmaStlAllocator, ptr, i64, i64 }
%struct.VmaStlAllocator = type { ptr }
%struct.VmaBudget = type { %struct.VmaStatistics, i64, i64 }
%struct.VmaStatistics = type { i32, i32, i64, i64 }
%struct.VmaTotalStatistics = type { [32 x %struct.VmaDetailedStatistics], [16 x %struct.VmaDetailedStatistics], %struct.VmaDetailedStatistics }
%struct.VmaDetailedStatistics = type { %struct.VmaStatistics, i32, i64, i64, i64, i64 }
%class.VmaJsonWriter = type <{ ptr, %class.VmaVector.0, i8, [7 x i8] }>
%class.VmaVector.0 = type { %struct.VmaStlAllocator.1, ptr, i64, i64 }
%struct.VmaStlAllocator.1 = type { ptr }
%struct.VmaAllocator_T = type <{ i8, [3 x i8], i32, i8, i8, i8, i8, i8, i8, [2 x i8], ptr, ptr, i8, [7 x i8], %struct.VkAllocationCallbacks, %struct.VmaDeviceMemoryCallbacks, %class.VmaAllocationObjectAllocator, i32, [4 x i8], %struct.VkPhysicalDeviceProperties, %struct.VkPhysicalDeviceMemoryProperties, [32 x ptr], [32 x %class.VmaDedicatedAllocationList], %struct.VmaCurrentBudgetData, %"struct.std::atomic", [4 x i8], i64, ptr, %"struct.std::atomic", %"struct.std::atomic", [32 x i32], %class.VmaRWMutex, %class.VmaIntrusiveLinkedList.14, i32, [4 x i8], %struct.VmaVulkanFunctions, i32, [4 x i8] }>
%struct.VkAllocationCallbacks = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.VmaDeviceMemoryCallbacks = type { ptr, ptr, ptr }
%class.VmaAllocationObjectAllocator = type { %class.VmaMutex, %class.VmaPoolAllocator.11 }
%class.VmaMutex = type { %"class.std::mutex" }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%class.VmaPoolAllocator.11 = type { ptr, i32, %class.VmaVector.12 }
%class.VmaVector.12 = type { %struct.VmaStlAllocator.13, ptr, i64, i64 }
%struct.VmaStlAllocator.13 = type { ptr }
%struct.VkPhysicalDeviceProperties = type { i32, i32, i32, i32, i32, [256 x i8], [16 x i8], %struct.VkPhysicalDeviceLimits, %struct.VkPhysicalDeviceSparseProperties }
%struct.VkPhysicalDeviceLimits = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i32, [3 x i32], i32, i32, i32, i32, i32, float, float, i32, [2 x i32], [2 x float], i32, i64, i64, i64, i64, i32, i32, i32, i32, float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, [2 x float], [2 x float], float, float, i32, i32, i64, i64, i64 }
%struct.VkPhysicalDeviceSparseProperties = type { i32, i32, i32, i32, i32 }
%struct.VkPhysicalDeviceMemoryProperties = type { i32, [32 x %struct.VkMemoryType], i32, [16 x %struct.VkMemoryHeap] }
%struct.VkMemoryType = type { i32, i32 }
%struct.VkMemoryHeap = type { i64, i32 }
%class.VmaDedicatedAllocationList = type { i8, %class.VmaRWMutex, %class.VmaIntrusiveLinkedList }
%class.VmaIntrusiveLinkedList = type { ptr, ptr, i64 }
%struct.VmaCurrentBudgetData = type { [16 x %"struct.std::atomic"], [16 x %"struct.std::atomic"], [16 x %"struct.std::atomic.9"], [16 x %"struct.std::atomic.9"], %"struct.std::atomic", %class.VmaRWMutex, [16 x i64], [16 x i64], [16 x i64] }
%"struct.std::atomic.9" = type { %"struct.std::__atomic_base.10" }
%"struct.std::__atomic_base.10" = type { i64 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%class.VmaRWMutex = type { %"class.std::shared_mutex" }
%"class.std::shared_mutex" = type { %"class.std::__shared_mutex_pthread" }
%"class.std::__shared_mutex_pthread" = type { %union.pthread_rwlock_t }
%union.pthread_rwlock_t = type { %struct.__pthread_rwlock_arch_t }
%struct.__pthread_rwlock_arch_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], i64, i32 }
%class.VmaIntrusiveLinkedList.14 = type { ptr, ptr, i64 }
%struct.VmaVulkanFunctions = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.288 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.vmaBuildStatsString = external hidden unnamed_addr constant [76 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.308 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.309 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.316 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.317 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.318 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.319 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.320 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.321 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.322 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.323 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.324 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.325 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.326 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.330 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.331 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.332 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.333 = external hidden unnamed_addr constant [20 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41), i1 noundef zeroext) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter10BeginArrayEb(ptr noundef nonnull align 8 dereferenceable(41), i1 noundef zeroext) #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41), ptr noundef nonnull align 8 dereferenceable(64)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, i32 noundef, i32 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T19CalculateStatisticsEP18VmaTotalStatistics(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T16PrintDetailedMapER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef nonnull align 8 dereferenceable(41)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @vmaBuildStatsString(ptr noundef %0, ptr noundef %1, i32 noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %class.VmaStringBuilder, align 8
  %8 = alloca [16 x %struct.VmaBudget], align 16
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.VmaTotalStatistics, align 8
  %12 = alloca %class.VmaJsonWriter, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %3
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br label %26

26:                                               ; preds = %23, %3
  %27 = phi i1 [ false, %3 ], [ %25, %23 ]
  br i1 %27, label %28, label %29

28:                                               ; preds = %26
  br label %31

29:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str.304, ptr noundef @.str.2, i32 noundef 16237, ptr noundef @__PRETTY_FUNCTION__.vmaBuildStatsString) #4
  unreachable

30:                                               ; No predecessors!
  br label %31

31:                                               ; preds = %30, %28
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %32)
  call void @_ZN16VmaStringBuilderC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %33)
  call void @llvm.lifetime.start.p0(i64 640, ptr %8) #5
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds [16 x %struct.VmaBudget], ptr %8, i64 0, i64 0
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = invoke noundef i32 @_ZNK14VmaAllocator_T18GetMemoryHeapCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %36)
          to label %38 unwind label %127

38:                                               ; preds = %31
  invoke void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916) %34, ptr noundef %35, i32 noundef 0, i32 noundef %37)
          to label %39 unwind label %127

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 3136, ptr %11) #5
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN14VmaAllocator_T19CalculateStatisticsEP18VmaTotalStatistics(ptr noundef nonnull align 8 dereferenceable(5916) %40, ptr noundef %11)
          to label %41 unwind label %131

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #5
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = invoke noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %42)
          to label %44 unwind label %135

44:                                               ; preds = %41
  invoke void @_ZN13VmaJsonWriterC1EPK21VkAllocationCallbacksR16VmaStringBuilder(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef %43, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %45 unwind label %135

45:                                               ; preds = %44
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext false)
          to label %46 unwind label %139

46:                                               ; preds = %45
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.305)
          to label %47 unwind label %139

47:                                               ; preds = %46
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext false)
          to label %48 unwind label %139

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.VmaAllocator_T, ptr %49, i32 0, i32 19
  store ptr %50, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.VmaAllocator_T, ptr %51, i32 0, i32 20
  store ptr %52, ptr %14, align 8, !tbaa !5
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.306)
          to label %53 unwind label %143

53:                                               ; preds = %48
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.307)
          to label %54 unwind label %143

54:                                               ; preds = %53
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.308)
          to label %55 unwind label %143

55:                                               ; preds = %54
  invoke void @_ZN13VmaJsonWriter11BeginStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef null)
          to label %56 unwind label %143

56:                                               ; preds = %55
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !11
  %60 = lshr i32 %59, 22
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %60)
          to label %61 unwind label %143

61:                                               ; preds = %56
  invoke void @_ZN13VmaJsonWriter14ContinueStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.309)
          to label %62 unwind label %143

62:                                               ; preds = %61
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !11
  %66 = lshr i32 %65, 12
  %67 = and i32 %66, 1023
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %67)
          to label %68 unwind label %143

68:                                               ; preds = %62
  invoke void @_ZN13VmaJsonWriter14ContinueStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.309)
          to label %69 unwind label %143

69:                                               ; preds = %68
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %73 = and i32 %72, 4095
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %73)
          to label %74 unwind label %143

74:                                               ; preds = %69
  invoke void @_ZN13VmaJsonWriter9EndStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef null)
          to label %75 unwind label %143

75:                                               ; preds = %74
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.310)
          to label %76 unwind label %143

76:                                               ; preds = %75
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %77, i32 0, i32 5
  %79 = getelementptr inbounds [256 x i8], ptr %78, i64 0, i64 0
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef %79)
          to label %80 unwind label %143

80:                                               ; preds = %76
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.311)
          to label %81 unwind label %143

81:                                               ; preds = %80
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %82, i32 0, i32 4
  %84 = load i32, ptr %83, align 8, !tbaa !18
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %84)
          to label %85 unwind label %143

85:                                               ; preds = %81
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.312)
          to label %86 unwind label %143

86:                                               ; preds = %85
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %87, i32 0, i32 7
  %89 = getelementptr inbounds %struct.VkPhysicalDeviceLimits, ptr %88, i32 0, i32 9
  %90 = load i32, ptr %89, align 4, !tbaa !19
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %90)
          to label %91 unwind label %143

91:                                               ; preds = %86
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.313)
          to label %92 unwind label %143

92:                                               ; preds = %91
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %93, i32 0, i32 7
  %95 = getelementptr inbounds %struct.VkPhysicalDeviceLimits, ptr %94, i32 0, i32 11
  %96 = load i64, ptr %95, align 8, !tbaa !20
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %12, i64 noundef %96)
          to label %97 unwind label %143

97:                                               ; preds = %92
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.314)
          to label %98 unwind label %143

98:                                               ; preds = %97
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %99, i32 0, i32 7
  %101 = getelementptr inbounds %struct.VkPhysicalDeviceLimits, ptr %100, i32 0, i32 105
  %102 = load i64, ptr %101, align 8, !tbaa !21
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %12, i64 noundef %102)
          to label %103 unwind label %143

103:                                              ; preds = %98
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.315)
          to label %104 unwind label %143

104:                                              ; preds = %103
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %105, i32 0, i32 2
  %107 = load i32, ptr %106, align 4, !tbaa !22
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %107)
          to label %108 unwind label %143

108:                                              ; preds = %104
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.316)
          to label %109 unwind label %143

109:                                              ; preds = %108
  %110 = load ptr, ptr %14, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 8, !tbaa !24
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %112)
          to label %113 unwind label %143

113:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %114 unwind label %139

114:                                              ; preds = %113
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.317)
          to label %115 unwind label %139

115:                                              ; preds = %114
  %116 = getelementptr inbounds %struct.VmaTotalStatistics, ptr %11, i32 0, i32 2
  invoke void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef nonnull align 8 dereferenceable(64) %116)
          to label %117 unwind label %139

117:                                              ; preds = %115
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.318)
          to label %118 unwind label %139

118:                                              ; preds = %117
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext false)
          to label %119 unwind label %139

119:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %120

120:                                              ; preds = %340, %119
  %121 = load i32, ptr %15, align 4, !tbaa !9
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = invoke noundef i32 @_ZNK14VmaAllocator_T18GetMemoryHeapCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %122)
          to label %124 unwind label %147

124:                                              ; preds = %120
  %125 = icmp ult i32 %121, %123
  br i1 %125, label %151, label %126

126:                                              ; preds = %124
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %345

127:                                              ; preds = %38, %31
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %9, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %10, align 4
  br label %367

131:                                              ; preds = %39
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  br label %366

135:                                              ; preds = %44, %41
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %9, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %10, align 4
  br label %365

139:                                              ; preds = %352, %349, %345, %118, %117, %115, %114, %113, %47, %46, %45
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %9, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %10, align 4
  br label %364

143:                                              ; preds = %109, %108, %104, %103, %98, %97, %92, %91, %86, %85, %81, %80, %76, %75, %74, %69, %68, %62, %61, %56, %55, %54, %53, %48
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %9, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %364

147:                                              ; preds = %338, %155, %154, %152, %151, %120
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %9, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %10, align 4
  br label %344

151:                                              ; preds = %124
  invoke void @_ZN13VmaJsonWriter11BeginStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.319)
          to label %152 unwind label %147

152:                                              ; preds = %151
  %153 = load i32, ptr %15, align 4, !tbaa !9
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %153)
          to label %154 unwind label %147

154:                                              ; preds = %152
  invoke void @_ZN13VmaJsonWriter9EndStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef null)
          to label %155 unwind label %147

155:                                              ; preds = %154
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext false)
          to label %156 unwind label %147

156:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.VmaAllocator_T, ptr %157, i32 0, i32 20
  %159 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %158, i32 0, i32 3
  %160 = load i32, ptr %15, align 4, !tbaa !9
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds [16 x %struct.VkMemoryHeap], ptr %159, i64 0, i64 %161
  store ptr %162, ptr %17, align 8, !tbaa !5
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.320)
          to label %163 unwind label %172

163:                                              ; preds = %156
  invoke void @_ZN13VmaJsonWriter10BeginArrayEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext true)
          to label %164 unwind label %172

164:                                              ; preds = %163
  %165 = load ptr, ptr %17, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.VkMemoryHeap, ptr %165, i32 0, i32 1
  %167 = load i32, ptr %166, align 8, !tbaa !25
  %168 = and i32 %167, 1
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %176

170:                                              ; preds = %164
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.321)
          to label %171 unwind label %172

171:                                              ; preds = %170
  br label %176

172:                                              ; preds = %337, %228, %227, %222, %221, %220, %214, %213, %207, %206, %205, %204, %200, %199, %198, %182, %170, %163, %156
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %9, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %10, align 4
  br label %343

176:                                              ; preds = %171, %164
  %177 = load ptr, ptr %17, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.VkMemoryHeap, ptr %177, i32 0, i32 1
  %179 = load i32, ptr %178, align 8, !tbaa !25
  %180 = and i32 %179, 2
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %184

182:                                              ; preds = %176
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.322)
          to label %183 unwind label %172

183:                                              ; preds = %182
  br label %184

184:                                              ; preds = %183, %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.VkMemoryHeap, ptr %185, i32 0, i32 1
  %187 = load i32, ptr %186, align 8, !tbaa !25
  %188 = and i32 %187, -4
  store i32 %188, ptr %18, align 4, !tbaa !9
  %189 = load i32, ptr %18, align 4, !tbaa !9
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %198

191:                                              ; preds = %184
  %192 = load i32, ptr %18, align 4, !tbaa !9
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %192)
          to label %193 unwind label %194

193:                                              ; preds = %191
  br label %198

194:                                              ; preds = %191
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %9, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %343

198:                                              ; preds = %193, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  invoke void @_ZN13VmaJsonWriter8EndArrayEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %199 unwind label %172

199:                                              ; preds = %198
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.30)
          to label %200 unwind label %172

200:                                              ; preds = %199
  %201 = load ptr, ptr %17, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.VkMemoryHeap, ptr %201, i32 0, i32 0
  %203 = load i64, ptr %202, align 8, !tbaa !27
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %12, i64 noundef %203)
          to label %204 unwind label %172

204:                                              ; preds = %200
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.323)
          to label %205 unwind label %172

205:                                              ; preds = %204
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext false)
          to label %206 unwind label %172

206:                                              ; preds = %205
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.324)
          to label %207 unwind label %172

207:                                              ; preds = %206
  %208 = load i32, ptr %15, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds [16 x %struct.VmaBudget], ptr %8, i64 0, i64 %209
  %211 = getelementptr inbounds %struct.VmaBudget, ptr %210, i32 0, i32 2
  %212 = load i64, ptr %211, align 8, !tbaa !28
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %12, i64 noundef %212)
          to label %213 unwind label %172

213:                                              ; preds = %207
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.325)
          to label %214 unwind label %172

214:                                              ; preds = %213
  %215 = load i32, ptr %15, align 4, !tbaa !9
  %216 = zext i32 %215 to i64
  %217 = getelementptr inbounds [16 x %struct.VmaBudget], ptr %8, i64 0, i64 %216
  %218 = getelementptr inbounds %struct.VmaBudget, ptr %217, i32 0, i32 1
  %219 = load i64, ptr %218, align 8, !tbaa !31
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %12, i64 noundef %219)
          to label %220 unwind label %172

220:                                              ; preds = %214
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %221 unwind label %172

221:                                              ; preds = %220
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.138)
          to label %222 unwind label %172

222:                                              ; preds = %221
  %223 = getelementptr inbounds %struct.VmaTotalStatistics, ptr %11, i32 0, i32 1
  %224 = load i32, ptr %15, align 4, !tbaa !9
  %225 = zext i32 %224 to i64
  %226 = getelementptr inbounds [16 x %struct.VmaDetailedStatistics], ptr %223, i64 0, i64 %225
  invoke void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef nonnull align 8 dereferenceable(64) %226)
          to label %227 unwind label %172

227:                                              ; preds = %222
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.326)
          to label %228 unwind label %172

228:                                              ; preds = %227
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext false)
          to label %229 unwind label %172

229:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %230

230:                                              ; preds = %333, %229
  %231 = load i32, ptr %19, align 4, !tbaa !9
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = invoke noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %232)
          to label %234 unwind label %237

234:                                              ; preds = %230
  %235 = icmp ult i32 %231, %233
  br i1 %235, label %241, label %236

236:                                              ; preds = %234
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %337

237:                                              ; preds = %330, %325, %324, %323, %254, %253, %252, %251, %249, %248, %241, %230
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %9, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %10, align 4
  br label %336

241:                                              ; preds = %234
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = load i32, ptr %19, align 4, !tbaa !9
  %244 = invoke noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %242, i32 noundef %243)
          to label %245 unwind label %237

245:                                              ; preds = %241
  %246 = load i32, ptr %15, align 4, !tbaa !9
  %247 = icmp eq i32 %244, %246
  br i1 %247, label %248, label %332

248:                                              ; preds = %245
  invoke void @_ZN13VmaJsonWriter11BeginStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.288)
          to label %249 unwind label %237

249:                                              ; preds = %248
  %250 = load i32, ptr %19, align 4, !tbaa !9
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %250)
          to label %251 unwind label %237

251:                                              ; preds = %249
  invoke void @_ZN13VmaJsonWriter9EndStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef null)
          to label %252 unwind label %237

252:                                              ; preds = %251
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext false)
          to label %253 unwind label %237

253:                                              ; preds = %252
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.320)
          to label %254 unwind label %237

254:                                              ; preds = %253
  invoke void @_ZN13VmaJsonWriter10BeginArrayEb(ptr noundef nonnull align 8 dereferenceable(41) %12, i1 noundef zeroext true)
          to label %255 unwind label %237

255:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %256 = load ptr, ptr %4, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.VmaAllocator_T, ptr %256, i32 0, i32 20
  %258 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %257, i32 0, i32 1
  %259 = load i32, ptr %19, align 4, !tbaa !9
  %260 = zext i32 %259 to i64
  %261 = getelementptr inbounds [32 x %struct.VkMemoryType], ptr %258, i64 0, i64 %260
  %262 = getelementptr inbounds %struct.VkMemoryType, ptr %261, i32 0, i32 0
  %263 = load i32, ptr %262, align 4, !tbaa !32
  store i32 %263, ptr %20, align 4, !tbaa !9
  %264 = load i32, ptr %20, align 4, !tbaa !9
  %265 = and i32 %264, 1
  %266 = icmp ne i32 %265, 0
  br i1 %266, label %267, label %273

267:                                              ; preds = %255
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.321)
          to label %268 unwind label %269

268:                                              ; preds = %267
  br label %273

269:                                              ; preds = %320, %313, %307, %301, %295, %289, %283, %277, %267
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %9, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %336

273:                                              ; preds = %268, %255
  %274 = load i32, ptr %20, align 4, !tbaa !9
  %275 = and i32 %274, 2
  %276 = icmp ne i32 %275, 0
  br i1 %276, label %277, label %279

277:                                              ; preds = %273
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.327)
          to label %278 unwind label %269

278:                                              ; preds = %277
  br label %279

279:                                              ; preds = %278, %273
  %280 = load i32, ptr %20, align 4, !tbaa !9
  %281 = and i32 %280, 4
  %282 = icmp ne i32 %281, 0
  br i1 %282, label %283, label %285

283:                                              ; preds = %279
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.328)
          to label %284 unwind label %269

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284, %279
  %286 = load i32, ptr %20, align 4, !tbaa !9
  %287 = and i32 %286, 8
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %291

289:                                              ; preds = %285
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.329)
          to label %290 unwind label %269

290:                                              ; preds = %289
  br label %291

291:                                              ; preds = %290, %285
  %292 = load i32, ptr %20, align 4, !tbaa !9
  %293 = and i32 %292, 16
  %294 = icmp ne i32 %293, 0
  br i1 %294, label %295, label %297

295:                                              ; preds = %291
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.330)
          to label %296 unwind label %269

296:                                              ; preds = %295
  br label %297

297:                                              ; preds = %296, %291
  %298 = load i32, ptr %20, align 4, !tbaa !9
  %299 = and i32 %298, 32
  %300 = icmp ne i32 %299, 0
  br i1 %300, label %301, label %303

301:                                              ; preds = %297
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.331)
          to label %302 unwind label %269

302:                                              ; preds = %301
  br label %303

303:                                              ; preds = %302, %297
  %304 = load i32, ptr %20, align 4, !tbaa !9
  %305 = and i32 %304, 64
  %306 = icmp ne i32 %305, 0
  br i1 %306, label %307, label %309

307:                                              ; preds = %303
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.332)
          to label %308 unwind label %269

308:                                              ; preds = %307
  br label %309

309:                                              ; preds = %308, %303
  %310 = load i32, ptr %20, align 4, !tbaa !9
  %311 = and i32 %310, 128
  %312 = icmp ne i32 %311, 0
  br i1 %312, label %313, label %315

313:                                              ; preds = %309
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.333)
          to label %314 unwind label %269

314:                                              ; preds = %313
  br label %315

315:                                              ; preds = %314, %309
  %316 = load i32, ptr %20, align 4, !tbaa !9
  %317 = and i32 %316, -224
  store i32 %317, ptr %20, align 4, !tbaa !9
  %318 = load i32, ptr %20, align 4, !tbaa !9
  %319 = icmp ne i32 %318, 0
  br i1 %319, label %320, label %323

320:                                              ; preds = %315
  %321 = load i32, ptr %20, align 4, !tbaa !9
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %12, i32 noundef %321)
          to label %322 unwind label %269

322:                                              ; preds = %320
  br label %323

323:                                              ; preds = %322, %315
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  invoke void @_ZN13VmaJsonWriter8EndArrayEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %324 unwind label %237

324:                                              ; preds = %323
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef @.str.138)
          to label %325 unwind label %237

325:                                              ; preds = %324
  %326 = getelementptr inbounds %struct.VmaTotalStatistics, ptr %11, i32 0, i32 0
  %327 = load i32, ptr %19, align 4, !tbaa !9
  %328 = zext i32 %327 to i64
  %329 = getelementptr inbounds [32 x %struct.VmaDetailedStatistics], ptr %326, i64 0, i64 %328
  invoke void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41) %12, ptr noundef nonnull align 8 dereferenceable(64) %329)
          to label %330 unwind label %237

330:                                              ; preds = %325
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %331 unwind label %237

331:                                              ; preds = %330
  br label %332

332:                                              ; preds = %331, %245
  br label %333

333:                                              ; preds = %332
  %334 = load i32, ptr %19, align 4, !tbaa !9
  %335 = add i32 %334, 1
  store i32 %335, ptr %19, align 4, !tbaa !9
  br label %230, !llvm.loop !34

336:                                              ; preds = %269, %237
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %343

337:                                              ; preds = %236
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %338 unwind label %172

338:                                              ; preds = %337
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %339 unwind label %147

339:                                              ; preds = %338
  br label %340

340:                                              ; preds = %339
  %341 = load i32, ptr %15, align 4, !tbaa !9
  %342 = add i32 %341, 1
  store i32 %342, ptr %15, align 4, !tbaa !9
  br label %120, !llvm.loop !36

343:                                              ; preds = %336, %194, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %344

344:                                              ; preds = %343, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %364

345:                                              ; preds = %126
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %346 unwind label %139

346:                                              ; preds = %345
  %347 = load i32, ptr %6, align 4, !tbaa !9
  %348 = icmp eq i32 %347, 1
  br i1 %348, label %349, label %352

349:                                              ; preds = %346
  %350 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN14VmaAllocator_T16PrintDetailedMapER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(5916) %350, ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %351 unwind label %139

351:                                              ; preds = %349
  br label %352

352:                                              ; preds = %351, %346
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %12)
          to label %353 unwind label %139

353:                                              ; preds = %352
  call void @_ZN13VmaJsonWriterD1Ev(ptr noundef nonnull align 8 dereferenceable(41) %12) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 3136, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 640, ptr %8) #5
  %354 = load ptr, ptr %4, align 8, !tbaa !5
  %355 = invoke noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %354)
          to label %356 unwind label %368

356:                                              ; preds = %353
  %357 = invoke noundef ptr @_ZNK16VmaStringBuilder7GetDataEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %358 unwind label %368

358:                                              ; preds = %356
  %359 = invoke noundef i64 @_ZNK16VmaStringBuilder9GetLengthEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %360 unwind label %368

360:                                              ; preds = %358
  %361 = invoke noundef ptr @_ZL19VmaCreateStringCopyPK21VkAllocationCallbacksPKcm(ptr noundef %355, ptr noundef %357, i64 noundef %359)
          to label %362 unwind label %368

362:                                              ; preds = %360
  %363 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %361, ptr %363, align 8, !tbaa !5
  call void @_ZN16VmaStringBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  ret void

364:                                              ; preds = %344, %143, %139
  call void @_ZN13VmaJsonWriterD1Ev(ptr noundef nonnull align 8 dereferenceable(41) %12) #5
  br label %365

365:                                              ; preds = %364, %135
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  br label %366

366:                                              ; preds = %365, %131
  call void @llvm.lifetime.end.p0(i64 3136, ptr %11) #5
  br label %367

367:                                              ; preds = %366, %127
  call void @llvm.lifetime.end.p0(i64 640, ptr %8) #5
  br label %372

368:                                              ; preds = %360, %358, %356, %353
  %369 = landingpad { ptr, i32 }
          cleanup
  %370 = extractvalue { ptr, i32 } %369, 0
  store ptr %370, ptr %9, align 8
  %371 = extractvalue { ptr, i32 } %369, 1
  store i32 %371, ptr %10, align 4
  br label %372

372:                                              ; preds = %368, %367
  call void @_ZN16VmaStringBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %373

373:                                              ; preds = %372
  %374 = load ptr, ptr %9, align 8
  %375 = load i32, ptr %10, align 4
  %376 = insertvalue { ptr, i32 } poison, ptr %374, 0
  %377 = insertvalue { ptr, i32 } %376, i32 %375, 1
  resume { ptr, i32 } %377
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL19VmaCreateStringCopyPK21VkAllocationCallbacksPKcm(ptr noundef, ptr noundef, i64 noundef) #2

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

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

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

declare void @_ZN13VmaJsonWriterC1EPK21VkAllocationCallbacksR16VmaStringBuilder(ptr, ptr, ptr)

declare void @_ZN13VmaJsonWriterD1Ev(ptr)

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 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 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 = { noreturn nounwind }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS26VkPhysicalDeviceProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !13, i64 16, !7, i64 20, !7, i64 276, !14, i64 296, !17, i64 800}
!13 = !{!"_ZTS20VkPhysicalDeviceType", !7, i64 0}
!14 = !{!"_ZTS22VkPhysicalDeviceLimits", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !15, i64 48, !15, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !7, i64 220, !10, i64 232, !7, i64 236, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !16, i64 268, !16, i64 272, !10, i64 276, !7, i64 280, !7, i64 288, !10, i64 296, !15, i64 304, !15, i64 312, !15, i64 320, !15, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !16, i64 352, !16, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !10, i64 404, !10, i64 408, !10, i64 412, !10, i64 416, !10, i64 420, !16, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !7, i64 444, !7, i64 452, !16, i64 460, !16, i64 464, !10, i64 468, !10, i64 472, !15, i64 480, !15, i64 488, !15, i64 496}
!15 = !{!"long", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!18 = !{!12, !13, i64 16}
!19 = !{!12, !10, i64 332}
!20 = !{!12, !15, i64 344}
!21 = !{!12, !15, i64 792}
!22 = !{!23, !10, i64 260}
!23 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !10, i64 0, !7, i64 4, !10, i64 260, !7, i64 264}
!24 = !{!23, !10, i64 0}
!25 = !{!26, !10, i64 8}
!26 = !{!"_ZTS12VkMemoryHeap", !15, i64 0, !10, i64 8}
!27 = !{!26, !15, i64 0}
!28 = !{!29, !15, i64 32}
!29 = !{!"_ZTS9VmaBudget", !30, i64 0, !15, i64 24, !15, i64 32}
!30 = !{!"_ZTS13VmaStatistics", !10, i64 0, !10, i64 4, !15, i64 8, !15, i64 16}
!31 = !{!29, !15, i64 24}
!32 = !{!33, !10, i64 0}
!33 = !{!"_ZTS12VkMemoryType", !10, i64 0, !10, i64 4}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}


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

%class.VmaStringBuilder = type { %class.VmaVector }
%class.VmaVector = type { %struct.VmaStlAllocator, ptr, i64, i64 }
%struct.VmaStlAllocator = type { ptr }
%struct.VmaBudget = type { %struct.VmaStatistics, i64, i64 }
%struct.VmaStatistics = type { i32, i32, i64, i64 }
%struct.VmaTotalStatistics = type { [32 x %struct.VmaDetailedStatistics], [16 x %struct.VmaDetailedStatistics], %struct.VmaDetailedStatistics }
%struct.VmaDetailedStatistics = type { %struct.VmaStatistics, i32, i64, i64, i64, i64 }
%class.VmaJsonWriter = type <{ ptr, %class.VmaVector.0, i8, [7 x i8] }>
%class.VmaVector.0 = type { %struct.VmaStlAllocator.1, ptr, i64, i64 }
%struct.VmaStlAllocator.1 = type { ptr }
%struct.VkMemoryHeap = type { i64, i32 }
%struct.VkMemoryType = type { i32, i32 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.288 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.vmaBuildStatsString = external hidden unnamed_addr constant [76 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.308 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.309 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.316 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.317 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.318 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.319 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.320 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.321 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.322 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.323 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.324 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.325 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.326 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.330 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.331 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.332 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.333 = external hidden unnamed_addr constant [20 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41), i1 noundef zeroext) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter10BeginArrayEb(ptr noundef nonnull align 8 dereferenceable(41), i1 noundef zeroext) local_unnamed_addr #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14VmaAllocator_T18GetMemoryHeapCountEv(ptr noundef nonnull align 8 dereferenceable(5916)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T19CalculateStatisticsEP18VmaTotalStatistics(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T16PrintDetailedMapER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @vmaBuildStatsString(ptr noundef %0, ptr noundef writeonly %1, i32 noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.VmaStringBuilder, align 8
  %5 = alloca [16 x %struct.VmaBudget], align 16
  %6 = alloca %struct.VmaTotalStatistics, align 8
  %7 = alloca %class.VmaJsonWriter, align 8
  %8 = icmp ne ptr %0, null
  %9 = icmp ne ptr %1, null
  %10 = and i1 %8, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.304, ptr noundef nonnull @.str.2, i32 noundef 16237, ptr noundef nonnull @__PRETTY_FUNCTION__.vmaBuildStatsString) #4
  unreachable

12:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %13 = tail call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  call void @_ZN16VmaStringBuilderC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %13)
  call void @llvm.lifetime.start.p0(i64 640, ptr nonnull %5) #5
  %14 = call noundef i32 @_ZNK14VmaAllocator_T18GetMemoryHeapCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  invoke void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef nonnull %5, i32 noundef 0, i32 noundef %14)
          to label %15 unwind label %76

15:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 3136, ptr nonnull %6) #5
  invoke void @_ZN14VmaAllocator_T19CalculateStatisticsEP18VmaTotalStatistics(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef nonnull %6)
          to label %16 unwind label %78

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #5
  %17 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  invoke void @_ZN13VmaJsonWriterC1EPK21VkAllocationCallbacksR16VmaStringBuilder(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef %17, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %18 unwind label %80

18:                                               ; preds = %16
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext false)
          to label %19 unwind label %82

19:                                               ; preds = %18
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.305)
          to label %20 unwind label %82

20:                                               ; preds = %19
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext false)
          to label %21 unwind label %82

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %0, i64 208
  %23 = getelementptr inbounds i8, ptr %0, i64 1032
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.306)
          to label %24 unwind label %84

24:                                               ; preds = %21
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.307)
          to label %25 unwind label %84

25:                                               ; preds = %24
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.308)
          to label %26 unwind label %84

26:                                               ; preds = %25
  invoke void @_ZN13VmaJsonWriter11BeginStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef null)
          to label %27 unwind label %84

27:                                               ; preds = %26
  %28 = load i32, ptr %22, align 8, !tbaa !5
  %29 = lshr i32 %28, 22
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %29)
          to label %30 unwind label %84

30:                                               ; preds = %27
  invoke void @_ZN13VmaJsonWriter14ContinueStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.309)
          to label %31 unwind label %84

31:                                               ; preds = %30
  %32 = load i32, ptr %22, align 8, !tbaa !5
  %33 = lshr i32 %32, 12
  %34 = and i32 %33, 1023
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %34)
          to label %35 unwind label %84

35:                                               ; preds = %31
  invoke void @_ZN13VmaJsonWriter14ContinueStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.309)
          to label %36 unwind label %84

36:                                               ; preds = %35
  %37 = load i32, ptr %22, align 8, !tbaa !5
  %38 = and i32 %37, 4095
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %38)
          to label %39 unwind label %84

39:                                               ; preds = %36
  invoke void @_ZN13VmaJsonWriter9EndStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef null)
          to label %40 unwind label %84

40:                                               ; preds = %39
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.310)
          to label %41 unwind label %84

41:                                               ; preds = %40
  %42 = getelementptr inbounds i8, ptr %0, i64 228
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull %42)
          to label %43 unwind label %84

43:                                               ; preds = %41
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.311)
          to label %44 unwind label %84

44:                                               ; preds = %43
  %45 = getelementptr inbounds i8, ptr %0, i64 224
  %46 = load i32, ptr %45, align 8, !tbaa !15
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %46)
          to label %47 unwind label %84

47:                                               ; preds = %44
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.312)
          to label %48 unwind label %84

48:                                               ; preds = %47
  %49 = getelementptr inbounds i8, ptr %0, i64 540
  %50 = load i32, ptr %49, align 4, !tbaa !16
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %50)
          to label %51 unwind label %84

51:                                               ; preds = %48
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.313)
          to label %52 unwind label %84

52:                                               ; preds = %51
  %53 = getelementptr inbounds i8, ptr %0, i64 552
  %54 = load i64, ptr %53, align 8, !tbaa !17
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %7, i64 noundef %54)
          to label %55 unwind label %84

55:                                               ; preds = %52
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.314)
          to label %56 unwind label %84

56:                                               ; preds = %55
  %57 = getelementptr inbounds i8, ptr %0, i64 1000
  %58 = load i64, ptr %57, align 8, !tbaa !18
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %7, i64 noundef %58)
          to label %59 unwind label %84

59:                                               ; preds = %56
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.315)
          to label %60 unwind label %84

60:                                               ; preds = %59
  %61 = getelementptr inbounds i8, ptr %0, i64 1292
  %62 = load i32, ptr %61, align 4, !tbaa !19
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %62)
          to label %63 unwind label %84

63:                                               ; preds = %60
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.316)
          to label %64 unwind label %84

64:                                               ; preds = %63
  %65 = load i32, ptr %23, align 8, !tbaa !21
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %65)
          to label %66 unwind label %84

66:                                               ; preds = %64
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %67 unwind label %82

67:                                               ; preds = %66
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.317)
          to label %68 unwind label %82

68:                                               ; preds = %67
  %69 = getelementptr inbounds i8, ptr %6, i64 3072
  invoke void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull align 8 dereferenceable(64) %69)
          to label %70 unwind label %82

70:                                               ; preds = %68
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.318)
          to label %71 unwind label %82

71:                                               ; preds = %70
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext false)
          to label %.preheader93 unwind label %82

.preheader93:                                     ; preds = %71
  %72 = call noundef i32 @_ZNK14VmaAllocator_T18GetMemoryHeapCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %.not98 = icmp eq i32 %72, 0
  br i1 %.not98, label %._crit_edge97, label %.lr.ph96

.lr.ph96:                                         ; preds = %.preheader93
  %73 = getelementptr inbounds i8, ptr %0, i64 1296
  %74 = getelementptr inbounds i8, ptr %6, i64 2048
  %75 = getelementptr inbounds i8, ptr %0, i64 1036
  br label %88

._crit_edge97:                                    ; preds = %188, %.preheader93
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %192 unwind label %82

76:                                               ; preds = %12
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %207

78:                                               ; preds = %15
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %206

80:                                               ; preds = %16
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %205

82:                                               ; preds = %195, %194, %._crit_edge97, %71, %70, %68, %67, %66, %20, %19, %18
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %204

84:                                               ; preds = %64, %63, %60, %59, %56, %55, %52, %51, %48, %47, %44, %43, %41, %40, %39, %36, %35, %31, %30, %27, %26, %25, %24, %21
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %204

86:                                               ; preds = %187, %92, %91, %89, %88
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %204

88:                                               ; preds = %.lr.ph96, %188
  %indvars.iv101 = phi i64 [ 0, %.lr.ph96 ], [ %indvars.iv.next102, %188 ]
  invoke void @_ZN13VmaJsonWriter11BeginStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.319)
          to label %89 unwind label %86

89:                                               ; preds = %88
  %90 = trunc nuw i64 %indvars.iv101 to i32
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %90)
          to label %91 unwind label %86

91:                                               ; preds = %89
  invoke void @_ZN13VmaJsonWriter9EndStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef null)
          to label %92 unwind label %86

92:                                               ; preds = %91
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext false)
          to label %93 unwind label %86

93:                                               ; preds = %92
  %94 = getelementptr inbounds [16 x %struct.VkMemoryHeap], ptr %73, i64 0, i64 %indvars.iv101
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.320)
          to label %95 unwind label %101

95:                                               ; preds = %93
  invoke void @_ZN13VmaJsonWriter10BeginArrayEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext true)
          to label %96 unwind label %101

96:                                               ; preds = %95
  %97 = getelementptr inbounds i8, ptr %94, i64 8
  %98 = load i32, ptr %97, align 8, !tbaa !22
  %99 = and i32 %98, 1
  %.not = icmp eq i32 %99, 0
  br i1 %.not, label %103, label %100

100:                                              ; preds = %96
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.321)
          to label %._crit_edge104 unwind label %101

._crit_edge104:                                   ; preds = %100
  %.pre = load i32, ptr %97, align 8, !tbaa !22
  br label %103

101:                                              ; preds = %._crit_edge, %133, %132, %130, %129, %128, %125, %124, %120, %119, %118, %117, %115, %114, %113, %106, %100, %95, %93
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %204

103:                                              ; preds = %._crit_edge104, %96
  %104 = phi i32 [ %.pre, %._crit_edge104 ], [ %98, %96 ]
  %105 = and i32 %104, 2
  %.not74 = icmp eq i32 %105, 0
  br i1 %.not74, label %107, label %106

106:                                              ; preds = %103
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.322)
          to label %._crit_edge105 unwind label %101

._crit_edge105:                                   ; preds = %106
  %.pre106 = load i32, ptr %97, align 8, !tbaa !22
  br label %107

107:                                              ; preds = %._crit_edge105, %103
  %108 = phi i32 [ %.pre106, %._crit_edge105 ], [ %104, %103 ]
  %109 = and i32 %108, -4
  %.not75 = icmp eq i32 %109, 0
  br i1 %.not75, label %113, label %110

110:                                              ; preds = %107
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %109)
          to label %113 unwind label %111

111:                                              ; preds = %110
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %204

113:                                              ; preds = %110, %107
  invoke void @_ZN13VmaJsonWriter8EndArrayEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %114 unwind label %101

114:                                              ; preds = %113
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.30)
          to label %115 unwind label %101

115:                                              ; preds = %114
  %116 = load i64, ptr %94, align 8, !tbaa !24
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %7, i64 noundef %116)
          to label %117 unwind label %101

117:                                              ; preds = %115
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.323)
          to label %118 unwind label %101

118:                                              ; preds = %117
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext false)
          to label %119 unwind label %101

119:                                              ; preds = %118
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.324)
          to label %120 unwind label %101

120:                                              ; preds = %119
  %121 = getelementptr inbounds [16 x %struct.VmaBudget], ptr %5, i64 0, i64 %indvars.iv101
  %122 = getelementptr inbounds i8, ptr %121, i64 32
  %123 = load i64, ptr %122, align 8, !tbaa !25
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %7, i64 noundef %123)
          to label %124 unwind label %101

124:                                              ; preds = %120
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.325)
          to label %125 unwind label %101

125:                                              ; preds = %124
  %126 = getelementptr inbounds i8, ptr %121, i64 24
  %127 = load i64, ptr %126, align 8, !tbaa !28
  invoke void @_ZN13VmaJsonWriter11WriteNumberEm(ptr noundef nonnull align 8 dereferenceable(41) %7, i64 noundef %127)
          to label %128 unwind label %101

128:                                              ; preds = %125
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %129 unwind label %101

129:                                              ; preds = %128
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.138)
          to label %130 unwind label %101

130:                                              ; preds = %129
  %131 = getelementptr inbounds [16 x %struct.VmaDetailedStatistics], ptr %74, i64 0, i64 %indvars.iv101
  invoke void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull align 8 dereferenceable(64) %131)
          to label %132 unwind label %101

132:                                              ; preds = %130
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.326)
          to label %133 unwind label %101

133:                                              ; preds = %132
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext false)
          to label %.preheader unwind label %101

.preheader:                                       ; preds = %133
  %134 = call noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %.not99 = icmp eq i32 %134, 0
  br i1 %.not99, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %183, %.preheader
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %187 unwind label %101

135:                                              ; preds = %182, %180, %179, %178, %146, %145, %144, %143, %142, %141
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %204

.lr.ph:                                           ; preds = %.preheader, %183
  %indvars.iv = phi i64 [ %indvars.iv.next, %183 ], [ 0, %.preheader ]
  %137 = trunc nuw i64 %indvars.iv to i32
  %138 = call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %0, i32 noundef %137)
  %139 = zext i32 %138 to i64
  %140 = icmp eq i64 %indvars.iv101, %139
  br i1 %140, label %141, label %183

141:                                              ; preds = %.lr.ph
  invoke void @_ZN13VmaJsonWriter11BeginStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.288)
          to label %142 unwind label %135

142:                                              ; preds = %141
  invoke void @_ZN13VmaJsonWriter14ContinueStringEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %137)
          to label %143 unwind label %135

143:                                              ; preds = %142
  invoke void @_ZN13VmaJsonWriter9EndStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef null)
          to label %144 unwind label %135

144:                                              ; preds = %143
  invoke void @_ZN13VmaJsonWriter11BeginObjectEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext false)
          to label %145 unwind label %135

145:                                              ; preds = %144
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.320)
          to label %146 unwind label %135

146:                                              ; preds = %145
  invoke void @_ZN13VmaJsonWriter10BeginArrayEb(ptr noundef nonnull align 8 dereferenceable(41) %7, i1 noundef zeroext true)
          to label %147 unwind label %135

147:                                              ; preds = %146
  %148 = getelementptr inbounds [32 x %struct.VkMemoryType], ptr %75, i64 0, i64 %indvars.iv
  %149 = load i32, ptr %148, align 4, !tbaa !29
  %150 = and i32 %149, 1
  %.not76 = icmp eq i32 %150, 0
  br i1 %.not76, label %154, label %151

151:                                              ; preds = %147
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.321)
          to label %154 unwind label %152

152:                                              ; preds = %177, %174, %171, %168, %165, %162, %159, %156, %151
  %153 = landingpad { ptr, i32 }
          cleanup
  br label %204

154:                                              ; preds = %151, %147
  %155 = and i32 %149, 2
  %.not77 = icmp eq i32 %155, 0
  br i1 %.not77, label %157, label %156

156:                                              ; preds = %154
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.327)
          to label %157 unwind label %152

157:                                              ; preds = %156, %154
  %158 = and i32 %149, 4
  %.not78 = icmp eq i32 %158, 0
  br i1 %.not78, label %160, label %159

159:                                              ; preds = %157
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.328)
          to label %160 unwind label %152

160:                                              ; preds = %159, %157
  %161 = and i32 %149, 8
  %.not79 = icmp eq i32 %161, 0
  br i1 %.not79, label %163, label %162

162:                                              ; preds = %160
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.329)
          to label %163 unwind label %152

163:                                              ; preds = %162, %160
  %164 = and i32 %149, 16
  %.not80 = icmp eq i32 %164, 0
  br i1 %.not80, label %166, label %165

165:                                              ; preds = %163
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.330)
          to label %166 unwind label %152

166:                                              ; preds = %165, %163
  %167 = and i32 %149, 32
  %.not81 = icmp eq i32 %167, 0
  br i1 %.not81, label %169, label %168

168:                                              ; preds = %166
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.331)
          to label %169 unwind label %152

169:                                              ; preds = %168, %166
  %170 = and i32 %149, 64
  %.not82 = icmp eq i32 %170, 0
  br i1 %.not82, label %172, label %171

171:                                              ; preds = %169
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.332)
          to label %172 unwind label %152

172:                                              ; preds = %171, %169
  %173 = and i32 %149, 128
  %.not83 = icmp eq i32 %173, 0
  br i1 %.not83, label %175, label %174

174:                                              ; preds = %172
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.333)
          to label %175 unwind label %152

175:                                              ; preds = %174, %172
  %176 = and i32 %149, -224
  %.not84 = icmp eq i32 %176, 0
  br i1 %.not84, label %178, label %177

177:                                              ; preds = %175
  invoke void @_ZN13VmaJsonWriter11WriteNumberEj(ptr noundef nonnull align 8 dereferenceable(41) %7, i32 noundef %176)
          to label %178 unwind label %152

178:                                              ; preds = %177, %175
  invoke void @_ZN13VmaJsonWriter8EndArrayEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %179 unwind label %135

179:                                              ; preds = %178
  invoke void @_ZN13VmaJsonWriter11WriteStringEPKc(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull @.str.138)
          to label %180 unwind label %135

180:                                              ; preds = %179
  %181 = getelementptr inbounds [32 x %struct.VmaDetailedStatistics], ptr %6, i64 0, i64 %indvars.iv
  invoke void @_ZL26VmaPrintDetailedStatisticsR13VmaJsonWriterRK21VmaDetailedStatistics(ptr noundef nonnull align 8 dereferenceable(41) %7, ptr noundef nonnull align 8 dereferenceable(64) %181)
          to label %182 unwind label %135

182:                                              ; preds = %180
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %183 unwind label %135

183:                                              ; preds = %.lr.ph, %182
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %184 = call noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %185 = zext i32 %184 to i64
  %186 = icmp ult i64 %indvars.iv.next, %185
  br i1 %186, label %.lr.ph, label %._crit_edge, !llvm.loop !31

187:                                              ; preds = %._crit_edge
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %188 unwind label %86

188:                                              ; preds = %187
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %189 = call noundef i32 @_ZNK14VmaAllocator_T18GetMemoryHeapCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %190 = zext i32 %189 to i64
  %191 = icmp ult i64 %indvars.iv.next102, %190
  br i1 %191, label %88, label %._crit_edge97, !llvm.loop !33

192:                                              ; preds = %._crit_edge97
  %193 = icmp eq i32 %2, 1
  br i1 %193, label %194, label %195

194:                                              ; preds = %192
  invoke void @_ZN14VmaAllocator_T16PrintDetailedMapER13VmaJsonWriter(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %195 unwind label %82

195:                                              ; preds = %194, %192
  invoke void @_ZN13VmaJsonWriter9EndObjectEv(ptr noundef nonnull align 8 dereferenceable(41) %7)
          to label %196 unwind label %82

196:                                              ; preds = %195
  call void @_ZN13VmaJsonWriterD1Ev(ptr noundef nonnull align 8 dereferenceable(41) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 3136, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 640, ptr nonnull %5) #5
  %197 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %198 = invoke noundef ptr @_ZNK16VmaStringBuilder7GetDataEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %199 unwind label %208

199:                                              ; preds = %196
  %200 = invoke noundef i64 @_ZNK16VmaStringBuilder9GetLengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %201 unwind label %208

201:                                              ; preds = %199
  %202 = invoke noundef ptr @_ZL19VmaCreateStringCopyPK21VkAllocationCallbacksPKcm(ptr noundef %197, ptr noundef %198, i64 noundef %200)
          to label %203 unwind label %208

203:                                              ; preds = %201
  store ptr %202, ptr %1, align 8, !tbaa !34
  call void @_ZN16VmaStringBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  ret void

204:                                              ; preds = %86, %135, %152, %111, %101, %84, %82
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %83, %82 ], [ %85, %84 ], [ %87, %86 ], [ %102, %101 ], [ %112, %111 ], [ %136, %135 ], [ %153, %152 ]
  call void @_ZN13VmaJsonWriterD1Ev(ptr noundef nonnull align 8 dereferenceable(41) %7) #5
  br label %205

205:                                              ; preds = %204, %80
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %204 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  br label %206

206:                                              ; preds = %205, %78
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %205 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 3136, ptr nonnull %6) #5
  br label %207

207:                                              ; preds = %206, %76
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %206 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 640, ptr nonnull %5) #5
  br label %210

208:                                              ; preds = %201, %199, %196
  %209 = landingpad { ptr, i32 }
          cleanup
  br label %210

210:                                              ; preds = %208, %207
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %207 ], [ %209, %208 ]
  call void @_ZN16VmaStringBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL19VmaCreateStringCopyPK21VkAllocationCallbacksPKcm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

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

declare void @_ZN13VmaJsonWriterC1EPK21VkAllocationCallbacksR16VmaStringBuilder(ptr, ptr, ptr) local_unnamed_addr

declare void @_ZN13VmaJsonWriterD1Ev(ptr) local_unnamed_addr

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 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 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 = { noreturn nounwind }
attributes #5 = { 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 = !{!"_ZTS26VkPhysicalDeviceProperties", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !8, i64 20, !8, i64 276, !11, i64 296, !14, i64 800}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS20VkPhysicalDeviceType", !8, i64 0}
!11 = !{!"_ZTS22VkPhysicalDeviceLimits", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !12, i64 48, !12, i64 56, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !7, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !7, i64 172, !7, i64 176, !7, i64 180, !7, i64 184, !7, i64 188, !7, i64 192, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !8, i64 220, !7, i64 232, !8, i64 236, !7, i64 248, !7, i64 252, !7, i64 256, !7, i64 260, !7, i64 264, !13, i64 268, !13, i64 272, !7, i64 276, !8, i64 280, !8, i64 288, !7, i64 296, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !7, i64 336, !7, i64 340, !7, i64 344, !7, i64 348, !13, i64 352, !13, i64 356, !7, i64 360, !7, i64 364, !7, i64 368, !7, i64 372, !7, i64 376, !7, i64 380, !7, i64 384, !7, i64 388, !7, i64 392, !7, i64 396, !7, i64 400, !7, i64 404, !7, i64 408, !7, i64 412, !7, i64 416, !7, i64 420, !13, i64 424, !7, i64 428, !7, i64 432, !7, i64 436, !7, i64 440, !8, i64 444, !8, i64 452, !13, i64 460, !13, i64 464, !7, i64 468, !7, i64 472, !12, i64 480, !12, i64 488, !12, i64 496}
!12 = !{!"long", !8, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !7, i64 332}
!17 = !{!6, !12, i64 344}
!18 = !{!6, !12, i64 792}
!19 = !{!20, !7, i64 260}
!20 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !7, i64 0, !8, i64 4, !7, i64 260, !8, i64 264}
!21 = !{!20, !7, i64 0}
!22 = !{!23, !7, i64 8}
!23 = !{!"_ZTS12VkMemoryHeap", !12, i64 0, !7, i64 8}
!24 = !{!23, !12, i64 0}
!25 = !{!26, !12, i64 32}
!26 = !{!"_ZTS9VmaBudget", !27, i64 0, !12, i64 24, !12, i64 32}
!27 = !{!"_ZTS13VmaStatistics", !7, i64 0, !7, i64 4, !12, i64 8, !12, i64 16}
!28 = !{!26, !12, i64 24}
!29 = !{!30, !7, i64 0}
!30 = !{!"_ZTS12VkMemoryType", !7, i64 0, !7, i64 4}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!35, !35, i64 0}
!35 = !{!"any pointer", !8, i64 0}


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