; LLVM IR from Eukky/TRender :: lib/imgui/imgui.ll (ZN5ImGui8ShutdownEP12ImGuiContext)

; 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, float, i32, i32, i32, %class.ImVector, %class.ImVector, %class.ImVector, %struct.ImGuiStorage, i32, [4 x i8], ptr, ptr, ptr, i32, i8, [3 x i8], i32, float, i32, i32, float, i8, i8, i8, i8, i8, i8, [2 x i8], i32, %struct.ImVec2, ptr, ptr, i32, i32, float, [4 x i8], ptr, %class.ImVector.1, %class.ImVector.2, %class.ImVector.3, %class.ImVector.4, %class.ImVector.4, %struct.ImGuiNextWindowData, i8, [3 x i8], i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.ImRect, i32, ptr, float, float, i8, [3 x i8], i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i32, %struct.ImRect, i8, i8, [2 x i8], i32, i32, i32, i32, i32, %struct.ImGuiNavMoveResult, %struct.ImGuiNavMoveResult, %struct.ImGuiNavMoveResult, %struct.ImDrawData, %struct.ImDrawDataBuilder, float, [4 x i8], %struct.ImDrawList, i32, i8, [3 x i8], i32, i32, %struct.ImGuiPayload, %struct.ImRect, i32, i32, float, i32, i32, i32, %class.ImVector.13, [8 x i8], %struct.ImGuiTextEditState, %struct.ImFont, i32, i32, %struct.ImVec4, i8, [3 x i8], float, float, %struct.ImVec2, i32, %class.ImVector.14, %struct.ImVec2, %struct.ImVec2, i8, [3 x i8], float, %struct.ImGuiTextBuffer, %class.ImVector.17, %class.ImVector.18, i8, [7 x i8], ptr, %struct.ImGuiTextBuffer, i32, i32, [120 x float], i32, float, i32, i32, i32, [3073 x i8], [3 x i8] }>
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, [21 x i32], float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], float, float, i8, i8, i8, i8, i8, [512 x i8], [17 x i16], [21 x float], i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, [5 x %struct.ImVec2], [5 x float], [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] }
%struct.ImGuiStyle = type { float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, float, float, float, float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, float, float, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, i8, i8, float, [42 x %struct.ImVec4] }
%struct.ImDrawListSharedData = type { %struct.ImVec2, ptr, float, float, %struct.ImVec4, [12 x %struct.ImVec2] }
%class.ImVector = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %class.ImVector.0 }
%class.ImVector.0 = type { i32, i32, ptr }
%class.ImVector.1 = type { i32, i32, ptr }
%class.ImVector.2 = type { i32, i32, ptr }
%class.ImVector.3 = type { i32, i32, ptr }
%class.ImVector.4 = type { i32, i32, ptr }
%struct.ImGuiNextWindowData = type <{ i32, i32, i32, i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, [3 x i8], %struct.ImRect, ptr, ptr, float, %struct.ImVec2, [4 x i8] }>
%struct.ImGuiNavMoveResult = type <{ i32, [4 x i8], ptr, float, float, float, %struct.ImRect, [4 x i8] }>
%struct.ImDrawData = type <{ i8, [7 x i8], ptr, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, [4 x i8] }>
%struct.ImDrawDataBuilder = type { [2 x %class.ImVector.5] }
%class.ImVector.5 = type { i32, i32, ptr }
%struct.ImDrawList = type { %class.ImVector.6, %class.ImVector.7, %class.ImVector.8, i32, ptr, ptr, i32, ptr, ptr, %class.ImVector.9, %class.ImVector.10, %class.ImVector.11, i32, i32, %class.ImVector.12 }
%class.ImVector.6 = type { i32, i32, ptr }
%class.ImVector.7 = type { i32, i32, ptr }
%class.ImVector.8 = type { i32, i32, ptr }
%class.ImVector.9 = type { i32, i32, ptr }
%class.ImVector.10 = type { i32, i32, ptr }
%class.ImVector.11 = type { i32, i32, ptr }
%class.ImVector.12 = 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 }
%class.ImVector.13 = type { i32, i32, ptr }
%struct.ImGuiTextEditState = type <{ i32, [4 x i8], %class.ImVector.7, %class.ImVector.14, %class.ImVector.14, i32, i32, i32, float, %"struct.ImGuiStb::STB_TexteditState", float, i8, i8, [6 x i8] }>
%"struct.ImGuiStb::STB_TexteditState" = type { i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, float, %"struct.ImGuiStb::StbUndoState" }
%"struct.ImGuiStb::StbUndoState" = type { [99 x %"struct.ImGuiStb::StbUndoRecord"], [999 x i16], i16, i16, i32, i32 }
%"struct.ImGuiStb::StbUndoRecord" = type { i32, i32, i32, i32 }
%struct.ImFont = type { float, float, %struct.ImVec2, %class.ImVector.15, %class.ImVector.16, %class.ImVector.7, ptr, float, i16, i16, ptr, ptr, float, float, i8, i32 }
%class.ImVector.15 = type { i32, i32, ptr }
%class.ImVector.16 = type { i32, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }
%class.ImVector.14 = type { i32, i32, ptr }
%struct.ImVec2 = type { float, float }
%class.ImVector.17 = type { i32, i32, ptr }
%class.ImVector.18 = type { i32, i32, ptr }
%struct.ImGuiTextBuffer = type { %class.ImVector.14 }
%struct.ImGuiWindowSettings = type <{ ptr, i32, %struct.ImVec2, %struct.ImVec2, i8, [3 x i8] }>

