; LLVM IR from vertver/Fresponze-old :: modules/imgui/imgui.ll (ZN5ImGui21ClosePopupsOverWindowEP11ImGuiWindowb)

; 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.ImGuiStyle, ptr, float, float, %struct.ImDrawListSharedData, double, i32, i32, i32, i8, i8, i8, i8, i32, [4 x i8], ptr, %struct.ImVector.3, %struct.ImVector.3, %struct.ImVector.3, %struct.ImVector.3, %struct.ImGuiStorage, i32, [4 x i8], ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, float, i32, i8, [3 x i8], i32, float, float, i32, i32, float, i8, i8, i8, i8, i8, [3 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.4, %struct.ImVector.5, %struct.ImVector.6, %struct.ImVector.7, %struct.ImVector.7, 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, [7 x i8], %struct.ImDrawData, %struct.ImDrawDataBuilder, float, [4 x i8], %struct.ImDrawList, %struct.ImDrawList, 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.15, [16 x i8], ptr, %struct.ImPool, %struct.ImVector.17, %struct.ImVector.18, %struct.ImVec2, %struct.ImGuiInputTextState, %struct.ImFont, i32, i32, float, float, [3 x float], %struct.ImVec4, i8, [3 x i8], float, float, float, i32, %struct.ImVector.2, %struct.ImVector.21, %struct.ImVec2, %struct.ImVec2, i8, [3 x i8], float, %struct.ImGuiTextBuffer, %struct.ImVector.22, %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, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], float, float, 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.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, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, i8, i8, i8, float, float, [48 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.3 = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %struct.ImVector.0 }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImGuiNextWindowData = type <{ i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, [3 x i8], %struct.ImRect, [4 x i8], ptr, ptr, float, %struct.ImVec2, [4 x i8] }>
%struct.ImGuiNextItemData = type <{ i32, float, i32, i32, i8, [3 x i8] }>
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, ptr }
%struct.ImGuiNavMoveResult = type <{ ptr, i32, i32, float, float, float, %struct.ImRect, [4 x i8] }>
%struct.ImDrawData = type <{ i8, [7 x i8], ptr, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, [4 x i8] }>
%struct.ImDrawDataBuilder = type { [2 x %struct.ImVector.8] }
%struct.ImVector.8 = type { i32, i32, ptr }
%struct.ImDrawList = type { %struct.ImVector.9, %struct.ImVector, %struct.ImVector.10, i32, ptr, ptr, i32, ptr, ptr, %struct.ImVector.11, %struct.ImVector.12, %struct.ImVector.13, %struct.ImDrawCmd, %struct.ImDrawListSplitter }
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImVector.11 = type { i32, i32, ptr }
%struct.ImVector.12 = type { i32, i32, ptr }
%struct.ImVector.13 = type { i32, i32, ptr }
%struct.ImDrawCmd = type { %struct.ImVec4, ptr, i32, i32, i32, ptr, ptr }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.14 }
%struct.ImVector.14 = type { i32, i32, ptr }
%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.15 = type { i32, i32, ptr }
%struct.ImPool = type <{ %struct.ImVector.16, %struct.ImGuiStorage, i32, [4 x i8] }>
%struct.ImVector.16 = type { i32, i32, ptr }
%struct.ImVector.17 = type { i32, i32, ptr }
%struct.ImVector.18 = 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, 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.19, float, float, %struct.ImVector, %struct.ImVector.20, ptr, %struct.ImVec2, ptr, ptr, i16, i16, i16, i8, i8, float, float, float, i32, [2 x i8], [6 x i8] }>
%struct.ImVector.19 = type { i32, i32, ptr }
%struct.ImVector.20 = type { i32, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.21 = type { i32, i32, ptr }
%struct.ImVec2 = type { float, float }
%struct.ImVector.22 = type { i32, i32, ptr }
%struct.ImChunkStream = type { %struct.ImVector.2 }
%struct.ImGuiTextBuffer = type { %struct.ImVector.2 }
%struct.ImGuiPopupData = type { i32, ptr, ptr, i32, i32, %struct.ImVec2, %struct.ImVec2 }
%struct.ImGuiWindow = type <{ ptr, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i16, i16, i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVector.21, %struct.ImGuiWindowTempData, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, i32, float, float, [4 x i8], %struct.ImGuiStorage, %struct.ImVector.25, float, i32, ptr, %struct.ImDrawList, ptr, ptr, ptr, ptr, ptr, [2 x i32], [2 x %struct.ImRect], i8, [3 x i8], i32, i32, [4 x i8] }>
%struct.ImGuiWindowTempData = type <{ %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, %struct.ImVec1, %struct.ImVec1, %struct.ImVec1, i32, i32, %struct.ImRect, %struct.ImRect, i32, i32, i32, i32, i32, i8, i8, i8, i8, %struct.ImVec2, %struct.ImGuiMenuColumns, i32, i32, %struct.ImVector.3, ptr, ptr, i32, i32, i32, i32, i32, float, float, [4 x i8], %struct.ImVector.23, %struct.ImVector.19, %struct.ImVector.19, %struct.ImVector.24, [6 x i16], [4 x i8] }>
%struct.ImVec1 = type { float }
%struct.ImGuiMenuColumns = type { float, float, float, [3 x float], [3 x float] }
%struct.ImVector.23 = type { i32, i32, ptr }
%struct.ImVector.24 = type { i32, i32, ptr }
%struct.ImVector.25 = type { i32, i32, ptr }

@GImGui = external dso_local global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [52 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui21ClosePopupsOverWindowEP11ImGuiWindowb = external hidden unnamed_addr constant [55 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui21ClosePopupsOverWindowEP11ImGuiWindowb(ptr noundef %0, i1 noundef zeroext %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %12 = zext i1 %1 to i8
  store i8 %12, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %13 = load ptr, ptr @GImGui, align 8, !tbaa !5
  store ptr %13, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.ImGuiContext, ptr %14, i32 0, i32 70
  %16 = getelementptr inbounds %struct.ImVector.7, ptr %15, i32 0, i32 0
  %17 = load i32, ptr %16, align 8, !tbaa !11
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  store i32 1, ptr %6, align 4
  br label %125

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !67
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %113

23:                                               ; preds = %20
  br label %24

24:                                               ; preds = %109, %23
  %25 = load i32, ptr %7, align 4, !tbaa !67
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ImGuiContext, ptr %26, i32 0, i32 70
  %28 = getelementptr inbounds %struct.ImVector.7, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !11
  %30 = icmp slt i32 %25, %29
  br i1 %30, label %31, label %112

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ImGuiContext, ptr %32, i32 0, i32 70
  %34 = load i32, ptr %7, align 4, !tbaa !67
  %35 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN8ImVectorI14ImGuiPopupDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %33, i32 noundef %34)
  store ptr %35, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ImGuiPopupData, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !68
  %39 = icmp ne ptr %38, null
  br i1 %39, label %41, label %40

40:                                               ; preds = %31
  store i32 4, ptr %6, align 4
  br label %106

41:                                               ; preds = %31
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ImGuiPopupData, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !68
  %45 = getelementptr inbounds %struct.ImGuiWindow, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 4, !tbaa !70
  %47 = and i32 %46, 67108864
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %41
  br label %52

50:                                               ; preds = %41
  call void @__assert_fail(ptr noundef @.str.130, ptr noundef @.str.3, i32 noundef 7652, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui21ClosePopupsOverWindowEP11ImGuiWindowb) #5
  unreachable

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51, %49
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImGuiPopupData, ptr %53, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !68
  %56 = getelementptr inbounds %struct.ImGuiWindow, ptr %55, i32 0, i32 2
  %57 = load i32, ptr %56, align 4, !tbaa !70
  %58 = and i32 %57, 16777216
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %52
  store i32 4, ptr %6, align 4
  br label %106

61:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  store i8 0, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %62 = load i32, ptr %7, align 4, !tbaa !67
  store i32 %62, ptr %10, align 4, !tbaa !67
  br label %63

63:                                               ; preds = %97, %61
  %64 = load i32, ptr %10, align 4, !tbaa !67
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ImGuiContext, ptr %65, i32 0, i32 70
  %67 = getelementptr inbounds %struct.ImVector.7, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !11
  %69 = icmp slt i32 %64, %68
  br i1 %69, label %70, label %74

70:                                               ; preds = %63
  %71 = load i8, ptr %9, align 1, !tbaa !9, !range !78, !noundef !79
  %72 = trunc i8 %71 to i1
  %73 = xor i1 %72, true
  br label %74

74:                                               ; preds = %70, %63
  %75 = phi i1 [ false, %63 ], [ %73, %70 ]
  br i1 %75, label %77, label %76

76:                                               ; preds = %74
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %100

77:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ImGuiContext, ptr %78, i32 0, i32 70
  %80 = load i32, ptr %10, align 4, !tbaa !67
  %81 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN8ImVectorI14ImGuiPopupDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %79, i32 noundef %80)
  %82 = getelementptr inbounds %struct.ImGuiPopupData, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !68
  store ptr %83, ptr %11, align 8, !tbaa !5
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %96

86:                                               ; preds = %77
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ImGuiWindow, ptr %87, i32 0, i32 68
  %89 = load ptr, ptr %88, align 8, !tbaa !80
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ImGuiWindow, ptr %90, i32 0, i32 68
  %92 = load ptr, ptr %91, align 8, !tbaa !80
  %93 = icmp eq ptr %89, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %86
  store i8 1, ptr %9, align 1, !tbaa !9
  br label %95

95:                                               ; preds = %94, %86
  br label %96

96:                                               ; preds = %95, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %10, align 4, !tbaa !67
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %10, align 4, !tbaa !67
  br label %63, !llvm.loop !81

100:                                              ; preds = %76
  %101 = load i8, ptr %9, align 1, !tbaa !9, !range !78, !noundef !79
  %102 = trunc i8 %101 to i1
  br i1 %102, label %104, label %103

103:                                              ; preds = %100
  store i32 2, ptr %6, align 4
  br label %105

104:                                              ; preds = %100
  store i32 0, ptr %6, align 4
  br label %105

105:                                              ; preds = %104, %103
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  br label %106

106:                                              ; preds = %105, %60, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %107 = load i32, ptr %6, align 4
  switch i32 %107, label %128 [
    i32 0, label %108
    i32 4, label %109
    i32 2, label %112
  ]

108:                                              ; preds = %106
  br label %109

109:                                              ; preds = %108, %106
  %110 = load i32, ptr %7, align 4, !tbaa !67
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !67
  br label %24, !llvm.loop !83

112:                                              ; preds = %106, %24
  br label %113

113:                                              ; preds = %112, %20
  %114 = load i32, ptr %7, align 4, !tbaa !67
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ImGuiContext, ptr %115, i32 0, i32 70
  %117 = getelementptr inbounds %struct.ImVector.7, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !11
  %119 = icmp slt i32 %114, %118
  br i1 %119, label %120, label %124

120:                                              ; preds = %113
  %121 = load i32, ptr %7, align 4, !tbaa !67
  %122 = load i8, ptr %4, align 1, !tbaa !9, !range !78, !noundef !79
  %123 = trunc i8 %122 to i1
  call void @_ZN5ImGui17ClosePopupToLevelEib(i32 noundef %121, i1 noundef zeroext %123)
  br label %124

124:                                              ; preds = %120, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  store i32 0, ptr %6, align 4
  br label %125

125:                                              ; preds = %124, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %126 = load i32, ptr %6, align 4
  switch i32 %126, label %128 [
    i32 0, label %127
    i32 1, label %127
  ]

127:                                              ; preds = %125, %125
  ret void

128:                                              ; preds = %125, %106
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui17ClosePopupToLevelEib(i32 noundef, i1 noundef zeroext) #2

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 = { 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 #4 = { nounwind }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !14, i64 7136}
!12 = !{!"_ZTS12ImGuiContext", !10, i64 0, !10, i64 1, !13, i64 8, !19, i64 5480, !6, i64 6432, !16, i64 6440, !16, i64 6444, !20, i64 6448, !22, i64 6664, !14, i64 6672, !14, i64 6676, !14, i64 6680, !10, i64 6684, !10, i64 6685, !10, i64 6686, !10, i64 6687, !14, i64 6688, !6, i64 6696, !23, i64 6704, !23, i64 6720, !23, i64 6736, !23, i64 6752, !24, i64 6768, !14, i64 6784, !6, i64 6792, !6, i64 6800, !6, i64 6808, !6, i64 6816, !6, i64 6824, !15, i64 6832, !16, i64 6840, !14, i64 6844, !10, i64 6848, !14, i64 6852, !16, i64 6856, !16, i64 6860, !14, i64 6864, !14, i64 6868, !16, i64 6872, !10, i64 6876, !10, i64 6877, !10, i64 6878, !10, i64 6879, !10, i64 6880, !14, i64 6884, !14, i64 6888, !26, i64 6896, !15, i64 6904, !6, i64 6912, !27, i64 6920, !14, i64 6924, !14, i64 6928, !10, i64 6932, !10, i64 6933, !6, i64 6936, !14, i64 6944, !16, i64 6948, !28, i64 6952, !30, i64 7064, !31, i64 7088, !32, i64 7104, !33, i64 7120, !34, i64 7136, !34, i64 7152, !6, i64 7168, !14, i64 7176, !14, i64 7180, !14, i64 7184, !14, i64 7188, !14, i64 7192, !14, i64 7196, !14, i64 7200, !14, i64 7204, !14, i64 7208, !14, i64 7212, !14, i64 7216, !27, i64 7220, !29, i64 7224, !14, i64 7240, !35, i64 7244, !14, i64 7248, !10, i64 7252, !10, i64 7253, !10, i64 7254, !10, i64 7255, !10, i64 7256, !10, i64 7257, !10, i64 7258, !14, i64 7260, !29, i64 7264, !10, i64 7280, !10, i64 7281, !14, i64 7284, !36, i64 7288, !14, i64 7292, !14, i64 7296, !14, i64 7300, !14, i64 7304, !37, i64 7312, !37, i64 7360, !37, i64 7408, !6, i64 7456, !14, i64 7464, !6, i64 7472, !6, i64 7480, !6, i64 7488, !16, i64 7496, !16, i64 7500, !10, i64 7504, !6, i64 7512, !6, i64 7520, !14, i64 7528, !14, i64 7532, !14, i64 7536, !14, i64 7540, !10, i64 7544, !38, i64 7552, !39, i64 7608, !16, i64 7640, !40, i64 7648, !40, i64 7872, !14, i64 8096, !10, i64 8100, !10, i64 8101, !10, i64 8102, !14, i64 8104, !14, i64 8108, !14, i64 8112, !49, i64 8120, !29, i64 8184, !14, i64 8200, !14, i64 8204, !16, i64 8208, !14, i64 8212, !14, i64 8216, !14, i64 8220, !14, i64 8224, !50, i64 8232, !7, i64 8248, !6, i64 8264, !51, i64 8272, !53, i64 8312, !54, i64 8328, !15, i64 8344, !55, i64 8352, !59, i64 12080, !14, i64 12200, !14, i64 12204, !16, i64 12208, !16, i64 12212, !7, i64 12216, !21, i64 12228, !10, i64 12244, !16, i64 12248, !16, i64 12252, !16, i64 12256, !14, i64 12260, !56, i64 12264, !62, i64 12280, !15, i64 12296, !15, i64 12304, !10, i64 12312, !16, i64 12316, !63, i64 12320, !64, i64 12336, !65, i64 12352, !10, i64 12368, !66, i64 12372, !6, i64 12376, !63, i64 12384, !16, i64 12400, !10, i64 12404, !14, i64 12408, !14, i64 12412, !14, i64 12416, !10, i64 12420, !14, i64 12424, !7, i64 12428, !14, i64 12908, !16, i64 12912, !14, i64 12916, !14, i64 12920, !14, i64 12924, !7, i64 12928}
!13 = !{!"_ZTS7ImGuiIO", !14, i64 0, !14, 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, !10, i64 172, !6, i64 176, !15, i64 184, !10, i64 192, !10, i64 193, !10, i64 194, !10, i64 195, !10, i64 196, !16, i64 200, !6, 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, !6, i64 288, !15, i64 296, !7, i64 304, !16, i64 312, !16, i64 316, !10, i64 320, !10, i64 321, !10, i64 322, !10, i64 323, !7, i64 324, !7, i64 836, !10, i64 920, !10, i64 921, !10, i64 922, !10, i64 923, !10, i64 924, !10, i64 925, !10, i64 926, !16, i64 928, !14, i64 932, !14, i64 936, !14, i64 940, !14, i64 944, !14, i64 948, !15, i64 952, !14, i64 960, !15, i64 964, !7, i64 972, !7, i64 1016, !7, i64 1056, !7, i64 1061, !7, i64 1066, !7, i64 1071, !7, i64 1076, !7, i64 1084, !7, i64 1104, !7, i64 1124, !7, i64 1164, !7, i64 1184, !7, i64 3232, !7, i64 5280, !7, i64 5364, !16, i64 5448, !17, i64 5452, !18, i64 5456}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTS6ImVec2", !16, i64 0, !16, i64 4}
!16 = !{!"float", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_ZTS8ImVectorItE", !14, i64 0, !14, i64 4, !6, i64 8}
!19 = !{!"_ZTS10ImGuiStyle", !16, i64 0, !15, i64 4, !16, i64 12, !16, i64 16, !15, i64 20, !15, i64 28, !14, 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, !14, i64 132, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !16, i64 168, !10, i64 172, !10, i64 173, !10, i64 174, !16, i64 176, !16, i64 180, !7, i64 184}
!20 = !{!"_ZTS20ImDrawListSharedData", !15, i64 0, !6, i64 8, !16, i64 16, !16, i64 20, !16, i64 24, !21, i64 28, !14, i64 44, !7, i64 48, !7, i64 144, !6, i64 208}
!21 = !{!"_ZTS6ImVec4", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!22 = !{!"double", !7, i64 0}
!23 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !14, i64 0, !14, i64 4, !6, i64 8}
!24 = !{!"_ZTS12ImGuiStorage", !25, i64 0}
!25 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !14, i64 0, !14, i64 4, !6, i64 8}
!26 = !{!"long long", !7, i64 0}
!27 = !{!"_ZTS16ImGuiInputSource", !7, i64 0}
!28 = !{!"_ZTS19ImGuiNextWindowData", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !10, i64 56, !29, i64 60, !6, i64 80, !6, i64 88, !16, i64 96, !15, i64 100}
!29 = !{!"_ZTS6ImRect", !15, i64 0, !15, i64 8}
!30 = !{!"_ZTS17ImGuiNextItemData", !14, i64 0, !16, i64 4, !14, i64 8, !14, i64 12, !10, i64 16}
!31 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !14, i64 0, !14, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !14, i64 0, !14, i64 4, !6, i64 8}
!33 = !{!"_ZTS8ImVectorIP6ImFontE", !14, i64 0, !14, i64 4, !6, i64 8}
!34 = !{!"_ZTS8ImVectorI14ImGuiPopupDataE", !14, i64 0, !14, i64 4, !6, i64 8}
!35 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!36 = !{!"_ZTS15ImGuiNavForward", !7, i64 0}
!37 = !{!"_ZTS18ImGuiNavMoveResult", !6, i64 0, !14, i64 8, !14, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !29, i64 28}
!38 = !{!"_ZTS10ImDrawData", !10, i64 0, !6, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !15, i64 28, !15, i64 36, !15, i64 44}
!39 = !{!"_ZTS17ImDrawDataBuilder", !7, i64 0}
!40 = !{!"_ZTS10ImDrawList", !41, i64 0, !18, i64 16, !42, i64 32, !14, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !6, i64 80, !6, i64 88, !43, i64 96, !44, i64 112, !45, i64 128, !46, i64 144, !47, i64 200}
!41 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !14, i64 0, !14, i64 4, !6, i64 8}
!42 = !{!"_ZTS8ImVectorI10ImDrawVertE", !14, i64 0, !14, i64 4, !6, i64 8}
!43 = !{!"_ZTS8ImVectorI6ImVec4E", !14, i64 0, !14, i64 4, !6, i64 8}
!44 = !{!"_ZTS8ImVectorIPvE", !14, i64 0, !14, i64 4, !6, i64 8}
!45 = !{!"_ZTS8ImVectorI6ImVec2E", !14, i64 0, !14, i64 4, !6, i64 8}
!46 = !{!"_ZTS9ImDrawCmd", !21, i64 0, !6, i64 16, !14, i64 24, !14, i64 28, !14, i64 32, !6, i64 40, !6, i64 48}
!47 = !{!"_ZTS18ImDrawListSplitter", !14, i64 0, !14, i64 4, !48, i64 8}
!48 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !14, i64 0, !14, i64 4, !6, i64 8}
!49 = !{!"_ZTS12ImGuiPayload", !6, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !7, i64 24, !10, i64 57, !10, i64 58}
!50 = !{!"_ZTS8ImVectorIhE", !14, i64 0, !14, i64 4, !6, i64 8}
!51 = !{!"_ZTS6ImPoolI11ImGuiTabBarE", !52, i64 0, !24, i64 16, !14, i64 32}
!52 = !{!"_ZTS8ImVectorI11ImGuiTabBarE", !14, i64 0, !14, i64 4, !6, i64 8}
!53 = !{!"_ZTS8ImVectorI15ImGuiPtrOrIndexE", !14, i64 0, !14, i64 4, !6, i64 8}
!54 = !{!"_ZTS8ImVectorI20ImGuiShrinkWidthItemE", !14, i64 0, !14, i64 4, !6, i64 8}
!55 = !{!"_ZTS19ImGuiInputTextState", !14, i64 0, !14, i64 4, !14, i64 8, !18, i64 16, !56, i64 32, !56, i64 48, !10, i64 64, !14, i64 68, !16, i64 72, !57, i64 76, !16, i64 3696, !10, i64 3700, !10, i64 3701, !14, i64 3704, !6, i64 3712, !6, i64 3720}
!56 = !{!"_ZTS8ImVectorIcE", !14, i64 0, !14, i64 4, !6, i64 8}
!57 = !{!"_ZTSN5ImStb17STB_TexteditStateE", !14, i64 0, !14, i64 4, !14, 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, !58, i64 24}
!58 = !{!"_ZTSN5ImStb12StbUndoStateE", !7, i64 0, !7, i64 1584, !17, i64 3582, !17, i64 3584, !14, i64 3588, !14, i64 3592}
!59 = !{!"_ZTS6ImFont", !60, i64 0, !16, i64 16, !16, i64 20, !18, i64 24, !61, i64 40, !6, i64 56, !15, i64 64, !6, i64 72, !6, i64 80, !17, i64 88, !17, i64 90, !17, i64 92, !10, i64 94, !16, i64 96, !16, i64 100, !16, i64 104, !14, i64 108, !7, i64 112}
!60 = !{!"_ZTS8ImVectorIfE", !14, i64 0, !14, i64 4, !6, i64 8}
!61 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !14, i64 0, !14, i64 4, !6, i64 8}
!62 = !{!"_ZTS8ImVectorIjE", !14, i64 0, !14, i64 4, !6, i64 8}
!63 = !{!"_ZTS15ImGuiTextBuffer", !56, i64 0}
!64 = !{!"_ZTS8ImVectorI20ImGuiSettingsHandlerE", !14, i64 0, !14, i64 4, !6, i64 8}
!65 = !{!"_ZTS13ImChunkStreamI19ImGuiWindowSettingsE", !56, i64 0}
!66 = !{!"_ZTS12ImGuiLogType", !7, i64 0}
!67 = !{!14, !14, i64 0}
!68 = !{!69, !6, i64 8}
!69 = !{!"_ZTS14ImGuiPopupData", !14, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !14, i64 28, !15, i64 32, !15, i64 40}
!70 = !{!71, !14, i64 12}
!71 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !14, i64 8, !14, i64 12, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !16, i64 64, !16, i64 68, !14, i64 72, !14, i64 76, !14, i64 80, !15, i64 84, !15, i64 92, !15, i64 100, !15, i64 108, !15, i64 116, !10, i64 124, !10, i64 125, !10, i64 126, !10, i64 127, !10, i64 128, !10, i64 129, !10, i64 130, !10, i64 131, !10, i64 132, !10, i64 133, !10, i64 134, !10, i64 135, !7, i64 136, !17, i64 138, !17, i64 140, !17, i64 142, !14, i64 144, !7, i64 148, !7, i64 149, !7, i64 150, !10, i64 151, !14, i64 152, !14, i64 156, !14, i64 160, !14, i64 164, !14, i64 168, !14, i64 172, !15, i64 176, !15, i64 184, !62, i64 192, !72, i64 208, !29, i64 536, !29, i64 552, !29, i64 568, !29, i64 584, !29, i64 600, !29, i64 616, !14, i64 632, !16, i64 636, !16, i64 640, !24, i64 648, !77, i64 664, !16, i64 680, !14, i64 684, !6, i64 688, !40, i64 696, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !7, i64 960, !7, i64 968, !10, i64 1000, !14, i64 1004, !14, i64 1008}
!72 = !{!"_ZTS19ImGuiWindowTempData", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !16, i64 48, !16, i64 52, !73, i64 56, !73, i64 60, !73, i64 64, !14, i64 68, !14, i64 72, !29, i64 76, !29, i64 92, !35, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !10, i64 128, !10, i64 129, !10, i64 130, !15, i64 132, !74, i64 140, !14, i64 176, !14, i64 180, !23, i64 184, !6, i64 200, !6, i64 208, !14, i64 216, !14, i64 220, !14, i64 224, !14, i64 228, !14, i64 232, !16, i64 236, !16, i64 240, !75, i64 248, !60, i64 264, !60, i64 280, !76, i64 296, !7, i64 312}
!73 = !{!"_ZTS6ImVec1", !16, i64 0}
!74 = !{!"_ZTS16ImGuiMenuColumns", !16, i64 0, !16, i64 4, !16, i64 8, !7, i64 12, !7, i64 24}
!75 = !{!"_ZTS8ImVectorIiE", !14, i64 0, !14, i64 4, !6, i64 8}
!76 = !{!"_ZTS8ImVectorI14ImGuiGroupDataE", !14, i64 0, !14, i64 4, !6, i64 8}
!77 = !{!"_ZTS8ImVectorI12ImGuiColumnsE", !14, i64 0, !14, i64 4, !6, i64 8}
!78 = !{i8 0, i8 2}
!79 = !{}
!80 = !{!71, !6, i64 928}
!81 = distinct !{!81, !82}
!82 = !{!"llvm.loop.mustprogress"}
!83 = distinct !{!83, !82}


