; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/dear_imgui/imgui.ll (ZN5ImGui22DestroyPlatformWindowsEv)

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

%struct.ImGuiContext = type <{ i8, i8, [6 x i8], %struct.ImGuiIO, %struct.ImGuiPlatformIO, %struct.ImGuiStyle, i32, i32, [4 x i8], ptr, float, float, %struct.ImDrawListSharedData, double, i32, i32, i32, i32, i8, i8, i8, i8, i32, ptr, %struct.ImVector.5, %struct.ImVector.5, %struct.ImVector.5, %struct.ImVector.5, %struct.ImGuiStorage, i32, [4 x i8], ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, float, i32, i32, i8, i8, [2 x i8], float, float, i32, i32, float, i8, i8, i8, i8, i8, i8, [2 x i8], i32, i32, [4 x i8], i64, %struct.ImVec2, ptr, i32, i32, i32, i8, i8, [2 x i8], ptr, i32, float, %struct.ImGuiNextWindowData, %struct.ImGuiNextItemData, [4 x i8], %struct.ImVector.6, %struct.ImVector.7, %struct.ImVector.8, %struct.ImVector.9, %struct.ImVector.9, %struct.ImVector.10, float, [4 x i8], ptr, ptr, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.ImRect, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i32, %struct.ImRect, i8, i8, [2 x i8], i32, i32, i32, i32, i32, i32, [4 x i8], %struct.ImGuiNavMoveResult, %struct.ImGuiNavMoveResult, %struct.ImGuiNavMoveResult, ptr, i32, [4 x i8], ptr, ptr, ptr, float, float, i8, [7 x i8], ptr, ptr, i32, i32, i32, i32, i8, [3 x i8], float, i32, i8, i8, i8, i8, i32, i32, i32, [4 x i8], %struct.ImGuiPayload, %struct.ImRect, i32, i32, float, i32, i32, i32, i32, [4 x i8], %struct.ImVector.11, [16 x i8], ptr, %struct.ImPool, %struct.ImVector.13, %struct.ImVector.14, %struct.ImVec2, %struct.ImGuiInputTextState, %struct.ImFont, i32, i32, float, float, [3 x float], %struct.ImVec4, float, i8, i8, [2 x i8], float, float, float, i32, [4 x i8], %struct.ImVector.2, %struct.ImVector.17, %struct.ImVec2, %struct.ImVec2, ptr, %struct.ImGuiDockContext, i8, [3 x i8], float, %struct.ImGuiTextBuffer, %struct.ImVector.20, %struct.ImChunkStream, i8, [3 x i8], i32, ptr, %struct.ImGuiTextBuffer, float, i8, [3 x i8], i32, i32, i32, i8, [3 x i8], i32, [120 x float], i32, float, i32, i32, i32, [3073 x i8], [7 x i8] }>
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, [22 x i32], float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], float, float, i32, i8, i8, i8, i8, [512 x i8], [21 x float], i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, i32, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x float], [5 x float], [5 x %struct.ImVec2], [5 x float], [512 x float], [512 x float], [21 x float], [21 x float], float, i16, %struct.ImVector }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImGuiPlatformIO = 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, %struct.ImVector.3, ptr, %struct.ImVector.4 }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImGuiStyle = type { float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, i32, float, float, float, float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, float, float, float, float, float, float, float, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, i8, i8, i8, float, float, [50 x %struct.ImVec4] }
%struct.ImDrawListSharedData = type { %struct.ImVec2, ptr, float, float, float, %struct.ImVec4, i32, [12 x %struct.ImVec2], [64 x i8], ptr }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %struct.ImVector.0 }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImGuiNextWindowData = type { i32, i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, i8, %struct.ImRect, ptr, ptr, float, i32, i32, %struct.ImGuiWindowClass, %struct.ImVec2 }
%struct.ImGuiWindowClass = type <{ i32, i32, i32, i32, i32, i32, i8, i8, [2 x i8] }>
%struct.ImGuiNextItemData = type <{ i32, float, i32, i32, i8, [3 x i8] }>
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, ptr }
%struct.ImVector.8 = type { i32, i32, ptr }
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImGuiNavMoveResult = type <{ ptr, i32, i32, float, float, float, %struct.ImRect, [4 x i8] }>
%struct.ImGuiPayload = type <{ ptr, i32, i32, i32, i32, [33 x i8], i8, i8, [5 x i8] }>
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVector.11 = type { i32, i32, ptr }
%struct.ImPool = type <{ %struct.ImVector.12, %struct.ImGuiStorage, i32, [4 x i8] }>
%struct.ImVector.12 = type { i32, i32, ptr }
%struct.ImVector.13 = type { i32, i32, ptr }
%struct.ImVector.14 = type { i32, i32, ptr }
%struct.ImGuiInputTextState = type { i32, i32, i32, %struct.ImVector, %struct.ImVector.2, %struct.ImVector.2, i8, i32, float, %"struct.ImStb::STB_TexteditState", float, i8, i8, i8, i32, ptr, ptr }
%"struct.ImStb::STB_TexteditState" = type { i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, float, %"struct.ImStb::StbUndoState" }
%"struct.ImStb::StbUndoState" = type { [99 x %"struct.ImStb::StbUndoRecord"], [999 x i16], i16, i16, i32, i32 }
%"struct.ImStb::StbUndoRecord" = type { i32, i32, i32, i32 }
%struct.ImFont = type <{ %struct.ImVector.15, float, float, %struct.ImVector, %struct.ImVector.16, ptr, %struct.ImVec2, ptr, ptr, i16, i16, i16, i8, i8, float, float, float, i32, [2 x i8], [6 x i8] }>
%struct.ImVector.15 = type { i32, i32, ptr }
%struct.ImVector.16 = type { i32, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.17 = type { i32, i32, ptr }
%struct.ImVec2 = type { float, float }
%struct.ImGuiDockContext = type <{ %struct.ImGuiStorage, %struct.ImVector.18, %struct.ImVector.19, i8, [7 x i8] }>
%struct.ImVector.18 = type { i32, i32, ptr }
%struct.ImVector.19 = type { i32, i32, ptr }
%struct.ImVector.20 = type { i32, i32, ptr }
%struct.ImChunkStream = type { %struct.ImVector.2 }
%struct.ImGuiTextBuffer = type { %struct.ImVector.2 }

@GImGui = external dso_local global ptr, align 8

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP14ImGuiViewportPEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui22DestroyPlatformWindowsEv() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  %3 = load ptr, ptr @GImGui, align 8, !tbaa !5
  store ptr %3, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %4

4:                                                ; preds = %18, %0
  %5 = load i32, ptr %2, align 4, !tbaa !9
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.ImGuiContext, ptr %6, i32 0, i32 80
  %8 = getelementptr inbounds %struct.ImVector.10, ptr %7, i32 0, i32 0
  %9 = load i32, ptr %8, align 8, !tbaa !11
  %10 = icmp slt i32 %5, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  br label %21

12:                                               ; preds = %4
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ImGuiContext, ptr %13, i32 0, i32 80
  %15 = load i32, ptr %2, align 4, !tbaa !9
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP14ImGuiViewportPEixEi(ptr noundef nonnull align 8 dereferenceable(16) %14, i32 noundef %15)
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN5ImGui21DestroyPlatformWindowEP14ImGuiViewportP(ptr noundef %17)
  br label %18

18:                                               ; preds = %12
  %19 = load i32, ptr %2, align 4, !tbaa !9
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %2, align 4, !tbaa !9
  br label %4, !llvm.loop !64

21:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui21DestroyPlatformWindowEP14ImGuiViewportP(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 = { 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 7488}
!12 = !{!"_ZTS12ImGuiContext", !13, i64 0, !13, i64 1, !14, i64 8, !19, i64 5472, !22, i64 5704, !10, i64 6692, !10, i64 6696, !6, i64 6704, !16, i64 6712, !16, i64 6716, !23, i64 6720, !25, i64 6936, !10, i64 6944, !10, i64 6948, !10, i64 6952, !10, i64 6956, !13, i64 6960, !13, i64 6961, !13, i64 6962, !13, i64 6963, !10, i64 6964, !6, i64 6968, !26, i64 6976, !26, i64 6992, !26, i64 7008, !26, i64 7024, !27, i64 7040, !10, i64 7056, !6, i64 7064, !6, i64 7072, !6, i64 7080, !6, i64 7088, !6, i64 7096, !6, i64 7104, !6, i64 7112, !15, i64 7120, !16, i64 7128, !10, i64 7132, !10, i64 7136, !13, i64 7140, !13, i64 7141, !16, i64 7144, !16, i64 7148, !10, i64 7152, !10, i64 7156, !16, i64 7160, !13, i64 7164, !13, i64 7165, !13, i64 7166, !13, i64 7167, !13, i64 7168, !13, i64 7169, !10, i64 7172, !10, i64 7176, !29, i64 7184, !15, i64 7192, !6, i64 7200, !30, i64 7208, !10, i64 7212, !10, i64 7216, !13, i64 7220, !13, i64 7221, !6, i64 7224, !10, i64 7232, !16, i64 7236, !31, i64 7240, !34, i64 7384, !35, i64 7408, !36, i64 7424, !37, i64 7440, !38, i64 7456, !38, i64 7472, !39, i64 7488, !16, i64 7504, !6, i64 7512, !6, i64 7520, !6, i64 7528, !10, i64 7536, !10, i64 7540, !6, i64 7544, !10, i64 7552, !10, i64 7556, !10, i64 7560, !10, i64 7564, !10, i64 7568, !10, i64 7572, !10, i64 7576, !10, i64 7580, !10, i64 7584, !10, i64 7588, !10, i64 7592, !30, i64 7596, !32, i64 7600, !10, i64 7616, !40, i64 7620, !10, i64 7624, !13, i64 7628, !13, i64 7629, !13, i64 7630, !13, i64 7631, !13, i64 7632, !13, i64 7633, !13, i64 7634, !10, i64 7636, !32, i64 7640, !13, i64 7656, !13, i64 7657, !10, i64 7660, !41, i64 7664, !10, i64 7668, !10, i64 7672, !10, i64 7676, !10, i64 7680, !42, i64 7688, !42, i64 7736, !42, i64 7784, !6, i64 7832, !10, i64 7840, !6, i64 7848, !6, i64 7856, !6, i64 7864, !16, i64 7872, !16, i64 7876, !13, i64 7880, !6, i64 7888, !6, i64 7896, !10, i64 7904, !10, i64 7908, !10, i64 7912, !10, i64 7916, !13, i64 7920, !16, i64 7924, !10, i64 7928, !13, i64 7932, !13, i64 7933, !13, i64 7934, !10, i64 7936, !10, i64 7940, !10, i64 7944, !43, i64 7952, !32, i64 8016, !10, i64 8032, !10, i64 8036, !16, i64 8040, !10, i64 8044, !10, i64 8048, !10, i64 8052, !10, i64 8056, !44, i64 8064, !7, i64 8080, !6, i64 8096, !45, i64 8104, !47, i64 8144, !48, i64 8160, !15, i64 8176, !49, i64 8184, !53, i64 11912, !10, i64 12032, !10, i64 12036, !16, i64 12040, !16, i64 12044, !7, i64 12048, !24, i64 12060, !16, i64 12076, !13, i64 12080, !13, i64 12081, !16, i64 12084, !16, i64 12088, !16, i64 12092, !10, i64 12096, !50, i64 12104, !56, i64 12120, !15, i64 12136, !15, i64 12144, !6, i64 12152, !57, i64 12160, !13, i64 12216, !16, i64 12220, !60, i64 12224, !61, i64 12240, !62, i64 12256, !13, i64 12272, !63, i64 12276, !6, i64 12280, !60, i64 12288, !16, i64 12304, !13, i64 12308, !10, i64 12312, !10, i64 12316, !10, i64 12320, !13, i64 12324, !10, i64 12328, !7, i64 12332, !10, i64 12812, !16, i64 12816, !10, i64 12820, !10, i64 12824, !10, i64 12828, !7, i64 12832}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTS7ImGuiIO", !10, i64 0, !10, i64 4, !15, i64 8, !16, i64 16, !16, i64 20, !6, i64 24, !6, i64 32, !16, i64 40, !16, i64 44, !16, i64 48, !7, i64 52, !16, i64 140, !16, i64 144, !6, i64 152, !6, i64 160, !16, i64 168, !13, i64 172, !6, i64 176, !15, i64 184, !13, i64 192, !13, i64 193, !13, i64 194, !13, i64 195, !13, i64 196, !13, i64 197, !13, i64 198, !13, i64 199, !13, i64 200, !13, i64 201, !13, i64 202, !13, i64 203, !13, i64 204, !16, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !15, i64 288, !7, i64 296, !16, i64 304, !16, i64 308, !10, i64 312, !13, i64 316, !13, i64 317, !13, i64 318, !13, i64 319, !7, i64 320, !7, i64 832, !13, i64 916, !13, i64 917, !13, i64 918, !13, i64 919, !13, i64 920, !13, i64 921, !13, i64 922, !16, i64 924, !10, i64 928, !10, i64 932, !10, i64 936, !10, i64 940, !10, i64 944, !15, i64 948, !10, i64 956, !15, i64 960, !7, i64 968, !7, i64 1008, !7, i64 1048, !7, i64 1053, !7, i64 1058, !7, i64 1063, !7, i64 1068, !7, i64 1076, !7, i64 1096, !7, i64 1116, !7, i64 1156, !7, i64 1176, !7, i64 3224, !7, i64 5272, !7, i64 5356, !16, i64 5440, !17, i64 5444, !18, i64 5448}
!15 = !{!"_ZTS6ImVec2", !16, i64 0, !16, i64 4}
!16 = !{!"float", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!19 = !{!"_ZTS15ImGuiPlatformIO", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !20, i64 192, !6, i64 208, !21, i64 216}
!20 = !{!"_ZTS8ImVectorI20ImGuiPlatformMonitorE", !10, i64 0, !10, i64 4, !6, i64 8}
!21 = !{!"_ZTS8ImVectorIP13ImGuiViewportE", !10, i64 0, !10, i64 4, !6, i64 8}
!22 = !{!"_ZTS10ImGuiStyle", !16, i64 0, !15, i64 4, !16, i64 12, !16, i64 16, !15, i64 20, !15, i64 28, !10, i64 36, !16, i64 40, !16, i64 44, !16, i64 48, !16, i64 52, !15, i64 56, !16, i64 64, !16, i64 68, !15, i64 72, !15, i64 80, !15, i64 88, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108, !16, i64 112, !16, i64 116, !16, i64 120, !16, i64 124, !16, i64 128, !16, i64 132, !10, i64 136, !15, i64 140, !15, i64 148, !15, i64 156, !15, i64 164, !16, i64 172, !13, i64 176, !13, i64 177, !13, i64 178, !16, i64 180, !16, i64 184, !7, i64 188}
!23 = !{!"_ZTS20ImDrawListSharedData", !15, i64 0, !6, i64 8, !16, i64 16, !16, i64 20, !16, i64 24, !24, i64 28, !10, i64 44, !7, i64 48, !7, i64 144, !6, i64 208}
!24 = !{!"_ZTS6ImVec4", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!25 = !{!"double", !7, i64 0}
!26 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !10, i64 0, !10, i64 4, !6, i64 8}
!27 = !{!"_ZTS12ImGuiStorage", !28, i64 0}
!28 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !10, i64 0, !10, i64 4, !6, i64 8}
!29 = !{!"long long", !7, i64 0}
!30 = !{!"_ZTS16ImGuiInputSource", !7, i64 0}
!31 = !{!"_ZTS19ImGuiNextWindowData", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !15, i64 20, !15, i64 28, !15, i64 36, !15, i64 44, !15, i64 52, !13, i64 60, !13, i64 61, !32, i64 64, !6, i64 80, !6, i64 88, !16, i64 96, !10, i64 100, !10, i64 104, !33, i64 108, !15, i64 136}
!32 = !{!"_ZTS6ImRect", !15, i64 0, !15, i64 8}
!33 = !{!"_ZTS16ImGuiWindowClass", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24, !13, i64 25}
!34 = !{!"_ZTS17ImGuiNextItemData", !10, i64 0, !16, i64 4, !10, i64 8, !10, i64 12, !13, i64 16}
!35 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !10, i64 0, !10, i64 4, !6, i64 8}
!36 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !10, i64 0, !10, i64 4, !6, i64 8}
!37 = !{!"_ZTS8ImVectorIP6ImFontE", !10, i64 0, !10, i64 4, !6, i64 8}
!38 = !{!"_ZTS8ImVectorI14ImGuiPopupDataE", !10, i64 0, !10, i64 4, !6, i64 8}
!39 = !{!"_ZTS8ImVectorIP14ImGuiViewportPE", !10, i64 0, !10, i64 4, !6, i64 8}
!40 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!41 = !{!"_ZTS15ImGuiNavForward", !7, i64 0}
!42 = !{!"_ZTS18ImGuiNavMoveResult", !6, i64 0, !10, i64 8, !10, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !32, i64 28}
!43 = !{!"_ZTS12ImGuiPayload", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !13, i64 57, !13, i64 58}
!44 = !{!"_ZTS8ImVectorIhE", !10, i64 0, !10, i64 4, !6, i64 8}
!45 = !{!"_ZTS6ImPoolI11ImGuiTabBarE", !46, i64 0, !27, i64 16, !10, i64 32}
!46 = !{!"_ZTS8ImVectorI11ImGuiTabBarE", !10, i64 0, !10, i64 4, !6, i64 8}
!47 = !{!"_ZTS8ImVectorI15ImGuiPtrOrIndexE", !10, i64 0, !10, i64 4, !6, i64 8}
!48 = !{!"_ZTS8ImVectorI20ImGuiShrinkWidthItemE", !10, i64 0, !10, i64 4, !6, i64 8}
!49 = !{!"_ZTS19ImGuiInputTextState", !10, i64 0, !10, i64 4, !10, i64 8, !18, i64 16, !50, i64 32, !50, i64 48, !13, i64 64, !10, i64 68, !16, i64 72, !51, i64 76, !16, i64 3696, !13, i64 3700, !13, i64 3701, !13, i64 3702, !10, i64 3704, !6, i64 3712, !6, i64 3720}
!50 = !{!"_ZTS8ImVectorIcE", !10, i64 0, !10, i64 4, !6, i64 8}
!51 = !{!"_ZTSN5ImStb17STB_TexteditStateE", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !16, i64 20, !52, i64 24}
!52 = !{!"_ZTSN5ImStb12StbUndoStateE", !7, i64 0, !7, i64 1584, !17, i64 3582, !17, i64 3584, !10, i64 3588, !10, i64 3592}
!53 = !{!"_ZTS6ImFont", !54, i64 0, !16, i64 16, !16, i64 20, !18, i64 24, !55, i64 40, !6, i64 56, !15, i64 64, !6, i64 72, !6, i64 80, !17, i64 88, !17, i64 90, !17, i64 92, !13, i64 94, !16, i64 96, !16, i64 100, !16, i64 104, !10, i64 108, !7, i64 112}
!54 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !6, i64 8}
!55 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !10, i64 0, !10, i64 4, !6, i64 8}
!56 = !{!"_ZTS8ImVectorIjE", !10, i64 0, !10, i64 4, !6, i64 8}
!57 = !{!"_ZTS16ImGuiDockContext", !27, i64 0, !58, i64 16, !59, i64 32, !13, i64 48}
!58 = !{!"_ZTS8ImVectorI16ImGuiDockRequestE", !10, i64 0, !10, i64 4, !6, i64 8}
!59 = !{!"_ZTS8ImVectorI21ImGuiDockNodeSettingsE", !10, i64 0, !10, i64 4, !6, i64 8}
!60 = !{!"_ZTS15ImGuiTextBuffer", !50, i64 0}
!61 = !{!"_ZTS8ImVectorI20ImGuiSettingsHandlerE", !10, i64 0, !10, i64 4, !6, i64 8}
!62 = !{!"_ZTS13ImChunkStreamI19ImGuiWindowSettingsE", !50, i64 0}
!63 = !{!"_ZTS12ImGuiLogType", !7, i64 0}
!64 = distinct !{!64, !65}
!65 = !{!"llvm.loop.mustprogress"}


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