@stdout = external 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

declare i32 @fclose(ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui8ShutdownEP12ImGuiContext(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %7, ptr %3, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.ImGuiContext, ptr %8, i32 0, i32 3
  %10 = getelementptr inbounds %struct.ImGuiIO, ptr %9, i32 0, i32 14
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %23

13:                                               ; preds = %1
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.ImGuiContext, ptr %14, i32 0, i32 1
  %16 = load i8, ptr %15, align 1, !tbaa !54, !range !55, !noundef !56
  %17 = trunc i8 %16 to i1
  br i1 %17, label %18, label %23

18:                                               ; preds = %13
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ImGuiContext, ptr %19, i32 0, i32 3
  %21 = getelementptr inbounds %struct.ImGuiIO, ptr %20, i32 0, i32 14
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  call void @_Z9IM_DELETEI11ImFontAtlasEvPT_(ptr noundef %22)
  br label %23

23:                                               ; preds = %18, %13, %1
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImGuiContext, ptr %24, i32 0, i32 3
  %26 = getelementptr inbounds %struct.ImGuiIO, ptr %25, i32 0, i32 14
  store ptr null, ptr %26, align 8, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ImGuiContext, ptr %27, i32 0, i32 0
  %29 = load i8, ptr %28, align 8, !tbaa !57, !range !55, !noundef !56
  %30 = trunc i8 %29 to i1
  br i1 %30, label %32, label %31

31:                                               ; preds = %23
  store i32 1, ptr %4, align 4
  br label %159

32:                                               ; preds = %23
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ImGuiContext, ptr %33, i32 0, i32 129
  %35 = load i8, ptr %34, align 8, !tbaa !58, !range !55, !noundef !56
  %36 = trunc i8 %35 to i1
  br i1 %36, label %37, label %48

37:                                               ; preds = %32
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.ImGuiContext, ptr %38, i32 0, i32 3
  %40 = getelementptr inbounds %struct.ImGuiIO, ptr %39, i32 0, i32 5
  %41 = load ptr, ptr %40, align 8, !tbaa !59
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %48

43:                                               ; preds = %37
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImGuiContext, ptr %44, i32 0, i32 3
  %46 = getelementptr inbounds %struct.ImGuiIO, ptr %45, i32 0, i32 5
  %47 = load ptr, ptr %46, align 8, !tbaa !59
  call void @_ZN5ImGui21SaveIniSettingsToDiskEPKc(ptr noundef %47)
  br label %48

48:                                               ; preds = %43, %37, %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !60
  br label %49

49:                                               ; preds = %63, %48
  %50 = load i32, ptr %5, align 4, !tbaa !60
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ImGuiContext, ptr %51, i32 0, i32 13
  %53 = getelementptr inbounds %class.ImVector, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !61
  %55 = icmp slt i32 %50, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %49
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %66

57:                                               ; preds = %49
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ImGuiContext, ptr %58, i32 0, i32 13
  %60 = load i32, ptr %5, align 4, !tbaa !60
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP11ImGuiWindowEixEi(ptr noundef nonnull align 8 dereferenceable(16) %59, i32 noundef %60)
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  call void @_Z9IM_DELETEI11ImGuiWindowEvPT_(ptr noundef %62)
  br label %63

63:                                               ; preds = %57
  %64 = load i32, ptr %5, align 4, !tbaa !60
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %5, align 4, !tbaa !60
  br label %49, !llvm.loop !62

66:                                               ; preds = %56
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ImGuiContext, ptr %67, i32 0, i32 13
  call void @_ZN8ImVectorIP11ImGuiWindowE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %68)
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ImGuiContext, ptr %69, i32 0, i32 14
  call void @_ZN8ImVectorIP11ImGuiWindowE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %70)
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ImGuiContext, ptr %71, i32 0, i32 19
  store ptr null, ptr %72, align 8, !tbaa !64
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ImGuiContext, ptr %73, i32 0, i32 15
  call void @_ZN8ImVectorIP11ImGuiWindowE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %74)
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImGuiContext, ptr %75, i32 0, i32 16
  call void @_ZN12ImGuiStorage5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %76)
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ImGuiContext, ptr %77, i32 0, i32 55
  store ptr null, ptr %78, align 8, !tbaa !65
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ImGuiContext, ptr %79, i32 0, i32 20
  store ptr null, ptr %80, align 8, !tbaa !66
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ImGuiContext, ptr %81, i32 0, i32 21
  store ptr null, ptr %82, align 8, !tbaa !67
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ImGuiContext, ptr %83, i32 0, i32 40
  store ptr null, ptr %84, align 8, !tbaa !68
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ImGuiContext, ptr %85, i32 0, i32 39
  store ptr null, ptr %86, align 8, !tbaa !69
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ImGuiContext, ptr %87, i32 0, i32 45
  store ptr null, ptr %88, align 8, !tbaa !70
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ImGuiContext, ptr %89, i32 0, i32 46
  call void @_ZN8ImVectorI11ImGuiColModE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %90)
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ImGuiContext, ptr %91, i32 0, i32 47
  call void @_ZN8ImVectorI13ImGuiStyleModE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %92)
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ImGuiContext, ptr %93, i32 0, i32 48
  call void @_ZN8ImVectorIP6ImFontE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %94)
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ImGuiContext, ptr %95, i32 0, i32 49
  call void @_ZN8ImVectorI13ImGuiPopupRefE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %96)
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ImGuiContext, ptr %97, i32 0, i32 50
  call void @_ZN8ImVectorI13ImGuiPopupRefE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %98)
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.ImGuiContext, ptr %99, i32 0, i32 96
  call void @_ZN17ImDrawDataBuilder15ClearFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(32) %100)
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ImGuiContext, ptr %101, i32 0, i32 99
  call void @_ZN10ImDrawList15ClearFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(168) %102)
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ImGuiContext, ptr %103, i32 0, i32 126
  call void @_ZN8ImVectorIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %104)
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ImGuiContext, ptr %105, i32 0, i32 115
  %107 = getelementptr inbounds %struct.ImGuiTextEditState, ptr %106, i32 0, i32 2
  call void @_ZN8ImVectorItE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %107)
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ImGuiContext, ptr %108, i32 0, i32 115
  %110 = getelementptr inbounds %struct.ImGuiTextEditState, ptr %109, i32 0, i32 3
  call void @_ZN8ImVectorIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %110)
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ImGuiContext, ptr %111, i32 0, i32 115
  %113 = getelementptr inbounds %struct.ImGuiTextEditState, ptr %112, i32 0, i32 4
  call void @_ZN8ImVectorIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %113)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !60
  br label %114