; 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
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [52 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui21ClosePopupsOverWindowEP11ImGuiWindowb = external hidden unnamed_addr constant [55 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui21ClosePopupsOverWindowEP11ImGuiWindowb(ptr noundef readonly %0, i1 noundef zeroext %1) local_unnamed_addr #1 {
  %3 = load ptr, ptr @GImGui, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 7136
  %5 = load i32, ptr %4, align 8, !tbaa !9
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %40, label %7

7:                                                ; preds = %2
  %.not = icmp ne ptr %0, null
  %8 = icmp sgt i32 %5, 0
  %or.cond = and i1 %.not, %8
  br i1 %or.cond, label %.lr.ph46, label %.loopexit

.lr.ph46:                                         ; preds = %7
  %9 = getelementptr inbounds i8, ptr %0, i64 928
  br label %10

10:                                               ; preds = %.lr.ph46, %.thread
  %.02845 = phi i32 [ 0, %.lr.ph46 ], [ %35, %.thread ]
  %11 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN8ImVectorI14ImGuiPopupDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %.02845)
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !66
  %.not32 = icmp eq ptr %13, null
  br i1 %.not32, label %..thread_crit_edge, label %14

..thread_crit_edge:                               ; preds = %10
  %.pre = load i32, ptr %4, align 8, !tbaa !9
  br label %.thread

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %13, i64 12
  %16 = load i32, ptr %15, align 4, !tbaa !68
  %17 = and i32 %16, 67108864
  %.not33 = icmp eq i32 %17, 0
  br i1 %.not33, label %18, label %19

18:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.130, ptr noundef nonnull @.str.3, i32 noundef 7652, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui21ClosePopupsOverWindowEP11ImGuiWindowb) #3
  unreachable