@GImGui = external dso_local local_unnamed_addr global ptr, align 8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP14ImGuiViewportPEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui22DestroyPlatformWindowsEv() local_unnamed_addr #1 {
  %1 = load ptr, ptr @GImGui, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %1, i64 7488
  %3 = load i32, ptr %2, align 8, !tbaa !9
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  ret void

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.04 = phi i32 [ %7, %.lr.ph ], [ 0, %0 ]
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP14ImGuiViewportPEixEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %.04)
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  tail call void @_ZN5ImGui21DestroyPlatformWindowEP14ImGuiViewportP(ptr noundef %6)
  %7 = add nuw nsw i32 %.04, 1
  %8 = load i32, ptr %2, align 8, !tbaa !9
  %9 = icmp slt i32 %7, %8
  br i1 %9, label %.lr.ph, label %._crit_edge, !llvm.loop !63
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui21DestroyPlatformWindowEP14ImGuiViewportP(ptr noundef) local_unnamed_addr #1

attributes #0 = { inlinehint 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !13, i64 7488}
!10 = !{!"_ZTS12ImGuiContext", !11, i64 0, !11, i64 1, !12, i64 8, !18, i64 5472, !21, i64 5704, !13, i64 6692, !13, i64 6696, !6, i64 6704, !15, i64 6712, !15, i64 6716, !22, i64 6720, !24, i64 6936, !13, i64 6944, !13, i64 6948, !13, i64 6952, !13, i64 6956, !11, i64 6960, !11, i64 6961, !11, i64 6962, !11, i64 6963, !13, i64 6964, !6, i64 6968, !25, i64 6976, !25, i64 6992, !25, i64 7008, !25, i64 7024, !26, i64 7040, !13, i64 7056, !6, i64 7064, !6, i64 7072, !6, i64 7080, !6, i64 7088, !6, i64 7096, !6, i64 7104, !6, i64 7112, !14, i64 7120, !15, i64 7128, !13, i64 7132, !13, i64 7136, !11, i64 7140, !11, i64 7141, !15, i64 7144, !15, i64 7148, !13, i64 7152, !13, i64 7156, !15, i64 7160, !11, i64 7164, !11, i64 7165, !11, i64 7166, !11, i64 7167, !11, i64 7168, !11, i64 7169, !13, i64 7172, !13, i64 7176, !28, i64 7184, !14, i64 7192, !6, i64 7200, !29, i64 7208, !13, i64 7212, !13, i64 7216, !11, i64 7220, !11, i64 7221, !6, i64 7224, !13, i64 7232, !15, i64 7236, !30, i64 7240, !33, i64 7384, !34, i64 7408, !35, i64 7424, !36, i64 7440, !37, i64 7456, !37, i64 7472, !38, i64 7488, !15, i64 7504, !6, i64 7512, !6, i64 7520, !6, i64 7528, !13, i64 7536, !13, i64 7540, !6, i64 7544, !13, i64 7552, !13, i64 7556, !13, i64 7560, !13, i64 7564, !13, i64 7568, !13, i64 7572, !13, i64 7576, !13, i64 7580, !13, i64 7584, !13, i64 7588, !13, i64 7592, !29, i64 7596, !31, i64 7600, !13, i64 7616, !39, i64 7620, !13, i64 7624, !11, i64 7628, !11, i64 7629, !11, i64 7630, !11, i64 7631, !11, i64 7632, !11, i64 7633, !11, i64 7634, !13, i64 7636, !31, i64 7640, !11, i64 7656, !11, i64 7657, !13, i64 7660, !40, i64 7664, !13, i64 7668, !13, i64 7672, !13, i64 7676, !13, i64 7680, !41, i64 7688, !41, i64 7736, !41, i64 7784, !6, i64 7832, !13, i64 7840, !6, i64 7848, !6, i64 7856, !6, i64 7864, !15, i64 7872, !15, i64 7876, !11, i64 7880, !6, i64 7888, !6, i64 7896, !13, i64 7904, !13, i64 7908, !13, i64 7912, !13, i64 7916, !11, i64 7920, !15, i64 7924, !13, i64 7928, !11, i64 7932, !11, i64 7933, !11, i64 7934, !13, i64 7936, !13, i64 7940, !13, i64 7944, !42, i64 7952, !31, i64 8016, !13, i64 8032, !13, i64 8036, !15, i64 8040, !13, i64 8044, !13, i64 8048, !13, i64 8052, !13, i64 8056, !43, i64 8064, !7, i64 8080, !6, i64 8096, !44, i64 8104, !46, i64 8144, !47, i64 8160, !14, i64 8176, !48, i64 8184, !52, i64 11912, !13, i64 12032, !13, i64 12036, !15, i64 12040, !15, i64 12044, !7, i64 12048, !23, i64 12060, !15, i64 12076, !11, i64 12080, !11, i64 12081, !15, i64 12084, !15, i64 12088, !15, i64 12092, !13, i64 12096, !49, i64 12104, !55, i64 12120, !14, i64 12136, !14, i64 12144, !6, i64 12152, !56, i64 12160, !11, i64 12216, !15, i64 12220, !59, i64 12224, !60, i64 12240, !61, i64 12256, !11, i64 12272, !62, i64 12276, !6, i64 12280, !59, i64 12288, !15, i64 12304, !11, i64 12308, !13, i64 12312, !13, i64 12316, !13, i64 12320, !11, i64 12324, !13, i64 12328, !7, i64 12332, !13, i64 12812, !15, i64 12816, !13, i64 12820, !13, i64 12824, !13, i64 12828, !7, i64 12832}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTS7ImGuiIO", !13, i64 0, !13, i64 4, !14, i64 8, !15, i64 16, !15, i64 20, !6, i64 24, !6, i64 32, !15, i64 40, !15, i64 44, !15, i64 48, !7, i64 52, !15, i64 140, !15, i64 144, !6, i64 152, !6, i64 160, !15, i64 168, !11, i64 172, !6, i64 176, !14, i64 184, !11, i64 192, !11, i64 193, !11, i64 194, !11, i64 195, !11, i64 196, !11, i64 197, !11, i64 198, !11, i64 199, !11, i64 200, !11, i64 201, !11, i64 202, !11, i64 203, !11, i64 204, !15, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !14, i64 288, !7, i64 296, !15, i64 304, !15, i64 308, !13, i64 312, !11, i64 316, !11, i64 317, !11, i64 318, !11, i64 319, !7, i64 320, !7, i64 832, !11, i64 916, !11, i64 917, !11, i64 918, !11, i64 919, !11, i64 920, !11, i64 921, !11, i64 922, !15, i64 924, !13, i64 928, !13, i64 932, !13, i64 936, !13, i64 940, !13, i64 944, !14, i64 948, !13, i64 956, !14, i64 960, !7, i64 968, !7, i64 1008, !7, i64 1048, !7, i64 1053, !7, i64 1058, !7, i64 1063, !7, i64 1068, !7, i64 1076, !7, i64 1096, !7, i64 1116, !7, i64 1156, !7, i64 1176, !7, i64 3224, !7, i64 5272, !7, i64 5356, !15, i64 5440, !16, i64 5444, !17, i64 5448}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!"_ZTS8ImVectorItE", !13, i64 0, !13, i64 4, !6, i64 8}
!18 = !{!"_ZTS15ImGuiPlatformIO", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !19, i64 192, !6, i64 208, !20, i64 216}
!19 = !{!"_ZTS8ImVectorI20ImGuiPlatformMonitorE", !13, i64 0, !13, i64 4, !6, i64 8}
!20 = !{!"_ZTS8ImVectorIP13ImGuiViewportE", !13, i64 0, !13, i64 4, !6, i64 8}
!21 = !{!"_ZTS10ImGuiStyle", !15, i64 0, !14, i64 4, !15, i64 12, !15, i64 16, !14, i64 20, !14, i64 28, !13, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !14, i64 56, !15, i64 64, !15, i64 68, !14, i64 72, !14, i64 80, !14, i64 88, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112, !15, i64 116, !15, i64 120, !15, i64 124, !15, i64 128, !15, i64 132, !13, i64 136, !14, i64 140, !14, i64 148, !14, i64 156, !14, i64 164, !15, i64 172, !11, i64 176, !11, i64 177, !11, i64 178, !15, i64 180, !15, i64 184, !7, i64 188}
!22 = !{!"_ZTS20ImDrawListSharedData", !14, i64 0, !6, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !23, i64 28, !13, i64 44, !7, i64 48, !7, i64 144, !6, i64 208}
!23 = !{!"_ZTS6ImVec4", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!24 = !{!"double", !7, i64 0}
!25 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !13, i64 0, !13, i64 4, !6, i64 8}
!26 = !{!"_ZTS12ImGuiStorage", !27, i64 0}
!27 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !13, i64 0, !13, i64 4, !6, i64 8}
!28 = !{!"long long", !7, i64 0}
!29 = !{!"_ZTS16ImGuiInputSource", !7, i64 0}
!30 = !{!"_ZTS19ImGuiNextWindowData", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !14, i64 20, !14, i64 28, !14, i64 36, !14, i64 44, !14, i64 52, !11, i64 60, !11, i64 61, !31, i64 64, !6, i64 80, !6, i64 88, !15, i64 96, !13, i64 100, !13, i64 104, !32, i64 108, !14, i64 136}
!31 = !{!"_ZTS6ImRect", !14, i64 0, !14, i64 8}
!32 = !{!"_ZTS16ImGuiWindowClass", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !11, i64 24, !11, i64 25}
!33 = !{!"_ZTS17ImGuiNextItemData", !13, i64 0, !15, i64 4, !13, i64 8, !13, i64 12, !11, i64 16}
!34 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !13, i64 0, !13, i64 4, !6, i64 8}
!35 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !13, i64 0, !13, i64 4, !6, i64 8}
!36 = !{!"_ZTS8ImVectorIP6ImFontE", !13, i64 0, !13, i64 4, !6, i64 8}
!37 = !{!"_ZTS8ImVectorI14ImGuiPopupDataE", !13, i64 0, !13, i64 4, !6, i64 8}
!38 = !{!"_ZTS8ImVectorIP14ImGuiViewportPE", !13, i64 0, !13, i64 4, !6, i64 8}
!39 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!40 = !{!"_ZTS15ImGuiNavForward", !7, i64 0}
!41 = !{!"_ZTS18ImGuiNavMoveResult", !6, i64 0, !13, i64 8, !13, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !31, i64 28}
!42 = !{!"_ZTS12ImGuiPayload", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !7, i64 24, !11, i64 57, !11, i64 58}
!43 = !{!"_ZTS8ImVectorIhE", !13, i64 0, !13, i64 4, !6, i64 8}
!44 = !{!"_ZTS6ImPoolI11ImGuiTabBarE", !45, i64 0, !26, i64 16, !13, i64 32}
!45 = !{!"_ZTS8ImVectorI11ImGuiTabBarE", !13, i64 0, !13, i64 4, !6, i64 8}
!46 = !{!"_ZTS8ImVectorI15ImGuiPtrOrIndexE", !13, i64 0, !13, i64 4, !6, i64 8}
!47 = !{!"_ZTS8ImVectorI20ImGuiShrinkWidthItemE", !13, i64 0, !13, i64 4, !6, i64 8}
!48 = !{!"_ZTS19ImGuiInputTextState", !13, i64 0, !13, i64 4, !13, i64 8, !17, i64 16, !49, i64 32, !49, i64 48, !11, i64 64, !13, i64 68, !15, i64 72, !50, i64 76, !15, i64 3696, !11, i64 3700, !11, i64 3701, !11, i64 3702, !13, i64 3704, !6, i64 3712, !6, i64 3720}
!49 = !{!"_ZTS8ImVectorIcE", !13, i64 0, !13, i64 4, !6, i64 8}
!50 = !{!"_ZTSN5ImStb17STB_TexteditStateE", !13, i64 0, !13, i64 4, !13, i64 8, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !15, i64 20, !51, i64 24}
!51 = !{!"_ZTSN5ImStb12StbUndoStateE", !7, i64 0, !7, i64 1584, !16, i64 3582, !16, i64 3584, !13, i64 3588, !13, i64 3592}
!52 = !{!"_ZTS6ImFont", !53, i64 0, !15, i64 16, !15, i64 20, !17, i64 24, !54, i64 40, !6, i64 56, !14, i64 64, !6, i64 72, !6, i64 80, !16, i64 88, !16, i64 90, !16, i64 92, !11, i64 94, !15, i64 96, !15, i64 100, !15, i64 104, !13, i64 108, !7, i64 112}
!53 = !{!"_ZTS8ImVectorIfE", !13, i64 0, !13, i64 4, !6, i64 8}
!54 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !13, i64 0, !13, i64 4, !6, i64 8}
!55 = !{!"_ZTS8ImVectorIjE", !13, i64 0, !13, i64 4, !6, i64 8}
!56 = !{!"_ZTS16ImGuiDockContext", !26, i64 0, !57, i64 16, !58, i64 32, !11, i64 48}
!57 = !{!"_ZTS8ImVectorI16ImGuiDockRequestE", !13, i64 0, !13, i64 4, !6, i64 8}
!58 = !{!"_ZTS8ImVectorI21ImGuiDockNodeSettingsE", !13, i64 0, !13, i64 4, !6, i64 8}
!59 = !{!"_ZTS15ImGuiTextBuffer", !49, i64 0}
!60 = !{!"_ZTS8ImVectorI20ImGuiSettingsHandlerE", !13, i64 0, !13, i64 4, !6, i64 8}
!61 = !{!"_ZTS13ImChunkStreamI19ImGuiWindowSettingsE", !49, i64 0}
!62 = !{!"_ZTS12ImGuiLogType", !7, i64 0}
!63 = distinct !{!63, !64}
!64 = !{!"llvm.loop.mustprogress"}


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