114:                                              ; preds = %129, %66
  %115 = load i32, ptr %6, align 4, !tbaa !60
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ImGuiContext, ptr %116, i32 0, i32 134
  %118 = getelementptr inbounds %class.ImVector.18, ptr %117, i32 0, i32 0
  %119 = load i32, ptr %118, align 8, !tbaa !71
  %120 = icmp slt i32 %115, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %114
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %132

122:                                              ; preds = %114
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ImGuiContext, ptr %123, i32 0, i32 134
  %125 = load i32, ptr %6, align 4, !tbaa !60
  %126 = call noundef nonnull align 8 dereferenceable(29) ptr @_ZN8ImVectorI19ImGuiWindowSettingsEixEi(ptr noundef nonnull align 8 dereferenceable(16) %124, i32 noundef %125)
  %127 = getelementptr inbounds %struct.ImGuiWindowSettings, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !72
  call void @_Z9IM_DELETEIcEvPT_(ptr noundef %128)
  br label %129

129:                                              ; preds = %122
  %130 = load i32, ptr %6, align 4, !tbaa !60
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %6, align 4, !tbaa !60
  br label %114, !llvm.loop !74

132:                                              ; preds = %121
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ImGuiContext, ptr %133, i32 0, i32 134
  call void @_ZN8ImVectorI19ImGuiWindowSettingsE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %134)
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.ImGuiContext, ptr %135, i32 0, i32 133
  call void @_ZN8ImVectorI20ImGuiSettingsHandlerE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %136)
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ImGuiContext, ptr %137, i32 0, i32 137
  %139 = load ptr, ptr %138, align 8, !tbaa !75
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %154

141:                                              ; preds = %132
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ImGuiContext, ptr %142, i32 0, i32 137
  %144 = load ptr, ptr %143, align 8, !tbaa !75
  %145 = load ptr, ptr @stdout, align 8, !tbaa !5
  %146 = icmp ne ptr %144, %145
  br i1 %146, label %147, label %154

147:                                              ; preds = %141
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ImGuiContext, ptr %148, i32 0, i32 137
  %150 = load ptr, ptr %149, align 8, !tbaa !75
  %151 = call i32 @fclose(ptr noundef %150)
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.ImGuiContext, ptr %152, i32 0, i32 137
  store ptr null, ptr %153, align 8, !tbaa !75
  br label %154

154:                                              ; preds = %147, %141, %132
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.ImGuiContext, ptr %155, i32 0, i32 138
  call void @_ZN15ImGuiTextBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %156)
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ImGuiContext, ptr %157, i32 0, i32 0
  store i8 0, ptr %158, align 8, !tbaa !57
  store i32 0, ptr %4, align 4
  br label %159

159:                                              ; preds = %154, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %160 = load i32, ptr %4, align 4
  switch i32 %160, label %162 [
    i32 0, label %161
    i32 1, label %161
  ]

161:                                              ; preds = %159, %159
  ret void

162:                                              ; preds = %159
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN10ImDrawList15ClearFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(168)) #1

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

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

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

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

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

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

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