19:                                               ; preds = %14
  %20 = and i32 %16, 16777216
  %.not34 = icmp eq i32 %20, 0
  %.pre51 = load i32, ptr %4, align 8, !tbaa !9
  br i1 %.not34, label %.preheader, label %.thread

.preheader:                                       ; preds = %19
  %.not50 = icmp slt i32 %.02845, %.pre51
  br i1 %.not50, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %.lr.ph.backedge
  %.02544 = phi i32 [ %.02544.be, %.lr.ph.backedge ], [ %.02845, %.preheader ]
  %21 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN8ImVectorI14ImGuiPopupDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %.02544)
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !66
  %.not37 = icmp eq ptr %23, null
  br i1 %.not37, label %.thread52, label %24

24:                                               ; preds = %.lr.ph
  %25 = getelementptr inbounds i8, ptr %23, i64 928
  %26 = load ptr, ptr %25, align 8, !tbaa !76
  %27 = load ptr, ptr %9, align 8, !tbaa !76
  %28 = icmp eq ptr %26, %27
  %29 = add nuw nsw i32 %.02544, 1
  %30 = load i32, ptr %4, align 8, !tbaa !9
  %31 = icmp sge i32 %29, %30
  %.not36 = select i1 %31, i1 true, i1 %28
  br i1 %.not36, label %._crit_edge, label %.lr.ph.backedge