!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, !6, i64 160}
!10 = !{!"_ZTS12ImGuiContext", !11, i64 0, !11, i64 1, !12, i64 8, !16, i64 5408, !6, i64 6232, !15, i64 6240, !15, i64 6244, !17, i64 6248, !15, i64 6384, !13, i64 6388, !13, i64 6392, !13, i64 6396, !19, i64 6400, !19, i64 6416, !19, i64 6432, !20, i64 6448, !13, i64 6464, !6, i64 6472, !6, i64 6480, !6, i64 6488, !13, i64 6496, !11, i64 6500, !13, i64 6504, !15, i64 6508, !13, i64 6512, !13, i64 6516, !15, i64 6520, !11, i64 6524, !11, i64 6525, !11, i64 6526, !11, i64 6527, !11, i64 6528, !11, i64 6529, !13, i64 6532, !14, i64 6536, !6, i64 6544, !6, i64 6552, !22, i64 6560, !13, i64 6564, !15, i64 6568, !6, i64 6576, !23, i64 6584, !24, i64 6600, !25, i64 6616, !26, i64 6632, !26, i64 6648, !27, i64 6664, !11, i64 6776, !13, i64 6780, !6, i64 6784, !13, i64 6792, !13, i64 6796, !13, i64 6800, !13, i64 6804, !13, i64 6808, !13, i64 6812, !13, i64 6816, !13, i64 6820, !22, i64 6824, !28, i64 6828, !13, i64 6844, !6, i64 6848, !15, i64 6856, !15, i64 6860, !11, i64 6864, !13, i64 6868, !13, i64 6872, !11, i64 6876, !11, i64 6877, !11, i64 6878, !11, i64 6879, !11, i64 6880, !11, i64 6881, !11, i64 6882, !13, i64 6884, !28, i64 6888, !11, i64 6904, !11, i64 6905, !13, i64 6908, !29, i64 6912, !13, i64 6916, !13, i64 6920, !13, i64 6924, !30, i64 6928, !30, i64 6976, !30, i64 7024, !31, i64 7072, !32, i64 7120, !15, i64 7152, !33, i64 7160, !13, i64 7328, !11, i64 7332, !13, i64 7336, !13, i64 7340, !41, i64 7344, !28, i64 7408, !13, i64 7424, !13, i64 7428, !15, i64 7432, !13, i64 7436, !13, i64 7440, !13, i64 7444, !42, i64 7448, !7, i64 7464, !43, i64 7472, !48, i64 11176, !13, i64 11288, !13, i64 11292, !18, i64 11296, !11, i64 11312, !15, i64 11316, !15, i64 11320, !14, i64 11324, !13, i64 11332, !44, i64 11336, !14, i64 11352, !14, i64 11360, !11, i64 11368, !15, i64 11372, !51, i64 11376, !52, i64 11392, !53, i64 11408, !11, i64 11424, !6, i64 11432, !51, i64 11440, !13, i64 11456, !13, i64 11460, !7, i64 11464, !13, i64 11944, !15, i64 11948, !13, i64 11952, !13, i64 11956, !13, i64 11960, !7, i64 11964}
!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 136, !15, i64 140, !6, i64 144, !6, i64 152, !15, i64 160, !11, i64 164, !6, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !11, i64 200, !11, i64 201, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !14, i64 256, !7, i64 264, !15, i64 272, !15, i64 276, !11, i64 280, !11, i64 281, !11, i64 282, !11, i64 283, !11, i64 284, !7, i64 285, !7, i64 798, !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, !14, i64 940, !14, i64 948, !7, i64 956, !7, i64 996, !7, i64 1016, !7, i64 1021, !7, i64 1026, !7, i64 1031, !7, i64 1036, !7, i64 1056, !7, i64 1076, !7, i64 1116, !7, i64 1136, !7, i64 3184, !7, i64 5232, !7, i64 5316}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTS10ImGuiStyle", !15, i64 0, !14, i64 4, !15, i64 12, !15, i64 16, !14, i64 20, !14, i64 28, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !14, i64 52, !15, i64 60, !15, i64 64, !14, i64 68, !14, i64 76, !14, i64 84, !15, i64 92, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112, !14, i64 116, !14, i64 124, !14, i64 132, !15, i64 140, !11, i64 144, !11, i64 145, !15, i64 148, !7, i64 152}
!17 = !{!"_ZTS20ImDrawListSharedData", !14, i64 0, !6, i64 8, !15, i64 16, !15, i64 20, !18, i64 24, !7, i64 40}
!18 = !{!"_ZTS6ImVec4", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!19 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !13, i64 0, !13, i64 4, !6, i64 8}
!20 = !{!"_ZTS12ImGuiStorage", !21, i64 0}
!21 = !{!"_ZTS8ImVectorIN12ImGuiStorage4PairEE", !13, i64 0, !13, i64 4, !6, i64 8}
!22 = !{!"_ZTS16ImGuiInputSource", !7, i64 0}
!23 = !{!"_ZTS8ImVectorI11ImGuiColModE", !13, i64 0, !13, i64 4, !6, i64 8}
!24 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !13, i64 0, !13, i64 4, !6, i64 8}
!25 = !{!"_ZTS8ImVectorIP6ImFontE", !13, i64 0, !13, i64 4, !6, i64 8}
!26 = !{!"_ZTS8ImVectorI13ImGuiPopupRefE", !13, i64 0, !13, i64 4, !6, i64 8}
!27 = !{!"_ZTS19ImGuiNextWindowData", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !14, i64 28, !14, i64 36, !14, i64 44, !14, i64 52, !11, i64 60, !28, i64 64, !6, i64 80, !6, i64 88, !15, i64 96, !14, i64 100}
!28 = !{!"_ZTS6ImRect", !14, i64 0, !14, i64 8}
!29 = !{!"_ZTS15ImGuiNavForward", !7, i64 0}
!30 = !{!"_ZTS18ImGuiNavMoveResult", !13, i64 0, !6, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !28, i64 28}
!31 = !{!"_ZTS10ImDrawData", !11, i64 0, !6, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !14, i64 28, !14, i64 36}
!32 = !{!"_ZTS17ImDrawDataBuilder", !7, i64 0}
!33 = !{!"_ZTS10ImDrawList", !34, i64 0, !35, i64 16, !36, i64 32, !13, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !6, i64 80, !6, i64 88, !37, i64 96, !38, i64 112, !39, i64 128, !13, i64 144, !13, i64 148, !40, i64 152}
!34 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !13, i64 0, !13, i64 4, !6, i64 8}
!35 = !{!"_ZTS8ImVectorItE", !13, i64 0, !13, i64 4, !6, i64 8}
!36 = !{!"_ZTS8ImVectorI10ImDrawVertE", !13, i64 0, !13, i64 4, !6, i64 8}
!37 = !{!"_ZTS8ImVectorI6ImVec4E", !13, i64 0, !13, i64 4, !6, i64 8}
!38 = !{!"_ZTS8ImVectorIPvE", !13, i64 0, !13, i64 4, !6, i64 8}
!39 = !{!"_ZTS8ImVectorI6ImVec2E", !13, i64 0, !13, i64 4, !6, i64 8}
!40 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !13, i64 0, !13, i64 4, !6, i64 8}
!41 = !{!"_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}
!42 = !{!"_ZTS8ImVectorIhE", !13, i64 0, !13, i64 4, !6, i64 8}
!43 = !{!"_ZTS18ImGuiTextEditState", !13, i64 0, !35, i64 8, !44, i64 24, !44, i64 40, !13, i64 56, !13, i64 60, !13, i64 64, !15, i64 68, !45, i64 72, !15, i64 3692, !11, i64 3696, !11, i64 3697}
!44 = !{!"_ZTS8ImVectorIcE", !13, i64 0, !13, i64 4, !6, i64 8}
!45 = !{!"_ZTSN8ImGuiStb17STB_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, !46, i64 24}
!46 = !{!"_ZTSN8ImGuiStb12StbUndoStateE", !7, i64 0, !7, i64 1584, !47, i64 3582, !47, i64 3584, !13, i64 3588, !13, i64 3592}
!47 = !{!"short", !7, i64 0}
!48 = !{!"_ZTS6ImFont", !15, i64 0, !15, i64 4, !14, i64 8, !49, i64 16, !50, i64 32, !35, i64 48, !6, i64 64, !15, i64 72, !47, i64 76, !47, i64 78, !6, i64 80, !6, i64 88, !15, i64 96, !15, i64 100, !11, i64 104, !13, i64 108}
!49 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !13, i64 0, !13, i64 4, !6, i64 8}
!50 = !{!"_ZTS8ImVectorIfE", !13, i64 0, !13, i64 4, !6, i64 8}
!51 = !{!"_ZTS15ImGuiTextBuffer", !44, i64 0}
!52 = !{!"_ZTS8ImVectorI20ImGuiSettingsHandlerE", !13, i64 0, !13, i64 4, !6, i64 8}
!53 = !{!"_ZTS8ImVectorI19ImGuiWindowSettingsE", !13, i64 0, !13, i64 4, !6, i64 8}
!54 = !{!10, !11, i64 1}
!55 = !{i8 0, i8 2}
!56 = !{}
!57 = !{!10, !11, i64 0}
!58 = !{!10, !11, i64 11368}
!59 = !{!10, !6, i64 32}
!60 = !{!13, !13, i64 0}
!61 = !{!10, !13, i64 6400}
!62 = distinct !{!62, !63}
!63 = !{!"llvm.loop.mustprogress"}
!64 = !{!10, !6, i64 6472}
!65 = !{!10, !6, i64 6784}
!66 = !{!10, !6, i64 6480}
!67 = !{!10, !6, i64 6488}
!68 = !{!10, !6, i64 6552}
!69 = !{!10, !6, i64 6544}
!70 = !{!10, !6, i64 6576}
!71 = !{!10, !13, i64 11408}
!72 = !{!73, !6, i64 0}
!73 = !{!"_ZTS19ImGuiWindowSettings", !6, i64 0, !13, i64 8, !14, i64 12, !14, i64 20, !11, i64 28}
!74 = distinct !{!74, !63}
!75 = !{!10, !6, i64 11432}


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

@stdout = external local_unnamed_addr global ptr, align 8

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui8ShutdownEP12ImGuiContext(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 160
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %9, label %4

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 1
  %6 = load i8, ptr %5, align 1, !tbaa !53, !range !54, !noundef !55
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %8, label %9

8:                                                ; preds = %4
  tail call void @_Z9IM_DELETEI11ImFontAtlasEvPT_(ptr noundef nonnull %3)
  br label %9

9:                                                ; preds = %8, %4, %1
  store ptr null, ptr %2, align 8, !tbaa !5
  %10 = load i8, ptr %0, align 8, !tbaa !56, !range !54, !noundef !55
  %11 = trunc nuw i8 %10 to i1
  br i1 %11, label %12, label %64

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 11368
  %14 = load i8, ptr %13, align 8, !tbaa !57, !range !54, !noundef !55
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %16, label %20

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  %18 = load ptr, ptr %17, align 8, !tbaa !58
  %.not52 = icmp eq ptr %18, null
  br i1 %.not52, label %20, label %19

19:                                               ; preds = %16
  tail call void @_ZN5ImGui21SaveIniSettingsToDiskEPKc(ptr noundef nonnull %18)
  br label %20

20:                                               ; preds = %19, %16, %12
  %21 = getelementptr inbounds i8, ptr %0, i64 6400
  %22 = load i32, ptr %21, align 8, !tbaa !59
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %20
  tail call void @_ZN8ImVectorIP11ImGuiWindowE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %24 = getelementptr inbounds i8, ptr %0, i64 6416
  tail call void @_ZN8ImVectorIP11ImGuiWindowE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %24)
  %25 = getelementptr inbounds i8, ptr %0, i64 6472
  store ptr null, ptr %25, align 8, !tbaa !60
  %26 = getelementptr inbounds i8, ptr %0, i64 6432
  tail call void @_ZN8ImVectorIP11ImGuiWindowE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %27 = getelementptr inbounds i8, ptr %0, i64 6448
  tail call void @_ZN12ImGuiStorage5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %28 = getelementptr inbounds i8, ptr %0, i64 6784
  store ptr null, ptr %28, align 8, !tbaa !61
  %29 = getelementptr inbounds i8, ptr %0, i64 6480
  %30 = getelementptr inbounds i8, ptr %0, i64 6544
  %31 = getelementptr inbounds i8, ptr %0, i64 6576
  store ptr null, ptr %31, align 8, !tbaa !62
  %32 = getelementptr inbounds i8, ptr %0, i64 6584
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %29, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %30, i8 0, i64 16, i1 false)
  tail call void @_ZN8ImVectorI11ImGuiColModE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %32)
  %33 = getelementptr inbounds i8, ptr %0, i64 6600
  tail call void @_ZN8ImVectorI13ImGuiStyleModE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %33)
  %34 = getelementptr inbounds i8, ptr %0, i64 6616
  tail call void @_ZN8ImVectorIP6ImFontE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %34)
  %35 = getelementptr inbounds i8, ptr %0, i64 6632
  tail call void @_ZN8ImVectorI13ImGuiPopupRefE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %35)
  %36 = getelementptr inbounds i8, ptr %0, i64 6648
  tail call void @_ZN8ImVectorI13ImGuiPopupRefE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %36)
  %37 = getelementptr inbounds i8, ptr %0, i64 7120
  tail call void @_ZN17ImDrawDataBuilder15ClearFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(32) %37)
  %38 = getelementptr inbounds i8, ptr %0, i64 7160
  tail call void @_ZN10ImDrawList15ClearFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(168) %38)
  %39 = getelementptr inbounds i8, ptr %0, i64 11336
  tail call void @_ZN8ImVectorIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
  %40 = getelementptr inbounds i8, ptr %0, i64 7480
  tail call void @_ZN8ImVectorItE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %40)
  %41 = getelementptr inbounds i8, ptr %0, i64 7496
  tail call void @_ZN8ImVectorIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
  %42 = getelementptr inbounds i8, ptr %0, i64 7512
  tail call void @_ZN8ImVectorIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %42)
  %43 = getelementptr inbounds i8, ptr %0, i64 11408
  %44 = load i32, ptr %43, align 8, !tbaa !63
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph59, label %._crit_edge60

.lr.ph:                                           ; preds = %20, %.lr.ph
  %.04856 = phi i32 [ %48, %.lr.ph ], [ 0, %20 ]
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP11ImGuiWindowEixEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %.04856)
  %47 = load ptr, ptr %46, align 8, !tbaa !64
  tail call void @_Z9IM_DELETEI11ImGuiWindowEvPT_(ptr noundef %47)
  %48 = add nuw nsw i32 %.04856, 1
  %49 = load i32, ptr %21, align 8, !tbaa !59
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !65

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge
  tail call void @_ZN8ImVectorI19ImGuiWindowSettingsE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %43)
  %51 = getelementptr inbounds i8, ptr %0, i64 11392
  tail call void @_ZN8ImVectorI20ImGuiSettingsHandlerE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %51)
  %52 = getelementptr inbounds i8, ptr %0, i64 11432
  %53 = load ptr, ptr %52, align 8, !tbaa !67
  %.not53 = icmp eq ptr %53, null
  %54 = load ptr, ptr @stdout, align 8
  %.not54 = icmp eq ptr %53, %54
  %or.cond = select i1 %.not53, i1 true, i1 %.not54
  br i1 %or.cond, label %62, label %60

.lr.ph59:                                         ; preds = %._crit_edge, %.lr.ph59
  %.057 = phi i32 [ %57, %.lr.ph59 ], [ 0, %._crit_edge ]
  %55 = tail call noundef nonnull align 8 dereferenceable(29) ptr @_ZN8ImVectorI19ImGuiWindowSettingsEixEi(ptr noundef nonnull align 8 dereferenceable(16) %43, i32 noundef %.057)
  %56 = load ptr, ptr %55, align 8, !tbaa !68
  tail call void @_Z9IM_DELETEIcEvPT_(ptr noundef %56)
  %57 = add nuw nsw i32 %.057, 1
  %58 = load i32, ptr %43, align 8, !tbaa !63
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %.lr.ph59, label %._crit_edge60, !llvm.loop !70