.lr.ph.backedge:                                  ; preds = %24, %.thread52
  %.02544.be = phi i32 [ %29, %24 ], [ %32, %.thread52 ]
  br label %.lr.ph, !llvm.loop !77

.thread52:                                        ; preds = %.lr.ph
  %32 = add nuw nsw i32 %.02544, 1
  %33 = load i32, ptr %4, align 8, !tbaa !9
  %.not62 = icmp slt i32 %32, %33
  br i1 %.not62, label %.lr.ph.backedge, label %.loopexit

._crit_edge:                                      ; preds = %24
  br i1 %28, label %.thread, label %.loopexit

.thread:                                          ; preds = %..thread_crit_edge, %19, %._crit_edge
  %34 = phi i32 [ %.pre, %..thread_crit_edge ], [ %.pre51, %19 ], [ %30, %._crit_edge ]
  %35 = add nuw nsw i32 %.02845, 1
  %36 = icmp slt i32 %35, %34
  br i1 %36, label %10, label %.loopexit, !llvm.loop !79

.loopexit:                                        ; preds = %.thread, %.preheader, %._crit_edge, %.thread52, %7
  %37 = phi i32 [ %5, %7 ], [ %33, %.thread52 ], [ %34, %.thread ], [ %30, %._crit_edge ], [ %.pre51, %.preheader ]
  %.129 = phi i32 [ 0, %7 ], [ %.02845, %.thread52 ], [ %35, %.thread ], [ %.02845, %._crit_edge ], [ %.02845, %.preheader ]
  %38 = icmp slt i32 %.129, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %.loopexit
  tail call void @_ZN5ImGui17ClosePopupToLevelEib(i32 noundef %.129, i1 noundef zeroext %1)
  br label %40

40:                                               ; preds = %.loopexit, %39, %2
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui17ClosePopupToLevelEib(i32 noundef, i1 noundef zeroext) local_unnamed_addr #1

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 7136}
!10 = !{!"_ZTS12ImGuiContext", !11, i64 0, !11, i64 1, !12, i64 8, !18, i64 5480, !6, i64 6432, !15, i64 6440, !15, i64 6444, !19, i64 6448, !21, i64 6664, !13, i64 6672, !13, i64 6676, !13, i64 6680, !11, i64 6684, !11, i64 6685, !11, i64 6686, !11, i64 6687, !13, i64 6688, !6, i64 6696, !22, i64 6704, !22, i64 6720, !22, i64 6736, !22, i64 6752, !23, i64 6768, !13, i64 6784, !6, i64 6792, !6, i64 6800, !6, i64 6808, !6, i64 6816, !6, i64 6824, !14, i64 6832, !15, i64 6840, !13, i64 6844, !11, i64 6848, !13, i64 6852, !15, i64 6856, !15, i64 6860, !13, i64 6864, !13, i64 6868, !15, i64 6872, !11, i64 6876, !11, i64 6877, !11, i64 6878, !11, i64 6879, !11, i64 6880, !13, i64 6884, !13, i64 6888, !25, i64 6896, !14, i64 6904, !6, i64 6912, !26, i64 6920, !13, i64 6924, !13, i64 6928, !11, i64 6932, !11, i64 6933, !6, i64 6936, !13, i64 6944, !15, i64 6948, !27, i64 6952, !29, i64 7064, !30, i64 7088, !31, i64 7104, !32, i64 7120, !33, i64 7136, !33, i64 7152, !6, i64 7168, !13, i64 7176, !13, i64 7180, !13, i64 7184, !13, i64 7188, !13, i64 7192, !13, i64 7196, !13, i64 7200, !13, i64 7204, !13, i64 7208, !13, i64 7212, !13, i64 7216, !26, i64 7220, !28, i64 7224, !13, i64 7240, !34, i64 7244, !13, i64 7248, !11, i64 7252, !11, i64 7253, !11, i64 7254, !11, i64 7255, !11, i64 7256, !11, i64 7257, !11, i64 7258, !13, i64 7260, !28, i64 7264, !11, i64 7280, !11, i64 7281, !13, i64 7284, !35, i64 7288, !13, i64 7292, !13, i64 7296, !13, i64 7300, !13, i64 7304, !36, i64 7312, !36, i64 7360, !36, i64 7408, !6, i64 7456, !13, i64 7464, !6, i64 7472, !6, i64 7480, !6, i64 7488, !15, i64 7496, !15, i64 7500, !11, i64 7504, !6, i64 7512, !6, i64 7520, !13, i64 7528, !13, i64 7532, !13, i64 7536, !13, i64 7540, !11, i64 7544, !37, i64 7552, !38, i64 7608, !15, i64 7640, !39, i64 7648, !39, i64 7872, !13, i64 8096, !11, i64 8100, !11, i64 8101, !11, i64 8102, !13, i64 8104, !13, i64 8108, !13, i64 8112, !48, i64 8120, !28, i64 8184, !13, i64 8200, !13, i64 8204, !15, i64 8208, !13, i64 8212, !13, i64 8216, !13, i64 8220, !13, i64 8224, !49, i64 8232, !7, i64 8248, !6, i64 8264, !50, i64 8272, !52, i64 8312, !53, i64 8328, !14, i64 8344, !54, i64 8352, !58, i64 12080, !13, i64 12200, !13, i64 12204, !15, i64 12208, !15, i64 12212, !7, i64 12216, !20, i64 12228, !11, i64 12244, !15, i64 12248, !15, i64 12252, !15, i64 12256, !13, i64 12260, !55, i64 12264, !61, i64 12280, !14, i64 12296, !14, i64 12304, !11, i64 12312, !15, i64 12316, !62, i64 12320, !63, i64 12336, !64, i64 12352, !11, i64 12368, !65, i64 12372, !6, i64 12376, !62, i64 12384, !15, i64 12400, !11, i64 12404, !13, i64 12408, !13, i64 12412, !13, i64 12416, !11, i64 12420, !13, i64 12424, !7, i64 12428, !13, i64 12908, !15, i64 12912, !13, i64 12916, !13, i64 12920, !13, i64 12924, !7, i64 12928}
!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, !15, i64 200, !6, 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, !6, i64 288, !14, i64 296, !7, i64 304, !15, i64 312, !15, i64 316, !11, i64 320, !11, i64 321, !11, i64 322, !11, i64 323, !7, i64 324, !7, i64 836, !11, i64 920, !11, i64 921, !11, i64 922, !11, i64 923, !11, i64 924, !11, i64 925, !11, i64 926, !15, i64 928, !13, i64 932, !13, i64 936, !13, i64 940, !13, i64 944, !13, i64 948, !14, i64 952, !13, i64 960, !14, i64 964, !7, i64 972, !7, i64 1016, !7, i64 1056, !7, i64 1061, !7, i64 1066, !7, i64 1071, !7, i64 1076, !7, i64 1084, !7, i64 1104, !7, i64 1124, !7, i64 1164, !7, i64 1184, !7, i64 3232, !7, i64 5280, !7, i64 5364, !15, i64 5448, !16, i64 5452, !17, i64 5456}
!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 = !{!"_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, !13, i64 132, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !15, i64 168, !11, i64 172, !11, i64 173, !11, i64 174, !15, i64 176, !15, i64 180, !7, i64 184}
!19 = !{!"_ZTS20ImDrawListSharedData", !14, i64 0, !6, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !20, i64 28, !13, i64 44, !7, i64 48, !7, i64 144, !6, i64 208}
!20 = !{!"_ZTS6ImVec4", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !13, i64 0, !13, i64 4, !6, i64 8}
!23 = !{!"_ZTS12ImGuiStorage", !24, i64 0}
!24 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !13, i64 0, !13, i64 4, !6, i64 8}
!25 = !{!"long long", !7, i64 0}
!26 = !{!"_ZTS16ImGuiInputSource", !7, i64 0}
!27 = !{!"_ZTS19ImGuiNextWindowData", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !11, i64 56, !28, i64 60, !6, i64 80, !6, i64 88, !15, i64 96, !14, i64 100}
!28 = !{!"_ZTS6ImRect", !14, i64 0, !14, i64 8}
!29 = !{!"_ZTS17ImGuiNextItemData", !13, i64 0, !15, i64 4, !13, i64 8, !13, i64 12, !11, i64 16}
!30 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !13, i64 0, !13, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !13, i64 0, !13, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorIP6ImFontE", !13, i64 0, !13, i64 4, !6, i64 8}
!33 = !{!"_ZTS8ImVectorI14ImGuiPopupDataE", !13, i64 0, !13, i64 4, !6, i64 8}
!34 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!35 = !{!"_ZTS15ImGuiNavForward", !7, i64 0}
!36 = !{!"_ZTS18ImGuiNavMoveResult", !6, i64 0, !13, i64 8, !13, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !28, i64 28}
!37 = !{!"_ZTS10ImDrawData", !11, i64 0, !6, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !14, i64 28, !14, i64 36, !14, i64 44}
!38 = !{!"_ZTS17ImDrawDataBuilder", !7, i64 0}
!39 = !{!"_ZTS10ImDrawList", !40, i64 0, !17, i64 16, !41, i64 32, !13, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !6, i64 80, !6, i64 88, !42, i64 96, !43, i64 112, !44, i64 128, !45, i64 144, !46, i64 200}
!40 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !13, i64 0, !13, i64 4, !6, i64 8}
!41 = !{!"_ZTS8ImVectorI10ImDrawVertE", !13, i64 0, !13, i64 4, !6, i64 8}
!42 = !{!"_ZTS8ImVectorI6ImVec4E", !13, i64 0, !13, i64 4, !6, i64 8}
!43 = !{!"_ZTS8ImVectorIPvE", !13, i64 0, !13, i64 4, !6, i64 8}
!44 = !{!"_ZTS8ImVectorI6ImVec2E", !13, i64 0, !13, i64 4, !6, i64 8}
!45 = !{!"_ZTS9ImDrawCmd", !20, i64 0, !6, i64 16, !13, i64 24, !13, i64 28, !13, i64 32, !6, i64 40, !6, i64 48}
!46 = !{!"_ZTS18ImDrawListSplitter", !13, i64 0, !13, i64 4, !47, i64 8}
!47 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !13, i64 0, !13, i64 4, !6, i64 8}
!48 = !{!"_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}
!49 = !{!"_ZTS8ImVectorIhE", !13, i64 0, !13, i64 4, !6, i64 8}
!50 = !{!"_ZTS6ImPoolI11ImGuiTabBarE", !51, i64 0, !23, i64 16, !13, i64 32}
!51 = !{!"_ZTS8ImVectorI11ImGuiTabBarE", !13, i64 0, !13, i64 4, !6, i64 8}
!52 = !{!"_ZTS8ImVectorI15ImGuiPtrOrIndexE", !13, i64 0, !13, i64 4, !6, i64 8}
!53 = !{!"_ZTS8ImVectorI20ImGuiShrinkWidthItemE", !13, i64 0, !13, i64 4, !6, i64 8}
!54 = !{!"_ZTS19ImGuiInputTextState", !13, i64 0, !13, i64 4, !13, i64 8, !17, i64 16, !55, i64 32, !55, i64 48, !11, i64 64, !13, i64 68, !15, i64 72, !56, i64 76, !15, i64 3696, !11, i64 3700, !11, i64 3701, !13, i64 3704, !6, i64 3712, !6, i64 3720}
!55 = !{!"_ZTS8ImVectorIcE", !13, i64 0, !13, i64 4, !6, i64 8}
!56 = !{!"_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, !57, i64 24}
!57 = !{!"_ZTSN5ImStb12StbUndoStateE", !7, i64 0, !7, i64 1584, !16, i64 3582, !16, i64 3584, !13, i64 3588, !13, i64 3592}
!58 = !{!"_ZTS6ImFont", !59, i64 0, !15, i64 16, !15, i64 20, !17, i64 24, !60, 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}
!59 = !{!"_ZTS8ImVectorIfE", !13, i64 0, !13, i64 4, !6, i64 8}
!60 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !13, i64 0, !13, i64 4, !6, i64 8}
!61 = !{!"_ZTS8ImVectorIjE", !13, i64 0, !13, i64 4, !6, i64 8}
!62 = !{!"_ZTS15ImGuiTextBuffer", !55, i64 0}
!63 = !{!"_ZTS8ImVectorI20ImGuiSettingsHandlerE", !13, i64 0, !13, i64 4, !6, i64 8}
!64 = !{!"_ZTS13ImChunkStreamI19ImGuiWindowSettingsE", !55, i64 0}
!65 = !{!"_ZTS12ImGuiLogType", !7, i64 0}
!66 = !{!67, !6, i64 8}
!67 = !{!"_ZTS14ImGuiPopupData", !13, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 28, !14, i64 32, !14, i64 40}
!68 = !{!69, !13, i64 12}
!69 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !13, i64 8, !13, i64 12, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !15, i64 64, !15, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !14, i64 84, !14, i64 92, !14, i64 100, !14, i64 108, !14, i64 116, !11, i64 124, !11, i64 125, !11, i64 126, !11, i64 127, !11, i64 128, !11, i64 129, !11, i64 130, !11, i64 131, !11, i64 132, !11, i64 133, !11, i64 134, !11, i64 135, !7, i64 136, !16, i64 138, !16, i64 140, !16, i64 142, !13, i64 144, !7, i64 148, !7, i64 149, !7, i64 150, !11, i64 151, !13, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !13, i64 172, !14, i64 176, !14, i64 184, !61, i64 192, !70, i64 208, !28, i64 536, !28, i64 552, !28, i64 568, !28, i64 584, !28, i64 600, !28, i64 616, !13, i64 632, !15, i64 636, !15, i64 640, !23, i64 648, !75, i64 664, !15, i64 680, !13, i64 684, !6, i64 688, !39, i64 696, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !7, i64 960, !7, i64 968, !11, i64 1000, !13, i64 1004, !13, i64 1008}
!70 = !{!"_ZTS19ImGuiWindowTempData", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !15, i64 48, !15, i64 52, !71, i64 56, !71, i64 60, !71, i64 64, !13, i64 68, !13, i64 72, !28, i64 76, !28, i64 92, !34, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !11, i64 128, !11, i64 129, !11, i64 130, !14, i64 132, !72, i64 140, !13, i64 176, !13, i64 180, !22, i64 184, !6, i64 200, !6, i64 208, !13, i64 216, !13, i64 220, !13, i64 224, !13, i64 228, !13, i64 232, !15, i64 236, !15, i64 240, !73, i64 248, !59, i64 264, !59, i64 280, !74, i64 296, !7, i64 312}
!71 = !{!"_ZTS6ImVec1", !15, i64 0}
!72 = !{!"_ZTS16ImGuiMenuColumns", !15, i64 0, !15, i64 4, !15, i64 8, !7, i64 12, !7, i64 24}
!73 = !{!"_ZTS8ImVectorIiE", !13, i64 0, !13, i64 4, !6, i64 8}
!74 = !{!"_ZTS8ImVectorI14ImGuiGroupDataE", !13, i64 0, !13, i64 4, !6, i64 8}
!75 = !{!"_ZTS8ImVectorI12ImGuiColumnsE", !13, i64 0, !13, i64 4, !6, i64 8}
!76 = !{!69, !6, i64 928}
!77 = distinct !{!77, !78}
!78 = !{!"llvm.loop.mustprogress"}
!79 = distinct !{!79, !78}


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