60:                                               ; preds = %._crit_edge60
  %61 = tail call i32 @fclose(ptr noundef nonnull %53)
  store ptr null, ptr %52, align 8, !tbaa !67
  br label %62

62:                                               ; preds = %60, %._crit_edge60
  %63 = getelementptr inbounds i8, ptr %0, i64 11440
  tail call void @_ZN15ImGuiTextBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %63)
  store i8 0, ptr %0, align 8, !tbaa !56
  br label %64

64:                                               ; preds = %9, %62
  ret void
}

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN10ImDrawList15ClearFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #4

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

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

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

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

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

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

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

attributes #0 = { nofree 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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, !14, i64 160}
!6 = !{!"_ZTS12ImGuiContext", !7, i64 0, !7, i64 1, !10, i64 8, !15, i64 5408, !14, i64 6232, !13, i64 6240, !13, i64 6244, !16, i64 6248, !13, i64 6384, !11, i64 6388, !11, i64 6392, !11, i64 6396, !18, i64 6400, !18, i64 6416, !18, i64 6432, !19, i64 6448, !11, i64 6464, !14, i64 6472, !14, i64 6480, !14, i64 6488, !11, i64 6496, !7, i64 6500, !11, i64 6504, !13, i64 6508, !11, i64 6512, !11, i64 6516, !13, i64 6520, !7, i64 6524, !7, i64 6525, !7, i64 6526, !7, i64 6527, !7, i64 6528, !7, i64 6529, !11, i64 6532, !12, i64 6536, !14, i64 6544, !14, i64 6552, !21, i64 6560, !11, i64 6564, !13, i64 6568, !14, i64 6576, !22, i64 6584, !23, i64 6600, !24, i64 6616, !25, i64 6632, !25, i64 6648, !26, i64 6664, !7, i64 6776, !11, i64 6780, !14, i64 6784, !11, i64 6792, !11, i64 6796, !11, i64 6800, !11, i64 6804, !11, i64 6808, !11, i64 6812, !11, i64 6816, !11, i64 6820, !21, i64 6824, !27, i64 6828, !11, i64 6844, !14, i64 6848, !13, i64 6856, !13, i64 6860, !7, i64 6864, !11, i64 6868, !11, i64 6872, !7, i64 6876, !7, i64 6877, !7, i64 6878, !7, i64 6879, !7, i64 6880, !7, i64 6881, !7, i64 6882, !11, i64 6884, !27, i64 6888, !7, i64 6904, !7, i64 6905, !11, i64 6908, !28, i64 6912, !11, i64 6916, !11, i64 6920, !11, i64 6924, !29, i64 6928, !29, i64 6976, !29, i64 7024, !30, i64 7072, !31, i64 7120, !13, i64 7152, !32, i64 7160, !11, i64 7328, !7, i64 7332, !11, i64 7336, !11, i64 7340, !40, i64 7344, !27, i64 7408, !11, i64 7424, !11, i64 7428, !13, i64 7432, !11, i64 7436, !11, i64 7440, !11, i64 7444, !41, i64 7448, !8, i64 7464, !42, i64 7472, !47, i64 11176, !11, i64 11288, !11, i64 11292, !17, i64 11296, !7, i64 11312, !13, i64 11316, !13, i64 11320, !12, i64 11324, !11, i64 11332, !43, i64 11336, !12, i64 11352, !12, i64 11360, !7, i64 11368, !13, i64 11372, !50, i64 11376, !51, i64 11392, !52, i64 11408, !7, i64 11424, !14, i64 11432, !50, i64 11440, !11, i64 11456, !11, i64 11460, !8, i64 11464, !11, i64 11944, !13, i64 11948, !11, i64 11952, !11, i64 11956, !11, i64 11960, !8, i64 11964}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS7ImGuiIO", !11, i64 0, !11, i64 4, !12, i64 8, !13, i64 16, !13, i64 20, !14, i64 24, !14, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !8, i64 52, !13, i64 136, !13, i64 140, !14, i64 144, !14, i64 152, !13, i64 160, !7, i64 164, !14, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !7, i64 200, !7, i64 201, !14, i64 208, !14, i64 216, !14, i64 224, !14, i64 232, !14, i64 240, !14, i64 248, !12, i64 256, !8, i64 264, !13, i64 272, !13, i64 276, !7, i64 280, !7, i64 281, !7, i64 282, !7, i64 283, !7, i64 284, !8, i64 285, !8, i64 798, !8, i64 832, !7, i64 916, !7, i64 917, !7, i64 918, !7, i64 919, !7, i64 920, !7, i64 921, !7, i64 922, !13, i64 924, !11, i64 928, !11, i64 932, !11, i64 936, !12, i64 940, !12, i64 948, !8, i64 956, !8, i64 996, !8, i64 1016, !8, i64 1021, !8, i64 1026, !8, i64 1031, !8, i64 1036, !8, i64 1056, !8, i64 1076, !8, i64 1116, !8, i64 1136, !8, i64 3184, !8, i64 5232, !8, i64 5316}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !8, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTS10ImGuiStyle", !13, i64 0, !12, i64 4, !13, i64 12, !13, i64 16, !12, i64 20, !12, i64 28, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !12, i64 52, !13, i64 60, !13, i64 64, !12, i64 68, !12, i64 76, !12, i64 84, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !12, i64 116, !12, i64 124, !12, i64 132, !13, i64 140, !7, i64 144, !7, i64 145, !13, i64 148, !8, i64 152}
!16 = !{!"_ZTS20ImDrawListSharedData", !12, i64 0, !14, i64 8, !13, i64 16, !13, i64 20, !17, i64 24, !8, i64 40}
!17 = !{!"_ZTS6ImVec4", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!18 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !11, i64 0, !11, i64 4, !14, i64 8}
!19 = !{!"_ZTS12ImGuiStorage", !20, i64 0}
!20 = !{!"_ZTS8ImVectorIN12ImGuiStorage4PairEE", !11, i64 0, !11, i64 4, !14, i64 8}
!21 = !{!"_ZTS16ImGuiInputSource", !8, i64 0}
!22 = !{!"_ZTS8ImVectorI11ImGuiColModE", !11, i64 0, !11, i64 4, !14, i64 8}
!23 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !11, i64 0, !11, i64 4, !14, i64 8}
!24 = !{!"_ZTS8ImVectorIP6ImFontE", !11, i64 0, !11, i64 4, !14, i64 8}
!25 = !{!"_ZTS8ImVectorI13ImGuiPopupRefE", !11, i64 0, !11, i64 4, !14, i64 8}
!26 = !{!"_ZTS19ImGuiNextWindowData", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 28, !12, i64 36, !12, i64 44, !12, i64 52, !7, i64 60, !27, i64 64, !14, i64 80, !14, i64 88, !13, i64 96, !12, i64 100}
!27 = !{!"_ZTS6ImRect", !12, i64 0, !12, i64 8}
!28 = !{!"_ZTS15ImGuiNavForward", !8, i64 0}
!29 = !{!"_ZTS18ImGuiNavMoveResult", !11, i64 0, !14, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !27, i64 28}
!30 = !{!"_ZTS10ImDrawData", !7, i64 0, !14, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 28, !12, i64 36}
!31 = !{!"_ZTS17ImDrawDataBuilder", !8, i64 0}
!32 = !{!"_ZTS10ImDrawList", !33, i64 0, !34, i64 16, !35, i64 32, !11, i64 48, !14, i64 56, !14, i64 64, !11, i64 72, !14, i64 80, !14, i64 88, !36, i64 96, !37, i64 112, !38, i64 128, !11, i64 144, !11, i64 148, !39, i64 152}
!33 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !11, i64 0, !11, i64 4, !14, i64 8}
!34 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !14, i64 8}
!35 = !{!"_ZTS8ImVectorI10ImDrawVertE", !11, i64 0, !11, i64 4, !14, i64 8}
!36 = !{!"_ZTS8ImVectorI6ImVec4E", !11, i64 0, !11, i64 4, !14, i64 8}
!37 = !{!"_ZTS8ImVectorIPvE", !11, i64 0, !11, i64 4, !14, i64 8}
!38 = !{!"_ZTS8ImVectorI6ImVec2E", !11, i64 0, !11, i64 4, !14, i64 8}
!39 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !11, i64 0, !11, i64 4, !14, i64 8}
!40 = !{!"_ZTS12ImGuiPayload", !14, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !8, i64 24, !7, i64 57, !7, i64 58}
!41 = !{!"_ZTS8ImVectorIhE", !11, i64 0, !11, i64 4, !14, i64 8}
!42 = !{!"_ZTS18ImGuiTextEditState", !11, i64 0, !34, i64 8, !43, i64 24, !43, i64 40, !11, i64 56, !11, i64 60, !11, i64 64, !13, i64 68, !44, i64 72, !13, i64 3692, !7, i64 3696, !7, i64 3697}
!43 = !{!"_ZTS8ImVectorIcE", !11, i64 0, !11, i64 4, !14, i64 8}
!44 = !{!"_ZTSN8ImGuiStb17STB_TexteditStateE", !11, i64 0, !11, i64 4, !11, i64 8, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !8, i64 18, !8, i64 19, !13, i64 20, !45, i64 24}
!45 = !{!"_ZTSN8ImGuiStb12StbUndoStateE", !8, i64 0, !8, i64 1584, !46, i64 3582, !46, i64 3584, !11, i64 3588, !11, i64 3592}
!46 = !{!"short", !8, i64 0}
!47 = !{!"_ZTS6ImFont", !13, i64 0, !13, i64 4, !12, i64 8, !48, i64 16, !49, i64 32, !34, i64 48, !14, i64 64, !13, i64 72, !46, i64 76, !46, i64 78, !14, i64 80, !14, i64 88, !13, i64 96, !13, i64 100, !7, i64 104, !11, i64 108}
!48 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !11, i64 0, !11, i64 4, !14, i64 8}
!49 = !{!"_ZTS8ImVectorIfE", !11, i64 0, !11, i64 4, !14, i64 8}
!50 = !{!"_ZTS15ImGuiTextBuffer", !43, i64 0}
!51 = !{!"_ZTS8ImVectorI20ImGuiSettingsHandlerE", !11, i64 0, !11, i64 4, !14, i64 8}
!52 = !{!"_ZTS8ImVectorI19ImGuiWindowSettingsE", !11, i64 0, !11, i64 4, !14, i64 8}
!53 = !{!6, !7, i64 1}
!54 = !{i8 0, i8 2}
!55 = !{}
!56 = !{!6, !7, i64 0}
!57 = !{!6, !7, i64 11368}
!58 = !{!6, !14, i64 32}
!59 = !{!6, !11, i64 6400}
!60 = !{!6, !14, i64 6472}
!61 = !{!6, !14, i64 6784}
!62 = !{!6, !14, i64 6576}
!63 = !{!6, !11, i64 11408}
!64 = !{!14, !14, i64 0}
!65 = distinct !{!65, !66}
!66 = !{!"llvm.loop.mustprogress"}
!67 = !{!6, !14, i64 11432}
!68 = !{!69, !14, i64 0}
!69 = !{!"_ZTS19ImGuiWindowSettings", !14, i64 0, !11, i64 8, !12, i64 12, !12, i64 20, !7, i64 28}
!70 = distinct !{!70, !66}


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